// Universal Media Player
// Build Date: 2026-08-20T18:14:30.195Z
// Commit: 65da2678cf5608f632907a3051fbeb0c310a1962
// Build Number: 20260820.01

/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let VL=class extends Event{constructor(a,s,c,f){super("context-request",{bubbles:!0,composed:!0}),this.context=a,this.contextTarget=s,this.callback=c,this.subscribe=f??!1}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 *//**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let $L=class{constructor(a,s,c,f){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(d,v)=>{this.unsubscribe&&(this.unsubscribe!==v&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=d,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(d,v)),this.unsubscribe=v},this.host=a,s.context!==void 0){const d=s;this.context=d.context,this.callback=d.callback,this.subscribe=d.subscribe??!1}else this.context=s,this.callback=c,this.subscribe=f??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new VL(this.context,this.host,this.t,this.subscribe))}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let cX=class{get value(){return this.o}set value(a){this.setValue(a)}setValue(a,s=!1){const c=s||!Object.is(a,this.o);this.o=a,c&&this.updateObservers()}constructor(a){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:c}]of this.subscriptions)s(this.o,c)},a!==void 0&&(this.value=a)}addCallback(a,s,c){if(!c)return void a(this.value);this.subscriptions.has(a)||this.subscriptions.set(a,{disposer:()=>{this.subscriptions.delete(a)},consumerHost:s});const{disposer:f}=this.subscriptions.get(a);a(this.value,f)}clearCallbacks(){this.subscriptions.clear()}};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let dX=class extends Event{constructor(a,s){super("context-provider",{bubbles:!0,composed:!0}),this.context=a,this.contextTarget=s}},hS=class extends cX{constructor(a,s,c){var f,d;super(s.context!==void 0?s.initialValue:c),this.onContextRequest=v=>{if(v.context!==this.context)return;const y=v.contextTarget??v.composedPath()[0];y!==this.host&&(v.stopPropagation(),this.addCallback(v.callback,y,v.subscribe))},this.onProviderRequest=v=>{if(v.context!==this.context||(v.contextTarget??v.composedPath()[0])===this.host)return;const y=new Set;for(const[g,{consumerHost:C}]of this.subscriptions)y.has(g)||(y.add(g),C.dispatchEvent(new VL(this.context,C,g,!0)));v.stopPropagation()},this.host=a,s.context!==void 0?this.context=s.context:this.context=s,this.attachListeners(),(d=(f=this.host).addController)==null||d.call(f,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new dX(this.context,this.host))}};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function fX({context:a}){return(s,c)=>{const f=new WeakMap;if(typeof c=="object")return{get(){return s.get.call(this)},set(d){return f.get(this).setValue(d),s.set.call(this,d)},init(d){return f.set(this,new hS(this,{context:a,initialValue:d})),d}};{s.constructor.addInitializer((y=>{f.set(y,new hS(y,{context:a}))}));const d=Object.getOwnPropertyDescriptor(s,c);let v;if(d===void 0){const y=new WeakMap;v={get(){return y.get(this)},set(g){f.get(this).setValue(g),y.set(this,g)},configurable:!0,enumerable:!0}}else{const y=d.set;v={...d,set(g){f.get(this).setValue(g),y?.call(this,g)}}}return void Object.defineProperty(s,c,v)}}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function Rr({context:a,subscribe:s}){return(c,f)=>{typeof f=="object"?f.addInitializer((function(){new $L(this,{context:a,callback:d=>{c.set.call(this,d)},subscribe:s})})):c.constructor.addInitializer((d=>{new $L(d,{context:a,callback:v=>{d[f]=v},subscribe:s})}))}}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const pS="lit-localize-status";/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const hX=(a,...s)=>({strTag:!0,strings:a,values:s}),ic=hX,pX=a=>typeof a!="string"&&"strTag"in a,zL=(a,s,c)=>{let f=a[0];for(let d=1;d<a.length;d++)f+=s[c?c[d-1]:d-1],f+=a[d];return f};/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const HL=(a=>pX(a)?zL(a.strings,a.values):a);let ue=HL,qL=!1;function gX(a){if(qL)throw new Error("lit-localize can only be configured once");ue=a,qL=!0}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class mX{constructor(s){this.__litLocalizeEventHandler=c=>{c.detail.status==="ready"&&this.host.requestUpdate()},this.host=s}hostConnected(){window.addEventListener(pS,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pS,this.__litLocalizeEventHandler)}}const vX=a=>a.addController(new mX(a)),yX=vX;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const gS=()=>(a,s)=>(a.addInitializer(yX),a);/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class GL{constructor(){this.settled=!1,this.promise=new Promise((s,c)=>{this._resolve=s,this._reject=c})}resolve(s){this.settled=!0,this._resolve(s)}reject(s){this.settled=!0,this._reject(s)}}/**
 * @license
 * Copyright 2014 Travis Webb
 * SPDX-License-Identifier: MIT
 */const Ws=[];for(let a=0;a<256;a++)Ws[a]=(a>>4&15).toString(16)+(a&15).toString(16);function bX(a){let s=0,c=8997,f=0,d=33826,v=0,y=40164,g=0,C=52210;for(let E=0;E<a.length;E++)c^=a.charCodeAt(E),s=c*435,f=d*435,v=y*435,g=C*435,v+=c<<8,g+=d<<8,f+=s>>>16,c=s&65535,v+=f>>>16,d=f&65535,C=g+(v>>>16)&65535,y=v&65535;return Ws[C>>8]+Ws[C&255]+Ws[y>>8]+Ws[y&255]+Ws[d>>8]+Ws[d&255]+Ws[c>>8]+Ws[c&255]}/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const wX="",xX="h",kX="s";function TX(a,s){return(s?xX:kX)+bX(typeof a=="string"?a:a.join(wX))}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const KL=new WeakMap,WL=new Map;function SX(a,s,c){if(a){const f=c?.id??CX(s),d=a[f];if(d){if(typeof d=="string")return d;if("strTag"in d)return zL(d.strings,s.values,d.values);{let v=KL.get(d);return v===void 0&&(v=d.values,KL.set(d,v)),{...d,values:v.map(y=>s.values[y])}}}}return HL(s)}function CX(a){const s=typeof a=="string"?a:a.strings;let c=WL.get(s);return c===void 0&&(c=TX(s,typeof a!="string"&&!("strTag"in a)),WL.set(s,c)),c}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function mS(a){window.dispatchEvent(new CustomEvent(pS,{detail:a}))}let a1="",vS,XL,o1,yS,YL,ac=new GL;ac.resolve();let s1=0;const AX=a=>(gX(((s,c)=>SX(YL,s,c))),a1=XL=a.sourceLocale,o1=new Set(a.targetLocales),o1.add(a.sourceLocale),yS=a.loadLocale,{getLocale:EX,setLocale:IX}),EX=()=>a1,IX=a=>{if(a===(vS??a1))return ac.promise;if(!o1||!yS)throw new Error("Internal error");if(!o1.has(a))throw new Error("Invalid locale code");s1++;const s=s1;return vS=a,ac.settled&&(ac=new GL),mS({status:"loading",loadingLocale:a}),(a===XL?Promise.resolve({templates:void 0}):yS(a)).then(c=>{s1===s&&(a1=a,vS=void 0,YL=c.templates,mS({status:"ready",readyLocale:a}),ac.resolve())},c=>{s1===s&&(mS({status:"error",errorLocale:a,errorMessage:c.toString()}),ac.reject(c))}),ac.promise};var MX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function JL(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var QL={};/*! codem-isoboxer v0.3.10 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */var ZL;function PX(){return ZL||(ZL=1,(function(a){var s={};s.parseBuffer=function(d){return new c(d).parse()},s.addBoxProcessor=function(d,v){typeof d!="string"||typeof v!="function"||(f.prototype._boxProcessors[d]=v)},s.createFile=function(){return new c},s.createBox=function(d,v,y){var g=f.create(d);return v&&v.append(g,y),g},s.createFullBox=function(d,v,y){var g=s.createBox(d,v,y);return g.version=0,g.flags=0,g},s.Utils={},s.Utils.dataViewToString=function(d,v){var y=v||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(y).decode(d);var g=[],C=0;if(y==="utf-8")for(;C<d.byteLength;){var E=d.getUint8(C++);E<128||(E<224?(E=(E&31)<<6,E|=d.getUint8(C++)&63):E<240?(E=(E&15)<<12,E|=(d.getUint8(C++)&63)<<6,E|=d.getUint8(C++)&63):(E=(E&7)<<18,E|=(d.getUint8(C++)&63)<<12,E|=(d.getUint8(C++)&63)<<6,E|=d.getUint8(C++)&63)),g.push(String.fromCharCode(E))}else for(;C<d.byteLength;)g.push(String.fromCharCode(d.getUint8(C++)));return g.join("")},s.Utils.utf8ToByteArray=function(d){var v,y;if(typeof TextEncoder<"u")v=new TextEncoder().encode(d);else for(v=[],y=0;y<d.length;++y){var g=d.charCodeAt(y);g<128?v.push(g):g<2048?(v.push(192|g>>6),v.push(128|63&g)):g<65536?(v.push(224|g>>12),v.push(128|63&g>>6),v.push(128|63&g)):(v.push(240|g>>18),v.push(128|63&g>>12),v.push(128|63&g>>6),v.push(128|63&g))}return v},s.Utils.appendBox=function(d,v,y){if(v._offset=d._cursor.offset,v._root=d._root?d._root:d,v._raw=d._raw,v._parent=d,y!==-1){if(y==null){d.boxes.push(v);return}var g=-1,C;if(typeof y=="number")g=y;else{if(typeof y=="string")C=y;else if(typeof y=="object"&&y.type)C=y.type;else{d.boxes.push(v);return}for(var E=0;E<d.boxes.length;E++)if(C===d.boxes[E].type){g=E+1;break}}d.boxes.splice(g,0,v)}},a.parseBuffer=s.parseBuffer,a.addBoxProcessor=s.addBoxProcessor,a.createFile=s.createFile,a.createBox=s.createBox,a.createFullBox=s.createFullBox,a.Utils=s.Utils,s.Cursor=function(d){this.offset=typeof d>"u"?0:d};var c=function(d){this._cursor=new s.Cursor,this.boxes=[],d&&(this._raw=new DataView(d))};c.prototype.fetch=function(d){var v=this.fetchAll(d,!0);return v.length?v[0]:null},c.prototype.fetchAll=function(d,v){var y=[];return c._sweep.call(this,d,y,v),y},c.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var d=f.parse(this);if(typeof d.type>"u")break;this.boxes.push(d)}return this},c._sweep=function(d,v,y){this.type&&this.type==d&&v.push(this);for(var g in this.boxes){if(v.length&&y)return;c._sweep.call(this.boxes[g],d,v,y)}},c.prototype.write=function(){var d=0,v;for(v=0;v<this.boxes.length;v++)d+=this.boxes[v].getLength(!1);var y=new Uint8Array(d);for(this._rawo=new DataView(y.buffer),this.bytes=y,this._cursor.offset=0,v=0;v<this.boxes.length;v++)this.boxes[v].write();return y.buffer},c.prototype.append=function(d,v){s.Utils.appendBox(this,d,v)};var f=function(){this._cursor=new s.Cursor};f.parse=function(d){var v=new f;return v._offset=d._cursor.offset,v._root=d._root?d._root:d,v._raw=d._raw,v._parent=d,v._parseBox(),d._cursor.offset=v._raw.byteOffset+v._raw.byteLength,v},f.create=function(d){var v=new f;return v.type=d,v.boxes=[],v},f.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],f.prototype._boxProcessors={},f.prototype._procField=function(d,v,y){this._parsing?this[d]=this._readField(v,y):this._writeField(v,y,this[d])},f.prototype._procFieldArray=function(d,v,y,g){var C;if(this._parsing)for(this[d]=[],C=0;C<v;C++)this[d][C]=this._readField(y,g);else for(C=0;C<this[d].length;C++)this._writeField(y,g,this[d][C])},f.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},f.prototype._procEntries=function(d,v,y){var g;if(this._parsing)for(this[d]=[],g=0;g<v;g++)this[d].push({}),y.call(this,this[d][g]);else for(g=0;g<v;g++)y.call(this,this[d][g])},f.prototype._procSubEntries=function(d,v,y,g){var C;if(this._parsing)for(d[v]=[],C=0;C<y;C++)d[v].push({}),g.call(this,d[v][C]);else for(C=0;C<y;C++)g.call(this,d[v][C])},f.prototype._procEntryField=function(d,v,y,g){this._parsing?d[v]=this._readField(y,g):this._writeField(y,g,d[v])},f.prototype._procSubBoxes=function(d,v){var y;if(this._parsing)for(this[d]=[],y=0;y<v;y++)this[d].push(f.parse(this));else for(y=0;y<v;y++)this._rawo?this[d][y].write():this.size+=this[d][y].getLength()},f.prototype._readField=function(d,v){switch(d){case"uint":return this._readUint(v);case"int":return this._readInt(v);case"template":return this._readTemplate(v);case"string":return v===-1?this._readTerminatedString():this._readString(v);case"data":return this._readData(v);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},f.prototype._readInt=function(d){var v=null,y=this._cursor.offset-this._raw.byteOffset;switch(d){case 8:v=this._raw.getInt8(y);break;case 16:v=this._raw.getInt16(y);break;case 32:v=this._raw.getInt32(y);break;case 64:var g=this._raw.getInt32(y),C=this._raw.getInt32(y+4);v=g*Math.pow(2,32)+C;break}return this._cursor.offset+=d>>3,v},f.prototype._readUint=function(d){var v=null,y=this._cursor.offset-this._raw.byteOffset,g,C;switch(d){case 8:v=this._raw.getUint8(y);break;case 16:v=this._raw.getUint16(y);break;case 24:g=this._raw.getUint16(y),C=this._raw.getUint8(y+2),v=(g<<8)+C;break;case 32:v=this._raw.getUint32(y);break;case 64:g=this._raw.getUint32(y),C=this._raw.getUint32(y+4),v=g*Math.pow(2,32)+C;break}return this._cursor.offset+=d>>3,v},f.prototype._readString=function(d){for(var v="",y=0;y<d;y++){var g=this._readUint(8);v+=String.fromCharCode(g)}return v},f.prototype._readTemplate=function(d){var v=this._readUint(d/2),y=this._readUint(d/2);return v+y/Math.pow(2,d/2)},f.prototype._readTerminatedString=function(){for(var d="";this._cursor.offset-this._offset<this._raw.byteLength;){var v=this._readUint(8);if(v===0)break;d+=String.fromCharCode(v)}return d},f.prototype._readData=function(d){var v=d>0?d:this._raw.byteLength-(this._cursor.offset-this._offset);if(v>0){var y=new Uint8Array(this._raw.buffer,this._cursor.offset,v);return this._cursor.offset+=v,y}else return null},f.prototype._readUTF8String=function(){var d=this._raw.byteLength-(this._cursor.offset-this._offset),v=null;return d>0&&(v=new DataView(this._raw.buffer,this._cursor.offset,d),this._cursor.offset+=d),v&&s.Utils.dataViewToString(v)},f.prototype._readUTF8TerminatedString=function(){var d=this._raw.byteLength-(this._cursor.offset-this._offset),v=null;if(d>0){v=new DataView(this._raw.buffer,this._cursor.offset,d);var y;for(y=0;y<d&&v.getUint8(y)!==0;y++);v=new DataView(this._raw.buffer,this._cursor.offset,y),this._cursor.offset+=Math.min(y+1,d)}return v&&s.Utils.dataViewToString(v)},f.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength){this._root._incomplete=!0;return}switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())},f.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},f.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(f.parse(this))},f.prototype.append=function(d,v){s.Utils.appendBox(this,d,v)},f.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var d=0;d<this.boxes.length;d++)this.size+=this.boxes[d].getLength();return this._data&&this._writeData(this._data),this.size},f.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var d=0;d<this.boxes.length;d++)this.boxes[d].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},f.prototype._writeInt=function(d,v){if(this._rawo){var y=this._cursor.offset-this._rawo.byteOffset;switch(d){case 8:this._rawo.setInt8(y,v);break;case 16:this._rawo.setInt16(y,v);break;case 32:this._rawo.setInt32(y,v);break;case 64:var g=Math.floor(v/Math.pow(2,32)),C=v-g*Math.pow(2,32);this._rawo.setUint32(y,g),this._rawo.setUint32(y+4,C);break}this._cursor.offset+=d>>3}else this.size+=d>>3},f.prototype._writeUint=function(d,v){if(this._rawo){var y=this._cursor.offset-this._rawo.byteOffset,g,C;switch(d){case 8:this._rawo.setUint8(y,v);break;case 16:this._rawo.setUint16(y,v);break;case 24:g=(v&16776960)>>8,C=v&255,this._rawo.setUint16(y,g),this._rawo.setUint8(y+2,C);break;case 32:this._rawo.setUint32(y,v);break;case 64:g=Math.floor(v/Math.pow(2,32)),C=v-g*Math.pow(2,32),this._rawo.setUint32(y,g),this._rawo.setUint32(y+4,C);break}this._cursor.offset+=d>>3}else this.size+=d>>3},f.prototype._writeString=function(d,v){for(var y=0;y<d;y++)this._writeUint(8,v.charCodeAt(y))},f.prototype._writeTerminatedString=function(d){if(d.length!==0){for(var v=0;v<d.length;v++)this._writeUint(8,d.charCodeAt(v));this._writeUint(8,0)}},f.prototype._writeTemplate=function(d,v){var y=Math.floor(v),g=(v-y)*Math.pow(2,d/2);this._writeUint(d/2,y),this._writeUint(d/2,g)},f.prototype._writeData=function(d){var v;if(d)if(this._rawo){if(d instanceof Array){for(var y=this._cursor.offset-this._rawo.byteOffset,v=0;v<d.length;v++)this._rawo.setInt8(y+v,d[v]);this._cursor.offset+=d.length}d instanceof Uint8Array&&(this._root.bytes.set(d,this._cursor.offset),this._cursor.offset+=d.length)}else this.size+=d.length},f.prototype._writeUTF8String=function(d){var v=s.Utils.utf8ToByteArray(d);if(this._rawo)for(var y=new DataView(this._rawo.buffer,this._cursor.offset,v.length),g=0;g<v.length;g++)y.setUint8(g,v[g]);else this.size+=v.length},f.prototype._writeField=function(d,v,y){switch(d){case"uint":this._writeUint(v,y);break;case"int":this._writeInt(v,y);break;case"template":this._writeTemplate(v,y);break;case"string":v==-1?this._writeTerminatedString(y):this._writeString(v,y);break;case"data":this._writeData(y);break;case"utf8":this._writeUTF8String(y);break}},f.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},f.prototype._boxProcessors.avc1=f.prototype._boxProcessors.avc2=f.prototype._boxProcessors.avc3=f.prototype._boxProcessors.avc4=f.prototype._boxProcessors.hvc1=f.prototype._boxProcessors.hev1=f.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},f.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_count","uint",32),this._procEntryField(d,"sample_offset",this.version===1?"int":"uint",32)})},f.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},f.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"segment_duration","uint",this.version===1?64:32),this._procEntryField(d,"media_time","int",this.version===1?64:32),this._procEntryField(d,"media_rate_integer","int",16),this._procEntryField(d,"media_rate_fraction","int",16)})},f.prototype._boxProcessors.emsg=function(){this._procFullBox(),this.version==1?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},f.prototype._boxProcessors.free=f.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},f.prototype._boxProcessors.ftyp=f.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var d=-1;this._parsing&&(d=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",d,"string",4)},f.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},f.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},f.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},f.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=(this.flags&1)!=0,this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},f.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),!this._parsing&&typeof this.language=="string"&&(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode((this.language>>10&31)+96,(this.language>>5&31)+96,(this.language&31)+96)),this._procField("pre_defined","uint",16)},f.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},f.prototype._boxProcessors.meta=function(){this._procFullBox()},f.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},f.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},f.prototype._boxProcessors.mp4a=f.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},f.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},f.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},f.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",this.version==1?64:32)},f.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,function(d){this._procEntryField(d,"entity_id","uint",32)}),this.flags&4096&&this._procField("preselection_tag","utf8string"),this.flags&8192&&this._procField("selection_priority","uint",8),this.flags&16384&&this._procField("interleaving_tag","utf8string")},f.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},f.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),this.flags&1&&this._procField("scheme_uri","string",-1)},f.prototype._boxProcessors.sdtp=function(){this._procFullBox();var d=-1;this._parsing&&(d=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",d,"uint",8)},f.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(d){this._parsing||(d.reference=(d.reference_type&1)<<31,d.reference|=d.referenced_size&2147483647,d.sap=(d.starts_with_SAP&1)<<31,d.sap|=(d.SAP_type&3)<<28,d.sap|=d.SAP_delta_time&268435455),this._procEntryField(d,"reference","uint",32),this._procEntryField(d,"subsegment_duration","uint",32),this._procEntryField(d,"sap","uint",32),this._parsing&&(d.reference_type=d.reference>>31&1,d.referenced_size=d.reference&2147483647,d.starts_with_SAP=d.sap>>31&1,d.SAP_type=d.sap>>28&7,d.SAP_delta_time=d.sap&268435455)})},f.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},f.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(d){this._procEntryField(d,"ranges_count","uint",32),this._procSubEntries(d,"ranges",d.ranges_count,function(v){this._procEntryField(v,"level","uint",8),this._procEntryField(v,"range_size","uint",24)})})},f.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},f.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_count","uint",32),this._procEntryField(d,"sample_delta","uint",32)})},f.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(d){this._procEntryField(d,"sample_delta","uint",32),this._procEntryField(d,"subsample_count","uint",16),this._procSubEntries(d,"subsamples",d.subsample_count,function(v){this._procEntryField(v,"subsample_size","uint",this.version===1?32:16),this._procEntryField(v,"subsample_priority","uint",8),this._procEntryField(v,"discardable","uint",8),this._procEntryField(v,"codec_specific_parameters","uint",32)})})},f.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},f.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},f.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),this.flags&1&&this._procField("base_data_offset","uint",64),this.flags&2&&this._procField("sample_description_offset","uint",32),this.flags&8&&this._procField("default_sample_duration","uint",32),this.flags&16&&this._procField("default_sample_size","uint",32),this.flags&32&&this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(this.length_size_of_traf_num&48)<<4,this.reserved|=(this.length_size_of_trun_num&12)<<2,this.reserved|=this.length_size_of_sample_num&3),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(this.reserved&48)>>4,this.length_size_of_trun_num=(this.reserved&12)>>2,this.length_size_of_sample_num=this.reserved&3),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(d){this._procEntryField(d,"time","uint",this.version===1?64:32),this._procEntryField(d,"moof_offset","uint",this.version===1?64:32),this._procEntryField(d,"traf_number","uint",(this.length_size_of_traf_num+1)*8),this._procEntryField(d,"trun_number","uint",(this.length_size_of_trun_num+1)*8),this._procEntryField(d,"sample_number","uint",(this.length_size_of_sample_num+1)*8)})},f.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},f.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},f.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),this.flags&1&&this._procField("data_offset","int",32),this.flags&4&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(d){this.flags&256&&this._procEntryField(d,"sample_duration","uint",32),this.flags&512&&this._procEntryField(d,"sample_size","uint",32),this.flags&1024&&this._procEntryField(d,"sample_flags","uint",32),this.flags&2048&&this._procEntryField(d,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},f.prototype._boxProcessors["url "]=f.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},f.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},f.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},f.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},f.prototype._boxProcessors.vtte=function(){}})(QL)),QL}var _X=PX();const DX=JL(_X);/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const u1=globalThis,bS=u1.ShadowRoot&&(u1.ShadyCSS===void 0||u1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wS=Symbol(),eR=new WeakMap;let tR=class{constructor(a,s,c){if(this._$cssResult$=!0,c!==wS)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a,this.t=s}get styleSheet(){let a=this.o;const s=this.t;if(bS&&a===void 0){const c=s!==void 0&&s.length===1;c&&(a=eR.get(s)),a===void 0&&((this.o=a=new CSSStyleSheet).replaceSync(this.cssText),c&&eR.set(s,a))}return a}toString(){return this.cssText}};const xS=a=>new tR(typeof a=="string"?a:a+"",void 0,wS),kn=(a,...s)=>{const c=a.length===1?a[0]:s.reduce((f,d,v)=>f+(y=>{if(y._$cssResult$===!0)return y.cssText;if(typeof y=="number")return y;throw Error("Value passed to 'css' function must be a 'css' function result: "+y+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(d)+a[v+1],a[0]);return new tR(c,a,wS)},LX=(a,s)=>{if(bS)a.adoptedStyleSheets=s.map(c=>c instanceof CSSStyleSheet?c:c.styleSheet);else for(const c of s){const f=document.createElement("style"),d=u1.litNonce;d!==void 0&&f.setAttribute("nonce",d),f.textContent=c.cssText,a.appendChild(f)}},nR=bS?a=>a:a=>a instanceof CSSStyleSheet?(s=>{let c="";for(const f of s.cssRules)c+=f.cssText;return xS(c)})(a):a;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:RX,defineProperty:NX,getOwnPropertyDescriptor:OX,getOwnPropertyNames:jX,getOwnPropertySymbols:UX,getPrototypeOf:FX}=Object,pf=globalThis,rR=pf.trustedTypes,BX=rR?rR.emptyScript:"",iR=pf.reactiveElementPolyfillSupport,bg=(a,s)=>a,l1={toAttribute(a,s){switch(s){case Boolean:a=a?BX:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,s){let c=a;switch(s){case Boolean:c=a!==null;break;case Number:c=a===null?null:Number(a);break;case Object:case Array:try{c=JSON.parse(a)}catch{c=null}}return c}},kS=(a,s)=>!RX(a,s),aR={attribute:!0,type:String,converter:l1,reflect:!1,useDefault:!1,hasChanged:kS};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),pf.litPropertyMetadata??(pf.litPropertyMetadata=new WeakMap);let gf=class extends HTMLElement{static addInitializer(a){this._$Ei(),(this.l??(this.l=[])).push(a)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(a,s=aR){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(a)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(a,s),!s.noAccessor){const c=Symbol(),f=this.getPropertyDescriptor(a,c,s);f!==void 0&&NX(this.prototype,a,f)}}static getPropertyDescriptor(a,s,c){const{get:f,set:d}=OX(this.prototype,a)??{get(){return this[s]},set(v){this[s]=v}};return{get:f,set(v){const y=f?.call(this);d?.call(this,v),this.requestUpdate(a,y,c)},configurable:!0,enumerable:!0}}static getPropertyOptions(a){return this.elementProperties.get(a)??aR}static _$Ei(){if(this.hasOwnProperty(bg("elementProperties")))return;const a=FX(this);a.finalize(),a.l!==void 0&&(this.l=[...a.l]),this.elementProperties=new Map(a.elementProperties)}static finalize(){if(this.hasOwnProperty(bg("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(bg("properties"))){const s=this.properties,c=[...jX(s),...UX(s)];for(const f of c)this.createProperty(f,s[f])}const a=this[Symbol.metadata];if(a!==null){const s=litPropertyMetadata.get(a);if(s!==void 0)for(const[c,f]of s)this.elementProperties.set(c,f)}this._$Eh=new Map;for(const[s,c]of this.elementProperties){const f=this._$Eu(s,c);f!==void 0&&this._$Eh.set(f,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(a){const s=[];if(Array.isArray(a)){const c=new Set(a.flat(1/0).reverse());for(const f of c)s.unshift(nR(f))}else a!==void 0&&s.push(nR(a));return s}static _$Eu(a,s){const c=s.attribute;return c===!1?void 0:typeof c=="string"?c:typeof a=="string"?a.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var a;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(a=this.constructor.l)==null||a.forEach(s=>s(this))}addController(a){var s;(this._$EO??(this._$EO=new Set)).add(a),this.renderRoot!==void 0&&this.isConnected&&((s=a.hostConnected)==null||s.call(a))}removeController(a){var s;(s=this._$EO)==null||s.delete(a)}_$E_(){const a=new Map,s=this.constructor.elementProperties;for(const c of s.keys())this.hasOwnProperty(c)&&(a.set(c,this[c]),delete this[c]);a.size>0&&(this._$Ep=a)}createRenderRoot(){const a=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return LX(a,this.constructor.elementStyles),a}connectedCallback(){var a;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(a=this._$EO)==null||a.forEach(s=>{var c;return(c=s.hostConnected)==null?void 0:c.call(s)})}enableUpdating(a){}disconnectedCallback(){var a;(a=this._$EO)==null||a.forEach(s=>{var c;return(c=s.hostDisconnected)==null?void 0:c.call(s)})}attributeChangedCallback(a,s,c){this._$AK(a,c)}_$ET(a,s){var c;const f=this.constructor.elementProperties.get(a),d=this.constructor._$Eu(a,f);if(d!==void 0&&f.reflect===!0){const v=(((c=f.converter)==null?void 0:c.toAttribute)!==void 0?f.converter:l1).toAttribute(s,f.type);this._$Em=a,v==null?this.removeAttribute(d):this.setAttribute(d,v),this._$Em=null}}_$AK(a,s){var c,f;const d=this.constructor,v=d._$Eh.get(a);if(v!==void 0&&this._$Em!==v){const y=d.getPropertyOptions(v),g=typeof y.converter=="function"?{fromAttribute:y.converter}:((c=y.converter)==null?void 0:c.fromAttribute)!==void 0?y.converter:l1;this._$Em=v;const C=g.fromAttribute(s,y.type);this[v]=C??((f=this._$Ej)==null?void 0:f.get(v))??C,this._$Em=null}}requestUpdate(a,s,c,f=!1,d){var v;if(a!==void 0){const y=this.constructor;if(f===!1&&(d=this[a]),c??(c=y.getPropertyOptions(a)),!((c.hasChanged??kS)(d,s)||c.useDefault&&c.reflect&&d===((v=this._$Ej)==null?void 0:v.get(a))&&!this.hasAttribute(y._$Eu(a,c))))return;this.C(a,s,c)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(a,s,{useDefault:c,reflect:f,wrapped:d},v){c&&!(this._$Ej??(this._$Ej=new Map)).has(a)&&(this._$Ej.set(a,v??s??this[a]),d!==!0||v!==void 0)||(this._$AL.has(a)||(this.hasUpdated||c||(s=void 0),this._$AL.set(a,s)),f===!0&&this._$Em!==a&&(this._$Eq??(this._$Eq=new Set)).add(a))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const a=this.scheduleUpdate();return a!=null&&await a,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var a;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[d,v]of this._$Ep)this[d]=v;this._$Ep=void 0}const f=this.constructor.elementProperties;if(f.size>0)for(const[d,v]of f){const{wrapped:y}=v,g=this[d];y!==!0||this._$AL.has(d)||g===void 0||this.C(d,void 0,v,g)}}let s=!1;const c=this._$AL;try{s=this.shouldUpdate(c),s?(this.willUpdate(c),(a=this._$EO)==null||a.forEach(f=>{var d;return(d=f.hostUpdate)==null?void 0:d.call(f)}),this.update(c)):this._$EM()}catch(f){throw s=!1,this._$EM(),f}s&&this._$AE(c)}willUpdate(a){}_$AE(a){var s;(s=this._$EO)==null||s.forEach(c=>{var f;return(f=c.hostUpdated)==null?void 0:f.call(c)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(a)),this.updated(a)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(a){return!0}update(a){this._$Eq&&(this._$Eq=this._$Eq.forEach(s=>this._$ET(s,this[s]))),this._$EM()}updated(a){}firstUpdated(a){}};gf.elementStyles=[],gf.shadowRootOptions={mode:"open"},gf[bg("elementProperties")]=new Map,gf[bg("finalized")]=new Map,iR?.({ReactiveElement:gf}),(pf.reactiveElementVersions??(pf.reactiveElementVersions=[])).push("2.1.2");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const c1=globalThis,oR=a=>a,d1=c1.trustedTypes,sR=d1?d1.createPolicy("lit-html",{createHTML:a=>a}):void 0,uR="$lit$",Ru=`lit$${Math.random().toFixed(9).slice(2)}$`,lR="?"+Ru,VX=`<${lR}>`,oc=document,wg=()=>oc.createComment(""),xg=a=>a===null||typeof a!="object"&&typeof a!="function",TS=Array.isArray,$X=a=>TS(a)||typeof a?.[Symbol.iterator]=="function",SS=`[ 	
\f\r]`,kg=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,cR=/-->/g,dR=/>/g,sc=RegExp(`>|${SS}(?:([^\\s"'>=/]+)(${SS}*=${SS}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),fR=/'/g,hR=/"/g,pR=/^(?:script|style|textarea|title)$/i,zX=a=>(s,...c)=>({_$litType$:a,strings:s,values:c}),xt=zX(1),Nu=Symbol.for("lit-noChange"),rr=Symbol.for("lit-nothing"),gR=new WeakMap,uc=oc.createTreeWalker(oc,129);function mR(a,s){if(!TS(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return sR!==void 0?sR.createHTML(s):s}const HX=(a,s)=>{const c=a.length-1,f=[];let d,v=s===2?"<svg>":s===3?"<math>":"",y=kg;for(let g=0;g<c;g++){const C=a[g];let E,I,D=-1,L=0;for(;L<C.length&&(y.lastIndex=L,I=y.exec(C),I!==null);)L=y.lastIndex,y===kg?I[1]==="!--"?y=cR:I[1]!==void 0?y=dR:I[2]!==void 0?(pR.test(I[2])&&(d=RegExp("</"+I[2],"g")),y=sc):I[3]!==void 0&&(y=sc):y===sc?I[0]===">"?(y=d??kg,D=-1):I[1]===void 0?D=-2:(D=y.lastIndex-I[2].length,E=I[1],y=I[3]===void 0?sc:I[3]==='"'?hR:fR):y===hR||y===fR?y=sc:y===cR||y===dR?y=kg:(y=sc,d=void 0);const F=y===sc&&a[g+1].startsWith("/>")?" ":"";v+=y===kg?C+VX:D>=0?(f.push(E),C.slice(0,D)+uR+C.slice(D)+Ru+F):C+Ru+(D===-2?g:F)}return[mR(a,v+(a[c]||"<?>")+(s===2?"</svg>":s===3?"</math>":"")),f]};class kv{constructor({strings:s,_$litType$:c},f){let d;this.parts=[];let v=0,y=0;const g=s.length-1,C=this.parts,[E,I]=HX(s,c);if(this.el=kv.createElement(E,f),uc.currentNode=this.el.content,c===2||c===3){const D=this.el.content.firstChild;D.replaceWith(...D.childNodes)}for(;(d=uc.nextNode())!==null&&C.length<g;){if(d.nodeType===1){if(d.hasAttributes())for(const D of d.getAttributeNames())if(D.endsWith(uR)){const L=I[y++],F=d.getAttribute(D).split(Ru),O=/([.?@])?(.*)/.exec(L);C.push({type:1,index:v,name:O[2],strings:F,ctor:O[1]==="."?GX:O[1]==="?"?KX:O[1]==="@"?WX:f1}),d.removeAttribute(D)}else D.startsWith(Ru)&&(C.push({type:6,index:v}),d.removeAttribute(D));if(pR.test(d.tagName)){const D=d.textContent.split(Ru),L=D.length-1;if(L>0){d.textContent=d1?d1.emptyScript:"";for(let F=0;F<L;F++)d.append(D[F],wg()),uc.nextNode(),C.push({type:2,index:++v});d.append(D[L],wg())}}}else if(d.nodeType===8)if(d.data===lR)C.push({type:2,index:v});else{let D=-1;for(;(D=d.data.indexOf(Ru,D+1))!==-1;)C.push({type:7,index:v}),D+=Ru.length-1}v++}}static createElement(s,c){const f=oc.createElement("template");return f.innerHTML=s,f}}function mf(a,s,c=a,f){var d,v;if(s===Nu)return s;let y=f!==void 0?(d=c._$Co)==null?void 0:d[f]:c._$Cl;const g=xg(s)?void 0:s._$litDirective$;return y?.constructor!==g&&((v=y?._$AO)==null||v.call(y,!1),g===void 0?y=void 0:(y=new g(a),y._$AT(a,c,f)),f!==void 0?(c._$Co??(c._$Co=[]))[f]=y:c._$Cl=y),y!==void 0&&(s=mf(a,y._$AS(a,s.values),y,f)),s}class qX{constructor(s,c){this._$AV=[],this._$AN=void 0,this._$AD=s,this._$AM=c}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(s){const{el:{content:c},parts:f}=this._$AD,d=(s?.creationScope??oc).importNode(c,!0);uc.currentNode=d;let v=uc.nextNode(),y=0,g=0,C=f[0];for(;C!==void 0;){if(y===C.index){let E;C.type===2?E=new Tv(v,v.nextSibling,this,s):C.type===1?E=new C.ctor(v,C.name,C.strings,this,s):C.type===6&&(E=new XX(v,this,s)),this._$AV.push(E),C=f[++g]}y!==C?.index&&(v=uc.nextNode(),y++)}return uc.currentNode=oc,d}p(s){let c=0;for(const f of this._$AV)f!==void 0&&(f.strings!==void 0?(f._$AI(s,f,c),c+=f.strings.length-2):f._$AI(s[c])),c++}}class Tv{get _$AU(){var s;return((s=this._$AM)==null?void 0:s._$AU)??this._$Cv}constructor(s,c,f,d){this.type=2,this._$AH=rr,this._$AN=void 0,this._$AA=s,this._$AB=c,this._$AM=f,this.options=d,this._$Cv=d?.isConnected??!0}get parentNode(){let s=this._$AA.parentNode;const c=this._$AM;return c!==void 0&&s?.nodeType===11&&(s=c.parentNode),s}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(s,c=this){s=mf(this,s,c),xg(s)?s===rr||s==null||s===""?(this._$AH!==rr&&this._$AR(),this._$AH=rr):s!==this._$AH&&s!==Nu&&this._(s):s._$litType$!==void 0?this.$(s):s.nodeType!==void 0?this.T(s):$X(s)?this.k(s):this._(s)}O(s){return this._$AA.parentNode.insertBefore(s,this._$AB)}T(s){this._$AH!==s&&(this._$AR(),this._$AH=this.O(s))}_(s){this._$AH!==rr&&xg(this._$AH)?this._$AA.nextSibling.data=s:this.T(oc.createTextNode(s)),this._$AH=s}$(s){var c;const{values:f,_$litType$:d}=s,v=typeof d=="number"?this._$AC(s):(d.el===void 0&&(d.el=kv.createElement(mR(d.h,d.h[0]),this.options)),d);if(((c=this._$AH)==null?void 0:c._$AD)===v)this._$AH.p(f);else{const y=new qX(v,this),g=y.u(this.options);y.p(f),this.T(g),this._$AH=y}}_$AC(s){let c=gR.get(s.strings);return c===void 0&&gR.set(s.strings,c=new kv(s)),c}k(s){TS(this._$AH)||(this._$AH=[],this._$AR());const c=this._$AH;let f,d=0;for(const v of s)d===c.length?c.push(f=new Tv(this.O(wg()),this.O(wg()),this,this.options)):f=c[d],f._$AI(v),d++;d<c.length&&(this._$AR(f&&f._$AB.nextSibling,d),c.length=d)}_$AR(s=this._$AA.nextSibling,c){var f;for((f=this._$AP)==null?void 0:f.call(this,!1,!0,c);s!==this._$AB;){const d=oR(s).nextSibling;oR(s).remove(),s=d}}setConnected(s){var c;this._$AM===void 0&&(this._$Cv=s,(c=this._$AP)==null||c.call(this,s))}}class f1{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(s,c,f,d,v){this.type=1,this._$AH=rr,this._$AN=void 0,this.element=s,this.name=c,this._$AM=d,this.options=v,f.length>2||f[0]!==""||f[1]!==""?(this._$AH=Array(f.length-1).fill(new String),this.strings=f):this._$AH=rr}_$AI(s,c=this,f,d){const v=this.strings;let y=!1;if(v===void 0)s=mf(this,s,c,0),y=!xg(s)||s!==this._$AH&&s!==Nu,y&&(this._$AH=s);else{const g=s;let C,E;for(s=v[0],C=0;C<v.length-1;C++)E=mf(this,g[f+C],c,C),E===Nu&&(E=this._$AH[C]),y||(y=!xg(E)||E!==this._$AH[C]),E===rr?s=rr:s!==rr&&(s+=(E??"")+v[C+1]),this._$AH[C]=E}y&&!d&&this.j(s)}j(s){s===rr?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}}class GX extends f1{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===rr?void 0:s}}class KX extends f1{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==rr)}}class WX extends f1{constructor(s,c,f,d,v){super(s,c,f,d,v),this.type=5}_$AI(s,c=this){if((s=mf(this,s,c,0)??rr)===Nu)return;const f=this._$AH,d=s===rr&&f!==rr||s.capture!==f.capture||s.once!==f.once||s.passive!==f.passive,v=s!==rr&&(f===rr||d);d&&this.element.removeEventListener(this.name,this,f),v&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){var c;typeof this._$AH=="function"?this._$AH.call(((c=this.options)==null?void 0:c.host)??this.element,s):this._$AH.handleEvent(s)}}class XX{constructor(s,c,f){this.element=s,this.type=6,this._$AN=void 0,this._$AM=c,this.options=f}get _$AU(){return this._$AM._$AU}_$AI(s){mf(this,s)}}const vR=c1.litHtmlPolyfillSupport;vR?.(kv,Tv),(c1.litHtmlVersions??(c1.litHtmlVersions=[])).push("3.3.3");const YX=(a,s,c)=>{const f=c?.renderBefore??s;let d=f._$litPart$;if(d===void 0){const v=c?.renderBefore??null;f._$litPart$=d=new Tv(s.insertBefore(wg(),v),v,void 0,c??{})}return d._$AI(a),d};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Tg=globalThis;let xn=class extends gf{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var a;const s=super.createRenderRoot();return(a=this.renderOptions).renderBefore??(a.renderBefore=s.firstChild),s}update(a){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(a),this._$Do=YX(s,this.renderRoot,this.renderOptions)}connectedCallback(){var a;super.connectedCallback(),(a=this._$Do)==null||a.setConnected(!0)}disconnectedCallback(){var a;super.disconnectedCallback(),(a=this._$Do)==null||a.setConnected(!1)}render(){return Nu}};var yR;xn._$litElement$=!0,xn.finalized=!0,(yR=Tg.litElementHydrateSupport)==null||yR.call(Tg,{LitElement:xn});const bR=Tg.litElementPolyfillSupport;bR?.({LitElement:xn}),(Tg.litElementVersions??(Tg.litElementVersions=[])).push("4.2.2");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Yn=a=>(s,c)=>{c!==void 0?c.addInitializer(()=>{customElements.define(a,s)}):customElements.define(a,s)};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const JX={attribute:!0,type:String,converter:l1,reflect:!1,hasChanged:kS},QX=(a=JX,s,c)=>{const{kind:f,metadata:d}=c;let v=globalThis.litPropertyMetadata.get(d);if(v===void 0&&globalThis.litPropertyMetadata.set(d,v=new Map),f==="setter"&&((a=Object.create(a)).wrapped=!0),v.set(c.name,a),f==="accessor"){const{name:y}=c;return{set(g){const C=s.get.call(this);s.set.call(this,g),this.requestUpdate(y,C,a,!0,g)},init(g){return g!==void 0&&this.C(y,void 0,a,g),g}}}if(f==="setter"){const{name:y}=c;return function(g){const C=this[y];s.call(this,g),this.requestUpdate(y,C,a,!0,g)}}throw Error("Unsupported decorator location: "+f)};function ir(a){return(s,c)=>typeof c=="object"?QX(a,s,c):((f,d,v)=>{const y=d.hasOwnProperty(v);return d.constructor.createProperty(v,f),y?Object.getOwnPropertyDescriptor(d,v):void 0})(a,s,c)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function Sg(a){return ir({...a,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const ZX=(a,s,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&typeof s!="object"&&Object.defineProperty(a,s,c),c);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function Tn(a,s){return(c,f,d)=>{const v=y=>{var g;return((g=y.renderRoot)==null?void 0:g.querySelector(a))??null};return ZX(c,f,{get(){return v(this)}})}}var wR={};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/var xR;function eY(){return xR||(xR=1,(function(a){(function(){var s=typeof window<"u"?window:MX,c={};(function(d,v,y){var g,C=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},E=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function I(e){e=[typeof globalThis=="object"&&globalThis,e,typeof d=="object"&&d,typeof self=="object"&&self,typeof v=="object"&&v];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var D=I(this),L="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");D.BigInt64Array&&(L.push("BigInt64"),L.push("BigUint64"));function F(e,t){if(t)for(var n=0;n<L.length;n++)X(L[n]+"Array.prototype."+e,t)}function O(e,t){t&&X(e,t)}function X(e,t){var n=D;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))return;n=n[i]}e=e[e.length-1],r=n[e],t=t(r),t!=r&&t!=null&&E(n,e,{configurable:!0,writable:!0,value:t})}var $;if(typeof Object.setPrototypeOf=="function")$=Object.setPrototypeOf;else{var Y;e:{var Z={a:!0},Q={};try{Q.__proto__=Z,Y=Q.a;break e}catch{}Y=!1}$=Y?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var ge=$;function K(e,t){if(e.prototype=C(t.prototype),e.prototype.constructor=e,ge)ge(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.$n=t.prototype}function we(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function x(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:we(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function se(e){if(!(e instanceof Array)){e=x(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Be=typeof Object.assign=="function"?Object.assign:function(e,t){if(e==null)throw new TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)te(r,i)&&(e[i]=r[i])}return e};O("Object.assign",function(e){return e||Be});function Me(e){if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object")}function Ie(){this.J=!1,this.H=null,this.i=void 0,this.h=1,this.F=this.I=0,this.L=this.C=null}function je(e){if(e.J)throw new TypeError("Generator is already running");e.J=!0}Ie.prototype.K=function(e){this.i=e};function ee(e,t){e.C={$i:t,rj:!0},e.h=e.I||e.F}Ie.prototype.getNextAddressJsc=function(){return this.h},Ie.prototype.getYieldResultJsc=function(){return this.i},Ie.prototype.return=function(e){this.C={return:e},this.h=this.F},Ie.prototype.return=Ie.prototype.return,Ie.prototype.O=function(e){this.C={A:e},this.h=this.F},Ie.prototype.jumpThroughFinallyBlocks=Ie.prototype.O,Ie.prototype.g=function(e,t){return this.h=t,{value:e}},Ie.prototype.yield=Ie.prototype.g,Ie.prototype.P=function(e,t){e=x(e);var n=e.next();if(Me(n),n.done)this.i=n.value,this.h=t;else return this.H=e,this.g(n.value,t)},Ie.prototype.yieldAll=Ie.prototype.P,Ie.prototype.A=function(e){this.h=e},Ie.prototype.jumpTo=Ie.prototype.A,Ie.prototype.j=function(){this.h=0},Ie.prototype.jumpToEnd=Ie.prototype.j,Ie.prototype.m=function(e,t){this.I=e,t!=null&&(this.F=t)},Ie.prototype.setCatchFinallyBlocks=Ie.prototype.m,Ie.prototype.D=function(e){this.I=0,this.F=e||0},Ie.prototype.setFinallyBlock=Ie.prototype.D,Ie.prototype.o=function(e,t){this.h=e,this.I=t||0},Ie.prototype.leaveTryBlock=Ie.prototype.o,Ie.prototype.l=function(e){return this.I=e||0,e=this.C.$i,this.C=null,e},Ie.prototype.enterCatchBlock=Ie.prototype.l,Ie.prototype.u=function(e,t,n){n?this.L[n]=this.C:this.L=[this.C],this.I=e||0,this.F=t||0},Ie.prototype.enterFinallyBlock=Ie.prototype.u,Ie.prototype.B=function(e,t){t=this.L.splice(t||0)[0],(t=this.C=this.C||t)?t.rj?this.h=this.I||this.F:t.A!=null&&this.F<t.A?(this.h=t.A,this.C=null):this.h=this.F:this.h=e},Ie.prototype.leaveFinallyBlock=Ie.prototype.B,Ie.prototype.M=function(e){return new me(e)},Ie.prototype.forIn=Ie.prototype.M;function me(e){this.i=e,this.g=[];for(var t in e)this.g.push(t);this.g.reverse()}me.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},me.prototype.getNext=me.prototype.h;function Le(e){this.g=new Ie,this.h=e}function He(e,t){je(e.g);var n=e.g.H;return n?Ce(e,"return"in n?n.return:function(r){return{value:r,done:!0}},t,e.g.return):(e.g.return(t),qe(e))}function Ce(e,t,n,r){try{var i=t.call(e.g.H,n);if(Me(i),!i.done)return e.g.J=!1,i;var o=i.value}catch(u){return e.g.H=null,ee(e.g,u),qe(e)}return e.g.H=null,r.call(e.g,o),qe(e)}function qe(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.J=!1,{value:t.value,done:!1}}catch(n){e.g.i=void 0,ee(e.g,n)}if(e.g.J=!1,e.g.C){if(t=e.g.C,e.g.C=null,t.rj)throw t.$i;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function gt(e){this.next=function(t){return je(e.g),e.g.H?t=Ce(e,e.g.H.next,t,e.g.K):(e.g.K(t),t=qe(e)),t},this.throw=function(t){return je(e.g),e.g.H?t=Ce(e,e.g.H.throw,t,e.g.K):(ee(e.g,t),t=qe(e)),t},this.return=function(t){return He(e,t)},this[Symbol.iterator]=function(){return this}}function Ne(e){function t(r){return e.next(r)}function n(r){return e.throw(r)}return new Promise(function(r,i){function o(u){u.done?r(u.value):Promise.resolve(u.value).then(t,n).then(o,i)}o(e.next())})}function P(e){return Ne(new gt(new Le(e)))}function oe(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}O("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(r+(o||"")+"_"+i++,o)}function n(o,u){this.g=o,E(this,"description",{configurable:!0,writable:!0,value:u})}if(e)return e;n.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(Math.random()*1e9>>>0)+"_",i=0;return t}),O("Symbol.iterator",function(e){return e||(e=Symbol("Symbol.iterator"),E(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return ne(we(this))}}),e)});function ne(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}O("Promise",function(e){function t(u){this.h=0,this.i=void 0,this.g=[],this.o=!1;var l=this.j();try{u(l.resolve,l.reject)}catch(h){l.reject(h)}}function n(){this.g=null}function r(u){return u instanceof t?u:new t(function(l){l(u)})}if(e)return e;n.prototype.h=function(u){if(this.g==null){this.g=[];var l=this;this.i(function(){l.l()})}this.g.push(u)};var i=D.setTimeout;n.prototype.i=function(u){i(u,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var u=this.g;this.g=[];for(var l=0;l<u.length;++l){var h=u[l];u[l]=null;try{h()}catch(p){this.j(p)}}}this.g=null},n.prototype.j=function(u){this.i(function(){throw u})},t.prototype.j=function(){function u(p){return function(m){h||(h=!0,p.call(l,m))}}var l=this,h=!1;return{resolve:u(this.F),reject:u(this.l)}},t.prototype.F=function(u){if(u===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(u instanceof t)this.I(u);else{e:switch(typeof u){case"object":var l=u!=null;break e;case"function":l=!0;break e;default:l=!1}l?this.D(u):this.m(u)}},t.prototype.D=function(u){var l=void 0;try{l=u.then}catch(h){this.l(h);return}typeof l=="function"?this.J(l,u):this.m(u)},t.prototype.l=function(u){this.u(2,u)},t.prototype.m=function(u){this.u(1,u)},t.prototype.u=function(u,l){if(this.h!=0)throw Error("Cannot settle("+u+", "+l+"): Promise already settled in state"+this.h);this.h=u,this.i=l,this.h===2&&this.H(),this.B()},t.prototype.H=function(){var u=this;i(function(){if(u.C()){var l=D.console;typeof l<"u"&&l.error(u.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var u=D.CustomEvent,l=D.Event,h=D.dispatchEvent;return typeof h>"u"?!0:(typeof u=="function"?u=new u("unhandledrejection",{cancelable:!0}):typeof l=="function"?u=new l("unhandledrejection",{cancelable:!0}):(u=D.document.createEvent("CustomEvent"),u.initCustomEvent("unhandledrejection",!1,!0,u)),u.promise=this,u.reason=this.i,h(u))},t.prototype.B=function(){if(this.g!=null){for(var u=0;u<this.g.length;++u)o.h(this.g[u]);this.g=null}};var o=new n;return t.prototype.I=function(u){var l=this.j();u.hf(l.resolve,l.reject)},t.prototype.J=function(u,l){var h=this.j();try{u.call(l,h.resolve,h.reject)}catch(p){h.reject(p)}},t.prototype.then=function(u,l){function h(w,T){return typeof w=="function"?function(k){try{p(w(k))}catch(S){m(S)}}:T}var p,m,b=new t(function(w,T){p=w,m=T});return this.hf(h(u,p),h(l,m)),b},t.prototype.catch=function(u){return this.then(void 0,u)},t.prototype.hf=function(u,l){function h(){switch(p.h){case 1:u(p.i);break;case 2:l(p.i);break;default:throw Error("Unexpected state: "+p.h)}}var p=this;this.g==null?o.h(h):this.g.push(h),this.o=!0},t.resolve=r,t.reject=function(u){return new t(function(l,h){h(u)})},t.race=function(u){return new t(function(l,h){for(var p=x(u),m=p.next();!m.done;m=p.next())r(m.value).hf(l,h)})},t.all=function(u){var l=x(u),h=l.next();return h.done?r([]):new t(function(p,m){function b(k){return function(S){w[k]=S,T--,T==0&&p(w)}}var w=[],T=0;do w.push(void 0),T++,r(h.value).hf(b(w.length-1),m),h=l.next();while(!h.done)})},t}),O("WeakMap",function(e){function t(h){if(this.g=(l+=Math.random()+1).toString(),h){h=x(h);for(var p;!(p=h.next()).done;)p=p.value,this.set(p[0],p[1])}}function n(){}function r(h){var p=typeof h;return p==="object"&&h!==null||p==="function"}function i(h){if(!te(h,u)){var p=new n;E(h,u,{value:p})}}function o(h){var p=Object[h];p&&(Object[h]=function(m){return m instanceof n?m:(Object.isExtensible(m)&&i(m),p(m))})}if((function(){if(!e||!Object.seal)return!1;try{var h=Object.seal({}),p=Object.seal({}),m=new e([[h,2],[p,3]]);return m.get(h)!=2||m.get(p)!=3?!1:(m.delete(h),m.set(p,4),!m.has(h)&&m.get(p)==4)}catch{return!1}})())return e;var u="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(h,p){if(!r(h))throw Error("Invalid WeakMap key");if(i(h),!te(h,u))throw Error("WeakMap key fail: "+h);return h[u][this.g]=p,this},t.prototype.get=function(h){return r(h)&&te(h,u)?h[u][this.g]:void 0},t.prototype.has=function(h){return r(h)&&te(h,u)&&te(h[u],this.g)},t.prototype.delete=function(h){return r(h)&&te(h,u)&&te(h[u],this.g)?delete h[u][this.g]:!1},t}),O("Map",function(e){function t(){var l={};return l.zc=l.next=l.head=l}function n(l,h){var p=l[1];return ne(function(){if(p){for(;p.head!=l[1];)p=p.zc;for(;p.next!=p.head;)return p=p.next,{done:!1,value:h(p)};p=null}return{done:!0,value:void 0}})}function r(l,h){var p=h&&typeof h;p=="object"||p=="function"?o.has(h)?p=o.get(h):(p=""+ ++u,o.set(h,p)):p="p_"+h;var m=l[0][p];if(m&&te(l[0],p))for(l=0;l<m.length;l++){var b=m[l];if(h!==h&&b.key!==b.key||h===b.key)return{id:p,list:m,index:l,entry:b}}return{id:p,list:m,index:-1,entry:void 0}}function i(l){if(this[0]={},this[1]=t(),this.size=0,l){l=x(l);for(var h;!(h=l.next()).done;)h=h.value,this.set(h[0],h[1])}}if((function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var l=Object.seal({x:4}),h=new e(x([[l,"s"]]));if(h.get(l)!="s"||h.size!=1||h.get({x:4})||h.set({x:4},"t")!=h||h.size!=2)return!1;var p=h.entries(),m=p.next();return m.done||m.value[0]!=l||m.value[1]!="s"?!1:(m=p.next(),!(m.done||m.value[0].x!=4||m.value[1]!="t"||!p.next().done))}catch{return!1}})())return e;var o=new WeakMap;i.prototype.set=function(l,h){l=l===0?0:l;var p=r(this,l);return p.list||(p.list=this[0][p.id]=[]),p.entry?p.entry.value=h:(p.entry={next:this[1],zc:this[1].zc,head:this[1],key:l,value:h},p.list.push(p.entry),this[1].zc.next=p.entry,this[1].zc=p.entry,this.size++),this},i.prototype.delete=function(l){return l=r(this,l),l.entry&&l.list?(l.list.splice(l.index,1),l.list.length||delete this[0][l.id],l.entry.zc.next=l.entry.next,l.entry.next.zc=l.entry.zc,l.entry.head=null,this.size--,!0):!1},i.prototype.clear=function(){this[0]={},this[1]=this[1].zc=t(),this.size=0},i.prototype.has=function(l){return!!r(this,l).entry},i.prototype.get=function(l){return(l=r(this,l).entry)&&l.value},i.prototype.entries=function(){return n(this,function(l){return[l.key,l.value]})},i.prototype.keys=function(){return n(this,function(l){return l.key})},i.prototype.values=function(){return n(this,function(l){return l.value})},i.prototype.forEach=function(l,h){for(var p=this.entries(),m;!(m=p.next()).done;)m=m.value,l.call(h,m[1],m[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var u=0;return i}),O("Set",function(e){function t(n){if(this.g=new Map,n){n=x(n);for(var r;!(r=n.next()).done;)this.add(r.value)}this.size=this.g.size}return(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),r=new e(x([n]));if(!r.has(n)||r.size!=1||r.add(n)!=r||r.size!=1||r.add({x:4})!=r||r.size!=2)return!1;var i=r.entries(),o=i.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=i.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:i.next().done)}catch{return!1}})()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,r){var i=this;this.g.forEach(function(o){return n.call(r,o,o,i)})},t)});function Ue(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var o=e[i];if(t.call(n,o,i,e))return{mj:i,v:o}}return{mj:-1,v:void 0}}O("Array.prototype.findIndex",function(e){return e||function(t,n){return Ue(this,t,n).mj}});function ze(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}O("Array.prototype.values",function(e){return e||function(){return ze(this,function(t,n){return n})}}),O("Array.from",function(e){return e||function(t,n,r){n=n??function(l){return l};var i=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var u=0;!(o=t.next()).done;)i.push(n.call(r,o.value,u++))}else for(o=t.length,u=0;u<o;u++)i.push(n.call(r,t[u],u));return i}}),O("Array.prototype.keys",function(e){return e||function(){return ze(this,function(t){return t})}}),O("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),O("Array.prototype.includes",function(e){return e||function(t,n){var r=this;r instanceof String&&(r=String(r));var i=r.length;for(n=n||0,n<0&&(n=Math.max(n+i,0));n<i;n++){var o=r[n];if(o===t||Object.is(o,t))return!0}return!1}});function ot(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}O("String.prototype.includes",function(e){return e||function(t,n){return ot(this,t,"includes").indexOf(t,n||0)!==-1}}),O("String.fromCodePoint",function(e){return e||function(t){for(var n="",r=0;r<arguments.length;r++){var i=Number(arguments[r]);if(i<0||i>1114111||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);i<=65535?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),n+=String.fromCharCode(i&1023|56320))}return n}}),O("String.prototype.startsWith",function(e){return e||function(t,n){var r=ot(this,t,"startsWith"),i=r.length,o=t.length;n=Math.max(0,Math.min(n|0,r.length));for(var u=0;u<o&&n<i;)if(r[n++]!=t[u++])return!1;return u>=o}}),O("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=x(n);for(var r;!(r=n.next()).done;)this.add(r.value)}}return(function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),i=new e([n]);return!i.has(n)||i.has(r)?!1:(i.delete(n),i.add(r),!i.has(n)&&i.has(r))}catch{return!1}})()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),O("Array.prototype.find",function(e){return e||function(t,n){return Ue(this,t,n).v}}),O("Object.entries",function(e){return e||function(t){var n=[],r;for(r in t)te(t,r)&&n.push([r,t[r]]);return n}}),O("Promise.withResolvers",function(e){return e||function(){var t,n;return{promise:new Promise(function(r,i){t=r,n=i}),resolve:t,reject:n}}}),O("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),O("Array.prototype.entries",function(e){return e||function(){return ze(this,function(t,n){return[t,n]})}}),O("Array.prototype.fill",function(e){return e||function(t,n,r){var i=this.length||0;for(n<0&&(n=Math.max(0,i+n)),(r==null||r>i)&&(r=i),r=Number(r),r<0&&(r=Math.max(0,i+r)),n=Number(n||0);n<r;n++)this[n]=t;return this}}),F("fill",function(e){return e||Array.prototype.fill}),O("Number.EPSILON",function(){return 2220446049250313e-31}),O("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),O("Math.clz32",function(e){return e||function(t){if(t=Number(t)>>>0,t===0)return 32;var n=0;return(t&4294901760)===0&&(t<<=16,n+=16),(t&4278190080)===0&&(t<<=8,n+=8),(t&4026531840)===0&&(t<<=4,n+=4),(t&3221225472)===0&&(t<<=2,n+=2),(t&2147483648)===0&&n++,n}}),O("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),O("String.prototype.trimLeft",function(e){function t(){return this.replace(/^[\s\xa0]+/,"")}return e||t}),O("String.prototype.trimStart",function(e){return e||String.prototype.trimLeft}),O("String.prototype.repeat",function(e){return e||function(t){var n=ot(this,null,"repeat");if(t<0||t>1342177279)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)t&1&&(r+=n),(t>>>=1)&&(n+=n);return r}}),O("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),O("Number.isInteger",function(e){return e||function(t){return Number.isFinite(t)?t===Math.floor(t):!1}}),O("Object.values",function(e){return e||function(t){var n=[],r;for(r in t)te(t,r)&&n.push(t[r]);return n}}),O("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),O("String.prototype.endsWith",function(e){return e||function(t,n){var r=ot(this,t,"endsWith");n===void 0&&(n=r.length),n=Math.max(0,Math.min(n|0,r.length));for(var i=t.length;i>0&&n>0;)if(r[--n]!=t[--i])return!1;return i<=0}}),O("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return t<0?-n:n}});var zt=this||self;function Te(e,t){e=e.split(".");var n=zt;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=t}function At(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}At.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.j+=e)};function tn(e){return e.h/(1-Math.pow(e.g,e.j))}function er(){this.h=new At(2),this.j=new At(5),this.g=0,this.i=128e3,this.l=16e3}er.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),t=this.j,t.g=Math.exp(t.i/e.slowHalfLife)},er.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},er.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(tn(this.h),tn(this.j))};function gn(){}function Xt(){}function ut(){}function vi(e){var t=oe.apply(1,arguments);yi.has(e)||(yi.add(e),ut.apply(gn,se(t)))}function La(){}function pu(){}function bl(){}var yi=new Set;self.console&&(new Map().set(1,function(){return console.error.apply(console,se(oe.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,se(oe.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,se(oe.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,se(oe.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,se(oe.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,se(oe.apply(0,arguments)))}),ut=function(){return console.warn.apply(console,se(oe.apply(0,arguments)))},Xt=function(){console.error.apply(console,se(oe.apply(0,arguments)))});function ra(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function ke(e,t){t=e.indexOf(t),t>-1&&e.splice(t,1)}function Fe(e,t,n){if(n||(n=ra),e.length!=t.length)return!1;t=t.slice(),e=x(e);for(var r=e.next(),i={};!r.done;i={vj:void 0},r=e.next()){if(i.vj=r.value,r=t.findIndex((function(o){return function(u){return n(o.vj,u)}})(i)),r==-1)return!1;t[r]=t[t.length-1],t.pop()}return t.length==0}function fe(e,t){var n=[],r=[];e=x(e);for(var i=e.next();!i.done;i=e.next())i=i.value,t(i)?n.push(i):r.push(i);return[n,r]}function ve(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;t(e[i])?n=i+1:r=i}return n}function xe(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=ra),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ae(){this.g=new Map}g=Ae.prototype,g.push=function(e,t){this.g.getOrInsertComputed(e,function(){return[]}).push(t)},g.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},g.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(r){return r!=t});this.g.set(e,n),n.length||this.g.delete(e)}},g.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},g.size=function(){return this.g.size},g.keys=function(){return Array.from(this.g.keys())};function he(){this.g=new Ae}g=he.prototype,g.release=function(){this.Ea(),this.g=null},g.G=function(e,t,n,r){this.g&&(e=new $e(e,t,n,r),this.g.push(t,e))},g.oa=function(e,t,n,r){function i(u){o.Ua(e,t,i),n(u)}var o=this;this.G(e,t,i,r)},g.Hb=function(e,t,n,r){if(this.g){t=x(t);for(var i=t.next();!i.done;i=t.next())this.G(e,i.value,n,r)}},g.Rl=function(e,t,n,r){var i=this;if(this.g)for(var o=!1,u=function(p){if(!o){o=!0;for(var m=x(t),b=m.next();!b.done;b=m.next())i.Ua(e,b.value,u);n(p)}},l=x(t),h=l.next();!h.done;h=l.next())this.G(e,h.value,u,r)},g.Ua=function(e,t,n){if(this.g){var r=this.g.get(t)||[];r=x(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.Ua(),this.g.remove(t,i))}},g.Mm=function(e,t,n){if(this.g){t=x(t);for(var r=t.next();!r.done;r=t.next())this.Ua(e,r.value,n)}},g.Ea=function(){if(this.g){for(var e=[],t=x(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,se(n.value));for(e=x(e),t=e.next();!t.done;t=e.next())t.value.Ua();this.g.g.clear()}},Te("shaka.util.EventManager",he),he.prototype.removeAll=he.prototype.Ea,he.prototype.unlistenMulti=he.prototype.Mm,he.prototype.unlisten=he.prototype.Ua,he.prototype.listenOnceMulti=he.prototype.Rl,he.prototype.listenMulti=he.prototype.Hb,he.prototype.listenOnce=he.prototype.oa,he.prototype.listen=he.prototype.G,he.prototype.release=he.prototype.release;function $e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=lt(e,r),this.target.addEventListener(t,n,this.g)}$e.prototype.Ua=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function lt(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(r){return!n.has(r)}),Ot(e)?t:t.capture||!1}function Ot(e){var t=Lt;if(t==null){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch{t=!1}Lt=t}return t||!1}var Lt=void 0;function et(e){this.h=e,this.g=void 0}et.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};function Qe(){return Xr.value()}var Ht=null,ia=null,Xr=new et(function(){var e=void 0;return Ht&&(e=Ht()),!e&&ia&&(e=ia()),e});function Wn(){}function $i(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=H(e);t=H(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function Vn(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function H(e,t,n){return n=n===void 0?1/0:n,tt(e,t===void 0?0:t,n,Uint8Array)}function Pe(e,t,n){return n=n===void 0?1/0:n,tt(e,t===void 0?0:t,n,Uint16Array)}function _e(e,t,n){return n=n===void 0?1/0:n,tt(e,t===void 0?0:t,n,DataView)}function tt(e,t,n,r){var i=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);var u=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,u))),new r(i,e,Math.floor(Math.min(e+Math.max(n,0),u))-e)}Te("shaka.util.BufferUtils",Wn),Wn.toDataView=_e,Wn.toUint16=Pe,Wn.toUint8=H,Wn.toArrayBuffer=Vn,Wn.equal=$i;function B(e,t,n){var r=oe.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(i){this.stack=i.stack}}B.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};function yt(e){var t=e.code,n=e.msExtendedCode;return n&&(n<0&&(n+=4294967296),n=n.toString(16)),{code:t,Sk:n,message:e.message}}Te("shaka.util.Error",B),B.Severity={RECOVERABLE:1,CRITICAL:2},B.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},B.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,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,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,BUFFER_WRITE_OUT_OF_BOUNDS:3025,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,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,WEBTRANSPORT_NOT_AVAILABLE:4056,WEBTRANSPORT_INITIALIZATION_FAILED:4057,MSF_VOD_CONTENT_NOT_SUPPORTED:4058,HLS_INVALID_KEY_IV_FOR_GCM:4059,HLS_INVALID_GCM_SEGMENT:4060,DASH_INVALID_JSON:4061,MSF_NO_CATALOG:4062,DASH_UNSUPPORTED_ESSENTIAL_PROPERTY:4063,MSF_CATALOG_TIMEOUT:4064,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,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,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,SS_IMA_SDK_MISSING:10002,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,VAST_INVALID_XML:10007,CS_AD_CONTAINER_MISSING:10008,SS_AD_CONTAINER_MISSING:10009,MEDIATAILOR_REQUEST_FAILED:10010};function Vt(){}function dt(e){if(!e)return"";if(e=H(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),self.TextDecoder&&!Qe().mi())return e=new TextDecoder().decode(e),e.includes("\uFFFD")&&Xt('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var r=65533;if((e[n]&128)==0?r=e[n]:e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(r=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(r=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(r=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3),r<=65535)t+=String.fromCharCode(r);else{r-=65536;var i=r&1023;t+=String.fromCharCode(55296+(r>>10)),t+=String.fromCharCode(56320+i)}}return t}function $n(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new B(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=_e(e);for(var i=0;i<n;i++)r[i]=e.getUint16(i*2,t);return xo.value()(r)}function kt(e){function t(r){return n.byteLength<=r||n[r]>=9&&n[r]<=126}if(!e)return"";var n=H(e);if(n[0]==239&&n[1]==187&&n[2]==191)return dt(n);if(n[0]==254&&n[1]==255)return $n(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return $n(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return $n(e,!1);if(n[1]==0&&n[3]==0)return $n(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return dt(e);throw new B(2,2,2003)}function Sr(e){if(self.TextEncoder&&!Qe().mi()){var t=new TextEncoder;return Vn(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return Vn(t)}function aa(e,t){for(var n=new ArrayBuffer(e.length*2),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(i*2,e.charCodeAt(i),t);return n}function Fn(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return i[1]=="#"?(i=i[2]=="x"||i[2]=="X"?parseInt(i.substring(3),16):parseInt(i.substring(2),10),i>=0&&i<=1114111?String.fromCodePoint(i):""):t[i]||"'"}):e||""}Te("shaka.util.StringUtils",Vt),Vt.resetFromCharCode=function(){xo.g=void 0},Vt.toUTF16=aa,Vt.toUTF8=Sr,Vt.fromBytesAutoDetect=kt,Vt.fromUTF16=$n,Vt.fromUTF8=dt;var xo=new et(function(){function e(n){try{var r=new Uint8Array(n);return String.fromCharCode.apply(null,r).length>0}catch{return!1}}for(var t={Xc:65536};t.Xc>0;t={Xc:t.Xc},t.Xc/=2)if(e(t.Xc))return(function(n){return function(r){for(var i="",o=0;o<r.length;o+=n.Xc)i+=String.fromCharCode.apply(null,r.subarray(o,o+n.Xc));return i}})(t);return null});function bi(){}function Ho(e){return e=H(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):(e=xo.value()(e),btoa(e))}function Ra(e,t){return t=t??!0,Uint8Array.prototype.toBase64?H(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=Ho(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function wi(e){if(!("fromBase64"in Uint8Array)){e=self.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return e=e.replace(/\s+/g,""),Uint8Array.fromBase64(e,{alphabet:/[-_]/.test(e)?"base64url":"base64"})}function gu(e){if(!("fromHex"in Uint8Array)){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=parseInt(e.substr(r*2,2),16);return n}return Uint8Array.fromHex(e)}function Yr(e){var t=H(e);if(!Uint8Array.prototype.toHex){e="",t=x(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}return t.toHex()}function Dn(){var e=oe.apply(0,arguments);return Is(e,0,e.length)}function Is(e,t,n){t=t===void 0?0:t,n=n===void 0?e.length:n;for(var r=0,i=t;i<n;++i)r+=e[i].byteLength;for(r=new Uint8Array(r),i=0;t<n;++t){var o=e[t];ArrayBuffer.isView(o)&&o.BYTES_PER_ELEMENT===1?r.set(o,i):r.set(H(o),i),i+=o.byteLength}return r}function Sv(e){for(var t=new Uint8Array(e.length),n=0,r=0,i=0;i<e.length;i++){var o=e[i];n>=2&&o==3?n=0:(t[r++]=o,o==0?n++:n=0)}return t.subarray(0,r)}Te("shaka.util.Uint8ArrayUtils",bi),bi.concat=Dn,bi.toHex=Yr,bi.fromHex=gu,bi.fromBase64=wi,bi.toBase64=Ra,bi.toStandardBase64=Ho;function ed(e,t){if(e===t||!e.length||!t.length)return!0;e=x(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,Ih(n))return!0;for(var r=x(t),i=r.next();!i.done;i=r.next())if(i=i.value,n.keySystem===i.keySystem||Ih(i))return!0}return!1}function td(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=x(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=x(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.keySystem==o.keySystem){i=new Map;for(var u=x((r.initData||[]).concat(o.initData||[])),l=u.next();!l.done;l=u.next())l=l.value,i.set(l.keyId,l);i=Array.from(i.values()),u=r.keyIds&&o.keyIds?new Set([].concat(se(r.keyIds),se(o.keyIds))):r.keyIds||o.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,serverCertificateUri:r.serverCertificateUri||o.serverCertificateUri,initData:i,keyIds:u});break}else Ih(r)?n.push(r):Ih(o)&&n.push(o)}return n}function mr(e){return e?e.keySystem:""}function zi(e){return e==="org.w3.clearkey"}function e5(e){return e?!!e.match(/^com\.widevine\.alpha/):!1}function qo(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function wl(e){return e?!!e.match(/^com\.apple\.fps/):!1}function Ih(e){return(e=e.licenseServerUri)?e.startsWith("data:application/json;base64,"):!1}function H2(e,t,n,r){return r=[].concat(se(new Set(r))).sort().join("#"),e+"#"+t+"#"+n+"#"+r}function t5(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n={"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"};if(!e&&!t)return n;var r={},i;for(i in n){var o=n[i],u=i;t?u="urn:uuid:"+i:e&&(u=i.replace(/-/g,"")),r[u]=o}return r}function Cv(e){return e.length===22?e:Ra(gu(e),!1)}var n5=new et(function(){return Vn(new Uint8Array([0]))}),nd=new Map;function Na(){}function q2(e,t){return e=Ft(e),t=Ft(t),e.split("-")[0]==t.split("-")[0]}function Mh(e,t){return e=Ft(e),t=Ft(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function G2(e,t){return e=Ft(e),t=Ft(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Ft(e){e=x(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=x(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=r5.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function xl(e,t){return e=Ft(e),t=Ft(t),t==e?4:Mh(t,e)?3:G2(t,e)?2:Mh(e,t)?1:0}function Ph(e){var t=e.indexOf("-");return e=t>=0?e.substring(0,t):e,e=e.toLowerCase(),e=r5.get(e)||e}function K2(e){return e.language?Ft(e.language):e.audio&&e.audio.language?Ft(e.audio.language):e.video&&e.video.language?Ft(e.video.language):"und"}function Av(e,t){e=Ft(e);var n=new Set;t=x(t);for(var r=t.next();!r.done;r=t.next())n.add(Ft(r.value));for(t=x(n),r=t.next();!r.done;r=t.next())if(r=r.value,r==e)return r;for(t=x(n),r=t.next();!r.done;r=t.next())if(r=r.value,Mh(r,e))return r;for(t=x(n),r=t.next();!r.done;r=t.next())if(r=r.value,G2(r,e))return r;for(n=x(n),t=n.next();!t.done;t=n.next())if(t=t.value,Mh(e,t))return t;return null}Te("shaka.util.LanguageUtils",Na),Na.findClosestLocale=Av,Na.getLocaleForVariant=K2,Na.getLocaleForText=function(e){return Ft(e.language||"und")},Na.getBase=Ph,Na.relatedness=xl,Na.areSiblings=function(e,t){var n=Ph(e),r=Ph(t);return e!=n&&t!=r&&n==r},Na.normalize=Ft,Na.isSiblingOf=G2,Na.isParentOf=Mh,Na.areLanguageCompatible=q2,Na.areLocaleCompatible=function(e,t){return e=Ft(e),t=Ft(t),e==t};var r5=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 Go(e,t,n,r,i){return t={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:i},r&&(t.keySystemUris=new Set([r])),!n&&wl(e)&&t.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null}),t}function i5(e,t){t=t===void 0?"cenc":t;var n=[],r=[],i=[],o=new Map;e.forEach(function(l,h){var p=Cv(h);l=Cv(l);var m={kty:"oct",kid:p,k:l};n.push(m),r.push(m.kid),i.push(h),o.set(p,l)}),e=JSON.stringify({keys:n});var u=JSON.stringify({kids:r});return u=[{initData:H(Sr(u)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+d.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:u,keyIds:new Set(i),clearKeys:o}}function rd(e,t){if(t.length==1)return t[0];if(e=Vr(e,t),e!=null)return e;throw new B(2,4,4025,t)}function Vr(e,t){var n=o5.get(e);n=x(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;for(var i=x(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.test(o.trim()))return o.trim()}return e==mt?"":null}function NU(e,t){if(e){var n=1;e=e.split(";");for(var r=x(e),i=r.next();!i.done;i=r.next()){var o=i.value;o.includes("=")?(o=o.split("="),i=o[0].startsWith("CC")?o[0]:"CC"+o[0],o=o[1]||"und"):(i="CC"+n,n+=e.length==2?2:1),t.set(i,Ft(o))}}else t.set("CC1","und")}function OU(e,t){if(e){var n=1;e=x(e.split(";"));for(var r=e.next();!r.done;r=e.next()){var i=r.value;i.includes("=")?(i=i.split("="),r="svc"+i[0],i=i[1].split(",")[0].split(":").pop()):(r="svc"+n,n++),t.set(r,Ft(i))}}else t.set("svc1","und")}function W2(e,t){var n=[];e=o5.get(e),e=x(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=x(t),o=i.next();!o.done;o=i.next())o=o.value,r.test(o.trim())&&n.push(o.trim())}return n}var mt="text",Ln={Ba:"video",aa:"audio",Xa:mt,wg:"image",Wm:"application",zk:"chapter"},a5=1/15,o5=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function _h(e,t,n,r){this.g=null,this.l=e,this.i=t,this.m=n,this.j=r,typeof libDPIModule>"u"&&ut("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u"?(this.h=LCEVCdec,typeof this.h.SupportObject>"u"?(ut("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||ut(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)):(ut("Could not find LCEVC Library on this page"),e=!1),e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=new this.h.LCEVCdec(this.l,this.i,this.m))}function X2(e,t,n,r){r.type!=="video"||e.j&&!Y2(r)||e.g&&e.g.appendBuffer(t,"video",r.id,-n,!e.j)}function s5(e){e.g&&e.i.classList.add("shaka-hidden")}_h.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Y2(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Te("shaka.lcevc.Dec",_h),_h.prototype.release=_h.prototype.release;function Ev(){}function kl(e,t){id.set(e,t)}function jU(){var e={};if(Qe(),rs())for(var t=x(id.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=x(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=rs()?id.has(n):$l().canPlayType(n)!="";return e}function u5(e,t){if(t){var n=id.get(t);if(n)return n}throw new B(2,4,4e3,e,t)}Te("shaka.media.ManifestParser",Ev),Ev.unregisterParserByMime=function(e){id.delete(e)},Ev.registerParserByMime=kl,Ev.AccessibilityPurpose={En:"visually impaired",gn:"hard of hearing",zn:"spoken subtitles"};var id=new Map;function l5(){}g=l5.prototype,g.extract=function(){},g.extractRaw608=function(){},g.decode=function(){return[]},g.clear=function(){},g.getStreams=function(){return[]};function J2(){}J2.prototype.init=function(){},J2.prototype.parse=function(){return[]};function Oa(e){this.h=new Map,this.i=0,this.j=new J2,(e=c5(e.toLowerCase()))&&(this.j=e()),this.g=new l5,(e=Tl)&&(this.g=e(),this.h.set(this.i,this.g))}Oa.prototype.init=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?-1:n,n!=-1&&this.i!=n?UU(this,n):t||this.g.clear(),this.j.init(e),n!=-1&&(this.i=n)};function Q2(e,t){t=e.j.parse(t),t=x(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;var r=H(n.packet);if(r.length>0)switch(n.format){case tw:e.g.extract(r,n.pts);break;case d5:e.g.extractRaw608(r,n.pts)}}return e.g.decode()}function UU(e,t){e.h.set(e.i,e.g),e.g=e.h.getOrInsertComputed(t,function(){var n=Tl;return n?n():e.g})}Oa.prototype.remove=function(e){e=e===void 0?[]:e,e=new Set(e);for(var t=x(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var r=this.h.get(n);r&&r.clear(),this.h.delete(n)}};function Z2(e,t){ew.set(e,t)}function c5(e){return ew.get(e)}Te("shaka.media.ClosedCaptionParser",Oa),Oa.findDecoder=function(){return Tl},Oa.unregisterDecoder=function(){Tl=null},Oa.registerDecoder=function(e){Tl=e},Oa.findParser=c5,Oa.unregisterParser=function(e){ew.delete(e)},Oa.registerParser=Z2;var ew=new Map,Tl=null,tw="sei",d5="raw608";function oa(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=xi,this.scroll=f5}oa.prototype.clone=function(){var e=new oa;return e.id=this.id,e.viewportAnchorX=this.viewportAnchorX,e.viewportAnchorY=this.viewportAnchorY,e.regionAnchorX=this.regionAnchorX,e.regionAnchorY=this.regionAnchorY,e.width=this.width,e.height=this.height,e.heightUnits=this.heightUnits,e.widthUnits=this.widthUnits,e.viewportAnchorUnits=this.viewportAnchorUnits,e.scroll=this.scroll,e},Te("shaka.text.CueRegion",oa),oa.prototype.clone=oa.prototype.clone;var xi=1;oa.units={PX:0,PERCENTAGE:xi,LINES:2};var f5="";oa.scrollMode={NONE:f5,UP:"up"};function Iv(e){this.h=e||"",this.g=0}function nw(e,t){for(var n=rw(e);n;)t(n),ad(e,/[ \t]+/gm),n=rw(e)}function ad(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function rw(e){return e.g==e.h.length?null:(e=ad(e,/[^ \t\n]*/gm))?e[0]:null}function iw(e){if(e=ad(e,FU),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+t*60+(Number(e[1])||0)*3600}function od(e){return e?iw(new Iv(e)):null}var FU=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Mv(){}function Hi(e){function t(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||ArrayBuffer.isView(r))return r;if(n.has(r))return null;var i=Array.isArray(r);if(r.constructor!=Object&&!i)return null;n.add(r);var o=i?[]:{},u;for(u in r)o[u]=t(r[u]);return i&&(o.length=r.length),o}}var n=new WeakSet;return t(e)}function mu(e){var t={},n;for(n in e)t[n]=e[n];return t}function ja(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var r=n.toString(),i=e[n];i!==void 0&&(i=ja(i))&&t.push(r+":"+i)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=x(n),r=n.next();!r.done;r=n.next())i=r.value,r=JSON.stringify(i),i=e[i],i!==void 0&&(i=ja(i))&&t.push(r+":"+i);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}Te("shaka.util.ObjectUtils",Mv),Mv.alphabeticalKeyOrderStringify=ja,Mv.shallowCloneObject=mu,Mv.cloneObject=Hi;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/function Dh(e,t){var n=n===void 0?!1:n;return e=kt(e),sd(e,t,n)}function sd(e,t,n){if(e=BU(e,n===void 0?!1:n),!t&&e.length)return e[0];var r=t.split(",");return(t=e.find(function(i){return r.includes(i.tagName)}))?t:null}function aw(e){return sw.has(e)?sw.get(e):""}function BU(e,t){function n(u,l){l=l===void 0?!1:l;for(var h=[];e[i];)if(e.charCodeAt(i)==60){if(e.charCodeAt(i+1)===47){l=i+2,i=e.indexOf(">",i),l=e.substring(l,i);var p=l.indexOf(u);if(p==-1){var m=u.indexOf(".");m>0&&(p=l.indexOf(u.substring(0,m)))}if(p==-1)throw u=e.substring(0,i).split(`
`),Error(`Unexpected close tag
Line: `+(u.length-1)+`
Column: `+(u[u.length-1].length+1)+`
Char: `+e[i]);i+1&&(i+=1);break}else if(e.charCodeAt(i+1)===33){if(e.charCodeAt(i+2)==45){for(;i!==-1&&(e.charCodeAt(i)!==62||e.charCodeAt(i-1)!=45||e.charCodeAt(i-2)!=45||i==-1);)i=e.indexOf(">",i+1);i===-1&&(i=e.length)}else if(e.charCodeAt(i+2)===91&&e.charCodeAt(i+8)===91&&e.substr(i+3,5).toLowerCase()==="cdata"){p=e.indexOf("]]>",i),p==-1?(h.push(e.substr(i+9)),i=e.length):(h.push(e.substring(i+9,p)),i=p+3);continue}i++;continue}if(o>512)throw Error("XML is too deeply nested");o++;e:{m=l,i++;var b=r(),w={};for(p=[];e.charCodeAt(i)!==62&&e[i];){var T=e.charCodeAt(i);if(T>64&&T<91||T>96&&T<123){T=r();for(var k=e.charCodeAt(i);k&&k!==39&&k!==34&&!(k>64&&k<91||k>96&&k<123)&&k!==62;)i++,k=e.charCodeAt(i);var S=i+1;if(i=e.indexOf(e[i],S),S=(" "+e.slice(S,i)).slice(1),k===39||k===34){if(i===-1){if(m={tagName:b,attributes:w,children:p,parent:null},t)for(b=0;b<p.length;b++)typeof p[b]!="string"&&(p[b].parent=m);p=m;break e}}else S=null,i--;if(T.startsWith("xmlns:")){k=S;var A=T.split(":")[1];sw.set(k,A),$U.set(A,k)}b==="tt"&&T==="xml:space"&&S==="preserve"&&(m=!0),w[T]=S}i++}for(e.charCodeAt(i-1)!==47?(i++,p=n(b,m)):i++,m={tagName:b,attributes:w,children:p,parent:null},b=p.length,w=0;w<b;w++)T=p[w],typeof T!="string"?t&&(T.parent=m):w==b-1&&T==`
`&&p.pop();p=m}if(o--,h.push(p),typeof p=="string")break;p.tagName[0]==="?"&&p.children&&(h.push.apply(h,se(p.children)),p.children=[])}else p=i,i=e.indexOf("<",i)-1,i===-2&&(i=e.length),p=(" "+e.slice(p,i+1)).slice(1),l?p.length>0&&h.push(p):(h.length&&p.length==1&&p[0]==`
`||p.trim().length>0)&&h.push(p),i++;return h}function r(){for(var u=i;`\r
	>/= `.indexOf(e[i])===-1&&e[i];)i++;return(" "+e.slice(u,i)).slice(1)}var i=0,o=0;return n("")}function Pv(e){return typeof e=="string"}function Sl(e){var t=[];if(!e.children)return[];e=x(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Rt(e,t){var n=[];if(!e.children)return[];e=x(e.children);for(var r=e.next();!r.done;r=e.next())r=r.value,r.tagName===t&&n.push(r);return n}function mn(e){if(typeof e=="string")return Fn(e);var t=[];e=x(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"&&t.push(n);return t=t.join(""),t===""?null:Fn(t)}function Cr(e){for(var t=x(e.children),n=t.next();!n.done;n=t.next())if(typeof n.value!="string")return null;return(e=mn(e))&&(e=e.trim()),e}function Ko(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=x(e.children);for(var r=e.next();!r.done;r=e.next())Ko(r.value,t,n)}return n}function Yt(e,t){return e=Rt(e,t),e.length!=1?null:e[0]}function qi(e,t,n){return e=h5(e,t,n),e.length!=1?null:e[0]}function wt(e,t,n,r){r=r===void 0?null:r;var i=null;return e=e.attributes[t],e==null||e===""&&r!==null||(i=n(e)),i??r}function ko(e,t,n){return t=aw(t),e.attributes[t+":"+n]||null}function h5(e,t,n){var r=aw(t);if(t=[],e.children)for(n=r?r+":"+n:n,e=x(e.children),r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===n&&t.push(r);return t}function Wo(e,t,n){t=x(t);for(var r=t.next();!r.done;r=t.next())if(r=ko(e,r.value,n))return r;return null}function Xo(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Gi(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function _v(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function Jr(e){return e=Number(e),e%1===0?e:null}function Lh(e){return e=Number(e),e%1===0&&e>0?e:null}function Ki(e){return e=Number(e),e%1===0&&e>=0?e:null}function Rh(e){return e=Number(e),isNaN(e)?null:e}function p5(e){return e?e.toLowerCase()==="true":!1}function VU(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Dv(e){var t=[];e=Fn(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=x(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=n.match(/^([\w]+)/);if(r){var i=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),u=n.match(/(@n='(\d+)')/),l=n.match(/\[(\d+)\]/);t.push({name:r[0],id:i?i[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:u?Number(u[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:l?Number(l[1])-1:null,Hc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Hc=n.slice(1))}return t}function g5(e,t){var n=Dv(t.attributes.sel||"");if(n.length){var r=n[n.length-1],i=t.attributes.pos||null;n=r.position,n==null&&(r.t!==null&&(n=m5(e,"t",r.t)),r.n!==null&&(n=m5(e,"n",r.n))),n===null?n=i==="prepend"?0:e.length:i==="prepend"?--n:i==="after"&&++n,i=t.tagName,(r=r.Hc)&&e[n]?v5(e[n],i,r,Cr(t)||""):(i!=="remove"&&i!=="replace"||e.splice(n,1),i!=="add"&&i!=="replace"||e.splice.apply(e,[n,0].concat(se(t.children))))}}function m5(e,t,n){var r=0;e=x(e);for(var i=e.next();!i.done;i=e.next()){if(Number(i.value.attributes[t])===n)return r;r++}return null}function v5(e,t,n,r){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=r)}function ow(e){if(!e)return null;var t={tagName:e.tagName,attributes:mu(e.attributes),children:[],parent:null};e=x(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=ow(n),n.parent=t),t.children.push(n);return t}var sw=new Map,$U=new Map;function rn(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new oa,this.position=null,this.positionAlign=Rv,this.size=0,this.textAlign=Yo,this.direction=jh,this.writingMode=Cl,this.lineInterpretation=Uh,this.line=null,this.lineHeight="",this.lineAlign=Al,this.displayAlign=Oh,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=C5,this.fontStyle=lw,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={columns:32,rows:15}}function y5(e,t){return e=new rn(e,t,""),e.lineBreak=!0,e}rn.prototype.clone=function(){function e(r){if(r===null||typeof r!="object")return r;if(Array.isArray(r))return r.map(e);if(r instanceof rn||r instanceof oa)return r.clone();var i={},o;for(o in r)i[o]=e(r[o]);return i}var t=new rn(0,0,""),n;for(n in this)t[n]=e(this[n]);return t};function Nh(e,t){if(e.payload!=t.payload||!(Math.abs(e.startTime-t.startTime)<.001&&Math.abs(e.endTime-t.endTime)<.001))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!xe(e.nestedCues,t.nestedCues,Nh))return!1}else if(n=="region"||n=="cellResolution"){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!xe(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function Lv(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&b5(t);var r=n;n=[];for(var i=-1,o=0;o<r.length;o++)r[o]==="<"?i=o+1:r[o]===">"&&i>0&&(i=r.substr(i,o-i),i.match(HU)&&n.push(i),i=-1);for(n=x(n),o=n.next();!o.done;o=n.next())o=o.value,r=r.replace("<"+o+">",'<div time="'+o+'">'),r+="</div>";e:{o=r,i=[];var u=-1;n="",r=!1;for(var l=0;l<o.length;l++)if(o[l]==="/"){var h=o.indexOf(">",l);if(h===-1){n=o;break e}if((h=o.substring(l+1,h))&&h=="v"){r=!0;var p=null;if(i.length&&(p=i[i.length-1]),p){if(p===h)n+="/"+h+">";else{if(!p.startsWith("v")){n+=o[l];continue}n+="/"+p+">"}l+=h.length+1}else n+=o[l]}else n+=o[l]}else o[l]==="<"?(u=l+1,o[u]!="v"&&(u=-1)):o[l]===">"&&u>0&&(i.push(o.substr(u,l-u)),u=-1),n+=o[l];for(o=x(i),i=o.next();!i.done;i=o.next())i=i.value,u=i.replace(" ",".voice-"),n=n.replace("<"+i+">","<"+u+">"),n=n.replace("</"+i+">","</"+u+">"),r||(n+="</"+u+">")}n=zU(n),e.payload="",r="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var m=sd(r,"span")}catch{}if(m)if(m=m.children,m.length!=1||m[0].tagName)for(m=x(m),n=m.next();!n.done;n=m.next())w5(n.value,e,t);else e.payload=Fn(n);else e.payload=Fn(n)}else e.payload=Fn(n)}function b5(e){for(var t=x(Object.entries(T5)),n=t.next();!n.done;n=t.next()){var r=x(n.value);n=r.next().value,r=r.next().value;var i=new rn(0,0,"");i.color=r,e.set("."+n,i)}for(t=x(Object.entries(S5)),n=t.next();!n.done;n=t.next())r=x(n.value),n=r.next().value,r=r.next().value,i=new rn(0,0,""),i.backgroundColor=r,e.set("."+n,i)}function zU(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return t[i]||""}):e||""}function w5(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new oa,r.position=null,r.size=0,r.textAlign=Yo,e.tagName)for(var i=x(e.tagName.split(/(?=[ .])+/g)),o=i.next();!o.done;o=i.next()){var u=o=o.value;if(u.startsWith(".voice-")){var l=u.split("-").pop();u='v[voice="'+l+'"]',n.has(u)||(u="v[voice="+l+"]")}switch(n.has(u)&&(l=r,u=n.get(u))&&(l.backgroundColor=u.backgroundColor||l.backgroundColor,l.color=u.color||l.color,l.fontFamily=u.fontFamily||l.fontFamily,l.fontSize=u.fontSize||l.fontSize,l.textShadow=u.textShadow||l.textShadow,l.fontWeight=u.fontWeight,l.fontStyle=u.fontStyle,l.opacity=u.opacity,l.rubyTag=u.rubyTag,l.textCombineUpright=u.textCombineUpright,l.wrapLine=u.wrapLine),o){case"br":r=y5(r.startTime,r.endTime),t.nestedCues.push(r);return;case"b":r.fontWeight=Fh;break;case"i":r.fontStyle=Bh;break;case"u":r.textDecoration.push(ud);break;case"font":(o=e.attributes.color)&&(r.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=od(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(i=e.children,Pv(e)||i.length==1&&Pv(i[0]))for(n=mn(e).split(`
`),e=!0,n=x(n),i=n.next();!i.done;i=n.next())i=i.value,e||(e=y5(r.startTime,r.endTime),t.nestedCues.push(e)),i.length>0&&(e=r.clone(),e.payload=Fn(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),t=x(i),e=t.next();!e.done;e=t.next())w5(e.value,r,n)}Te("shaka.text.Cue",rn),rn.parseCuePayload=Lv,rn.equal=Nh,rn.prototype.clone=rn.prototype.clone;var Rv="auto";rn.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Rv};var Yo="center",uw={LEFT:"left",RIGHT:"right",CENTER:Yo,START:"start",END:"end"};rn.textAlign=uw;var Oh="after",x5={BEFORE:"before",CENTER:"center",AFTER:Oh};rn.displayAlign=x5;var jh="ltr";rn.direction={HORIZONTAL_LEFT_TO_RIGHT:jh,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Cl="horizontal-tb";rn.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Cl,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Uh=0;rn.lineInterpretation={LINE_NUMBER:Uh,PERCENTAGE:1};var Al="start",k5={CENTER:"center",START:Al,END:"end"};rn.lineAlign=k5;var T5={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};rn.defaultTextColor=T5;var S5={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};rn.defaultTextBackgroundColor=S5;var C5=400,Fh=700;rn.fontWeight={NORMAL:C5,BOLD:Fh};var lw="normal",Bh="italic",A5={NORMAL:lw,ITALIC:Bh,OBLIQUE:"oblique"};rn.fontStyle=A5;var ud="underline";rn.textDecoration={UNDERLINE:ud,LINE_THROUGH:"line-through",OVERLINE:"overline"};var HU=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function vu(){}vu.prototype.destroy=function(){};function El(e,t,n){cw.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,Qh:t})}function ld(e,t){for(var n=x(E5),r=n.next();!r.done;r=n.next()){e:{var i=e;r=r.value,r=r===void 0?null:r,i=i.toLowerCase().split(";")[0],r=x(r!==null?[r]:E5);for(var o=r.next();!o.done;o=r.next())if(o=cw.get(i+"-"+o.value)){i=o.Qh;break e}i=null}if(i&&(r=i(),o=r.isSupported(e,t),r.destroy(),o))return i}return null}Te("shaka.transmuxer.TransmuxerEngine",vu),vu.findTransmuxer=ld,vu.unregisterTransmuxer=function(e,t){cw.delete(e.toLowerCase().split(";")[0]+"-"+t)},vu.registerTransmuxer=El,vu.prototype.destroy=vu.prototype.destroy;var cw=new Map;vu.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4};var E5=[4,3,2,1];function dw(){}function tr(e,t){var n=e;return t&&!sa.includes(e)&&(n+='; codecs="'+t+'"'),n}function Nv(e,t){return t&&(e+='; codecs="'+t+'"'),e}function fw(e,t,n){var r=tr(e,t);return t=Nv(e,t),ld(t)?(e=ld(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?r.replace("video","audio"):r,n}function cd(e){return e.split(";")[0].split("/")[1]}function Ar(e){var t=I5(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc";case e==="lvc1":return"lcevc"}return e}function yu(e){var t=[];e=x(e.split(","));for(var n=e.next();!n.done;n=e.next())n=I5(n.value),t.push(n[0]);return t.sort().join(",")}function ki(e){return e.split(";")[0]}function Qr(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Vh(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"||e==="audio/x-mpegurl"}function $h(e,t){var n=Qe(),r=e.toLowerCase();return r=="flac"?n.Qa()!="WEBKIT"?"flac":"fLaC":r==="opus"?n.Qa()!="WEBKIT"?"opus":cd(t)=="mp4"?"Opus":"opus":r=="ac-3"&&n.Ie()?"ec-3":e}function hw(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function I5(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Te("shaka.util.MimeUtils",dw),dw.getFullTypeWithAllCodecs=Nv,dw.getFullType=tr,new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var sa=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ms(e,t){this.l=null,this.j=e,this.D=t===void 0?"UNKNOWN":t,this.C=this.J=this.I=!1,this.o=new Map,this.i=new Map,this.u=0,this.B=1/0,this.h=this.g=null,this.H="",this.F=function(){},this.m=new Map}function $r(e,t){qh.set(e,t)}function zh(e){return qh.get(e)}function Hh(e){return qh.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!Tl:!1}Ms.prototype.destroy=function(){return this.j=this.l=null,this.o.clear(),this.i.clear(),this.m.clear(),Promise.resolve()};function M5(e,t,n,r,i,o){o=o===void 0?-1:o;var u,l,h,p,m,b,w,T,k;return P(function(S){if(S.h==1)return e.C||e.o.has(o)?S.g(Promise.resolve(),2):(u=e.i.get(o)||[],u.push({buffer:t,startTime:n,endTime:r,uri:i,Qk:o}),e.i.set(o,u),S.return());if(!e.l||!e.j)return S.return();if(n==null||r==null)return e.l.parseInit(H(t)),S.return();for(l=e.C?0:e.o.get(o),h=e.I||e.C?n:e.o.get(o),p={periodStart:l,segmentStart:n,segmentEnd:r,vttOffset:h,isMpegTs:e.J},m=e.l.parseMedia(H(t),p,i,[]),b=x(m),w=b.next();!w.done;w=b.next())T=w.value,e.F(T,i||null,p);k=m.filter(function(A){return A.startTime>=e.u&&A.startTime<e.B}),e.j.append(k),e.g==null&&(e.g=Math.max(n,e.u)),e.h=Math.min(r,e.B),S.j()})}Ms.prototype.remove=function(e,t,n){n=n===void 0?!1:n;var r=this,i,o,u,l,h,p,m,b;return P(function(w){if(w.h==1)return w.g(Promise.resolve(),2);if(e>=t||n&&(WU(r,e,t),r.H===""))return w.return();for(i=function(T){return T.startTime<t&&T.endTime>e},o=x(r.i.keys()),u=o.next();!u.done;u=o.next()){for(l=u.value,h=r.i.get(l),p=[],m=0;m<h.length;m++)b=h[m],i(b)||p.push(b);r.i.set(l,p)}r.j&&r.j.remove(e,t)&&r.g!=null&&(t<=r.g||e>=r.h||(e<=r.g&&t>=r.h?r.g=r.h=null:e<=r.g&&t<r.h?r.g=t:e>r.g&&t>=r.h&&(r.h=e)),L5(r)),w.j()})};function P5(e,t,n){n=n===void 0?-1:n,(!e.o.has(n)||e.D!=="HLS"||e.D==="HLS"&&n===-1&&e.o.get(n)===0)&&e.o.set(n,t),t=e.i.get(n)||[];for(var r=0;r<t.length;r++){var i=t[r];M5(e,i.buffer,i.startTime,i.endTime,i.uri,i.Qk)}e.i.set(n,[])}function qU(e,t){e.J=t}function GU(e,t,n){e.u=t,e.B=n}function _5(e,t,n){e.H=t,(t=e.m.get(t))&&(t=t.filter(function(r){return r.endTime<=n}),t.length&&e.j.append(t))}function D5(e,t,n){t.startTime+=n,t.endTime+=n,t=x(t.nestedCues);for(var r=t.next();!r.done;r=t.next())D5(e,r.value,n)}function KU(e,t,n){var r=new Map;t=x(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value;i=o.stream,o=o.cue,r.getOrInsert(i,[]),D5(e,o,n),o.startTime>=e.u&&o.startTime<e.B&&(r.get(i).push(o),i==e.H&&e.j.append([o]))}for(n=x(r.keys()),t=n.next();!t.done;t=n.next())for(i=t.value,t=e.m.getOrInsertComputed(i,function(){return[]}),i=x(r.get(i)),o=i.next();!o.done;o=i.next())t.push(o.value);L5(e)}function WU(e,t,n){for(var r=x(e.m.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o=e.m.get(i);o=o.filter(function(u){return u.startTime<t||u.endTime>=n}),e.m.set(i,o)}}function L5(e){for(var t=1/0,n=-1/0,r=x(e.m.values()),i=r.next();!i.done;i=r.next()){i=x(i.value);for(var o=i.next();!o.done;o=i.next())o=o.value,t=Math.min(t,o.startTime),n=Math.max(n,o.endTime)}t!==1/0&&n!==-1/0&&(e.g=e.g==null?Math.max(t,e.u):Math.min(e.g,Math.max(t,e.u)),e.h=Math.max(e.h,Math.min(n,e.B)))}Te("shaka.text.TextEngine",Ms),Ms.prototype.destroy=Ms.prototype.destroy,Ms.findParser=zh,Ms.unregisterParser=function(e){qh.delete(e)},Ms.registerParser=$r;var qh=new Map;function ft(e){this.h=e,this.g=null}ft.prototype.Va=function(){return this.stop(),this.h(),this},ft.prototype.$=function(e){var t=this;return this.stop(),R5(this,function(){t.h()},e),this},ft.prototype.Ka=function(e){return this.stop(),N5(this,e),this},ft.prototype.stop=function(){var e;(e=this.g)==null||e.call(this),this.g=null};function R5(e,t,n){var r=!0,i=null;e.g=function(){clearTimeout(i),r=!1},i=setTimeout(function(){r&&t()},n*1e3)}function N5(e,t){R5(e,function(){N5(e,t),e.h()},t)}Te("shaka.util.Timer",ft),ft.prototype.stop=ft.prototype.stop,ft.prototype.tickEvery=ft.prototype.Ka,ft.prototype.tickAfter=ft.prototype.$,ft.prototype.tickNow=ft.prototype.Va;function Il(e){return e!=null}function Ov(e,t){return Promise.race([t,new Promise(function(n,r){new ft(r).$(e)})])}function O5(e){return new Promise(function(t){new ft(t).$(e)})}function j5(){}function U5(e,t,n,r,i){if(i.length){var o=e.textStreams;i=x(i);for(var u=i.next(),l={};!u.done;l={ui:void 0},u=i.next())if(l.ui=u.value,u=o.filter((function(k){return function(S){return!!(S.codecs.startsWith(k.ui)||S.mimeType.startsWith(k.ui))}})(l)),u.length){o=u;break}e.textStreams=o}if(o=e.variants,(t.length||n.length)&&(o=XU(o,t,n)),r.length){for(t=new Ae,o=x(o),n=o.next();!n.done;n=o.next())n=n.value,t.push(String(n.video.width||0),n);var h=[];t.forEach(function(k,S){k=0;var A=[];S=x(S);for(var M=S.next(),_={};!M.done;_={vg:void 0},M=S.next())_.vg=M.value,M=r.filter((function(R){return function(U){return R.vg.decodingInfos[0][U]}})(_)).length,M>k?(k=M,A=[_.vg]):M==k&&A.push(_.vg);h.push.apply(h,se(A))}),o=h}for(t=new Set,n=x(o),i=n.next();!i.done;i=n.next())i=i.value,i.video&&t.add(i.video);if(t.size){var p={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};i=Array.from(t).sort(function(k,S){return k.bandwidth&&S.bandwidth&&k.bandwidth!=S.bandwidth?k.bandwidth-S.bandwidth:k.width!=S.width?k.width-S.width:k.codecs&&S.codecs?(k=Ar(k.codecs),S=Ar(S.codecs),(p[k]||1)-(p[S]||1)):0});var m=[];for(t=new Map,n=function(k){var S=[String(k.width||""),String(k.height||""),String(Math.round(k.frameRate||0)),k.hdr||"",k.fastSwitching];return k.dependencyStream&&S.push(k.dependencyStream.baseOriginalId||""),k.roles&&S.push(k.roles.sort().join("_")),S.join(";")},i=x(i),u=i.next();!u.done;u=i.next()){u=u.value,l=n(u);var b=t.get(l)||[];if(b.length){var w=Ar(b[b.length-1].codecs),T=Ar(u.codecs);w==T&&(b.push(u),m.push(u.id))}else b.push(u),m.push(u.id);t.set(l,b)}e.variants=o.filter(function(k){return!((k=k.video)&&!m.includes(k.id))})}else e.variants=o}function XU(e,t,n){t=x(t);for(var r=t.next(),i={};!r.done;i={vk:void 0},r=t.next())if(i.vk=r.value,r=e.filter((function(o){return function(u){return u.video&&u.video.codecs.startsWith(o.vk)}})(i)),r.length){e=r;break}for(n=x(n),t=n.next(),r={};!t.done;r={Li:void 0},t=n.next())if(r.Li=t.value,t=e.filter((function(o){return function(u){return u.audio&&u.audio.codecs.startsWith(o.Li)}})(r)),t.length){e=t;break}return e}function YU(e,t,n){e.variants=e.variants.filter(function(r){return jv(r,t,n)})}function jv(e,t,n){function r(u,l,h){return u>=l&&u<=h}if(e&&e.video&&e.video.width&&e.video.height){var i=e.video.width,o=e.video.height;if(o>i&&(o=x([o,i]),i=o.next().value,o=o.next().value),!r(i,t.minWidth,Math.min(t.maxWidth,n.width))||!r(o,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i*o,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!r(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function JU(e,t,n,r){return n=n===void 0?[]:n,r=r===void 0?{}:r,P(function(i){return i.h==1?i.g(F5(e,t,t.offlineSessionIds.length>0,n,r),2):(tF(t),i.g(nF(t),0))})}function F5(e,t,n,r,i){var o,u;return P(function(l){if(l.h==1)return Qe().dk()&&QU(t.variants),l.g(pw(t.variants,n,!1,r),2);o=null,e&&(u=e.Xb())&&(o=u.keySystem),t.variants=t.variants.filter(function(h){var p=ZU(h,o,i);if(!p){var m=[];h.audio&&m.push(q5(h.audio)),h.video&&m.push(q5(h.video))}return p}),l.j()})}function QU(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=x(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&n.add(r.video);for(n=x(n),e=n.next();!e.done;e=n.next()){e=e.value,r=x(t);for(var i=r.next();!i.done;i=r.next()){var o=x(i.value);if(i=o.next().value,o=o.next().value,e.codecs.includes(i)){e.codecs=e.codecs.replace(i,o);break}}}}function ZU(e,t,n){if(!e.decodingInfos.some(function(h){return!(!h.supported||t&&(h=h.keySystemAccess)&&(n[h.keySystem]||h.keySystem)!=t)}))return!1;var r=Qe(),i=r.Cb()==="Xbox";r=r.Ra()==="MOBILE"&&r.Qa()==="GECKO";var o=e.video,u=o&&o.width||0,l=o&&o.height||0;return i&&o&&(u>1920||l>1080)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(i=o&&o.dependencyStream)&&!Y2(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function B5(e,t){var n,r,i,o,u,l,h;return P(function(p){if(p.h==1){for(n=function(m,b){if(m){var w=mu(m);return w.supported=m.supported&&b.supported,w.powerEfficient=m.powerEfficient&&b.powerEfficient,w.smooth=m.smooth&&b.smooth,b.keySystemAccess&&!w.keySystemAccess&&(w.keySystemAccess=b.keySystemAccess),w}return b},r=null,i=[],o=x(t),u=o.next(),l={};!u.done;l={cache:void 0,gf:void 0},u=o.next())h=u.value,l.gf=ja(h),l.cache=Bv,l.cache.has(l.gf)?r=n(r,l.cache.get(l.gf)):i.push(eF(h).then((function(m){return function(b){var w=null;b=x(b||[]);for(var T=b.next();!T.done;T=b.next())w=n(w,T.value);w&&(m.cache.set(m.gf,w),r=n(r,w))}})(l)));return p.g(Promise.all(i),2)}r&&e.decodingInfos.push(r),p.j()})}function eF(e){var t=[""];e.video&&(t=Qr(e.video.contentType).split(","));var n=[""];e.audio&&(n=Qr(e.audio.contentType).split(","));var r=[];t=x(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;for(var o=x(n),u=o.next(),l={};!u.done;l={Yc:void 0},u=o.next())u=u.value,l.Yc=Hi(e),e.video&&(l.Yc.video.contentType=tr(ki(l.Yc.video.contentType),i)),e.audio&&(l.Yc.audio.contentType=tr(ki(l.Yc.audio.contentType),u)),r.push(new Promise((function(h){return function(p,m){(Qe().Ra()=="MOBILE"?Ov(5,navigator.mediaCapabilities.decodingInfo(h.Yc)):navigator.mediaCapabilities.decodingInfo(h.Yc)).then(function(b){p(b)}).catch(m)}})(l)))}return Promise.all(r).catch(function(){return JSON.stringify(e),null})}function pw(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N;return P(function(j){switch(j.h){case 1:if(e.some(function(V){return V.decodingInfos.length}))return j.return();i=x(r),o=i.next(),u={};case 2:if(o.done){j.A(4);break}u.Jj=o.value,l=!1,h=x(e),p=h.next();case 5:if(p.done){j.A(7);break}m=p.value,b=V5(m,t,n).filter((function(V){return function(q){return q=q[0],q=q.keySystemConfiguration&&q.keySystemConfiguration.keySystem,!q||q===V.Jj}})(u)),w=x(b),T=w.next();case 8:if(T.done){j.A(10);break}return k=T.value,j.g(B5(m,k),9);case 9:T=w.next(),j.A(8);break;case 10:m.decodingInfos.some(function(V){return V.supported})&&(l=!0),p=h.next(),j.A(5);break;case 7:if(l)return j.return();u={Jj:void 0},o=i.next(),j.A(2);break;case 4:S=x(e),A=S.next();case 12:if(A.done){j.A(0);break}M=A.value,_=V5(M,t,n).filter(function(V){return V=V[0],V=V.keySystemConfiguration&&V.keySystemConfiguration.keySystem,!V||!r.includes(V)}),R=x(_),U=R.next();case 15:if(U.done){A=S.next(),j.A(12);break}return N=U.value,j.g(B5(M,N),16);case 16:U=R.next(),j.A(15)}})}function V5(e,t,n){var r=e.audio,i=e.video,o=[],u=[];if(i)for(var l=x(i.fullMimeTypes),h=l.next();!h.done;h=l.next()){h=h.value;var p=Qr(h);if(p.includes(",")&&!r){var m=p.split(","),b=ki(h);p=rd("video",m),m=rd("audio",m),m=$h(m,b),b=fw(b,m,"audio"),u.push({contentType:b,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(p=hw(p),h={contentType:fw(ki(h),p,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||30},i.hdr)switch(i.hdr){case"PQ":h.transferFunction="pq";break;case"HLG":h.transferFunction="hlg"}i.colorGamut&&(h.colorGamut=i.colorGamut),o.push(h)}if(r)for(l=x(r.fullMimeTypes),h=l.next();!h.done;h=l.next())p=h.value,h=ki(p),p=$h(Qr(p),h),h=fw(h,p,"audio"),u.push({contentType:h,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(l=[],o.length==0&&o.push(null),u.length==0&&u.push(null),o=x(o),h=o.next();!h.done;h=o.next())for(h=h.value,p=x(u),b=p.next();!b.done;b=p.next())b=b.value,m={type:n?"file":"media-source"},h&&(m.video=h),b&&(m.audio=b),l.push(m);if(u=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!u.length)return[l];for(e=[],n=new Map,u=x(u),o=u.next();!o.done;o=u.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(u=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=x(n.keys()),h=o.next();!h.done;h=o.next()){for(h=h.value,b=n.get(h),p=new Map,b=x(b),m=b.next();!m.done;m=b.next()){m=m.value;var w=m.videoRobustness+","+m.audioRobustness;p.get(w)||p.set(w,[]),p.get(w).push(m)}for(p=x(p.values()),b=p.next();!b.done;b=p.next()){b=b.value,m=[],w=x(l);for(var T=w.next();!T.done;T=w.next()){T=Object.assign({},T.value);for(var k={keySystem:h,initDataType:"cenc",persistentState:u,distinctiveIdentifier:"optional",sessionTypes:t},S=x(b),A=S.next();!A.done;A=S.next()){if(A=A.value,A.initData&&A.initData.length){for(var M=new Set,_=x(A.initData),R=_.next();!R.done;R=_.next())M.add(R.value.initDataType);k.initDataType=A.initData[0].initDataType}A.distinctiveIdentifierRequired&&(k.distinctiveIdentifier="required"),A.persistentStateRequired&&(k.persistentState="required"),A.sessionType&&(k.sessionTypes=[A.sessionType]),r&&(k.audio?(A.encryptionScheme&&(k.audio.encryptionScheme=k.audio.encryptionScheme||A.encryptionScheme),k.audio.robustness=k.audio.robustness||A.audioRobustness):(k.audio={robustness:A.audioRobustness},A.encryptionScheme&&(k.audio.encryptionScheme=A.encryptionScheme)),k.audio.robustness==""&&delete k.audio.robustness),i&&(k.video?(A.encryptionScheme&&(k.video.encryptionScheme=k.video.encryptionScheme||A.encryptionScheme),k.video.robustness=k.video.robustness||A.videoRobustness):(k.video={robustness:A.videoRobustness},A.encryptionScheme&&(k.video.encryptionScheme=A.encryptionScheme)),k.video.robustness==""&&delete k.video.robustness)}T.keySystemConfiguration=k,m.push(T)}e.push(m)}}return e}function tF(e){e.textStreams=e.textStreams.filter(function(t){return t=tr(t.mimeType,t.codecs),Hh(t)})}function nF(e){var t,n,r,i,o,u,l;return P(function(h){switch(h.h){case 1:t=[],n=x(e.imageStreams),r=n.next();case 2:if(r.done){h.A(4);break}if(i=r.value,o=i.mimeType,o=="application/mp4"&&i.codecs=="mjpg"&&(o="image/jpg"),Vv.has(o)){h.A(5);break}if(u=oF.get(o),!u){Vv.set(o,!1),h.A(5);break}return h.g(rF(u),7);case 7:l=h.i,Vv.set(o,l);case 5:Vv.get(o)&&t.push(i),r=n.next(),h.A(2);break;case 4:e.imageStreams=t,h.j()}})}function rF(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function dd(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,o=t?t.codecs:null,u=n?n.codecs:null,l=t?t.groupId:null,h=[];n&&h.push(n.mimeType),t&&h.push(t.mimeType),h=h[0]||null;var p=[];t&&p.push(t.kind),n&&p.push(n.kind),p=p[0]||null;var m=new Set;if(t)for(var b=x(t.roles),w=b.next();!w.done;w=b.next())m.add(w.value);if(n)for(b=x(n.roles),w=b.next();!w.done;w=b.next())m.add(w.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,videoLabel:null,kind:p,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:h,audioMimeType:r,videoMimeType:i,codecs:"",audioCodec:o,videoCodec:u,primary:e.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,audioLanguage:null,videoLanguage:null,forced:!1,videoId:null,audioId:null,audioGroupId:l,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,e.videoRoles=n.roles,e.videoLanguage=n.language||null,e.videoLabel=n.label,(r=n.dependencyStream)&&(e.width=r.width||e.width,e.height=r.height||e.height,e.videoCodec=r.codecs||e.videoCodec,e.pixelAspectRatio=r.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&r.bandwidth&&(e.videoBandwidth+=r.bandwidth)),u.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=i,i=u.split(",");try{e.videoCodec=rd("video",i),e.audioCodec=rd("audio",i)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.audioLanguage=t.language||null,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,i=t.dependencyStream)&&(e.audioCodec=i.codecs||e.audioCodec,e.audioBandwidth&&i.bandwidth&&(e.audioBandwidth+=i.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function Gh(e){return{id:e.id,active:!1,type:mt,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function gw(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=e.segmentIndex.Ib());var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&t!=null&&(t/=Number(i.split("x")[0])),i&&n!=null&&(n/=Number(i.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:i||null,originalImageId:e.originalId}}function mw(e){return{id:e.id,type:"chapter",bandwidth:e.bandwidth||0,language:e.language}}function Kh(e){return e.__shaka_id==null&&(e.__shaka_id=aF++),e.__shaka_id}function $5(e,t){return t=t===void 0?!1:t,t={id:Kh(e),active:t&&e.mode!="disabled",type:mt,bandwidth:0,language:Ft(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:e.kind=="forced",originalTextId:e.id,originalLanguage:e.language},e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function Uv(e,t){var n=e?e.language:null;if(n={id:Kh(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:Ft(n||"und"),label:e?e.label:null,videoLabel:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:e?e.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,audioLanguage:e?Ft(e.language||"und"):null,videoLanguage:t?Ft(t.language||"und"):null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+(","+n.videoCodec):n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function Fv(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function Wh(e){return e.filter(function(t){return Fv(t)})}function Ps(e,t,n,r){if(!t)return[];var i=e,o=e.filter(function(h){return h.primary});o.length&&(i=o);var u=i.length?i[0].language:"";if(i=i.filter(function(h){return h.language==u}),t){var l=Av(Ft(t),e.map(function(h){return h.language}));if(l)i=e.filter(function(h){return Ft(h.language)==l});else return[]}if(i=i.filter(function(h){return h.forced==r}),n){if(e=z5(i,n),e.length)return e}else if(e=i.filter(function(h){return h.roles.length==0}),e.length)return e;return e=i.map(function(h){return h.roles}).reduce(function(h,p){return h.concat(p)},[]),e.length?z5(i,e[0]):i}function z5(e,t){return e.filter(function(n){return n.roles.includes(t)})}function iF(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function H5(e,t){t.length&&(t=t.filter(function(n){return Ar(e.codecs)==Ar(n.codecs)}).sort(function(n,r){return n.bandwidth&&r.bandwidth&&n.bandwidth!=r.bandwidth?n.bandwidth-r.bandwidth:(n.width||0)-(r.width||0)}),e.trickModeVideo=t[0],t.length>1&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function q5(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function _s(e){var t={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",supplementalCodecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],accessibilityPurpose:null,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1};return Object.assign(t,e),t.mimeType&&t.fullMimeTypes.add(tr(t.mimeType,t.codecs)),t}function G5(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=x(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=_s({mimeType:n?ki(n):"",codecs:n?Qr(n):"",encrypted:!0,language:"und",type:"video"});n.startsWith("audio/")?(r.type="audio",t.audio=r):t.video=r}return t}Te("shaka.util.StreamUtils",j5),j5.meetsRestrictions=jv;var Bv=new Map,aF=0,Vv=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),oF=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function vn(){var e=this;this.L=this.H=null,this.o=!1,this.u=new er,this.i=new he,navigator.connection&&navigator.connection.addEventListener&&this.i.G(navigator.connection,"change",function(){e.g.useNetworkInformation&&navigator.onLine&&(e.u=new er,e.g&&e.u.configure(e.g.advanced),e.trySuggestStreams())}),this.m=[],this.I=1,this.O=!1,this.l=this.h=this.g=this.B=null,this.C=new ft(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.H&&e.H(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.D=d,"documentPictureInPicture"in d&&this.i.G(d.documentPictureInPicture,"enter",function(){e.D=d.documentPictureInPicture.window,e.C&&e.C.Va(),e.i.oa(e.D,"pagehide",function(){e.D=d,e.C&&e.C.Va()})}),this.M=this.F=this.j=null,this.K=this.J=0}g=vn.prototype,g.stop=function(){this.H=null,this.o=!1,this.m=[],this.I=1,this.h=this.B=null;var e;(e=this.l)==null||e.disconnect(),this.l=null;var t;(t=this.C)==null||t.stop(),this.F=this.j=null,X5(this)},g.release=function(){this.stop(),this.i.release(),this.C=null},g.init=function(e,t){this.H=e,this.L=t},g.chooseVariant=function(e){e=e===void 0?!1:e;var t=1/0,n=1/0;if(this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,t=this.D.screen.height*n,n*=this.D.screen.width),this.l&&this.g.restrictToElementSize){var r=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,i=this.h.clientHeight,o=this.h.clientWidth;this.j&&document.pictureInPictureElement&&document.pictureInPictureElement==this.h&&(i=this.j.height,o=this.j.width),t=Math.min(t,i*r),n=Math.min(n,o*r)}if(i=this.m.filter(function(p){return p&&!(p.audio&&p.audio.fastSwitching||p.video&&p.video.fastSwitching)}),i.length||(i=this.m),r=i,e&&i.length!=this.m.length&&(r=this.m.filter(function(p){return p&&!!(p.audio&&p.audio.fastSwitching||p.video&&p.video.fastSwitching)})),e=vw(this,this.g.restrictions,r,1/0,1/0),t!=1/0||n!=1/0){for(e=sF(e),e=x(e),i=e.next();!i.done;i=e.next())if(i=i.value,i.height>=t&&i.width>=n){t=i.height,n=i.width;break}e=vw(this,this.g.restrictions,r,t,n)}for(t=this.getBandwidthEstimate(),r.length&&!e.length&&(e=vw(this,null,r,1/0,1/0),e=[e[0]]),n=e[0]||null,r=0;r<e.length;r++){i=e[r];var u=isNaN(this.I)?1:Math.abs(this.I);o=u*i.bandwidth/this.g.bandwidthDowngradeTarget;for(var l={bandwidth:1/0},h=r+1;h<e.length;h++)if(i.bandwidth!=e[h].bandwidth){l=e[h];break}u=u*l.bandwidth/this.g.bandwidthUpgradeTarget,n&&i&&t>=o&&t<=u&&(n.bandwidth!=i.bandwidth||n.bandwidth==i.bandwidth&&n.video&&i.video&&(n.video.width<i.video.width||n.video.height<i.video.height))&&(n=i)}return this.B=Date.now(),n},g.enable=function(){this.o=!0,$v(this),this.m.length&&this.trySuggestStreams()},g.disable=function(){this.o=!1},g.segmentDownloaded=function(e,t,n){e>=this.g.cacheLoadThreshold&&this.u.sample(e,t),n&&this.B!=null&&this.o&&K5(this)},g.trySuggestStreams=function(){this.o&&(this.B=Date.now(),K5(this,!0))},g.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=navigator.connection.downlink*1e6),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.u.getBandwidthEstimate(e),this.F?this.F.getBandwidthEstimate(e):e)},g.setVariants=function(e){return Fe(e,this.m)?!1:(this.m=e,!0)},g.playbackRateChanged=function(e){this.I=e},g.setMediaElement=function(e){function t(){n.C.$(lF)}var n=this;this.h=e,this.l&&(this.l.disconnect(),this.l=null),this.h&&"ResizeObserver"in d&&(this.l=new ResizeObserver(t),this.l.observe(this.h)),this.i.G(e,"enterpictureinpicture",function(r){r.pictureInPictureWindow&&(n.j=r.pictureInPictureWindow,n.i.G(n.j,"resize",t))}),this.i.G(e,"leavepictureinpicture",function(){n.j&&n.i.Ua(n.j,"resize",t),n.j=null}),W5(this)},g.setCmsdManager=function(e){this.F=e},g.configure=function(e){this.g=e,this.u&&this.g&&this.u.configure(this.g.advanced),W5(this)};function K5(e,t){if(t===void 0||!t){if(!e.O){if(t=e.u,!(t.g>=t.i))return;e.O=!0,e.B-=(e.g.switchInterval-e.g.minTimeToSwitch)*1e3}if(Date.now()-e.B<e.g.switchInterval*1e3)return}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.H&&(e.H(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch),$v(e))}function vw(e,t,n,r,i){if(e.F){var o=e.F.fj();o&&(n=n.filter(function(u){return u.bandwidth&&o?u.bandwidth<=o:!0}))}return t&&(n=n.filter(function(u){return jv(u,t,{width:i,height:r})})),n.sort(function(u,l){return u.bandwidth-l.bandwidth})}function sF(e){var t=[];e=x(e);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(r,i){return r.width-i.width})}function W5(e){X5(e);var t=e.h;e.g.droppedFrames&&t!=null&&t.getVideoPlaybackQuality&&($v(e),uF(e),e.M=new ft(function(){if(!e.h.paused&&e.o&&e.g.droppedFrames){var n=e.h.getVideoPlaybackQuality(),r=n.droppedVideoFrames;if(n=n.totalVideoFrames,(isNaN(e.I)?1:Math.abs(e.I))>1||!n)e.J=r,e.K=n;else{var i=r-e.J,o=n-e.K;e.J=r,e.K=n,i/o>=e.g.advanced.droppedFramesThreshold&&e.L&&e.L("video",e.g.advanced.droppedFramesBanDuration)}}}).Ka(e.g.advanced.droppedFramesInterval))}function X5(e){e.i.Ua(e.h,"resize");var t;(t=e.M)==null||t.stop(),e.M=null}function $v(e){var t=e.h;e.g.droppedFrames&&t!=null&&t.getVideoPlaybackQuality&&(t=t.getVideoPlaybackQuality(),e.J=t.droppedVideoFrames,e.K=t.totalVideoFrames)}function uF(e){e.i.G(e.h,"resize",function(){$v(e)})}Te("shaka.abr.SimpleAbrManager",vn),vn.prototype.configure=vn.prototype.configure,vn.prototype.setCmsdManager=vn.prototype.setCmsdManager,vn.prototype.setMediaElement=vn.prototype.setMediaElement,vn.prototype.playbackRateChanged=vn.prototype.playbackRateChanged,vn.prototype.setVariants=vn.prototype.setVariants,vn.prototype.getBandwidthEstimate=vn.prototype.getBandwidthEstimate,vn.prototype.trySuggestStreams=vn.prototype.trySuggestStreams,vn.prototype.segmentDownloaded=vn.prototype.segmentDownloaded,vn.prototype.disable=vn.prototype.disable,vn.prototype.enable=vn.prototype.enable,vn.prototype.chooseVariant=vn.prototype.chooseVariant,vn.prototype.init=vn.prototype.init,vn.prototype.release=vn.prototype.release,vn.prototype.stop=vn.prototype.stop;var lF=1;function Zr(e){this.video=e===void 0?null:e}g=Zr.prototype,g.needsSkipUI=function(){return!0},g.isClientRendering=function(){return!0},g.hasCustomClick=function(){return!1},g.isUsingAnotherMediaElement=function(){return!1},g.getDuration=function(){return-1},g.getMinSuggestedDuration=function(){return this.getDuration()},g.getRemainingTime=function(){return-1},g.isPaused=function(){return this.video?this.video.paused:!1},g.isSkippable=function(){return!1},g.getTimeUntilSkippable=function(){return 0},g.canSkipNow=function(){return!1},g.skip=function(){},g.pause=function(){this.video&&this.video.pause()},g.play=function(){this.video&&this.video.play()},g.getVolume=function(){return this.video?this.video.volume:1},g.setVolume=function(e){this.video&&(this.video.volume=e)},g.isMuted=function(){return this.video?this.video.muted:!1},g.isLinear=function(){return!0},g.resize=function(){},g.setMuted=function(e){this.video&&(this.video.muted=e)},g.getSequenceLength=function(){return 1},g.getPositionInSequence=function(){return 1},g.getTitle=function(){return""},g.getDescription=function(){return""},g.getVastMediaBitrate=function(){return 0},g.getVastMediaHeight=function(){return 0},g.getVastMediaWidth=function(){return 0},g.getVastAdId=function(){return""},g.getAdId=function(){return""},g.getCreativeAdId=function(){return""},g.getAdvertiserName=function(){return""},g.getMediaUrl=function(){return null},g.getTimeOffset=function(){return 0},g.getPodIndex=function(){return 0},g.release=function(){this.video=null},Te("shaka.ads.AbstractAd",Zr);function yw(e,t){this.g=e,this.h=t}yw.prototype.toString=function(){return"v"+this.g+"."+this.h};function Y5(e,t){var n=new yw(6,0),r=J5,i=r.g,o=n.h-i.h;((n.g-i.g||o)>0?r.i:r.h)(r.g,n,e,t)}function cF(e,t,n,r){ut([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function dF(e,t,n,r){Xt([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}var J5=null;function bw(e,t){var n=ei();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}bw.prototype.attempt=function(){var e=this,t,n;return P(function(r){if(r.h==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new B(2,7,1010);return t=e.g,e.g++,t==0?r.return():(n=e.h*(1+(Math.random()*2-1)*e.o),r.g(new Promise(function(i){new ft(i).$(n/1e3)}),2))}e.h*=e.m,r.j()})};function ei(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function In(e,t){this.promise=e,this.i=t,this.g=null}function bu(e){return new In(Promise.reject(e),function(){return Promise.resolve()})}function ww(){var e=Promise.reject(new B(2,7,7001));return e.catch(function(){}),new In(e,function(){return Promise.resolve()})}function Ml(e){return new In(Promise.resolve(e),function(){return Promise.resolve()})}function Q5(e){return new In(e,function(){return e.catch(function(){})})}In.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function xw(e){return new In(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}In.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},In.prototype.Ya=function(e,t){function n(l){return function(h){if(i.g&&l)o.reject(u);else{var p=l?e:t;p?r=fF(p,h,o):(l?o.resolve:o.reject)(h)}}}function r(){return o.reject(u),i.abort()}var i=this,o=Promise.withResolvers();o.promise.catch(function(){});var u=new B(2,7,7001);return this.promise.then(n(!0),n(!1)),new In(o.promise,function(){return r()})};function fF(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){},function(){})})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}D.Object.defineProperties(In.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Te("shaka.util.AbortableOperation",In),In.prototype.chain=In.prototype.Ya,In.prototype.finally=In.prototype.finally,In.all=xw,In.prototype.abort=In.prototype.abort,In.notAbortable=Q5,In.completed=Ml,In.aborted=ww,In.failed=bu;function Ge(e,t){if(t)if(t instanceof Map)for(var n=x(t.keys()),r=n.next();!r.done;r=n.next())r=r.value,Object.defineProperty(this,r,{value:t.get(r),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=d.performance&&d.performance.now?d.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Z5(e){var t=new Ge(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}Ge.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Ge.prototype.stopImmediatePropagation=function(){this.g=!0},Ge.prototype.stopPropagation=function(){},Te("shaka.util.FakeEvent",Ge);function Bt(){this.mb=new Ae,this.be=this}Bt.prototype.addEventListener=function(e,t){this.mb&&this.mb.push(e,t)},Bt.prototype.removeEventListener=function(e,t){this.mb&&this.mb.remove(e,t)},Bt.prototype.dispatchEvent=function(e){if(!this.mb)return!0;var t=this.mb.get(e.type)||[],n=this.mb.get("__shaka_all_events__");for(n&&(t=t.concat(n)),t=x(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.be,e.currentTarget=this.be;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},Bt.prototype.release=function(){this.mb=null};function fd(){this.g=[]}function wu(e,t){e.g.push(t.finally(function(){ke(e.g,t)}))}fd.prototype.destroy=function(){for(var e=[],t=x(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function hd(e,t){return new URL(t,e).toString()}function zn(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;var r=[];e=x(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var o=x(t),u=o.next();!u.done;u=o.next()){if(u=new URL(u.value,i),n){var l=new URLSearchParams(n);l=x(l.entries());for(var h=l.next();!h.done;h=l.next()){var p=x(h.value);h=p.next().value,p=p.next().value,u.searchParams.append(h,p)}}r.push(u.toString())}}return r}function hF(e){try{var t=new URL(e).protocol.slice(0,-1);if(t&&e.toLowerCase().startsWith(t+":"))return t}catch{}return(e=e.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/))?e[1].toLowerCase():""}function pF(e,t){try{var n=new URL(e);if(n.protocol=t,n.protocol===t+":")return n.toString()}catch{}return n=e.indexOf(":"),n===-1?t+":"+e:t+e.slice(n)}function Xh(e){try{var t=new URL(e).hostname;if(t)return t}catch{}return(e=e.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/([^/?#]*)/))?e[1]:""}function gF(e,t){return e=new URL(e),e.hostname=t,e.toString()}function pd(e,t){if(t=t?.(),!t)return e;e=new URL(e),t=x(new URLSearchParams(t));for(var n=t.next();!n.done;n=t.next()){var r=x(n.value);n=r.next().value,r=r.next().value,e.searchParams.set(n,r)}return e.toString()}function kw(e,t){if(!t.size)return e;e=new URL(e),t=x(t.entries());for(var n=t.next();!n.done;n=t.next()){var r=x(n.value);n=r.next().value,r=r.next().value,e.searchParams.set(n,r)}return e.toString()}function ln(e,t,n,r,i,o,u){Bt.call(this),this.i=null,this.j=!1,this.u=new fd,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=r||null,this.D=i||null,this.H=o||null,this.F=u||null,this.l=new Map}K(ln,Bt),g=ln.prototype,g.configure=function(e){this.i=e};function Ds(e,t,n,r){r=r===void 0?!1:r,n=n||aI;var i=Hv.get(e);(!i||n>=i.priority)&&Hv.set(e,{priority:n,Qh:t,hm:r})}function eI(e,t){for(var n=x(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(e=x(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}g.lm=function(e){this.g.add(e)},g.Nm=function(e){this.g.delete(e)},g.Ik=function(){this.g.clear()},g.nm=function(e){this.h.add(e)},g.Om=function(e){this.h.delete(e)},g.Jk=function(){this.h.clear()},g.Ri=function(){this.l.clear()};function yn(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n,attempt:0}}g.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),Bt.prototype.release.call(this),this.u.destroy()},g.request=function(e,t,n){var r=this,i=new rI;if(this.j){var o=Promise.reject(new B(2,7,7001));return o.catch(function(){}),new zv(o,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},o=Hi(t.headers),t.retryParameters=t.retryParameters?Hi(t.retryParameters):ei(),t.uris=Hi(t.uris),t.attempt=0,o=tI(this,e,t,n,new bw(t.retryParameters,!1),null,i,o);var u=o.Ya(function(p){return vF(r,e,p,n)}),l=0;o.promise.then(function(){l=Date.now()},function(){});var h=u.Ya(function(p){var m=p.response;return m.timeMs+=Date.now()-l,p.Il||!r.o||m.fromCache||t.method=="HEAD"||e!=ua||r.o(m.timeMs,m.data.byteLength,nI(n),t,n),r.F&&r.F(e,m,n),m},function(p){throw p&&(p.severity=2),p});return i=new zv(h.promise,function(){return h.abort()},i),wu(this.u,i),i};function mF(e,t,n,r){function i(l){o=o.Ya(function(){return n.body&&(n.body=Vn(n.body)),l(t,n,r)})}var o=Ml(void 0);e.D&&i(e.D),e=x(e.g);for(var u=e.next();!u.done;u=e.next())i(u.value);return o.Ya(void 0,function(l){throw l instanceof B&&l.code==7001?l:new B(2,1,1006,l)})}function tI(e,t,n,r,i,o,u,l){var h=n.attempt%n.uris.length;n.headers=Hi(l);var p=mF(e,t,n,r),m=Date.now(),b=0;p.promise.then(function(){b=Date.now()-m},function(){}),e.i.forceHTTP&&(n.uris[h]=n.uris[h].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[h]=n.uris[h].replace("http://","https://")),h>0&&e.H&&e.H(t,r,n.uris[h],n.uris[h-1]);var w=hF(n.uris[h]),T=!1;w||(w=location.protocol,w=w.slice(0,-1),n.uris[h]=pF(n.uris[h],w)),w=w.toLowerCase();var k=(w=Hv.get(w))?w.Qh:null;if(!k)return bu(new B(2,1,1e3,n.uris[h]));var S=w.hm;(w=e.l.get(Xh(n.uris[h])))&&(n.headers[e.i.commonAccessTokenHeaderName]=w);var A=null,M=null,_=!1,R=!1,U;return p.Ya(function(){return Q5(i.attempt())}).Ya(function(){if(e.j)return ww();U=Date.now();var N=0;n.requestStartTime=Date.now();var j=k(n.uris[h],n,t,function(G,z,J){A&&A.stop(),M&&M.$(q/1e3),e.o&&t==ua&&(N++,n.packetNumber=N,e.o(G,z,nI(r),n,r),T=!0,u.g=J)},function(G){R=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(G,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!S)return j;var V=n.retryParameters.connectionTimeout;V&&(A=new ft(function(){_=!0,j.abort()}),A.$(V/1e3));var q=n.retryParameters.stallTimeout;return q&&(M=new ft(function(){_=!0,j.abort()})),j}).Ya(function(N){A&&A.stop(),M&&M.stop(),N.timeMs==null&&(N.timeMs=Date.now()-U,N.timeMs+=b);var j=N.headers[e.i.commonAccessTokenHeaderName];return j&&e.l.set(Xh(N.uri),j),j={response:N,Il:T},!R&&e.m&&e.m(N.headers,n,t),e.B&&e.B(t,n,r,N),j},function(N){if(A&&A.stop(),M&&M.stop(),e.C){var j=null,V=0;N instanceof B&&(j=N,N.code==1001&&(V=N.data[1])),e.C(t,n,r,j,V,_)}if(e.j)return ww();if(_&&(N=new B(1,1,1003,n.uris[h],t)),N instanceof B){if(N.code==7001)throw N;if(N.code==1010)throw o;if(N.severity==1){if(j=new Map().set("error",N),j=new Ge("retry",j),j.cancelable=!0,e.dispatchEvent(j),j.defaultPrevented)throw N;return++n.attempt,tI(e,t,n,r,i,N,u,l)}}throw N})}function vF(e,t,n,r){var i=Ml(void 0);e=x(e.h);for(var o=e.next(),u={};!o.done;u={Qj:void 0},o=e.next())u.Qj=o.value,i=i.Ya((function(l){return function(){var h=n.response;return h.data&&(h.data=Vn(h.data)),(0,l.Qj)(t,h,r)}})(u));return i.Ya(function(){return n},function(l){var h=2;if(l instanceof B){if(l.code==7001)throw l;h=l.severity}throw new B(h,1,1007,l)})}function nI(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.gd)return!1}return!0}Te("shaka.net.NetworkingEngine",ln),ln.prototype.request=ln.prototype.request,ln.prototype.destroy=ln.prototype.destroy,ln.makeRequest=yn,ln.defaultRetryParameters=function(){return ei()},ln.prototype.clearCommonAccessTokenMap=ln.prototype.Ri,ln.prototype.clearAllResponseFilters=ln.prototype.Jk,ln.prototype.unregisterResponseFilter=ln.prototype.Om,ln.prototype.registerResponseFilter=ln.prototype.nm,ln.prototype.clearAllRequestFilters=ln.prototype.Ik,ln.prototype.unregisterRequestFilter=ln.prototype.Nm,ln.prototype.registerRequestFilter=ln.prototype.lm,ln.unregisterScheme=function(e){Hv.delete(e)},ln.registerScheme=Ds,ln.prototype.configure=ln.prototype.configure;function rI(){this.g=0}ln.NumBytesRemainingClass=rI;function zv(e,t,n){In.call(this,e,t),this.h=n}K(zv,In),ln.PendingRequest=zv;var ua=1,iI={MANIFEST:0,SEGMENT:ua,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9,SESSION_DATA:10,FINGERPRINT:11,PLAYLIST:12,EVENT_CALLBACK:13};ln.RequestType=iI,ln.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12,TRACKING_EVENT:13};var aI=3;ln.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:aI};var Hv=new Map;function gd(e){this.g=!1,this.h=Promise.withResolvers(),this.i=e}gd.prototype.destroy=function(){var e=this;return this.g?this.h.promise:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function Zt(e,t){if(e.g)throw t instanceof B&&t.code==7003?t:new B(2,7,7003,t)}function Tw(e,t){var n=[];e=x(e);for(var r=e.next();!r.done;r=e.next())n.push(t(r.value));return n}function yF(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function md(e){for(var t=new Map,n=x(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Sw(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}function nn(e,t){this.h=_e(e),this.i=t==Cw,this.g=0}g=nn.prototype,g.La=function(){return this.g<this.h.byteLength},g.Ia=function(){return this.g},g.$a=function(){return this.h.byteLength},g.Z=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw Ls()}},g.Da=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw Ls()}},g.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw Ls()}},g.Sh=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw Ls()}},g.Sd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw Ls()}if(t>2097151)throw new B(2,3,3001);return this.g+=8,t*4294967296+e},g.Ja=function(e,t){if(this.g+e>this.h.byteLength)throw Ls();var n=H(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},g.skip=function(e){if(this.g+e>this.h.byteLength)throw Ls();this.g+=e},g.Rj=function(e){if(this.g<e)throw Ls();this.g-=e},g.seek=function(e){if(e<0||e>this.h.byteLength)throw Ls();this.g=e},g.Rd=function(){for(var e=this.g;this.La()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=H(this.h,e,this.g-e),this.g+=1,dt(e)};function Ls(){return new B(2,3,3e3)}Te("shaka.util.DataViewReader",nn),nn.prototype.readTerminatedString=nn.prototype.Rd,nn.prototype.seek=nn.prototype.seek,nn.prototype.rewind=nn.prototype.Rj,nn.prototype.skip=nn.prototype.skip,nn.prototype.readBytes=nn.prototype.Ja,nn.prototype.readUint64=nn.prototype.Sd,nn.prototype.readInt32=nn.prototype.Sh,nn.prototype.readUint32=nn.prototype.S,nn.prototype.readUint16=nn.prototype.Da,nn.prototype.readUint8=nn.prototype.Z,nn.prototype.getLength=nn.prototype.$a,nn.prototype.getPosition=nn.prototype.Ia,nn.prototype.hasMoreData=nn.prototype.La;var Cw=1;nn.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Cw};function Tt(){this.i=new Map,this.h=new Map,this.g=!1}g=Tt.prototype,g.box=function(e,t){return e=oI(e),this.i.set(e,bF),this.h.set(e,t),this},g.ua=function(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())this.box(n.value,t);return this},g.T=function(e,t){return e=oI(e),this.i.set(e,sI),this.h.set(e,t),this},g.bj=function(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())this.T(n.value,t);return this},g.stop=function(){this.g=!0},g.parse=function(e,t,n){for(e=new nn(e,0),this.g=!1;e.La()&&!this.g;)this.Od(0,e,t,n)},g.Od=function(e,t,n,r){var i=t.Ia();if(r&&i+8>t.$a())this.g=!0;else{var o=t.S(),u=t.S(),l=_l(u),h=!1;switch(o){case 0:o=t.$a()-i;break;case 1:if(r&&t.Ia()+8>t.$a()){this.g=!0;return}o=t.Sd(),h=!0}var p=this.h.get(u);if(p){var m=null,b=null;if(this.i.get(u)==sI){if(r&&t.Ia()+4>t.$a()){this.g=!0;return}b=t.S(),m=b>>>24,b&=16777215}u=i+o,n&&u>t.$a()&&(u=t.$a()),r&&u>t.$a()?this.g=!0:(u-=t.Ia(),t=u>0?t.Ja(u,!1):new Uint8Array(0),t=new nn(t,0),p({name:l,parser:this,partialOkay:n||!1,stopOnPartial:r||!1,version:m,flags:b,reader:t,size:o,start:i+e,has64BitSize:h}))}else t.skip(Math.min(i+o-t.Ia(),t.$a()-t.Ia()))}};function qt(e){for(var t=Jo(e);e.reader.La()&&!e.parser.g;)e.parser.Od(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Ua(e){for(var t=Jo(e),n=e.reader.S(),r=0;r<n&&(e.parser.Od(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);r++);}function Pl(e){var t=Jo(e);for(e.reader.skip(78);e.reader.La()&&!e.parser.g;)e.parser.Od(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Yh(e){var t=Jo(e);e.reader.skip(8);var n=e.reader.Da();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.La()&&!e.parser.g;)e.parser.Od(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function vd(e,t){return function(n){e(n.reader.Ja(n.reader.$a()-n.reader.Ia(),t))}}function oI(e){var t=0;e=x(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function _l(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Jo(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Te("shaka.util.Mp4Parser",Tt),Tt.headerSize=Jo,Tt.typeToString=_l,Tt.allData=vd,Tt.audioSampleEntry=Yh,Tt.visualSampleEntry=Pl,Tt.sampleDescription=Ua,Tt.children=qt,Tt.prototype.parseNext=Tt.prototype.Od,Tt.prototype.parse=Tt.prototype.parse,Tt.prototype.stop=Tt.prototype.stop,Tt.prototype.fullBoxes=Tt.prototype.bj,Tt.prototype.fullBox=Tt.prototype.T,Tt.prototype.boxes=Tt.prototype.ua,Tt.prototype.box=Tt.prototype.box;var bF=0,sI=1,Qo=["moov","trak","mdia","minf","stbl"],Dl=["moof","traf"],uI=[].concat(se(["avc1","avc3","dvav","dva1"]),se(["hev1","hvc1","dvh1","dvhe"])),Aw=[].concat(se(uI),se(["vvc1","vvi1","dvc1","dvi1"])),lI="ac-3 ec-3 ac-4 Opus fLaC apac".split(" ");function Ew(e){var t=this;this.g=[],this.data=[],new Tt().ua(["moov","moof"],qt).T("pssh",function(n){if(!(n.version>1)){var r=H(n.reader.h,-12,n.size);t.data.push(r),n=n.reader.Ja(16,!1),t.g.push(Yr(n))}}).parse(e)}function Iw(e,t,n,r){var i=e.length,o=12+t.length+4+i;r>0&&(o+=4+16*n.size);var u=new Uint8Array(o),l=_e(u),h=0;if(l.setUint32(h,o),h+=4,l.setUint32(h,1886614376),h+=4,r<1?l.setUint32(h,0):l.setUint32(h,16777216),h+=4,u.set(t,h),h+=t.length,r>0)for(l.setUint32(h,n.size),h+=4,t=x(n),n=t.next();!n.done;n=t.next())n=gu(n.value),u.set(n,h),h+=n.length;return l.setUint32(h,i),u.set(e,h+4),u}function qv(e){var t=this;this.D=e,this.o=this.u=null,this.Y=this.R=!1,this.J=0,this.g=null,this.C=new he,this.i=new Map,this.W=[],this.B=new Map,this.K=!1,this.l=Promise.withResolvers(),this.h=null,this.m=function(n){n.severity==2&&t.l.reject(n),e.onError(n)},this.ba=new Map,this.ha=new Map,this.L=new ft(function(){return PF(t)}),this.P=!1,this.M=[],this.ma=!1,this.F=new ft(function(){DF(t)}),this.l.promise.catch(function(){}),this.j=new gd(function(){return wF(t)}),this.O=!1,this.H=this.I=null,this.V=function(){return!1}}g=qv.prototype,g.destroy=function(){return this.j.destroy()};function wF(e){var t;return P(function(n){switch(n.h){case 1:return e.C.release(),e.C=null,e.l.reject(),e.F.stop(),e.F=null,e.L.stop(),e.L=null,n.g(Dw(e),2);case 2:if(!e.o){n.A(3);break}return n.m(4),n.g(e.o.setMediaKeys(null),6);case 6:n.o(5);break;case 4:t=n.l(),ut("DrmEngine.destroyNow_ exception",t);case 5:e.o=null;case 3:e.g=null,e.u=null,e.B=new Map,e.h=null,e.m=function(){},e.D=null,e.O=!1,e.I=null,n.j()}})}g.configure=function(e,t){this.h=e,t&&(this.V=t),this.F&&this.R&&this.g&&this.F.Ka(this.h.updateExpirationTime)};function xF(e,t,n){return e.Y=!0,e.B=new Map,e.P=n,dI(e,t,!1)}function cI(e,t,n,r){r=r===void 0?!0:r,e.B=new Map,n=x(n);for(var i=n.next();!i.done;i=n.next())e.B.set(i.value,{initData:null,initDataType:null});for(n=x(e.h.persistentSessionsMetadata),i=n.next();!i.done;i=n.next())i=i.value,e.B.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.P=e.B.size>0,dI(e,t,r)}function kF(e,t,n,r,i,o){var u,l,h,p,m;return P(function(b){return b.h==1?(u=[],o.length&&u.push(o[0].contentType),i.length&&u.push(i[0].contentType),l=function(w){return w=Go(t,w,null),w.licenseServerUri=n,w.serverCertificate=r,w.persistentStateRequired=!0,w.sessionType="persistent-license",w},h=G5(u),h.video&&(p=l(o[0].encryptionScheme||""),h.video.drmInfos.push(p)),h.audio&&(m=l(i[0].encryptionScheme||""),h.audio.drmInfos.push(m)),b.g(pw([h],!0,e.O,[]),2)):(Zt(e.j),b.return(gI(e,[h])))})}function dI(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){if(N.h==1){for(TI(e.h.clearKeys,t),r=t.some(function(j){return!!(j.video&&j.video.drmInfos.length||j.audio&&j.audio.drmInfos.length)}),i=md(e.h.servers),o=md(e.h.advanced||{}),!r&&n&&NF(t,i),u=new WeakSet,l=x(t),h=l.next();!h.done;h=l.next())for(p=h.value,m=wI(p),b=x(m),w=b.next();!w.done;w=b.next())T=w.value,u.has(T)||(u.add(T),jF(T,i,o,e.h.keySystemsMapping));for(k=function(j,V){var q=[];j=x(j);for(var G=j.next();!G.done;G=j.next()){G=G.value;var z=G[V]||o.has(G.keySystem)&&o.get(G.keySystem)[V]||"";if(z==""&&e5(G.keySystem)&&(V=="audioRobustness"?z=[e.h.defaultAudioRobustnessForWidevine]:V=="videoRobustness"&&(z=[e.h.defaultVideoRobustnessForWidevine])),typeof z=="string")q.push(G);else if(Array.isArray(z)){z.length===0&&(z=[""]),z=x(z);for(var J=z.next();!J.done;J=z.next()){var ie={};q.push(Object.assign({},G,(ie[V]=J.value,ie)))}}}return q},S=new WeakSet,A=x(t),M=A.next();!M.done;M=A.next())_=M.value,_.video&&!S.has(_.video)&&(_.video.drmInfos=k(_.video.drmInfos,"videoRobustness"),_.video.drmInfos=k(_.video.drmInfos,"audioRobustness"),S.add(_.video)),_.audio&&!S.has(_.audio)&&(_.audio.drmInfos=k(_.audio.drmInfos,"videoRobustness"),_.audio.drmInfos=k(_.audio.drmInfos,"audioRobustness"),S.add(_.audio));return N.g(pw(t,e.P,e.O,e.h.preferredKeySystems),2)}return Zt(e.j),R=r||i.size>0,R?(U=gI(e,t),N.return(r?U:U.catch(function(){}))):(e.R=!0,N.return(Promise.resolve()))})}function fI(e){var t;return P(function(n){switch(n.h){case 1:if(e.o.mediaKeys)return n.return();if(!e.I){n.A(2);break}return n.g(e.I,3);case 3:return Zt(e.j),n.return();case 2:return n.m(4),e.I=e.o.setMediaKeys(e.u),n.g(e.I,6);case 6:n.o(5);break;case 4:t=n.l(),e.m(new B(2,6,6003,t.message));case 5:Zt(e.j),n.j()}})}function TF(e,t){return P(function(n){if(n.h==1)return n.g(fI(e),2);Jh(e,t.initDataType,H(t.initData)),n.j()})}g.Ub=function(e){var t=this,n,r,i,o;return P(function(u){if(u.h==1)return t.o===e?u.return():t.u?(n=Qe(),t.o=e,t.h.delayLicenseRequestUntilPlayed&&t.C.oa(t.o,"play",function(){for(var l=x(t.M),h=l.next();!h.done;h=l.next())_w(t,h.value);t.ma=!0,t.M=[]}),(r=Jp(n,t.o))?t.C.Hb(r,["connect","connecting","disconnect"],function(){Dw(t)}):"webkitCurrentPlaybackTargetIsWireless"in t.o&&t.C.G(t.o,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Dw(t)}),t.H=t.g&&t.g.initData.find(function(l){return l.initData.length>0})||null,i=t.g.keySystem,(o=n.Hh(i))||!t.H&&t.g.keySystem==="com.apple.fps"&&!t.B.size?u.A(2):u.g(fI(t),2)):(t.C.oa(e,"encrypted",function(){t.m(new B(2,6,6010))}),u.return());hI(t).catch(function(){}),!o&&(t.H||t.B.size||t.h.parseInbandPsshEnabled)||t.C.G(t.o,"encrypted",function(l){return TF(t,l)}),u.j()})};function SF(e){var t,n,r,i,o;return P(function(u){switch(u.h){case 1:if(!e.u||!e.g)return u.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){u.A(2);break}return t=yn([e.g.serverCertificateUri],e.h.retryParameters),u.m(3),n=e.D.xc.request(5,t,{isPreload:e.V()}),u.g(n.promise,5);case 5:r=u.i,e.g.serverCertificate=H(r.data),u.o(4);break;case 3:throw i=u.l(),new B(2,6,6017,i);case 4:if(e.j.g)return u.return();case 2:return!e.g.serverCertificate||!e.g.serverCertificate.length?u.return():(u.m(6),u.g(e.u.setServerCertificate(e.g.serverCertificate),8));case 8:u.o(0);break;case 6:throw o=u.l(),new B(2,6,6004,o.message)}})}function CF(e,t){var n,r,i;return P(function(o){if(o.h==1)return o.g(vI(e,t,{initData:null,initDataType:null}),2);if(o.h!=3)return n=o.i,n?(r=[],(i=e.i.get(n))&&(i.wb=Promise.withResolvers(),r.push(i.wb.promise)),r.push(n.remove()),o.g(Promise.all(r),3)):o.return();e.i.delete(n),o.j()})}function hI(e){var t,n,r,i,o;return P(function(u){if(u.h==1)return e.B.size?(e.B.forEach(function(l,h){vI(e,h,l)}),u.g(e.l.promise,3)):u.A(2);if(u.h!=2){if(t=e.g&&e.g.keyIds||new Set([]),t.size>0&&RF(e))return u.return(e.l.promise);e.K=!1,e.l=Promise.withResolvers(),e.l.promise.catch(function(){})}for(n=(e.g?e.g.initData:[])||[],r=x(n),i=r.next();!i.done;i=r.next())o=i.value,Jh(e,o.initDataType,o.initData);return Qh(e)&&e.l.resolve(),u.return(e.l.promise)})}function Jh(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(u){t=u,u instanceof B||(t=new B(2,6,6016,u)),e.m(t);return}if(e.h.ignoreDuplicateInitData){var r=e.i.values();r=x(r);for(var i=r.next();!i.done;i=r.next())if($i(n,i.value.initData))return;var o=!1;if(e.B.forEach(function(u){!o&&$i(n,u.initData)&&(o=!0)}),o)return}e.K=!0,e.i.size>0&&Qh(e)&&(e.l.resolve(),e.K=!1,e.l=Promise.withResolvers(),e.l.promise.catch(function(){})),Gv(e,t,n,e.g.sessionType)}}function pI(e){return e=e.i.keys(),e=Tw(e,function(t){return t.sessionId}),Array.from(e)}g.mh=function(){var e=this,t=this.i.keys();return t=Tw(t,function(n){var r=e.i.get(n);return{sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType}}),Array.from(t)},g.Wh=function(e){var t=this;this.i.forEach(function(n,r){e!=null&&r.sessionId!=e||xI(t,r)})},g.ci=function(e,t){t=t===void 0?.1:t;var n=this,r,i,o,u,l;return P(function(h){switch(h.h){case 1:if(Zt(n.j),i=r=null,n.i.forEach(function(p,m){m.sessionId===e.sessionId&&(r=m,i=p)}),!(r&&i&&n.g&&i.initData&&i.initDataType))return h.return(!1);if(o=i.initData,u=i.initDataType,!(t>0)){h.A(2);break}return h.g(O5(t),2);case 2:return h.m(4),n.i.delete(r),h.g(Kv(n,r),6);case 6:if(l=Gv(n,u,o,n.g.sessionType,!1),!l)throw new B(2,6,6005,"Failed to create new session for license retry");return h.return(!0);case 4:return h.l(),h.return(!1)}})},g.re=function(){var e=1/0,t=this.i.keys();t=x(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e};function AF(e){return e.J?e.J:NaN}g.Xb=function(){return this.g},g.zf=function(){return Sw(this.ha)};function gI(e,t){var n,r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:if(n=new Map,r=EF(e,t,n),!r)throw navigator.requestMediaKeySystemAccess?new B(2,6,6001):new B(2,6,6020);if(Zt(e.j),p.m(2),r.getConfiguration(),i=e.h.keySystemsMapping[r.keySystem]||r.keySystem,e.g=kI(e,i,n.get(i)),!e.g.licenseServerUri)throw new B(2,6,6012,e.g.keySystem);return p.g(r.createMediaKeys(),4);case 4:if(o=p.i,Zt(e.j),e.u=o,!(e.h.minHdcpVersion!=""&&"getStatusForPolicy"in e.u)){p.A(5);break}return p.m(6),p.g(e.u.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if(u=p.i,u!="usable")throw new B(2,6,6018);Zt(e.j),p.o(5,2);break;case 6:throw l=p.l(2),l instanceof B?l:new B(2,6,6019,l.message);case 5:return e.R=!0,e.F.Ka(e.h.updateExpirationTime),p.g(SF(e),9);case 9:Zt(e.j),p.o(0);break;case 2:throw h=p.l(),Zt(e.j,h),e.g=null,h instanceof B?h:new B(2,6,6002,h.message)}})}function EF(e,t,n){for(var r=x(t),i=r.next();!i.done;i=r.next()){i=x(wI(i.value));for(var o=i.next();!o.done;o=i.next())o=o.value,n.getOrInsertComputed(o.keySystem,function(){return[]}).push(o)}if(n.size==1&&n.has(""))throw new B(2,6,6e3);r=e.h.preferredKeySystems,r.length||(i=md(e.h.servers),i.size==1&&(r=Array.from(i.keys()))),i=x(r);var u=i.next();for(o={};!u.done;o={Kj:void 0},u=i.next()){o.Kj=u.value,u=x(t);for(var l=u.next();!l.done;l=u.next())if(l=l.value.decodingInfos.find((function(b){return function(w){return w.supported&&w.keySystemAccess!=null&&w.keySystemAccess.keySystem==b.Kj}})(o)))return l.keySystemAccess}for(i=x([!0,!1]),o=i.next();!o.done;o=i.next())for(o=o.value,u=x(t),l=u.next();!l.done;l=u.next()){l=x(l.value.decodingInfos);for(var h=l.next();!h.done;h=l.next())if(h=h.value,h.supported&&h.keySystemAccess){var p=h.keySystemAccess.keySystem;if(!r.includes(p)){var m=n.get(p);for(!m&&e.h.keySystemsMapping[p]&&(m=n.get(e.h.keySystemsMapping[p])),p=x(m),m=p.next();!m.done;m=p.next())if(!!m.value.licenseServerUri==o)return h.keySystemAccess}}}return null}function Mw(e){Qh(e)&&e.l.resolve()}function mI(e,t){new ft(function(){t.loaded=!0,Mw(e)}).$(FF)}function vI(e,t,n){var r,i,o,u,l,h,p;return P(function(m){switch(m.h){case 1:try{r=e.u.createSession("persistent-license")}catch(b){return i=new B(2,6,6005,b.message),e.m(i),m.return(Promise.reject(i))}return e.C.G(r,"message",function(b){Pw(e)?e.M.push(b):_w(e,b)}),e.C.G(r,"keystatuseschange",function(b){return yI(e,b)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Kh:1/0,wb:null,type:"persistent-license",Ae:0,tj:!1},e.i.set(r,o),m.m(2),m.g(r.load(t),4);case 4:return u=m.i,Zt(e.j),u||(e.i.delete(r),l=e.h.persistentSessionOnlinePlayback?1:2,e.m(new B(l,6,6013)),o.loaded=!0),mI(e,o),Mw(e),m.return(r);case 2:h=m.l(),Zt(e.j,h),e.i.delete(r),p=e.h.persistentSessionOnlinePlayback?1:2,e.m(new B(p,6,6005,h.message)),o.loaded=!0,Mw(e);case 3:return m.return(Promise.resolve())}})}function Gv(e,t,n,r,i){i=i===void 0?!1:i;try{var o=e.u.createSession(r)}catch(u){return e.m(new B(2,6,6005,u.message)),null}return e.C.G(o,"message",function(u){Pw(e)?e.M.push(u):_w(e,u)}),e.C.G(o,"keystatuseschange",function(u){return yI(e,u)}),e.i.set(o,{initData:n,initDataType:t,loaded:!1,Kh:1/0,wb:null,type:r,Ae:0,tj:i}),o.closed.then(function(u){if(!e.j.g){var l=e.i.get(o);if(l){var h=o;u=u||"unknown",u!=="unknown"&&(e.i.delete(h),bI(e,u,l))}}}).catch(function(){}),e.h.logLicenseExchange&&Ra(n),o.generateRequest(t,n).catch(function(u){if(!e.j.g){e.i.delete(o);var l=u.errorCode;if(l&&l.systemCode){var h=l.systemCode;h<0&&(h+=4294967296),h="0x"+h.toString(16)}e.m(new B(2,6,6006,u.message,u,h))}}),o}function Pw(e){return e.o?e.h.delayLicenseRequestUntilPlayed&&e.o.paused&&!e.ma:!e.Y&&e.h.delayLicenseRequestUntilPlayed}function IF(e){return P(function(t){return t.h==1?!e.K||Pw(e)?t.A(0):t.g(e.l.promise,3):t.g(Promise.all(e.W.map(function(n){return n.promise})),0)})}function _w(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_;P(function(R){switch(R.h){case 1:if(n=t.target,e.h.logLicenseExchange&&Ra(t.message),r=e.i.get(n),i=e.g.licenseServerUri,o=e.h.advanced[e.g.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(i=o.individualizationServer),u=yn([i],e.h.retryParameters),u.body=t.message,u.method="POST",u.licenseRequestType=t.messageType,u.sessionId=n.sessionId,u.drmInfo=e.g,r&&(u.initData=r.initData,u.initDataType=r.initDataType,r.tj&&(u.licenseRequestType="license-renewal")),o&&o.headers)for(l in o.headers)u.headers[l]=o.headers[l];if(h=zi(e.g.keySystem)){var U=u,N=e.g;try{var j=kt(U.body);if(j){var V=JSON.parse(j);V.type||(V.type=N.sessionType,U.body=Sr(JSON.stringify(V)))}}catch{}}if(qo(e.g.keySystem))if(U=$n(u.body,!0,!0),U.includes("PlayReadyKeyMessage")){for(U=sd(U,"PlayReadyKeyMessage"),N=Ko(U,"HttpHeader"),N=x(N),j=N.next();!j.done;j=N.next())V=j.value,j=Ko(V,"name")[0],V=Ko(V,"value")[0],u.headers[mn(j)]=mn(V);U=Ko(U,"Challenge")[0],u.body=wi(mn(U))}else u.headers["Content-Type"]="text/xml; charset=utf-8";return p=Date.now(),R.m(2),b=e.D.xc.request(2,u,{isPreload:e.V()}),e.W.push(b),R.g(b.promise,4);case 4:m=R.i,ke(e.W,b),R.o(3);break;case 2:if(w=R.l(),e.j.g)return R.return();if(T={sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType},k=new B(2,6,6007,w,T),e.h.failureCallback)try{e.h.failureCallback(k)}catch{}return k.handled?(r&&r.wb&&r.wb.reject(k),R.return()):(e.i.size==1?(e.m(k),r&&r.wb&&r.wb.reject(k)):(r&&r.wb&&r.wb.reject(k),e.i.delete(n),Qh(e)&&(e.l.resolve(),e.L.$(.1))),R.return());case 3:return e.j.g?R.return():(e.J+=(Date.now()-p)/1e3,e.h.logLicenseExchange&&Ra(m.data),h&&MF(e,m),R.m(5),R.g(n.update(m.data),7));case 7:r&&(r.Ae=Date.now()/1e3),R.o(6);break;case 5:return A=(S=R.l())&&S.message||String(S),M=new B(2,6,6008,A),e.m(M),r&&r.wb&&r.wb.reject(M),R.return();case 6:if(e.j.g)return R.return();_=new Ge("drmsessionupdate"),e.D.onEvent(_),r&&(r.wb&&r.wb.resolve(),mI(e,r)),R.j()}})}function MF(e,t){t=dt(t.data);try{var n=JSON.parse(t),r=new Map(n.keys.map(function(p){var m=p.kid;return p=p.k,[Cv(m),Cv(p)]}));if(e.g.clearKeys)for(var i=x(r),o=i.next();!o.done;o=i.next()){var u=x(o.value),l=u.next().value,h=u.next().value;e.g.clearKeys.set(l,h)}else e.g.clearKeys=r}catch{}}function yI(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach(function(o,u){if(typeof u=="string"){var l=u;u=o,o=l}if(l=Qe(),qo(e.g.keySystem)&&u.byteLength==16&&l.cg()){l=_e(u);var h=l.getUint32(0,!0),p=l.getUint16(4,!0),m=l.getUint16(6,!0);l.setUint32(0,h,!1),l.setUint16(4,p,!1),l.setUint16(6,m,!1)}n&&o!="status-pending"&&(n.loaded=!0),o=="expired"&&(r=!0),u=Yr(u).slice(0,32),e.ba.set(u,o)});var i=t.expiration-Date.now();(i<0||r&&i<1e3)&&n&&!n.wb&&(e.i.delete(t),Kv(e,t)),Qh(e)&&(e.l.resolve(),e.L.$(BF))}function PF(e){var t=e.ba,n=e.ha;n.clear(),t.forEach(function(r,i){return n.set(i,r)}),t=Array.from(n.values()),t.length&&t.every(function(r){return r=="expired"})&&e.m(new B(2,6,6014)),e.D.Wf(Sw(n))}function _F(){var e,t,n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J;return P(function(ie){if(ie.h==1){if(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(d.MediaKeys&&d.navigator&&d.navigator.requestMediaKeySystemAccess&&d.MediaKeySystemAccess&&d.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=x(e),r=n.next();!r.done;r=n.next())i=r.value,t[i]=null;return ie.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),u=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],l=["150","2000","3000"],h={"com.widevine.alpha":u,"com.widevine.alpha.experiment":u,"com.microsoft.playready.recommendation":l},p=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],b={videoCapabilities:p,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]},w=[null,"cenc","cbcs"],T=new Map,k=Qe(),S=function(le,be,ce){var ae,de,re,pe,Re,W,Se,Ee,Xe,vt,wn,bt,cn;return P(function(Nt){switch(Nt.h){case 1:return Nt.m(2),Nt.g(be.createMediaKeys(),5);case 5:ae=Nt.i;case 4:Nt.o(3);break;case 2:return Nt.l(),Nt.return();case 3:if(re=(de=be.getConfiguration().sessionTypes)?de.includes("persistent-license"):!1,k.Bj()&&(re=!1),pe=be.getConfiguration().videoCapabilities,Re=be.getConfiguration().audioCapabilities,W={persistentState:re,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},T.get(le)?W=T.get(le):T.set(le,W),(Se=pe[0].encryptionScheme)&&!W.encryptionSchemes.includes(Se)&&W.encryptionSchemes.push(Se),(Ee=pe[0].robustness)&&!W.videoRobustnessLevels.includes(Ee)&&W.videoRobustnessLevels.push(Ee),(Xe=Re[0].robustness)&&!W.audioRobustnessLevels.includes(Xe)&&W.audioRobustnessLevels.push(Xe),!(ce&&"getStatusForPolicy"in ae)){Nt.A(0);break}vt=x(o),wn=vt.next();case 7:if(wn.done){Nt.A(0);break}if(bt=wn.value,W.minHdcpVersions.includes(bt)){Nt.A(8);break}return Nt.g(ae.getStatusForPolicy({minHdcpVersion:bt}),10);case 10:if(cn=Nt.i,cn=="usable")W.minHdcpVersions.includes(bt)||W.minHdcpVersions.push(bt);else{Nt.A(0);break}case 8:wn=vt.next(),Nt.A(7)}})},A=function(le,be,ce,ae,de){de=de===void 0?!1:de;var re,pe,Re,W,Se,Ee,Xe,vt,wn,bt,cn;return P(function(Nt){switch(Nt.h){case 1:for(Nt.m(2),re=Hi(b),pe=x(re.videoCapabilities),Re=pe.next();!Re.done;Re=pe.next())W=Re.value,W.encryptionScheme=be,W.robustness=ce;for(Se=x(re.audioCapabilities),Ee=Se.next();!Ee.done;Ee=Se.next())Xe=Ee.value,Xe.encryptionScheme=be,Xe.robustness=ae;return vt=Hi(re),vt.persistentState="required",vt.sessionTypes=["persistent-license"],wn=[vt,re],cn=Qe(),cn.Ra()=="MOBILE"?Nt.g(Ov(5,navigator.requestMediaKeySystemAccess(le,wn)),7):Nt.g(navigator.requestMediaKeySystemAccess(le,wn),6);case 6:bt=Nt.i,Nt.A(5);break;case 7:bt=Nt.i;case 5:return Nt.g(S(le,bt,de),8);case 8:Nt.o(0);break;case 2:Nt.l(),Nt.j()}})},M=[],_=x(e),R=_.next();!R.done;R=_.next()){for(U=R.value,T.set(U,null),N=!0,j=x(w),V=j.next();!V.done;V=j.next())q=V.value,M.push(A(U,q,"","",N)),N=!1;for(G=x(h[U]||[]),z=G.next();!z.done;z=G.next())J=z.value,M.push(A(U,null,J,"")),M.push(A(U,null,"",J))}return ie.g(Promise.all(M),2)}return ie.return(Sw(T))})}function Kv(e,t){var n,r;return P(function(i){switch(i.h){case 1:return n=null,i.m(2),i.g(Ov(UF,Promise.all([t.close().catch(function(){}),t.closed])),4);case 4:r=i.i,n=r[1],i.o(3);break;case 2:i.l();case 3:n&&n!=="unknown"&&bI(e,n),i.j()}})}function bI(e,t,n){if(t==="internal-error")e.m(new B(2,6,6005,"CDM reported internal error"));else if(t!=="closed-by-application"&&t!=="release-acknowledged"&&t!=="resource-evicted"&&t==="hardware-context-reset"&&n)if(n.initDataType&&n.initData)try{Gv(e,n.initDataType,n.initData,n.type)}catch(r){e.m(new B(2,6,6005,"Failed to recreate session after hardware context reset: "+r.message))}else e.m(new B(2,6,6005,"Cannot recreate session after hardware reset: missing metadata"))}function Dw(e){var t;return P(function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map(function(r){r=x(r);var i=r.next().value,o=r.next().value;return P(function(u){if(u.h==1)return u.m(2),e.Y||e.B.has(i.sessionId)||o.type!=="persistent-license"||e.h.persistentSessionOnlinePlayback?u.g(Kv(e,i),5):u.g(i.remove(),5);if(u.h!=2)return u.o(0);u.l(),u.j()})})),0)})}function wI(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function DF(e){var t=Date.now()/1e3;e.i.forEach(function(n,r){var i=n.Kh,o=r.expiration;isNaN(o)&&(o=1/0),o!=i&&(e.D.onExpirationUpdated(r.sessionId,o),n.Kh=o),e.h.renewalIntervalSec>0&&(i=t-n.Ae,n.Ae>0&&i>=e.h.renewalIntervalSec&&xI(e,r))})}function xI(e,t){var n,r,i,o,u,l,h,p;P(function(m){switch(m.h){case 1:return(n=e.i.get(t))&&(n.Ae=Date.now()/1e3),e.g?(r=e.g.keySystem,i=t,o={sessionId:t.sessionId,sessionType:e.g.sessionType,initData:n?n.initData:null,initDataType:n?n.initDataType:null},m.m(2),wl(r)?(u=Sr("renew"),m.g(t.update(u),5)):qo(r)&&n&&n.initData&&n.initDataType?m.g(LF(e,t,n),7):(ut("Manual license renewal is not supported for "+r),m.return())):m.return();case 7:i=m.i,m.A(5);break;case 5:m.o(3);break;case 2:return m.l(),m.return();case 3:l=e.i.get(i),h={sessionId:i.sessionId,sessionType:e.g.sessionType,initData:l?l.initData:null,initDataType:l?l.initDataType:null},p=new Ge("licenserenewal",new Map().set("oldSessionMetadata",o).set("newSessionMetadata",h)),e.D.onEvent(p),m.j()}})}function LF(e,t,n){var r;return P(function(i){if(i.h==1)return e.i.delete(t),i.g(Kv(e,t),2);if(r=Gv(e,n.initDataType,n.initData,e.g.sessionType,!0),!r)throw new B(2,6,6005,"Failed to create new session for renewal");return i.return(r)})}function Qh(e){return e=e.i.values(),yF(e,function(t){return t.loaded})}function RF(e){for(var t=x(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function NF(e,t){var n=[];for(t.forEach(function(r,i){n.push({keySystem:i,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=x(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function kI(e,t,n){var r=[],i=[],o=[],u=[],l=[],h=new Set,p=new Set;for(OF(n,r,i,u,o,l,h,p),e=e.P?"persistent-license":"temporary",t={keySystem:t,encryptionScheme:r[0],licenseServerUri:i[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||e,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:u[0],serverCertificateUri:o[0],initData:l,keyIds:h,mediaTypes:n[0].mediaTypes},p.size>0&&(t.keySystemUris=p),n=x(n),p=n.next();!p.done;p=n.next())p=p.value,p.distinctiveIdentifierRequired&&(t.distinctiveIdentifierRequired=p.distinctiveIdentifierRequired),p.persistentStateRequired&&(t.persistentStateRequired=p.persistentStateRequired);return t}function OF(e,t,n,r,i,o,u,l){var h=[];e=x(e);for(var p=e.next(),m={};!p.done;m={Wa:void 0},p=e.next()){if(m.Wa=p.value,t.includes(m.Wa.encryptionScheme)||t.push(m.Wa.encryptionScheme),zi(m.Wa.keySystem)&&m.Wa.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(m.Wa.licenseServerUri)||h.push(m.Wa.licenseServerUri):n.includes(m.Wa.licenseServerUri)||n.push(m.Wa.licenseServerUri),i.includes(m.Wa.serverCertificateUri)||i.push(m.Wa.serverCertificateUri),m.Wa.serverCertificate&&(r.some((function(T){return function(k){return $i(k,T.Wa.serverCertificate)}})(m))||r.push(m.Wa.serverCertificate)),m.Wa.initData){p=x(m.Wa.initData);for(var b=p.next(),w={};!b.done;w={sh:void 0},b=p.next())w.sh=b.value,o.some((function(T){return function(k){var S=T.sh;return k.keyId&&k.keyId==S.keyId?!0:k.initDataType==S.initDataType&&$i(k.initData,S.initData)}})(w))||o.push(w.sh)}if(m.Wa.keyIds)for(p=x(m.Wa.keyIds),b=p.next();!b.done;b=p.next())u.add(b.value);if(m.Wa.keySystemUris&&l)for(m=x(m.Wa.keySystemUris),p=m.next();!p.done;p=m.next())l.add(p.value)}if(h.length==1)n.push(h[0]);else if(h.length>0){for(t=[],h=x(h),r=h.next();!r.done;r=h.next())r=d.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),t.push.apply(t,se(r.keys));h=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+d.btoa(h))}}function jF(e,t,n,r){var i=e.keySystem;i&&(!zi(i)||!e.licenseServerUri)&&(t.size&&t.get(i)&&(t=t.get(i),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(i))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),r[i]&&(e.keySystem=r[i]),d.cast&&d.cast.__platform__&&i=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function TI(e,t){if(e=md(e),e.size!=0){e=i5(e),t=x(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var UF=1,FF=5,BF=.5;function VF(){this.g=Rl,this.j=new Map().set(Rl,2).set(Ll,1),this.i=0,this.h=-1}function Lw(e,t){var n=e.g!==t;return e.g=t,n&&t===Rl&&(e.i=Date.now()),n}var Ll=0,Rl=1;function Rw(e,t,n){this.h=e,this.i=t,this.g=n}function SI(e,t){var n,r,i;return P(function(o){if(o.h==1)return o.g(JU(e.g,t,e.h.drm.preferredKeySystems,e.h.drm.keySystemsMapping),2);if(e.h.streaming.dontChooseCodecs||(n=e.h.preferredVideo.map(function(u){return u.codec}).filter(Boolean),r=e.h.preferredAudio.map(function(u){return u.codec}).filter(Boolean),i=e.h.preferredText.map(function(u){return u.format}).filter(Boolean),U5(t,n,r,e.h.preferredDecodingAttributes,i)),!t.variants.some(Fv))throw new B(2,4,4032);return o.return(AI(e,t))})}function CI(e,t){var n=e.h.restrictions;e=e.i;var r=!1;t=x(t.variants);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=i.allowedByApplication;i.allowedByApplication=jv(i,n,e),o!=i.allowedByApplication&&(r=!0)}return r}function AI(e,t){var n=CI(e,t);if(t){var r=e.g?e.g.Xb():null;if(r&&e.g.u){for(var i=new Set,o=x(t.variants),u=o.next();!u.done;u=o.next())u=u.value,u.audio&&i.add(u.audio),u.video&&i.add(u.video);for(i=x(i),o=i.next();!o.done;o=i.next())EI(e,r.keySystem,o.value)}II(e,t)}return n}function EI(e,t,n){n=x(n.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t){for(var i=x(r.initData||[]),o=i.next();!o.done;o=i.next())o=o.value,Jh(e.g,o.initDataType,o.initData);i=e.g,i.g&&(i.g.mediaTypes!==r.mediaTypes&&(i.g.mediaTypes=r.mediaTypes),Ih(r)&&(i.g=kI(i,i.g.keySystem,[i.g,r])))}}function II(e,t){function n(p){if(p&&!l.has(p)&&(l.add(p),p.keyIds.size)){p=x(p.keyIds);for(var m=p.next();!m.done;m=p.next()){m=m.value;var b=r[i?"00":m];b?MI.includes(b)&&u.add(b):o.add(m)}}}var r=e.g?e.g.zf():{};e=Object.keys(r);var i=e.length&&e[0]=="00";e=!1;var o=new Set,u=new Set,l=new WeakSet;t=x(t.variants);for(var h=t.next();!h.done;h=t.next()){if(h=h.value,!h.allowedByApplication)e=!0;else if(h.allowedByKeySystem)return;n(h.audio),n(h.video)}throw e={hasAppRestrictions:e,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(u)},new B(2,4,4012,e)}var MI=["output-restricted","internal-error"];Te("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Nl(e,t){var n=null,r=null,i=null,o=null,u=e.S();return t&1&&(i=e.Sd()),t&2&&(o=e.S()),t&8&&(n=e.S()),t&16&&(r=e.S()),{trackId:u,nc:n,Kc:r,Ni:i,ei:o}}function Wv(e,t){return t==1?(t=e.S(),e=e.S(),{Oa:t*4294967296+e}):{Oa:e.S()}}function Xv(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),e=e.Da(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function Ol(e,t,n){var r=e.S(),i=[],o=null;n&1&&(o=e.Sh()),n&4&&e.skip(4);for(var u=0;u<r;u++){var l={Ud:null,sampleSize:null,dg:null};n&256&&(l.Ud=e.S()),n&512&&(l.sampleSize=e.S()),n&1024&&e.skip(4),n&2048&&(l.dg=t==0?e.S():e.Sh()),i.push(l)}return{Sj:r,Vc:i,Ic:o}}function Nw(e,t){t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.S();return t==1?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),t=e.Da()+e.Da()/16,e=e.Da()+e.Da()/16,{trackId:n,width:t,height:e}}function PI(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Da();return e.skip(2),e.skip(2),e.skip(2),e=e.Da()+e.Da()/65536,{channelCount:t,sampleRate:e}}function Yv(e){return e=e.S(),{codec:_l(e)}}function Ow(e,t){e.Z();var n=e.Z(),r=t>=1?n>>4&15:0;t=t>=1?n&15:0,n=e.Z();var i=e.Z(),o=e.Ja(16,!1);o=Yr(o);var u=null;return n===1&&i===0&&(u=e.Z(),u=e.Ja(u,!0)),{defaultKID:o,Pn:n,Ok:i,tf:r,uf:t,Jc:u}}function $F(e){var t=null,n=null,r=e.Ja(4,!1),i=String.fromCharCode(r[0]);if(i+=String.fromCharCode(r[1]),i+=String.fromCharCode(r[2]),i+=String.fromCharCode(r[3]),i==="nclx"){switch(e.Da()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(r=e.Da(),e.Da(),r){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Ne:n}}function Zh(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Ti(e){return(e<10?"0":"")+e}function _I(e,t,n,r){var i=!!(t&2);t&1&&(e.skip(3),n=e.Z(),e.skip(16),n===0&&(r=e.Z(),r=e.Ja(r,!0))),t=e.S();for(var o=[],u=0;u<t;u++){var l=r;if(n>0)l=e.Ja(n,!0);else if(!l)throw Error("SENC specifies IV size 0 but no constant IV is available.");var h=new Uint8Array(16);if(h.set(l.subarray(0,Math.min(l.length,16)),0),l=null,i){var p=e.Da();l=[];for(var m=0;m<p;m++)l.push({ke:e.Da(),Mc:e.S()})}o.push({iv:h,hk:l})}return{bb:o}}function DI(){this.h=null,this.j=new Map,this.i=this.g=null}function zF(e,t,n,r){var i;return P(function(o){return o.h==1?(i=H(t),n?(e.i=i,o.return(GF(i))):e.i?e.h===r?o.A(2):(e.h=r,e.g=HF(e.h),o.g(e.g,3)):o.return(i)):(o.h!=2&&(e.j=o.i,e.g=null),o.return(qF(e,i,e.i)))})}DI.prototype.destroy=function(){var e=this;return P(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.m(3),t.g(e.g,5);case 5:t.o(2);break;case 3:t.l();case 2:e.h=null,e.j.clear(),e.g=null,e.i=null,t.j()}})};function HF(e){var t,n,r,i,o,u,l,h;return P(function(p){if(p.h==1)return t=new Map,e.clearKeys?p.g(Promise.all([].concat(se(e.clearKeys.entries())).map(function(m){var b=x(m);m=b.next().value,b=b.next().value,b=wi(b);var w=wi(m);return Promise.all([crypto.subtle.importKey("raw",b,{name:"AES-CBC"},!1,["decrypt","encrypt"]),crypto.subtle.importKey("raw",b,{name:"AES-CTR"},!1,["decrypt"])]).then(function(T){var k=x(T);return T=k.next().value,k=k.next().value,{Ql:Yr(w),Kg:T,qf:k}})})),2):p.return(t);for(n=p.i,r=x(n),i=r.next();!i.done;i=r.next())o=i.value,u=o.Ql,l=o.Kg,h=o.qf,t.set(u,{Kg:l,qf:h});return p.return(t)})}function qF(e,t,n){var r,i,o,u,l;return P(function(h){return h.h==1?(r=KF(n),i=WF(t,r),o=i.Vk.map(function(p){var m=r.get(p.trackId)||r.values().next().value;return XF(e,p,t,m)}),h.g(Promise.all(o),2)):(u=h.i,l=[t.slice(0,i.Tk)].concat(se(u)),h.return(Dn.apply(bi,se(l))))})}function GF(e){function t(l){i.push(function(){r.setUint32(l.start+4,1718773093,!1),n.fill(0,l.start+8,l.start+l.size)})}var n=H(e).slice(),r=_e(n),i=[],o=-1;new Tt().ua(Qo,qt).T("stsd",Ua).box("encv",function(l){o=l.start,Pl(l)}).box("enca",function(l){o=l.start,Yh(l)}).box("sinf",function(l){t(l),qt(l)}).box("frma",function(l){var h=Yv(l.reader).codec,p=o;p!==-1&&h&&i.push(function(){for(var m=0;m<4;++m)r.setUint8(p+4+m,h.charCodeAt(m))})}).T("sgpd",t).box("pssh",t).parse(n,!0),e=x(i);for(var u=e.next();!u.done;u=e.next())u=u.value,u();return n}function KF(e){var t=new Map,n=0;return new Tt().ua(["moov","mdia","minf","stbl"],qt).box("trak",function(r){n=0,qt(r)}).T("tkhd",function(r){n=Nw(r.reader,r.version).trackId,t.getOrInsert(n,{defaultKID:"",encryptionScheme:"cenc",me:8,Jc:null,tf:0,uf:0})}).T("stsd",Ua).box("encv",Pl).box("enca",Yh).box("sinf",qt).T("schm",function(r){r=_l(r.reader.S());var i=t.get(n);i&&(i.encryptionScheme=r.toLowerCase())}).box("schi",qt).T("tenc",function(r){r=Ow(r.reader,r.version);var i=t.get(n);i&&(i.defaultKID=r.defaultKID,i.me=r.Ok,i.Jc=r.Jc,i.tf=r.tf,i.uf=r.uf)}).parse(e,!0),t}function WF(e,t){function n(u){o&&o.Jg.push({start:u.start,size:u.size})}var r=[],i=0,o=null;return new Tt().box("moof",function(u){r.length||(i=u.start),o={Md:u.start,Cj:u.size,Gh:-1,Be:-1,Uj:null,lk:0,trackId:0,qk:[],Jg:[]},qt(u)}).box("traf",qt).T("tfhd",function(u){o&&(u=Nl(u.reader,u.flags),o.trackId=u.trackId,o.lk=u.Kc||0)}).T("trun",function(u){if(o){u=Ol(u.reader,u.version,u.flags),u=x(u.Vc);for(var l=u.next();!l.done;l=u.next())o.qk.push({size:l.value.sampleSize||o.lk})}}).T("senc",function(u){if(o){var l=t.get(o.trackId);l&&(o.Uj=_I(u.reader,u.flags,l.me,l.Jc)),n(u)}}).bj(["saiz","saio","sgpd","sbgp"],n).box("pssh",n).box("mdat",function(u){o&&(o.Gh=u.start,o.Be=u.size,r.push(o),o=null)}).parse(e),{Vk:r,Tk:i}}function XF(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R;return P(function(U){if(U.h==1)return i=r.defaultKID,o=e.j.get(i),o?(u=r.encryptionScheme,(l=t.Uj)&&r.me!==8&&(h=n.subarray(t.Md,t.Md+t.Cj),new Tt().ua(Dl,qt).T("senc",function(N){l=_I(N.reader,N.flags,r.me,r.Jc)}).parse(h,!1)),p=t.Gh+8,m=n.subarray(p,p+t.Be-8),U.g(YF(m,t.qk.map(function(N){return N.size}),l,r,o,u),2)):U.return(n.slice(t.Md,t.Gh+t.Be));if(b=U.i,w=n.slice(t.Md,t.Md+t.Cj),T=_e(w),t.Jg)for(k=x(t.Jg),S=k.next();!S.done;S=k.next())A=S.value,M=A.start-t.Md,M>=0&&M+A.size<=w.byteLength&&(T.setUint32(M+4,1718773093,!1),w.fill(0,M+8,M+A.size));return _=8+b.byteLength,R=new Uint8Array(_),_e(R).setUint32(0,_,!1),R.set([109,100,97,116],4),R.set(b,8),U.return(Dn(w,R))})}function YF(e,t,n,r,i,o){var u,l,h,p,m,b,w,T,k;return P(function(S){if(S.h==1)return u=new Uint8Array(e.byteLength),l=0,h=t.map(function(A,M){var _=l;if(l+=A,A=e.subarray(_,_+A),n&&n.bb[M]){M=n.bb[M];var R=r.me===16?16:8,U=new Uint8Array(16);return U.set(M.iv.slice(0,R),0),o==="cenc"?JF(A,U,M.hk,i).then(function(N){return{offset:_,rf:N}}):LI(A,r.Jc||U,M.hk,r,i).then(function(N){return{offset:_,rf:N}})}return o==="cbcs"&&r.Jc?LI(A,r.Jc,null,r,i).then(function(N){return{offset:_,rf:N}}):Promise.resolve({offset:_,rf:A})}),S.g(Promise.all(h),2);for(p=S.i,m=x(p),b=m.next();!b.done;b=m.next())w=b.value,T=w.offset,k=w.rf,u.set(k,T);return S.return(u)})}function JF(e,t,n,r){var i,o,u,l,h,p,m,b,w,T;return P(function(k){switch(k.h){case 1:if(n&&n.length){k.A(2);break}return i=Wn,o=H,k.g(crypto.subtle.decrypt({name:"AES-CTR",counter:t,length:64},r.qf,e),3);case 3:return k.return(o.call(i,k.i));case 2:return u=new Uint8Array(e.byteLength),h=l=0,p=n.map(function(S){var A=l;if(l+=S.ke,S.Mc===0)return Promise.resolve({nf:A,Si:S.ke,Zi:l,Rk:0,Rg:null});var M=t.slice();ZF(M,h);var _=l;return l+=S.Mc,h+=Math.ceil(S.Mc/16),crypto.subtle.decrypt({name:"AES-CTR",counter:M,length:64},r.qf,e.subarray(_,_+S.Mc)).then(function(R){return{nf:A,Si:S.ke,Zi:_,Rk:S.Mc,Rg:H(R)}})}),k.g(Promise.all(p),4);case 4:for(m=k.i,b=x(m),w=b.next();!w.done;w=b.next())T=w.value,u.set(e.subarray(T.nf,T.nf+T.Si),T.nf),T.Rg&&u.set(T.Rg,T.Zi);return k.return(u)}})}function LI(e,t,n,r,i){var o,u,l,h,p,m,b,w,T,k,S,A;return P(function(M){if(M.h==1){if(o=r.tf,u=r.uf,o===0&&(o=1,u=0),l=new Uint8Array(e.byteLength),h=[],p=t,m=function(_,R){var U=_;for(_+=R,R={};U<_;R={wd:void 0,Xf:void 0,mf:void 0}){var N=Math.min(o*16,_-U);if(N>=16){var j=Math.floor(N/16)*16;R.wd=U,R.Xf=N-j,R.mf=U+j,h.push(QF(e.subarray(R.wd,R.wd+j),p,i.Kg).then((function(V){return function(q){l.set(q,V.wd),V.Xf>0&&l.set(e.subarray(V.mf,V.mf+V.Xf),V.mf)}})(R))),p=e.slice(R.wd+j-16,R.wd+j),U+=j+R.Xf}else l.set(e.subarray(U,U+N),U),U+=N;R=Math.min(u*16,_-U),R>0&&(l.set(e.subarray(U,U+R),U),U+=R)}},n&&n.length)for(b=0,w=x(n),T=w.next();!T.done;T=w.next())k=T.value,S=b,b+=k.ke,l.set(e.subarray(S,S+k.ke),S),k.Mc>0&&(A=b,b+=k.Mc,m(A,k.Mc));else m(0,e.byteLength);return M.g(Promise.all(h),2)}return M.return(l)})}function QF(e,t,n){var r,i,o,u,l,h,p,m;return P(function(b){return b.h==1?!e||!e.byteLength||e.byteLength%16!==0?b.return(new Uint8Array(0)):(r=e.byteLength/16,i=e.subarray((r-1)*16,r*16),o=i.map(function(w){return 16^w}),u=new Uint8Array(16),b.g(crypto.subtle.encrypt({name:"AES-CBC",iv:u},n,o),2)):b.h!=3?(l=b.i,h=new Uint8Array(l,0,16),p=new Uint8Array(e.byteLength+16),p.set(e,0),p.set(h,e.byteLength),b.g(crypto.subtle.decrypt({name:"AES-CBC",iv:t},n,p),3)):(m=b.i,b.return(H(m)))})}function ZF(e,t){for(var n=15;n>=8&&t>0;n--)t+=e[n],e[n]=t&255,t>>>=8}function eB(e){if(!e)return!1;var t;return(t=d.crypto)!=null&&t.subtle&&zi(e.keySystem)?!Qe().lj():!1}function Si(e){return tB.getOrInsertComputed(e,function(){var t,n;return(n=(t=self.ManagedMediaSource||self.MediaSource)==null?void 0:t.isTypeSupported(e))!=null?n:!1})}function RI(){var e=self.ManagedMediaSource||self.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var tB=new Map;function jl(e){this.g=e=e===void 0?[]:e}function NI(e){var t=en,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=Qe().Ie()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var r=new Uint8Array([]);switch(e.type){case"video":e.codecs.includes("avc1")?r=OI(e,"avc1","avcC"):e.codecs.includes("hvc1")&&(r=OI(e,"hvc1","hvcC"));break;case"audio":if(n=="mp3")e=en(".mp3",ep(e));else if(n=="ac-3"){n=en("dac3",e.fb),r="ac-3";var i=new Uint8Array([]);bd(e.stream)&&(i=yd(e.stream,e.codecs),r="enca"),e=en(r,ep(e),n,i)}else if(n=="ec-3")n=en("dec3",e.fb),r="ec-3",i=new Uint8Array([]),bd(e.stream)&&(i=yd(e.stream,e.codecs),r="enca"),e=en(r,ep(e),n,i);else if(n=="opus")n=en("dOps",e.fb),r="Opus",i=new Uint8Array([]),bd(e.stream)&&(i=yd(e.stream,e.codecs),r="enca"),e=en(r,ep(e),n,i);else{if(e.fb.byteLength>0)n=en("esds",e.fb);else{n=en,r=e.id+1,i=e.stream.channelsCount||2;var o=e.stream.audioSamplingRate||44100,u=rd("audio",e.codecs.split(",")),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},h=l[o];(u==="mp4a.40.5"||u==="mp4a.40.29")&&(h=l[o*2]),o=parseInt(u.split(".").pop(),10),u=lB.value(),Ul(u,r,6),u[26]=o<<3|h>>>1,u[27]=h<<7|i<<3,n=n("esds",u)}r="mp4a",i=new Uint8Array([]),bd(e.stream)&&(i=yd(e.stream,e.codecs),r="enca"),e=en(r,ep(e),n,i)}r=e}return e=en("stsd",yB.value(),r),t("stbl",e,wB.value(),xB.value(),kB.value(),TB.value())}function OI(e,t,n){var r=e.stream.width||0,i=e.stream.height||0,o=new Uint8Array([]);if(e.fb.byteLength>0&&(o=en(n,e.fb)),n=dB.value(),Ul(n,r,24),Ul(n,i,26),e.bd||e.nd){r=e.bd||0,i=e.nd||0;var u=To("pasp",8);Hn(u,r,8),Hn(u,i,12),r=u}else r=new Uint8Array([]);return i=new Uint8Array([]),bd(e.stream)&&(i=yd(e.stream,e.codecs),t="encv"),en(t,n,o,r,i)}function ep(e){var t=e.stream.channelsCount||2;e=e.stream.audioSamplingRate||44100;var n=cB.value();return n[17]=t,Ul(n,e,24),n}function jI(e){var t=[];if(!bd(e))return new Uint8Array([]);e=x(e.drmInfos);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.initData){n=x(n.initData);for(var r=n.next();!r.done;r=n.next())t.push(r.value.initData)}return Dn.apply(bi,se(t))}function yd(e,t){var n=en,r=t.split(".")[0];t=To("frma",4),Hn(t,UI(r),8),r="cenc";var i=e.drmInfos[0];i&&i.encryptionScheme&&(r=i.encryptionScheme),i=hB.value(),Hn(i,UI(r),4),r=en("schm",i),i=en;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=x(e.drmInfos);for(var u=e.next();!u.done;u=e.next())if((u=u.value)&&u.keyIds&&u.keyIds.size){u=x(u.keyIds);for(var l=u.next();!l.done;l=u.next()){o=l.value,l=new Uint8Array(o.length/2);for(var h=0;h<o.length/2;h+=1)l[h]=parseInt(String(o[h*2]+o[h*2+1]),16);o=l}}return e=en("tenc",fB.value(),o),n("sinf",t,r,i("schi",e))}function nB(e){var t=[],n=0;e=x(e.g);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=en,o=r.data?r.data.sequenceNumber:0,u=To("mfhd",8);Hn(u,o,12),o=u;var l,h=r.data?r.data.bb:[];for(u=To("sdtp",4+h.length),l=0;l<h.length;l++){var p=h[l].flags;u[l+12]=p.wf<<4|p.If<<2|p.Ef}var m=u.length+32+20+8+16+8+8;h=en,l=r.id+1,p=uB.value(),Hn(p,l,4),l=en("tfhd",p),p=r.data?r.data.Oa:0;var b=Math.floor(p/(xu+1)),w=Math.floor(p%(xu+1));p=To("tfdt",12),p[8]=1,Hn(p,b,12),Hn(p,w,16);var T=m;m=r.data?r.data.bb:[],b=m.length;var k=12+16*b;for(w=To("trun",k),T+=8+k,w[8]=r.type==="video"?1:0,w[9]=0,w[10]=15,w[11]=1,Hn(w,b,12),Hn(w,T,16),T=0;T<b;T++){k=m[T];var S=k.flags,A=20+16*T;Hn(w,k.duration,A),Hn(w,k.size,A+4),w[A+8]=S.yh<<2|S.wf,w[A+9]=S.If<<6|S.Ef<<4|S.Ah,w[A+10]=S.vf&61440,w[A+11]=S.vf&15,Hn(w,k.zb,A+12)}for(u=h("traf",l,p,w,u),i=i("moof",o,u),r=r.data?r.data.bb:[],o=0,u=x(r),h=u.next();!h.done;h=u.next())o+=h.value.data.byteLength;o=8+o,t.push({Yl:i,bb:r,Be:o}),n+=i.byteLength+o}for(n=H(new ArrayBuffer(n)),e=0,t=x(t),r=t.next();!r.done;r=t.next())for(o=r.value,r=o.Yl,i=o.bb,o=o.Be,n.set(r,e),e+=r.byteLength,Hn(n,o,e),n.set(rB.value(),e+4),e+=8,r=x(i),i=r.next();!i.done;i=r.next())i=i.value,n.set(i.data,e),e+=i.data.byteLength;return n}function Hn(e,t,n){e[n]=t>>>24&255,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=t&255}function Ul(e,t,n){e[n]=t>>>8&255,e[n+1]=t&255}function UI(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<(e.length-n-1)*8;return t}function en(e){for(var t=oe.apply(1,arguments),n=0,r=x(t),i=r.next();!i.done;i=r.next())n+=i.value.byteLength;for(n=To(e,n),r=8,i=0;i<t.length;i++)n.set(t[i],r),r+=t[i].byteLength;return n}function To(e,t){var n=FI.get(e);return n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],FI.set(e,n)),e=8+t,t=new Uint8Array(e),t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t.set(n,4),t}function bd(e){return e.encrypted&&e.drmInfos.length>0}var xu=4294967295,FI=new Map,rB=new et(function(){return new Uint8Array([109,100,97,116])}),iB=new et(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])}),aB=new et(function(){return new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0])}),oB=new et(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}),sB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),uB=new et(function(){return new Uint8Array([0,0,0,58,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),lB=new et(function(){return new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,0,0,6,1,2])}),cB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0])}),dB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])}),fB=new et(function(){return new Uint8Array([0,0,0,0,0,0,1,8])}),hB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,1,0,0])}),pB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),gB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),mB=new et(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),vB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),yB=new et(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),bB=new et(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);return en("ftyp",e,n,e,t)}),BI=new et(function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=en("dref",e),en("dinf",e)}),wB=new et(function(){return To("stts",8)}),xB=new et(function(){return To("stsc",8)}),kB=new et(function(){return To("stsz",12)}),TB=new et(function(){return To("stco",8)});function SB(e){e=H(e);var t=null;return new Tt().ua(Qo,qt).T("stsd",Ua).box("enca",function(n){return t=n.reader.h,Yh(n)}).box("sinf",qt).box("frma",function(n){n.parser.stop(),Yv(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}function CB(e){e=H(e);var t=null,n=-1;return new Tt().ua(Qo,qt).T("stsd",Ua).box("hvc1",function(r){return t=r.reader.h,n=r.start,Pl(r)}).box("dvvC",function(r){r.parser.stop(),t.setUint32(r.start-n-4,1718773093)}).parse(e),e}function AB(e,t,n,r){var i=t=H(t),o=!1,u,l=[],h=[];if(new Tt().ua(Qo,function(m){l.push(m),qt(m)}).T("stsd",function(m){u=m,l.push(m),Ua(m)}).ua(["encv","enca"],function(m){o=!0,m.parser.stop()}).ua(Aw,function(m){h.push({box:m,Dj:1701733238})}).ua([].concat(se(lI),["mp4a"]),function(m){h.push({box:m,Dj:1701733217})}).parse(t),o)return t;if(h.length==0||!u)throw Yr(t),new B(2,3,3019,n);h.reverse(),n=x(h);for(var p=n.next();!p.done;p=n.next())p=p.value,i=MB(e,i,u,p.box,l,p.Dj,r);return i=PB(e,i),Qe().$h(r)?(e=new Uint8Array(t.byteLength+i.byteLength),e.set(i),e.set(t,i.byteLength),e):i}function EB(e){e=H(e);var t=[];new Tt().box("mdat",function(u){t.push(u)}).parse(e);for(var n=[],r=0;r<t.length;r++){var i=t[r-1],o=t[r];n.push(IB(e.subarray(i?i.start+i.size:0,o.start+o.size)))}return Dn.apply(bi,se(n))}function IB(e){var t,n,r,i,o=[];if(new Tt().ua(Dl,function(m){o.push(m),qt(m)}).T("tfhd",function(m){t=m,r=Nl(m.reader,m.flags)}).T("trun",function(m){n=m,i=Ol(m.reader,m.version,m.flags)}).parse(e),r&&r.ei!==2){var u=t.start+Jo(t)+4+(r.Ni!==null?8:0),l=_e(e);if(r.ei!==null)l.setUint32(u,2);else{Rs(e,t.start,t.size+4);var h=l.getUint32(t.start+8);l.setUint32(t.start+8,h|2),i&&i.Ic!==null&&l.setInt32(n.start+Jo(n)+4,i.Ic+4),h=e.subarray(0,u),l=e.subarray(u),e=new Uint8Array(e.byteLength+4),e.set(h),h=[];for(var p=3;p>=0;p--)h.push(2>>8*p&255);for(e.set(new Uint8Array(h),u),e.set(l,u+4),u=x(o),l=u.next();!l.done;l=u.next())l=l.value,Rs(e,l.start,l.size+4)}}return e}function MB(e,t,n,r,i,o,u){var l=yd(e,r.name),h=t.subarray(r.start,r.start+r.size);for(e=new Uint8Array(r.size+l.byteLength),e.set(h,0),_e(e).setUint32(4,o),e.set(l,r.size),Rs(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),r=Qe().Hf(u)?r.start:r.start+r.size,u=t.subarray(r),o.set(t.subarray(0,r)),o.set(e,r),o.set(u,r+e.byteLength),t=x(i),i=t.next();!i.done;i=t.next())i=i.value,Rs(o,i.start,i.size+e.byteLength);return e=_e(o,n.start),n=Jo(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function PB(e,t){if(e=jI(e),e.byteLength===0)return t;var n=0,r=0;new Tt().box("moov",function(l){n=l.start,r=l.size,l.parser.stop()}).parse(t);var i=n+r;Rs(t,n,r+e.byteLength);var o=new Uint8Array(t.byteLength+e.byteLength),u=t.subarray(i);return o.set(t.subarray(0,i)),o.set(e,i),o.set(u,i+e.byteLength),o}function Rs(e,t,n){e=_e(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function _B(e){var t=H(e),n=[];return new Tt().ua(Qo,function(r){n.push({start:r.start,size:r.size}),qt(r)}).box("stsd",function(r){n.push({start:r.start,size:r.size});for(var i=_e(t,r.start),o=0;o<r.size-3;o++){var u=i.getUint32(o);u==1633889587?i.setUint32(o,1700998451):u==1684103987&&i.setUint32(o,1684366131)}}).parse(t),t}function DB(e){e=H(e);var t=[],n=[],r=[],i=[],o=!1;if(new Tt().box("moof",function(j){t.push(j),qt(j)}).box("traf",function(j){n.push(j),qt(j)}).T("tfhd",function(j){r.push(j)}).T("trun",function(j){i.push(j)}).ua(["senc","saiz","saio"],function(){o=!0}).parse(e,!1,!0),o||t.length!=1||n.length!=1||r.length!=1||i.length!=1)return e;var u=t[0],l=n[0],h=r[0],p=i[0],m=p.flags,b=Nl(h.reader,h.flags),w=Ol(p.reader,p.version,p.flags);if(b.Ni!=null||!(m&1)||w.Ic==null)return e;var T=u.start+u.size,k=_e(e);if(T+8>e.byteLength||k.getUint32(T+4)!=1835295092||(k=k.getUint32(T),k==1))return e;k==0&&(k=e.byteLength-T);var S=e.byteLength-(T+8);if(S>=k-8)return e;for(var A=k=0,M=x(w.Vc),_=M.next();!_.done;_=M.next()){if(_=_.value,_=_.sampleSize!=null?_.sampleSize:b.Kc,_==null)return e;if(k+_>S)break;k+=_,A++}if(A!=1||A>=w.Sj)return e;M=(m&256)!=0,S=0,_=x(w.Vc);for(var R=_.next();!R.done;R=_.next()){if(R=R.value,R=M?R.Ud:b.nc,R==null)return e;S+=R}_=Jo(p),R=p.start+_+4,R+=4,m&4&&(R+=4);var U=0;if(m&256&&(U+=4),m&512&&(U+=4),m&1024&&(U+=4),m&2048&&(U+=4),m=(w.Sj-A)*U,U=R+A*U,U+m!=T)return e;U=e.slice(0,U);var N=_e(U);return N.setUint32(p.start+_,A),N.setInt32(p.start+_+4,w.Ic-m),M?N.setUint32(R,S):(h=h.start+Jo(h)+4,b.ei!=null&&(h+=4),N.setUint32(h,S)),Rs(U,p.start,p.size-m),Rs(U,l.start,l.size-m),Rs(U,u.start,u.size-m),u=e.slice(T,T+8),Rs(u,0,8+k),Dn(U,u,e.subarray(T+8,T+8+k))}function Ci(e,t,n,r,i,o,u,l){this.U=e,this.startByte=t,this.endByte=n,this.Jd=r===void 0?null:r,this.timescale=i===void 0?null:i,this.h=o===void 0?null:o,this.aesKey=u===void 0?null:u,this.g=this.mimeType=this.codecs=null,this.encrypted=l===void 0?!1:l}Ci.prototype.Rc=function(){return this.startByte},Ci.prototype.Oc=function(){return this.endByte},Ci.prototype.Je=function(e){this.h=e},Ci.prototype.$b=function(){return this.h};function tp(e,t){return e===t?!0:e&&t?e.Rc()==t.Rc()&&e.Oc()==t.Oc()&&xe(e.U().sort(),t.U().sort())&&$i(e.$b(),t.$b()):e==t}Te("shaka.media.InitSegmentReference",Ci),Ci.prototype.getEndByte=Ci.prototype.Oc,Ci.prototype.getStartByte=Ci.prototype.Rc;function nt(e,t,n,r,i,o,u,l,h,p,m,b,w,T,k,S){for(p=p===void 0?[]:p,T=T===void 0?Ns:T,this.startTime=e,this.j=this.endTime=t,this.D=n,this.startByte=r,this.endByte=i,this.ia=o,this.timestampOffset=u,this.appendWindowStart=l,this.appendWindowEnd=h,this.h=p,this.tilesLayout=m===void 0?"":m,this.B=b===void 0?null:b,this.g=w===void 0?null:w,this.status=T,this.preload=!1,this.l=!0,this.o=!1,this.aesKey=k===void 0?null:k,this.thumbnailSprite=null,this.i=-1,this.m=S===void 0?!1:S,this.ze=this.gd=!1,e=x(this.h),t=e.next();!t.done;t=e.next())t.value.zj();this.m&&this.h.length&&this.h[this.h.length-1].yj(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.F=!1,this.C=null}g=nt.prototype,g.U=function(){return this.D()},g.getStartTime=function(){return this.startTime},g.il=function(){return this.endTime},g.Rc=function(){return this.startByte},g.Oc=function(){return this.endByte};function jw(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.h.length>0&&e.m)for(e=x(e.h),e=e.next();!e.done;e=e.next()){jw(e.value);break}return null}g.El=function(){return this.tilesLayout},g.Dl=function(){return this.B},g.tc=function(){return this.status},g.Vl=function(){this.status=$I},g.Fh=function(){this.preload=!0},g.isPreload=function(){return this.preload},g.Id=function(){this.l=!1},g.Ll=function(){return this.l},g.zj=function(){this.gd=!0},g.Nl=function(){return this.gd},g.yj=function(){this.ze=!0},g.Ml=function(){return this.ze},g.xj=function(){this.o=!0},g.Jl=function(){return this.o},g.ig=function(e){this.thumbnailSprite=e},g.Bl=function(){return this.thumbnailSprite},g.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=x(this.h),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},g.si=function(e){this.g==null?Xt("Sync attempted without sync time!"):(e=this.g-e-this.startTime,Math.abs(e)>=.001&&this.offset(e))},g.Je=function(e,t){this.u=e,this.F=t===void 0?!1:t},g.$b=function(e){var t=this.u;return(e===void 0||e)&&this.F&&(this.u=null),t};function VI(e,t){e.ia=t,e=x(e.h);for(var n=e.next();!n.done;n=e.next())VI(n.value,t)}g.hg=function(e){this.C=e},g.getMetadata=function(){return this.C},Te("shaka.media.SegmentReference",nt),nt.prototype.getMetadata=nt.prototype.getMetadata,nt.prototype.setMetadata=nt.prototype.hg,nt.prototype.getSegmentData=nt.prototype.$b,nt.prototype.setSegmentData=nt.prototype.Je,nt.prototype.syncAgainst=nt.prototype.si,nt.prototype.offset=nt.prototype.offset,nt.prototype.getThumbnailSprite=nt.prototype.Bl,nt.prototype.setThumbnailSprite=nt.prototype.ig,nt.prototype.hasByterangeOptimization=nt.prototype.Jl,nt.prototype.markAsByterangeOptimization=nt.prototype.xj,nt.prototype.isLastPartial=nt.prototype.Ml,nt.prototype.markAsLastPartial=nt.prototype.yj,nt.prototype.isPartial=nt.prototype.Nl,nt.prototype.markAsPartial=nt.prototype.zj,nt.prototype.isIndependent=nt.prototype.Ll,nt.prototype.markAsNonIndependent=nt.prototype.Id,nt.prototype.isPreload=nt.prototype.isPreload,nt.prototype.markAsPreload=nt.prototype.Fh,nt.prototype.markAsUnavailable=nt.prototype.Vl,nt.prototype.getStatus=nt.prototype.tc,nt.prototype.getTileDuration=nt.prototype.Dl,nt.prototype.getTilesLayout=nt.prototype.El,nt.prototype.getEndByte=nt.prototype.Oc,nt.prototype.getStartByte=nt.prototype.Rc,nt.prototype.getEndTime=nt.prototype.il,nt.prototype.getStartTime=nt.prototype.getStartTime,nt.prototype.getUris=nt.prototype.U;var Ns=0,$I=1;nt.Status={Xm:Ns,Cn:$I,jn:2};function wd(e){return e.length==1&&e.end(0)-e.start(0)<1e-4}function zI(e){return!e||wd(e)?null:e.length==1&&e.start(0)<0?0:e.length?e.start(0):null}function Jv(e){return!e||wd(e)?null:e.length?e.end(e.length-1):null}function Qv(e,t){return!e||!e.length||wd(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function HI(e,t){if(!e||!e.length||wd(e))return 0;var n=0;e=x(Fa(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,i>t&&(n+=i-Math.max(r,t))}return n}function qI(e,t){if(!e||!e.length||wd(e))return 0;var n=0;e=x(Fa(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,r<t&&(n+=Math.min(i,t)-r)}return n}function LB(e,t,n){return!e||!e.length||wd(e)?null:(e=Fa(e).findIndex(function(r,i,o){return r.start>t&&(i==0||o[i-1].end-t<=n)}),e>=0?e:null)}function Fa(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function np(){}function GI(e,t){var n=xd.get(t)||[];t=[],n=x(n);for(var r=n.next();!r.done;r=n.next())r=r.value,t.push.apply(t,se(r().parse(e)));for(e=new Set,n=[],t=x(t),r=t.next();!r.done;r=t.next())r=r.value,e.has(r.key)||(e.add(r.key),n.push(r));return n}function KI(e){return e=xd.get(e),e!=null&&e.length>0}function ku(e,t){xd.has(e)||xd.set(e,[]),xd.get(e).push(t)}Te("shaka.metadata.Metadata",np),np.unregisterParserByMime=function(e){xd.delete(e)},np.registerParserByMime=ku,np.supports=KI,np.getMetadataFrames=GI;var xd=new Map;function Fl(){}function WI(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function XI(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Uw(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function Bl(e,t){switch(t){case 0:return Array.from(e).map(function(n){return String.fromCharCode(n)}).join("");case 1:return kt(e);case 2:return $n(e,!1);case 3:return dt(e);default:return""}}function Zv(e){return e===1||e===2?2:1}function e0(e,t,n){if(n=n===void 0?0:n,t===1||t===2){for(t=n;t+1<e.length;t+=2)if(e[t]===0&&e[t+1]===0)return t;return-1}return e.indexOf(0,n)}function RB(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(e.size<2)return null;var n=e.data[0],r=e.data.subarray(1).indexOf(0);if(r===-1)return null;var i=dt(H(e.data,1,r)),o=e.data[2+r],u=3+r;if(r=e0(e.data,n,u),r===-1)return null;u=Bl(e.data.subarray(u,r),n),n=r+Zv(n);var l;return i==="-->"?l=dt(e.data.subarray(n)):l=Vn(e.data.subarray(n)),t.mimeType=i,t.pictureType=o,t.description=u,t.data=l,t}return e.type==="COMM"?e.size<5||(l=e.data[0],i=dt(e.data.subarray(1,4)).replace(/\0/g,""),n=e0(e.data,l,4),n===-1)?null:(o=Bl(e.data.subarray(4,n),l),e=Bl(e.data.subarray(n+Zv(l)),l).replace(/\0*$/,""),t.description=o||i,t.data=e,t):e.type==="TXXX"?e.size<2||(o=e.data[0],l=e0(e.data,o,1),l===-1)?null:(i=Bl(e.data.subarray(1,l),o),e=Bl(e.data.subarray(l+Zv(o)),o).replace(/^\ufeff/,"").replace(/\0*$/,""),t.description=i,t.data=e,t):e.type==="WXXX"?e.size<2||(o=e.data[0],l=e0(e.data,o,1),l===-1)?null:(i=Bl(e.data.subarray(1,l),o),e=dt(e.data.subarray(l+Zv(o))).replace(/\0*$/,""),t.description=i,t.data=e,t):e.type==="PRIV"?e.size<2||(i=e.data.indexOf(0),i===-1)?null:(i=dt(H(e.data,0,i)),t.description=i,i=="com.apple.streaming.transportStreamTimestamp"?(i=e.data.subarray(i.length+1),e=i[3]&1,i=(i[4]<<23)+(i[5]<<15)+(i[6]<<7)+i[7],i/=45,e&&(i+=4772185884e-2),t.data=i):(e=Vn(e.data.subarray(i.length+1)),t.data=e),t):e.type==="UFID"?(i=e.data.indexOf(0),i===-1?null:(o=dt(H(e.data,0,i)),t.description=o,t.data=Vn(e.data.subarray(i+1)),t)):e.type[0]==="T"?e.size<2?null:(e=Bl(e.data.subarray(1),e.data[0]).replace(/\0+$/,"").split("\0").map(function(h){return h.replace(/^\ufeff/,"")}).filter(function(h){return h.length>0}).join(" / "),t.data=e,t):e.type[0]==="W"?(e=dt(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Vn(e.data),t):null}function kd(e){for(var t=0,n=[];WI(e,t);){var r=e[t+3],i=Uw(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i&&e[t]!==0;){var o=e.subarray(t);if(r>=4)var u=Uw(o,4);else u=o[4]<<24,u|=o[5]<<16,u|=o[6]<<8,u|=o[7],u>>>=0;o={type:String.fromCharCode(o[0],o[1],o[2],o[3]),size:u,data:o.subarray(10,10+u)},(u=RB(o))&&n.push(u),t+=o.size+10}XI(e,t)&&(t+=10)}return n}function Td(e,t){for(var n=t=t===void 0?0:t,r=0;WI(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=Uw(e,t+6),XI(e,t+10)&&(r+=10),t+=r;return r>0?e.subarray(n,n+r):new Uint8Array([])}Fl.prototype.parse=function(e){return kd(e)},Te("shaka.metadata.Id3Utils",Fl),Fl.prototype.parse=Fl.prototype.parse,Fl.getID3Data=Td,Fl.getID3Frames=kd;for(var YI=x(sa),Fw=YI.next();!Fw.done;Fw=YI.next())ku(Fw.value,function(){return new Fl});function Wi(e,t){this.g=e,this.u=t===void 0?"":t,this.j=!1,this.o=0,this.h=new Map,this.i=NB++,this.l=this.m=!1}g=Wi.prototype,g.destroy=function(){for(var e=x(this.h.values()),t=e.next();!t.done;t=e.next())t=t.value,t.wi.stop(),t.reject(new B(2,3,3018,"Worker transmuxer destroyed"));this.h.clear(),this.l&&(Zo&&Zo.postMessage({cmd:"destroy",id:this.i}),Sd.delete(this.i),this.l=!1,Sd.size===0&&Zo&&(Zo.terminate(),Zo=null)),this.g.destroy()},g.isSupported=function(e,t){return this.g.isSupported(e,t)},g.convertCodecs=function(e,t){return this.g.convertCodecs(e,t)},g.getOriginalMimeType=function(){return this.g.getOriginalMimeType()},g.transmux=function(e,t,n,r,i){var o=this,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q;return P(function(G){if(G.h==1){if(o.j)return G.return(o.g.transmux(e,t,n,r,i));if(!o.l){if(u=OB(o.u),!u)return o.j=!0,G.return(o.g.transmux(e,t,n,r,i));Sd.set(o.i,o),o.l=!0}if(l=Zo,!l)return o.j=!0,G.return(o.g.transmux(e,t,n,r,i));o.m||(h=o.g.getOriginalMimeType(),l.postMessage({cmd:"init",id:o.i,mimeType:h}),o.m=!0),p=o.o++,m={id:t.id,codecs:t.codecs,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,height:t.height,width:t.width,language:t.language},b=n?{discontinuitySequence:n.i,startTime:n.startTime,endTime:n.endTime,uris:n.U()}:null,w=Vn(Dn(e)),T=Promise.withResolvers(),k=T.promise,S=T.resolve,A=T.reject,M=!1,_=new ft(function(){o.h.has(p)&&(o.h.delete(p),M=o.j=!0,S(null))}),_.$(30),o.h.set(p,{resolve:S,reject:A,wi:_});try{l.postMessage({cmd:"transmux",id:o.i,reqId:p,data:w,streamProps:m,refProps:b,duration:r,contentType:i},[w])}catch{return _.stop(),o.h.delete(p),JI(),G.return(o.g.transmux(e,t,n,r,i))}return G.g(k,2)}if(R=G.i,M||R===null)return ut("Worker transmux unavailable; falling back to main-thread transmuxing"),G.return(o.g.transmux(e,t,n,r,i));if((U=R.streamMutations)&&Object.keys(U).length>0)for(N=x(Object.keys(U)),j=N.next();!j.done;j=N.next())V=j.value,t[V]=U[V];return q=R.output,q.type==="raw"?G.return(H(q.data)):G.return({data:H(q.data),init:q.init?H(q.init):null})})},Te("shaka.transmuxer.TransmuxerProxy",Wi),Wi.prototype.transmux=Wi.prototype.transmux,Wi.prototype.getOriginalMimeType=Wi.prototype.getOriginalMimeType,Wi.prototype.convertCodecs=Wi.prototype.convertCodecs,Wi.prototype.isSupported=Wi.prototype.isSupported,Wi.prototype.destroy=Wi.prototype.destroy;var NB=0,Zo=null,Sd=new Map;function OB(e){if(Zo)return Zo;if(!Qe().Zd()||!e)return null;try{var t=new Worker(e);return t.addEventListener("message",function(n){n=n.data;var r=n.cmd;if(r==="transmuxed"||r==="error"){var i=Sd.get(n.id);if(i){var o=n.cmd;if(o==="transmuxed"||o==="error"){var u=n.reqId;(r=i.h.get(u))&&(r.wi.stop(),i.h.delete(u),o==="error"?(n=n.error,r.reject(new(Function.prototype.bind.apply(B,[null,n.severity,n.category,n.code].concat(se(n.data)))))):r.resolve(n))}}}}),t.addEventListener("error",function(){JI()}),Zo=t}catch{return null}}function JI(){for(var e=x(Sd.values()),t=e.next();!t.done;t=e.next()){t=t.value,t.j=!0;for(var n=x(t.h.values()),r=n.next();!r.done;r=n.next())r=r.value,r.wi.stop(),r.resolve(null);t.h.clear()}Zo=null,Sd.clear()}function Bw(){}function QI(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function t0(e){for(var t=!1,n=e.getElementsByTagName("source"),r=n.length-1;r>=0;--r)e.removeChild(n[r]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function Vl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function $l(){return rp||(Vw||(Vw=new ft(function(){rp=null})),(rp=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(rp=document.createElement("video")),Vw.$(1),rp)}function jB(e,t){var n,r,i,o,u;return P(function(l){if(l.h==1)return"fonts"in document&&"FontFace"in d?l.g(document.fonts.ready,2):l.return();if(!("entries"in document.fonts))return l.return();for(n=function(h){h=h.entries();for(var p=[],m=h.next();m.done===!1;)p.push(m.value),m=h.next();return p},r=x(n(document.fonts)),i=r.next();!i.done;i=r.next())if(o=i.value,o.family===e&&o.display==="swap")return l.return();u=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(u),l.j()})}Te("shaka.util.Dom",Bw),Bw.removeAllChildren=Vl,Bw.clearSourceFromVideo=t0;var Vw=null,rp=null;function Tu(e,t,n){return n=n===void 0?Number.EPSILON:n,e===t?!0:(e=Math.abs(e-t),e<=n?!0:n!==Number.EPSILON?Math.abs(e-n)<=Number.EPSILON:!1)}function ZI(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function Os(e,t){this.j=e,t!==void 0&&t&&(this.j=Sv(e)),this.i=this.j.byteLength,this.g=this.h=0}function n0(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(n!==0){for(var r=0,i=0;i<n;i++)r=r<<8|e.j[t+i];e.h=r<<(4-n)*8,e.g=n*8,e.i-=n}}function Ai(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=n*8,e.g-=n,n0(e)}e.h<<=t,e.g-=t}function Ct(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&n0(e),n=t-n,n>0?r<<n|Ct(e,n):r}function e4(e){for(var t=0;e.g===0;){if(e.i===0)return t;n0(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||e.i===0)break;n0(e)}return t}function vr(e){Ai(e,1+e4(e))}function We(e){var t=e4(e);return Ct(e,t+1)-1}function Cd(e){return e=We(e),1&e?1+e>>>1:-1*(e>>>1)}function it(e){return Ct(e,1)===1}function $t(e){return Ct(e,8)}function r0(e,t){for(var n=8,r=8,i=0;i<t;i++)r!==0&&(r=Cd(e),r=(n+r+256)%256),n=r===0?n:r}function UB(e){return $t(e),We(e),We(e)}Te("shaka.util.ExpGolomb",Os);function hn(){this.K=null,this.L=!1,this.C=this.M=null,this.m=[],this.j=[],this.g=[],this.F=this.H=null,this.l=[],this.i=[],this.h=[],this.I=null,this.u=[],this.o=[],this.D=this.J=this.B=null}g=hn.prototype,g.clearData=function(){this.m=[],this.j=[],this.g=[],this.l=[],this.i=[],this.h=[],this.u=[],this.o=[]},g.gg=function(e){this.D!=null&&this.D!=e&&(this.B=null),this.D=e},g.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,qw(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(e[i]==71){var o=!!(e[i+1]&64),u=((e[i+1]&31)<<8)+e[i+2];if((e[i+3]&48)>>4>1){var l=i+5+e[i+4];if(l==i+188)continue}else l=i+4;switch(u){case 0:o&&(l+=e[l]+1),this.K=(e[l+10]&31)<<8|e[l+11];break;case 17:case 8191:break;case this.K:o&&(l+=e[l]+1),o=e,u={audio:-1,video:-1,Ff:-1,audioCodec:"",videoCodec:""};var h=l+3+((o[l+1]&15)<<8|o[l+2])-4;for(l+=12+((o[l+10]&15)<<8|o[l+11]);l<h;){var p=(o[l+1]&31)<<8|o[l+2],m=(o[l+3]&15)<<8|o[l+4];switch(o[l]){case 6:if(m>0)for(var b=l+5,w=m;w>2;){var T=o[b+1]+2;switch(o[b]){case 5:var k=b+2;k=o[k]<<24|o[k+1]<<16|o[k+2]<<8|o[k+3],u.audio==-1&&k===1332770163?(u.audio=p,u.audioCodec="opus"):u.video==-1&&k===1096167473&&(u.video=p,u.videoCodec="av1");break;case 106:u.audio==-1&&(u.audio=p,u.audioCodec="ac3");break;case 122:u.audio==-1&&(u.audio=p,u.audioCodec="ec3");break;case 124:u.audio==-1&&(u.audio=p,u.audioCodec="aac");break;case 127:u.audioCodec=="opus"&&(k=null,o[b+2]===128&&(k=o[b+3]),k!=null&&(this.J={channelCount:(k&15)===0?2:k&15,Hk:k,sampleRate:48e3}))}b+=T,w-=T}break;case 15:u.audio==-1&&(u.audio=p,u.audioCodec="aac");break;case 17:u.audio==-1&&(u.audio=p,u.audioCodec="aac-loas");break;case 21:u.Ff==-1&&(u.Ff=p);break;case 27:u.video==-1&&(u.video=p,u.videoCodec="avc");break;case 3:case 4:u.audio==-1&&(u.audio=p,u.audioCodec="mp3");break;case 36:u.video==-1&&(u.video=p,u.videoCodec="hvc");break;case 129:u.audio==-1&&(u.audio=p,u.audioCodec="ac3");break;case 132:case 135:u.audio==-1&&(u.audio=p,u.audioCodec="ec3")}l+=m+5}o=u,o.video!=-1&&(this.M=o.video,this.C=o.videoCodec),o.audio!=-1&&(this.H=o.audio,this.F=o.audioCodec),o.Ff!=-1&&(this.I=o.Ff),r&&!this.L&&(r=!1,i=t-188),this.L=!0;break;case this.M:l=e.subarray(l,i+188),o?(this.j.push(this.m.length),this.m.push(l)):this.j.length&&this.m.push(l);break;case this.H:l=e.subarray(l,i+188),o?(this.i.push(this.l.length),this.l.push(l)):this.i.length&&this.l.push(l);break;case this.I:l=e.subarray(l,i+188),o?(this.o.push(this.u.length),this.u.push(l)):this.o.length&&this.u.push(l);break;default:r=!0}}return this};function $w(e,t,n){return Is(e,t[n],n+1<t.length?t[n+1]:e.length)}function t4(e,t,n){if(t.byteLength<9||(t[0]<<16|t[1]<<8|t[2])!==1)return null;var r=t[4]<<8|t[5];if(r&&r>n-6)return null;var i=null,o=null,u=t[7];if(t.byteLength<n4(t))return null;if(u&192){i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2;var l=null;u&64&&(l=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,i=Hw(i,l)),e.B==null&&(e.B=i),i=Hw(i,e.B),o=e.B=i,l!=null&&(o=Hw(l,i))}return e=t[8]+9,n<=e?null:{packetLength:r,gm:e,pts:i,dts:o}}function zw(e,t){return(e=t4(e,t,t.byteLength))?{data:t.subarray(e.gm),packetLength:e.packetLength,pts:e.pts,dts:e.dts,nalus:[]}:null}g.Ij=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var r=e.byteLength,i=1;this.C=="hvc"&&(i=2);var o=t.state||0,u=o,l=0,h=[],p=-1,m=0,b=this.C==="hvc";for(o==-1&&(p=0,m=b?e[0]>>1&63:e[0]&31,o=0,l=1);l<r;){var w=e[l++];o?o===1?o=w?0:2:w?w==1?(w=l-o-1,p>=0?h.push({data:e.subarray(p+i,w),fullData:e.subarray(p,w),type:m,time:n,state:null}):(o=h.length?h[h.length-1]:t.Sf)&&(u&&l<=4-u&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-u),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-u)),w>0&&(w=e.subarray(0,w),o.data=Dn(o.data,w),o.fullData=Dn(o.fullData,w),o.state=0)),l<r?(m=b?e[l]>>1&63:e[l]&31,p=l,o=0):o=-1):o=0:o=3:o=w?0:1}return p>=0&&o>=0&&h.push({data:e.subarray(p+i,r),fullData:e.subarray(p,r),type:m,time:n,state:o}),!h.length&&t.Sf&&(n=h.length?h[h.length-1]:t.Sf)&&(n.data=Dn(n.data,e),n.fullData=Dn(n.fullData,e)),t.state=o,h},g.getMetadata=function(){for(var e=[],t=0;t<this.o.length;t++){var n=$w(this.u,this.o,t);(n=zw(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:kd(n.data),dts:n.dts,pts:n.pts})}return e},g.Bb=function(){if(this.i.length&&!this.h.length)for(var e=0;e<this.i.length;e++){var t=$w(this.l,this.i,e),n=zw(this,t),r=this.h.length?this.h[this.h.length-1]:null;n&&n.pts!=null&&n.dts!=null&&(!r||r.pts!=n.pts&&r.dts!=n.dts)?this.h.push(n):this.h.length&&(t=n?n.data:t)&&(r=this.h[this.h.length-1],r.data=Dn(r.data,t))}return this.h},g.Dd=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=0;t<this.j.length;t++){var n=$w(this.m,this.j,t),r=zw(this,n),i=this.g.length?this.g[this.g.length-1]:null;r&&r.pts!=null&&r.dts!=null&&(!i||i.pts!=r.pts&&i.dts!=r.dts)?this.g.push(r):this.g.length&&(n=r?r.data:n)&&(i=this.g[this.g.length-1],i.data=Dn(i.data,n))}if(e){for(t={Sf:null,state:null},i=[],n=x(this.g),r=n.next();!r.done;r=n.next())r=r.value,r.nalus=this.Ij(r,t),r.nalus.length&&(i.push(r),t.Sf=r.nalus[r.nalus.length-1]);this.g=i}}return e?this.g:(e=this.g,this.g=[],e)};function FB(e,t){if(t=="audio"){t=e.l;var n=e.i}else if(t=="video")t=e.m,n=e.j;else return null;for(var r=0;r<n.length;r++){var i=n[r],o=r+1<n.length?n[r+1]:t.length,u=t[i];if(u){for(var l=0,h=i;h<o;h++)l+=t[h].byteLength;if(i=u.byteLength>=9&&u.byteLength>=n4(u)?u:Is(t,i,o),(l=t4(e,i,l))&&(l=r4(l),l!=null))return l}}return null}function n4(e){return e=e[7],e&64?19:e&192?14:9}function r4(e){return e.pts==null||e.dts==null?null:Math.min(e.dts,e.pts)/9e4}g.getStartTime=function(e){if(e=="audio")e=this.Bb();else if(e=="video")e=this.Dd(!1);else return null;return e.length?r4(e[0]):null},g.qe=function(){return{audio:this.F,video:this.C}},g.Cf=function(){for(var e=[],t=x(this.Dd()),n=t.next();!n.done;n=t.next())e.push.apply(e,se(n.value.nalus));return e},g.kj=function(){return this.C=="hvc"?VB(this):BB(this)};function i4(e){var t=e.Dd();return t.length>1&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?Math.abs(1/(t-e)*9e4):null}function BB(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Cf();if(!n.length||(n=n.find(function(T){return T.type==7}),!n))return t;n=new Os(n.data);var r=$t(n),i=$t(n),o=$t(n);if(vr(n),$B.includes(r)){var u=We(n);if(u===3&&Ai(n,1),vr(n),vr(n),Ai(n,1),it(n)){u=u!==3?8:12;for(var l=0;l<u;l++)it(n)&&(l<6?r0(n,16):r0(n,64))}}if(vr(n),u=We(n),u===0)We(n);else if(u===1)for(Ai(n,1),vr(n),vr(n),u=We(n),l=0;l<u;l++)vr(n);vr(n),Ai(n,1),u=We(n),l=We(n);var h=Ct(n,1);h===0&&Ai(n,1),Ai(n,1);var p=0,m=0,b=0,w=0;return it(n)&&(p=We(n),m=We(n),b=We(n),w=We(n)),t.height=String((2-h)*(l+1)*16-b*2-w*2),t.width=String((u+1)*16-p*2-m*2),t.codec="avc1."+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=i4(e),t}function VB(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Cf();if(!n.length||(n=n.find(function(N){return N.type==33}),!n))return t;var r=new Os(n.fullData,!0);$t(r),$t(r),Ct(r,4);var i=Ct(r,3);it(r);var o=Ct(r,2),u=Ct(r,1),l=Ct(r,5),h=Ct(r,32);n=$t(r);for(var p=$t(r),m=$t(r),b=$t(r),w=$t(r),T=$t(r),k=$t(r),S=[],A=[],M=0;M<i;M++)S.push(it(r)),A.push(it(r));if(i>0)for(M=i;M<8;M++)Ct(r,2);for(M=0;M<i;M++)S[M]&&Ct(r,88),A[M]&&$t(r);We(r),i=We(r),i==3&&Ct(r,1),S=We(r),A=We(r);var _=M=0,R=0,U=0;return it(r)&&(M+=We(r),_+=We(r),R+=We(r),U+=We(r)),t.width=String(S-(M+_)*(i===1||i===2?2:1)),t.height=String(A-(R+U)*(i===1?2:1)),r=(function(N){for(var j=0,V=0;V<32;V++)j|=(N>>V&1)<<31-V;return j>>>0})(h),u=u==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+l),o+="."+r.toString(16).toUpperCase(),o+="."+u+k,T&&(o+="."+T.toString(16).toUpperCase()),w&&(o+="."+w.toString(16).toUpperCase()),b&&(o+="."+b.toString(16).toUpperCase()),m&&(o+="."+m.toString(16).toUpperCase()),p&&(o+="."+p.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=i4(e),t}function Hw(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=n*8589934592;return e}function Ad(e){return!(qw(e)<0)}function qw(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;var r=e.indexOf(71,n+1);n=r>=0&&r<t?r:n+1}return-1}Te("shaka.util.TsParser",hn),hn.syncOffset=qw,hn.probe=Ad,hn.prototype.getVideoInfo=hn.prototype.kj,hn.prototype.getVideoNalus=hn.prototype.Cf,hn.prototype.getCodecs=hn.prototype.qe,hn.prototype.getStartTime=hn.prototype.getStartTime,hn.prototype.getVideoData=hn.prototype.Dd,hn.prototype.getAudioData=hn.prototype.Bb,hn.prototype.getMetadata=hn.prototype.getMetadata,hn.prototype.parseNalus=hn.prototype.Ij,hn.prototype.parse=hn.prototype.parse,hn.prototype.setDiscontinuitySequence=hn.prototype.gg,hn.prototype.clearData=hn.prototype.clearData,hn.Timescale=9e4;var $B=[100,110,122,244,44,83,86,118,128,138,139,134];function a4(e,t,n,r,i){var o=this;this.g=e,this.C=n,this.o=r,this.ba=t,this.l=new Map,this.D=new Map,this.Fa=new Map,this.h=null,this.Aa=!1,this.H=i||null,this.m=new Map,this.B=new he,this.j=new Map,this.I=null,this.M=Promise.withResolvers(),this.za="",this.sb=!1,this.xa=!0,this.Y=!1,this.K=this.W=null,this.i=Gw(this,this.M),this.Ha=this.J=!1,this.F=new gd(function(){return qB(o)}),this.O=!1,this.V="UNKNOWN",this.u=this.kb=this.mb=!1,this.wa=null,this.Pa=new Map,this.ma=this.P=this.ra=this.R=null,this.ha=Promise.withResolvers();var u=Jp(Qe(),this.g);u&&(this.Y=u.state!="disconnected",this.B.Hb(u,["connect","connecting","disconnect"],function(){o.Y=u.state!="disconnected"})),this.ib=!1,this.L=new Map}function Gw(e,t){if(e.xa=!0,d.ManagedMediaSource){e.K||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.B.G(n,"startstreaming",function(){e.xa=!0}),e.B.G(n,"endstreaming",function(){e.xa=!1})}else n=new MediaSource;return e.B.oa(n,"sourceopen",function(){URL.revokeObjectURL(e.za),t.resolve()}),e.B.oa(e.g,"playing",function(){e.sb=!0}),e.za=Xw(n),o4(e),e.o.useSourceElements?(e.W=QI(e.za),e.g.appendChild(e.W),e.K&&e.g.appendChild(e.K),e.g.load()):e.g.src=e.za,n}function zB(e,t,n){if(e.g&&d.ManagedMediaSource&&e.i&&e.o.useSourceElements){var r;((r=e.K)==null?void 0:r.parentElement)===e.g&&e.g.removeChild(e.K),e.K=QI(t,n),e.g.appendChild(e.K),e.g.disableRemotePlayback=!1}}function HB(){var e='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="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(se(sa)),t={};Qe(),e=x(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,Hh(n))t[n]=!0;else if(rs()){var r=ki(n),i=$h(Qr(n),r);r=tr(r,i),t[n]=Si(r)||!!ld(r)}else t[n]=$l().canPlayType(n)!="";r=n.split(";")[0],t[r]=t[r]||t[n]}return t}g=a4.prototype,g.destroy=function(){return this.F.destroy()};function qB(e){var t,n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_;return P(function(R){if(R.h==1){for(t=[],n=x(e.m),r=n.next();!r.done;r=n.next())for(i=r.value,o=x(i),u=o.next().value,l=o.next().value,h=l[0],p=u,e.m.set(p,l.slice(0,1)),h&&t.push(h.p.promise.catch(function(){})),m=x(l.slice(1)),b=m.next();!b.done;b=m.next())w=b.value,w.p.reject(new B(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),R.g(Promise.all(t),2)}for(t=[],T=x(e.j.values()),k=T.next();!k.done;k=T.next())S=k.value,S.destroy();for(A=x(e.L.values()),M=A.next();!M.done;M=A.next())_=M.value,t.push(_.destroy());return e.B&&(e.B.release(),e.B=null),e.g&&(o4(e),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.W=null,e.K=null,e.o=null,e.i=null,e.h=null,e.ba=null,e.l.clear(),e.Fa.clear(),e.L.clear(),e.j.clear(),e.I=null,e.m.clear(),e.H=null,e.Pa.clear(),e.C=null,R.g(Promise.all(t),0)})}function o4(e){if(e.g){e.g.removeAttribute("src");var t;((t=e.W)==null?void 0:t.parentElement)===e.g&&e.g.removeChild(e.W);var n;((n=e.K)==null?void 0:n.parentElement)===e.g&&e.g.removeChild(e.K)}}g.init=function(e,t,n,r){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,r=r===void 0?!1:r;var i=this,o,u,l,h,p,m;return P(function(b){if(b.h==1)return o=Ln,b.g(i.M.promise,2);if(b.h!=3)return!ap(i)&&!a0(i)?b.A(3):(Xt("Expected MediaSource to be open during init(); reopening the media source."),i.M=Promise.withResolvers(),i.i=Gw(i,i.M),b.g(i.M.promise,3));for(i.O=t,i.V=n,i.mb=r,i.kb=!i.O&&i.V=="HLS"&&!i.mb,i.Pa.clear(),i.R=null,i.ra=null,i.P=null,i.ma=null,i.ha=Promise.withResolvers(),u=x(e.keys()),l=u.next();!l.done;l=u.next())h=l.value,p=e.get(h),i0(i,h,p,p.codecs),i.u?(i.m.set(o.aa,[]),i.m.set(o.Ba,[])):i.m.set(h,[]);(m=e.get(o.aa))&&m.isAudioMuxedInVideo&&(i.u=!0),b.j()})};function i0(e,t,n,r){t=="audio"&&r&&(r=$h(r,n.mimeType)),t=="video"&&r&&n.mimeType=="video/mp4"&&(r=hw(r));var i=tr(n.mimeType,r);if(t==mt)ip(e,i,n.external);else{var o=e.o.forceTransmux;(!Si(i)||!e.O&&sa.includes(i))&&(o=!0);var u=Nv(n.mimeType,r);if(o){if(o=Vr("audio",(r||"").split(",")),r=Vr("video",(r||"").split(",")),o&&r){e.u=!0,i0(e,"audio",n,o),i0(e,"video",n,r);return}(r=ld(u))&&(i=new Wi(r(),e.o.transmuxWorkerUrl),e.j.set(t,i),i=i.convertCodecs(t,u))}u=i+e.o.addExtraFeaturesToSourceBuffer(i),Zt(e.F);try{var l=e.i.addSourceBuffer(u)}catch(p){throw new B(2,3,3015,p,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}if(e.O&&(l.mode=aV),e.B.G(l,"error",function(){var p=e.m.get(t)[0];p.p.reject(new B(2,3,3014,e.g.error?e.g.error.code:0,p.uri))}),e.B.G(l,"updateend",function(){return js(e,t)}),e.l.set(t,l),e.D.set(t,i),e.Fa.set(t,!!n.drmInfos.length),n=e.C.Xb(),eB(n))e.L.set(t,new DI);else{var h;(h=e.L.get(t))==null||h.destroy(),e.L.delete(t)}}}g.configure=function(e){this.o=e,this.h&&(this.h.F=e.modifyCueCallback)};function s4(e){return e.xa&&!e.Y&&!e.J}function ip(e,t,n){e.h||(e.h=new Ms(e.ba,e.V),e.h&&(e.h.F=e.o.modifyCueCallback));var r=e.h;e=e.Aa,t=="application/cea-608"||t=="application/cea-708"?r.l=null:(r.l=qh.get(t)(),r.l.setManifestType(r.D),r.I=e,r.C=n)}function ap(e){return e.J?!1:e.i?e.i.readyState=="ended":!0}function a0(e){return e.J?!1:e.i?e.i.readyState=="closed":!0}function o0(e,t){return e.l.size?t==mt?e.h.g:zI(zl(e,t)):null}function Su(e,t){return e.l.size?t==mt?e.h.h:Jv(zl(e,t)):null}function GB(e,t,n){return t==mt?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=zl(e,t),HI(e,n))}function KB(e,t,n){return t==mt?(e=e.h,e.g==null||e.g>n?0:Math.min(n,e.h)-e.g):(e=zl(e,t),qI(e,n))}g.Nc=function(){var e={total:this.J?[]:Fa(this.g.buffered),audio:Fa(zl(this,"audio")),video:Fa(zl(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function zl(e,t){if(!sp(e))return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function WB(e,t,n,r,i,o,u){u=u===void 0?!1:u;var l=null,h=[],p=H(n);if(sa.includes(o))n=kd(p),n.length&&r&&((u=n.find(function(S){return S.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof u.data=="number"&&(l=Math.round(u.data)/1e3),e.C.onMetadata([{cueTime:r.startTime,data:p,frames:n,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(o.includes("/mp4")&&r&&r.ia){p=new Tt;var m=i.emsgSchemeIdUris!=null&&i.emsgSchemeIdUris.length>0||e.o.dispatchAllEmsgBoxes,b=[];m&&p.T("emsg",function(S){e:{var A=i.emsgSchemeIdUris;if(S.version===0)var M=S.reader.Rd(),_=S.reader.Rd(),R=S.reader.S(),U=S.reader.S(),N=S.reader.S(),j=S.reader.S(),V=r.startTime+U/R;else R=S.reader.S(),V=S.reader.Sd()/R+r.timestampOffset,U=V-r.startTime,N=S.reader.S(),j=S.reader.S(),M=S.reader.Rd(),_=S.reader.Rd();if(S=S.reader.Ja(S.reader.$a()-S.reader.Ia(),!0),A&&A.includes(M)||e.o.dispatchAllEmsgBoxes)if(M=="urn:mpeg:dash:event:2012")e.C.fm();else{A=V,(M!=="https://aomedia.org/emsg/ID3"||N!==4294967295)&&(A+=N/R),R={startTime:V,endTime:A,schemeIdUri:M,value:_,timescale:R,presentationTimeDelta:U,eventDuration:N,id:j,messageData:S};break e}R=null}R&&b.push(R)});var w=r.ia.timescale;t=w&&!isNaN(w);var T=0,k=!1;for(t&&p.T("prft",function(S){var A=S.reader,M=S.version;A.S(),S=A.S();var _=A.S();S=S*1e3+_/4294967296*1e3,M===0?A=A.S():(M=A.S(),A=A.S(),A=M*4294967296+A),S=ZI(S),A=new Map().set("detail",{wallClockTime:S,programStartDate:new Date(S-A/w*1e3)}),A=new Ge("prft",A),e.C.onEvent(A)}).ua(Dl,qt).T("tfdt",function(S){k||(T=Wv(S.reader,S.version).Oa/w,k=!0,m||S.parser.stop())}),(m||t)&&p.parse(n,!1,u),k&&r.timestampOffset==0&&(l=T),p=x(b),n=p.next();!n.done;n=p.next())XB(e,n.value,r,l)}else o.includes("/mp4")||o.includes("/webm")||!Ad(p)||(h=e.Pa.getOrInsertComputed(t,function(){return new hn}),h.clearData(),h.gg(r.i),h.parse(p),p=FB(h,t),p!=null&&(l=p),h=h.getMetadata());return{timestamp:l,metadata:h}}function XB(e,t,n,r){var i=Tu(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);r&&e.V=="HLS"&&!i&&(n=-r+n.startTime,t.startTime+=n,t.endTime+=n),e.C.bm(t),!t.messageData||t.schemeIdUri!="https://aomedia.org/emsg/ID3"&&t.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(n=kd(t.messageData),n.length&&(r=t.startTime,e.C.onMetadata([{cueTime:r,data:t.messageData,frames:n,dts:r,pts:r}],0,t.endTime)))}function s0(e,t,n,r,i,o,u,l,h,p,m){u=u===void 0?!1:u,l=l===void 0?!1:l,h=h===void 0?!1:h,p=p===void 0?!1:p;var b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re;return P(function(W){switch(W.h){case 1:if(b=Ln,t!=b.Xa){W.A(2);break}return W.g(M5(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.U()[0]:null,r?r.i:-1),3);case 3:return W.return({ed:null});case 2:if(p||!e.u){W.A(4);break}return W.g(s0(e,b.aa,n,r,i,o,u,l,h,!0),5);case 5:return w=W.i,W.g(s0(e,b.Ba,n,r,i,o,u,l,h,!0),6);case 6:return T=W.i,W.return(T.ed!=null?T:w);case 4:if(!e.l.has(t))return W.return({ed:null});if(k=e.l.get(t).timestampOffset,S=null,ap(e)&&qn(e,t,function(){var Se=e.l.get(t);if(ap(e)){var Ee=Se.buffered;Ee=Ee.length?Ee.end(Ee.length-1):0,Se.remove(Ee,Ee+.001)}else js(e,t)},null),A=e.D.get(t),e.j.has(t)&&(A=e.j.get(t).getOriginalMimeType()),r&&(M=WB(e,t,n,r,i,A,h),_=M.timestamp,R=M.metadata,_!=null&&(S=_,e.R==null&&t==b.Ba&&(e.R=_,e.ra=r.startTime,e.P!=null&&(U=0,e.ra==e.ma&&(U=e.R-e.P),e.ha.resolve(U))),e.P==null&&t==b.aa&&(e.P=_,e.ma=r.startTime,e.R!=null&&(N=0,e.ra==e.ma&&(N=e.R-e.P),e.ha.resolve(N))),j=_,V=sa,!e.O&&V.includes(e.D.get(t))&&(j=0),q=r.startTime-j,G=Math.abs(k-q),(G>=.001||u||l)&&(!h||q>0||!k)&&(k=q,e.kb&&(qn(e,t,function(){return Ed(e,t)},null),qn(e,t,function(){return Id(e,t,k)},null))),(t==b.Ba||!e.l.has(b.Ba))&&e.h&&(P5(e.h,k,r.i),qU(e.h,(A||"").includes("mp2t")))),R.length)&&e.C.onMetadata(R,k,r?r.endTime:null),o&&t==b.Ba&&(e.h||ip(e,"application/cea-608",!1),e.I||(z=A.split(";",1)[0],e.I=new Oa(z)),r?(J=Q2(e.I,n),J.length&&KU(e.h,J,k)):e.I.init(n,l,m)),!e.j.has(t)){W.A(7);break}return W.g(e.j.get(t).transmux(n,i,r,e.i.duration,t),8);case 8:ie=W.i,ArrayBuffer.isView(ie)?n=ie:(le=ie,le.init!=null&&(be=le.init,qn(e,t,function(){d4(e,t,be,k,i,!0)},r?r.U()[0]:null)),n=le.data);case 7:if(n=eV(e,i,n,r,t),!e.L.has(t)){W.A(9);break}if(ce=cd(e.D.get(t))=="mp4",ae=e.C.Xb(),!ce||!ae){W.A(9);break}return de=r===null,re=e.L.get(t),W.g(zF(re,n,de,ae),11);case 11:n=W.i;case 9:if(!r||!e.O||t==b.Xa){W.A(12);break}if(!u&&!l){W.A(12);break}if(pe=r.startTime,e.V!="HLS"||e.u||t!=b.aa||!e.l.has(b.Ba)){W.A(14);break}return W.g(e.ha.promise,15);case 15:Re=W.i,Math.abs(Re)>.15&&(pe-=Re);case 14:qn(e,t,function(){return Ed(e,t)},null),qn(e,t,function(){return Id(e,t,pe)},null);case 12:return W.g(qn(e,t,function(){d4(e,t,n,k,i,!r)},r?r.U()[0]:null),16);case 16:return W.return({ed:S})}})}function YB(e,t){var n=Su(e,"video")||0;_5(e.h,t,n)}function JB(e){e.h&&_5(e.h,"",0)}g.remove=function(e,t,n,r){var i=this,o,u;return P(function(l){return l.h==1?(o=Ln,e==o.Ba&&i.I&&(i.I.remove(r),u=i.h.g||0,i.h.remove(u,n,!0)),e==o.Xa?l.g(i.h.remove(t,n),0):n>t?l.g(qn(i,e,function(){return u0(i,e,t,n)},null),5):l.A(0)):i.u?l.g(qn(i,o.aa,function(){return u0(i,o.aa,t,n)},null),0):l.A(0)})};function u4(e,t){var n;return P(function(r){return r.h==1?(n=Ln,t==n.Xa?e.h?r.g(e.h.remove(0,1/0),0):r.return():t===n.Ba&&e.I&&e.h?r.g(e.h.remove(0,1/0,!0),4):r.A(4)):r.h!=6?r.g(qn(e,t,function(){return u0(e,t,0,e.i.duration)},null),6):e.u?r.g(qn(e,n.aa,function(){return u0(e,n.aa,0,e.i.duration)},null),0):r.A(0)})}g.flush=function(e){var t=this,n;return P(function(r){return r.h==1?(n=Ln,e==n.Xa?r.return():r.g(qn(t,e,function(){t.g.currentTime-=.001,js(t,e)},null),2)):t.u?r.g(qn(t,n.aa,function(){var i=n.aa;t.g.currentTime-=.001,js(t,i)},null),0):r.A(0)})};function l4(e,t,n,r,i,o,u,l,h){var p,m,b;return P(function(w){return w.h==1?(p=Ln,t==p.Xa?(o||P5(e.h,n),GU(e.h,r,i),w.return()):(m=[],w.g(rV(e,t,u,l,h),2))):(b=w.i,b||(m.push(qn(e,t,function(){return Ed(e,t)},null)),e.u&&m.push(qn(e,p.aa,function(){return Ed(e,p.aa)},null))),o||(m.push(qn(e,t,function(){return Id(e,t,n)},null)),e.u&&m.push(qn(e,p.aa,function(){return Id(e,p.aa,n)},null))),(r!=0||i!=1/0)&&(m.push(qn(e,t,function(){return f4(e,t,r,i)},null)),e.u&&m.push(qn(e,p.aa,function(){return f4(e,p.aa,r,i)},null))),m.length?w.g(Promise.all(m),0):w.A(0))})}function c4(e,t,n){var r,i;return P(function(o){return o.h==1?(r=Ln,t==r.Xa||!e.O||(i=Su(e,t))&&Math.abs(i-n)<.15?o.return():(qn(e,t,function(){return Ed(e,t)},null),e.u&&qn(e,r.aa,function(){return Ed(e,r.aa)},null),o.g(qn(e,t,function(){return Id(e,t,n)},null),2))):e.u?o.g(qn(e,r.aa,function(){return Id(e,r.aa,n)},null),0):o.A(0)})}g.endOfStream=function(e){var t=this;return P(function(n){return n.g(op(t,function(){ap(t)||a0(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},g.Sb=function(e){var t=this;return P(function(n){return n.g(op(t,function(){if(t.o.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var r=x(t.l.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o={start:function(){},p:Promise.withResolvers(),uri:null};t.m.get(i).unshift(o)}t.i.duration=e,t.wa=e}),0)})},g.getDuration=function(){return this.i.duration};function QB(e,t,n){P(function(r){return!sp(e)||e.i.duration!==1/0?r.return():(e.ib=!0,r.g(op(e,function(){sp(e)&&e.i.duration===1/0&&e.i.setLiveSeekableRange(t,n)}),0))})}function Kw(e){P(function(t){return!sp(e)||!e.ib||e.i.duration!==1/0?t.return():(e.ib=!1,t.g(op(e,function(){sp(e)&&e.i.duration===1/0&&e.i.clearLiveSeekableRange()}),0))})}function d4(e,t,n,r,i,o){o=o===void 0?!1:o,e.H&&X2(e.H,n,r,i),r=o,r=r===void 0?!1:r,r=new Map().set("data",n).set("contentType",t).set("isInitData",r),r=new Ge("bufferappending",r),e.C.onEvent(r),e.l.get(t).appendBuffer(n)}function u0(e,t,n,r){if(r<=n)js(e,t);else{if(e.H){var i=e.H;t==="video"&&i.g&&i.g.flushBuffer(n,r)}e.l.get(t).remove(n,r)}}function Ed(e,t){var n=e.l.get(t),r=n.appendWindowStart,i=n.appendWindowEnd;n.abort(),n.appendWindowStart=r,n.appendWindowEnd=i,js(e,t)}function Id(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,js(e,t)}function f4(e,t,n,r){var i=e.l.get(t);(i.appendWindowEnd!==r||i.appendWindowStart!==n)&&(i.appendWindowStart=0,i.appendWindowEnd=r,i.appendWindowStart=n),js(e,t)}function js(e,t){if(e.J||e.F.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),Ww(e,t))}function qn(e,t,n,r){return Zt(e.F),n={start:n,p:Promise.withResolvers(),uri:r},e.m.get(t).push(n),e.m.get(t).length==1&&h4(e,t),n.p.promise}function op(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:for(Zt(e.F),n=[],r=Array.from(e.l.keys()),i=new Map,o=x(r),u=o.next(),l={};!u.done;l={ready:void 0},u=o.next())h=u.value,l.ready=Promise.withResolvers(),p={start:(function(j){return function(){return j.ready.resolve()}})(l),p:l.ready,uri:null},m=e.m.get(h),m.push(p),n.push(l.ready.promise),i.set(h,p),m.length==1&&p.start();return N.m(2),N.g(Promise.all(n),4);case 4:N.o(3);break;case 2:if(b=N.l(),e.F.g){for(w=x(r),T=w.next();!T.done;T=w.next())k=T.value,S=e.m.get(k),i.has(k)&&ke(S,i.get(k));return N.return()}throw b;case 3:return N.m(5,6),N.g(t(),6);case 6:for(N.u(),A=x(r),M=A.next();!M.done;M=A.next())_=M.value,Ww(e,_);N.B(0);break;case 5:throw R=N.l(),U=e.g.error?yt(e.g.error):"No error in the media element",new B(2,3,3015,R,U,null)}})}function Ww(e,t){e.m.get(t).shift(),h4(e,t)}function h4(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(i){if(i.name=="QuotaExceededError")n.p.reject(new B(2,3,3017,t));else if(s4(e)){var r=e.g.error?yt(e.g.error):"No error in the media element";n.p.reject(new B(2,3,3015,i,r,n.uri))}else n.p.reject(new B(2,3,3024,t));Ww(e,t)}}function ZB(e,t){e.ba=t,e.h&&(e.h.j=t)}function eV(e,t,n,r,i){if(cd(e.D.get(i))!="mp4")return n;var o=r===null,u=e.Fa.get(i),l=e.C.se(),h=!1;r&&r.ia&&(h=r.ia.encrypted),r=r?r.U()[0]:null;var p=Qe();e.o.correctEc3Enca&&o&&i==="audio"&&(n=SB(n));var m;if(m=o)if(p.Qa()!="CHROMIUM")m=!1;else{m=null;var b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(m=parseInt(b[1],10)),m=t.type==="video"&&m!=null&&m<94&&t.supplementalCodecs!=t.codecs&&/dvh1|dvhe/.test(t.supplementalCodecs)}return m&&(n=CB(n)),e.o.insertFakeEncryptionInInit&&u&&p.Td(l,i)&&(o?n=AB(t,n,r,l):!h&&p.Oj(i)&&(n=EB(n))),o&&p.Ie()&&(n=_B(n)),!o&&t.isIframe&&e.o.repairIFrames&&(n=DB(n)),n}function tV(e,t,n,r){return qn(e,t,function(){if(t!==mt){e.D.get(t);var i=Qe(),o=e.C.se();i.ub(o)&&(e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),r&&e.j.set(t,r),i=n+e.o.addExtraFeaturesToSourceBuffer(n),e.l.get(t).changeType(i),e.D.set(t,n)),js(e,t)}},null)}function nV(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q;return P(function(G){if(G.h==1){if(e.J||e.Y)return G.return();for(n=Ln,e.J=!0,e.u=!1,r=e.g.currentTime,i=e.g.autoplay,e.g.paused||(e.Ha=!0),e.sb&&(e.g.autoplay=!1),G.D(2),e.B.Ea(),o=x(e.j.values()),u=o.next();!u.done;u=o.next())l=u.value,l.destroy();for(h=x(e.L.values()),p=h.next();!p.done;p=h.next())m=p.value,m.destroy();for(b=x(e.l.values()),w=b.next();!w.done;w=b.next()){T=w.value;try{e.i.removeSourceBuffer(T)}catch{}}return e.j.clear(),e.l.clear(),e.L.clear(),k=e.i.duration,e.M=Promise.withResolvers(),e.i=Gw(e,e.M),G.g(e.M.promise,4)}if(G.h!=2){for(!isNaN(k)&&k?e.i.duration=k:!isNaN(e.wa)&&e.wa&&(e.i.duration=e.wa),S=Promise.withResolvers(),A=e.i.sourceBuffers,M=t.size,_=0,R=function(){_++,_===M&&(S.resolve(),e.B.Ua(A,"addsourcebuffer",R))},e.B.G(A,"addsourcebuffer",R),U=x(t.keys()),N=U.next();!N.done;N=U.next())j=N.value,V=t.get(j),i0(e,j,V,V.codecs);return(q=t.get(n.aa))&&q.isAudioMuxedInVideo&&(e.u=!0),e.u&&!e.m.has(n.aa)&&e.m.set(n.aa,[]),G.g(S.promise,2)}return G.u(),e.J=!1,Zt(e.F),e.B.oa(e.g,"loadedmetadata",function(){e.F.g||(e.g.currentTime=r)}),e.B.oa(e.g,"canplaythrough",function(){e.F.g||(e.g.autoplay=i,e.Ha&&(e.Ha=!1,e.g.play()))}),G.B(0)})}function p4(e,t){return op(e,function(){return nV(e,t)})}function g4(e,t,n,r){var i=!1,o=Vr("audio",(r||"").split(",")),u=Vr("video",(r||"").split(",")),l=u;t=="audio"&&(l=o),l||(l=r);var h=tr(n,l),p=ki(e.D.get(t)),m=e.o.forceTransmux;if(!Si(h)||!e.O&&sa.includes(h)?m=!0:m||n==p||(m=!Qe().kg()&&sa.includes(n)),m&&(l=Nv(n,l),p=ld(l))){var b=new Wi(p(),e.o.transmuxWorkerUrl);o&&u&&(i=!0),h=b.convertCodecs(t,l)}return!b&&t==="video"&&o&&(h=tr(n,r)),e=Ar(Qr(h)),{jc:b,Lm:i,Oi:ki(h),codec:e,mimeType:h}}function m4(e,t,n,r,i){if(t==mt)return{type:Yw,Tf:n,jc:null};var o=Ar(Qr(e.D.get(t))),u=ki(e.D.get(t)),l=g4(e,t,n,r),h=l.jc,p=l.Lm,m=l.Oi,b=l.codec;l=l.mimeType;var w=!0;return p&&e.D.has("audio")&&(n=g4(e,"audio",n,r),r=Ar(Qr(e.D.get("audio"))),w=ki(e.D.get("audio")),w=r==n.codec&&w==n.Oi,n.jc&&n.jc.destroy()),o===b&&u===m&&w?{type:Yw,Tf:l,jc:h}:(o=!0,(e.u&&!i.has("audio")||p&&h&&!e.j.has(t))&&(o=!1),t=Qe(),i=e.C.se(),o&&e.o.codecSwitchingStrategy==="smooth"&&t.ub(i)?{type:v4,Tf:l,jc:h}:(h&&h.destroy(),{type:Jw,Tf:l,jc:null}))}function rV(e,t,n,r,i){var o,u,l,h,p,m;return P(function(b){return b.h==1?(o=Ln,u=m4(e,t,n,r,i),l=u.type,h=u.jc,p=u.Tf,(m=i.get(o.aa))&&(e.u=m.isAudioMuxedInVideo),l==Yw?(e.j.has(t)&&!h?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&h?e.j.set(t,h):h&&(e.j.has(t)&&e.j.get(t).transmux!==h.transmux?(e.j.get(t).destroy(),e.j.set(t,h)):h.destroy()),b.return(!1)):l==v4?b.g(tV(e,t,p,h),3):l!=Jw?b.A(3):(h&&h.destroy(),b.g(p4(e,i),3))):b.return(!0)})}function iV(e,t,n,r,i){return e=m4(e,t,n,r,i),e.jc&&e.jc.destroy(),e.type==Jw}function sp(e){return!(!e.i||e.F.g||e.g.error||e.Y||e.J||a0(e))}var Xw=d.URL.createObjectURL,aV="sequence",Yw="none",Jw="reset",v4="changeType";function Ze(e,t,n,r){this.h=e,this.F=t,this.u=this.m=1/0,this.i=r===void 0?1:r,this.g=this.l=null,this.C=0,this.B=!0,this.K=!1,this.J=0,this.H=n===void 0?!0:n,this.I=0,this.o=!1,this.j=e,this.D=[]}g=Ze.prototype,g.getDuration=function(){return this.m},g.rl=function(){return this.i},g.Xj=function(e){this.h=e},g.Sb=function(e){this.m=e},g.yl=function(){return this.h},g.Wj=function(e){this.C=e},g.Yd=function(e){e&&!this.B&&(this.K=!0),this.B=e},g.li=function(e){this.u=e},g.Bf=function(){return this.u},g.ji=function(e){this.F=e},g.hl=function(){return this.F},g.Gj=function(e,t){if(e.length!=0){var n=(Date.now()+this.C)/1e3;if(e=e.filter(function(i){return i.start+t<n}),e.length!=0){var r=e[e.length-1].end+t;this.Uf(e[0].start+t),this.i=e.reduce(function(i,o){return Math.max(i,o.end-o.start)},this.i),this.g=Math.max(this.g,r),this.h!=null&&this.H&&!this.o&&(this.h=n-this.g-this.i)}}},g.De=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.C)/1e3;e=x(e);for(var i=e.next();!i.done;i=e.next())i=i.value,r<i.startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.i=Math.max(this.i,i.endTime-i.startTime));this.Uf(t),this.g=Math.max(this.g,n),this.h!=null&&this.H&&!this.o&&(this.h=r-this.g-this.i)}},g.Fj=function(e,t){this.Uf(e),t==1/0||this.isLive()||(this.g=Math.max(this.g,t))},g.ul=function(){return this.g},g.Eh=function(){this.o=!0},g.Ol=function(){return this.o},g.ki=function(e){this.j=e},g.ol=function(){return this.j},g.Yj=function(e){this.D=e},g.oh=function(e){if(!this.D.length)return null;for(var t=this.D[0],n=x(this.D),r=n.next();!r.done&&(r=r.value,r.start<=e);r=n.next())t=r;return t},g.ij=function(e){var t=this.oh(e);return t?t.Ph+(e-t.start):this.j==null?null:this.j+e},g.Uf=function(e){this.l==null?this.l=e:this.K||(this.l=Math.min(this.l,e))},g.Ih=function(e){this.i=Math.max(this.i,e)},g.offset=function(e){this.l!=null&&(this.l+=e),this.g!=null&&(this.g+=e)},g.isLive=function(){return this.m==1/0&&!this.B},g.Hd=function(){return this.m!=1/0&&!this.B},g.ya=function(){return!this.B},g.Fb=function(){var e=this.Qc()-this.u;return Math.max(this.J,e)},g.bk=function(e){this.J=e},g.Qc=function(){return this.ya()?Math.min(Math.max(0,(Date.now()+this.C)/1e3-this.i-this.h)+this.I,this.m):this.g?Math.min(this.g,this.m):this.m},g.ue=function(e){var t=Math.max(this.l,this.J);if(this.u==1/0)return Math.ceil(t*1e3)/1e3;var n=this.Qc()-this.u;return e=Math.min(n+e,this.Eb()),Math.max(t,e)},g.Kb=function(){return this.ue(0)},g.Eb=function(){var e=this.ya()?this.F:0;return Math.max(0,this.Qc()-e)},g.tk=function(){return!(this.h==null||this.g!=null&&this.H)},g.Vj=function(e){this.I=e},g.$k=function(){return this.I},Te("shaka.media.PresentationTimeline",Ze),Ze.prototype.getAvailabilityTimeOffset=Ze.prototype.$k,Ze.prototype.setAvailabilityTimeOffset=Ze.prototype.Vj,Ze.prototype.usingPresentationStartTime=Ze.prototype.tk,Ze.prototype.getSeekRangeEnd=Ze.prototype.Eb,Ze.prototype.getSeekRangeStart=Ze.prototype.Kb,Ze.prototype.getSafeSeekRangeStart=Ze.prototype.ue,Ze.prototype.getSegmentAvailabilityEnd=Ze.prototype.Qc,Ze.prototype.setUserSeekStart=Ze.prototype.bk,Ze.prototype.getSegmentAvailabilityStart=Ze.prototype.Fb,Ze.prototype.isDynamic=Ze.prototype.ya,Ze.prototype.isInProgress=Ze.prototype.Hd,Ze.prototype.isLive=Ze.prototype.isLive,Ze.prototype.offset=Ze.prototype.offset,Ze.prototype.notifyMaxSegmentDuration=Ze.prototype.Ih,Ze.prototype.notifyMinSegmentStartTime=Ze.prototype.Uf,Ze.prototype.getProgramDateTimeForTime=Ze.prototype.ij,Ze.prototype.getProgramDateTimeRegionForTime=Ze.prototype.oh,Ze.prototype.setProgramDateTimeRegions=Ze.prototype.Yj,Ze.prototype.getInitialProgramDateTime=Ze.prototype.ol,Ze.prototype.setInitialProgramDateTime=Ze.prototype.ki,Ze.prototype.isStartTimeLocked=Ze.prototype.Ol,Ze.prototype.lockStartTime=Ze.prototype.Eh,Ze.prototype.getMaxSegmentEndTime=Ze.prototype.ul,Ze.prototype.notifyPeriodDuration=Ze.prototype.Fj,Ze.prototype.notifySegments=Ze.prototype.De,Ze.prototype.notifyTimeRange=Ze.prototype.Gj,Ze.prototype.getDelay=Ze.prototype.hl,Ze.prototype.setDelay=Ze.prototype.ji,Ze.prototype.getSegmentAvailabilityDuration=Ze.prototype.Bf,Ze.prototype.setSegmentAvailabilityDuration=Ze.prototype.li,Ze.prototype.setStatic=Ze.prototype.Yd,Ze.prototype.setClockOffset=Ze.prototype.Wj,Ze.prototype.getPresentationStartTime=Ze.prototype.yl,Ze.prototype.setDuration=Ze.prototype.Sb,Ze.prototype.setPresentationStartTime=Ze.prototype.Xj,Ze.prototype.getMaxSegmentDuration=Ze.prototype.rl,Ze.prototype.getDuration=Ze.prototype.getDuration;function Qw(e,t,n,r,i){var o=this;this.u=r,this.I=i||function(){return e.playbackRate},this.g=e,this.D=t,this.h=n,this.l=new he,this.o=!1,this.m=0,this.C=!1,this.H=this.F=0,this.j=sV(this),this.B=!1,this.l.G(e,"waiting",function(){return up(o)}),this.i=new ft(function(){up(o)}).Ka(this.h.gapJumpTimerTime)}Qw.prototype.release=function(){this.l&&(this.l.release(),this.l=null),this.i!=null&&(this.i.stop(),this.i=null),this.j&&(this.j.release(),this.j=null),this.g=this.D=this.u=null},Qw.prototype.Nd=function(){this.B=!0,this.i&&this.i.Ka(this.h.gapJumpTimerTime),up(this)};function up(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.o)return}else e.o=!1;if((!e.g.paused||e.g.currentTime==e.m&&(e.g.autoplay||e.g.currentTime!=e.m))&&(!e.j||!b4(e.j))){var t=e.g.currentTime,n=e.g.buffered,r=e.h.gapDetectionThreshold;if(!(e.I()<0)){if(r=LB(n,t,r),r==null&&e.j&&!b4(e.j)){for(var i=Fa(n),o=0;o<i.length-1;o++)if(Math.abs(t-i[o].end)<.1&&i[o+1].start>i[o].end){r=o+1;break}}r==null||r==0&&!e.B||(i=n.start(r),(o=e.h.gapPadding)&&(i=Math.ceil((i+o)*100)/100),o=e.D.Eb(),i>=o||i-t<.001||(r!=0&&n.end(r-1),oV(e,i),t==e.m&&(e.m=i),e.F++,e.u(new Ge("gapjumped"))))}}}}function oV(e,t){e.C=!0,e.l.oa(e.g,"seeked",function(){e.C=!1}),e.g.currentTime=t}function sV(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new y4(new w4(e.g),t,function(r,i,o){var u;return P(function(l){if(l.h==1)return u=Fa(e.g.buffered),u.length?n?(e.g.currentTime+=n,l.A(2)):l.g(e.g.play(),3):l.return();if(l.h!=2){if(!e.g)return l.return();e.g.pause(),e.g.play()}o==0&&(e.H++,e.u(new Ge("stalldetected"))),l.j()})})}function y4(e,t,n){this.i=e,this.u=x4(e),this.h=e.g.currentTime,this.m=Date.now()/1e3,this.l=this.g=0,this.o=t,this.j=n}y4.prototype.release=function(){this.i&&this.i.release(),this.j=this.i=null};function b4(e){var t=e.i,n=x4(t),r=t.g.currentTime,i=Date.now()/1e3;return(e.h!=r||e.u!=n)&&(e.m=i,e.h=r,e.u=n,e.g=0),r=i-e.m,(n=r>=e.o&&n&&e.g<3&&(e.g==0||i-e.l>=e.o))&&(e.j&&e.j(e.h,r,e.g),e.g++,e.l=i,e.h=t.g.currentTime),n}function w4(e){var t=this;this.g=e,this.h=new he,this.i=!1,this.h.G(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.G(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.G(this.g,"audiofocuslost",function(){t.i=!0})}function x4(e){if(e.g.paused||e.g.playbackRate==0||e.i||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=x(Fa(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}w4.prototype.release=function(){this.h&&this.h.release(),this.h=null};function Md(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=uV.value().get(t),n.oa(e,t,r))}var uV=new et(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function k4(e,t,n,r){var i=this;this.g=e,this.m=t,this.u=n,this.j=null,this.l=function(){return i.j==null&&(i.j=r()),i.j},this.o=!1,this.h=new he,this.i=new A4(e),Md(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){S4(i,i.l())})}k4.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function Zw(e){return e.o?e.g.currentTime:e.l()}function T4(e,t){e.g.readyState>0?E4(e.i,t):(e.j=t,Md(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){S4(e,e.l())}))}function S4(e,t){Math.abs(e.g.currentTime-t)<.001?C4(e):(e.h.oa(e.g,"seeking",function(){C4(e)}),E4(e.i,t))}function C4(e){e.o=!0,e.h.G(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function A4(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new ft(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}A4.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function E4(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ka(.1)}function I4(e){this.g=e,this.i=!1,this.h=null,this.j=new he}g=I4.prototype,g.ready=function(){function e(){if(t.h==null||t.h==0&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,r=null;if(typeof t.h=="number")r=t.h;else if(t.h instanceof Date){var i=M4(t);i!==null&&(r=t.h.getTime()/1e3-i,r=P4(t,r))}r==null?t.i=!0:(r<0&&(r=Math.max(0,n+r)),n!=r?(t.j.oa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=r):t.i=!0)}}var t=this;Md(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){e()})},g.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},g.xg=function(e){this.h=this.i?this.h:e},g.ee=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=e.getTime()/1e3-(M4(this)||0),e=P4(this,e)),e||0},g.Gi=function(){return 0},g.Ei=function(){return 0},g.Fi=function(){return!1},g.Ej=function(){},g.qj=function(){var e=Jv(this.g.buffered);return e!=null&&e>=this.g.duration-1};function M4(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function P4(e,t){return e=e.g.seekable,e.length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function _4(e,t,n,r,i,o,u){var l=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=i,this.o=null,this.i=new Qw(e,t.presentationTimeline,n,o,u),this.j=new k4(e,function(){e:{var h=l.i;h.o=!0,h.B=!1,h.i&&h.i.Ka(h.h.gapJumpTimerTime),up(h);var p=Zw(l.j);if(h=R4(l,p),!RI()&&Math.abs(h-p)>.001){p=!1;var m=Qe().Tj();if(m){var b=Date.now()/1e3;(!l.o||l.o<b-m)&&(l.o=b,p=!0)}else p=!0;if(p){T4(l.j,h),h=void 0;break e}}l.u(),h=void 0}return h},function(h){var p=l.i;p.g.seeking&&!p.o&&(p.o=!0,p.m=h),p.i&&p.i.Ka(p.h.gapJumpTimerTime),up(p)},function(){return D4(l,r)}),this.m=new ft(function(){if(l.h.readyState!=0&&!l.h.paused){var h=Zw(l.j),p=l.g.Kb(),m=l.g.Eb();m-p<3&&(p=m-3),h<p&&(h=R4(l,h),l.h.currentTime=h)}})}g=_4.prototype,g.ready=function(){this.m.Ka(.25)},g.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.u=function(){}},g.xg=function(e){T4(this.j,D4(this,e))},g.ee=function(){var e=Zw(this.j);return this.h.readyState>0&&!this.h.paused?N4(this,e):e},g.Gi=function(){return this.i.H},g.Ei=function(){return this.i.F},g.Fi=function(){return this.i.C};function D4(e,t){return t==null?t=e.g.ya()?e.g.Eb():e.g.Kb():t instanceof Date?t=t.getTime()/1e3-(e.g.j||e.g.h):t<0&&(t=e.g.Eb()+t),L4(e,N4(e,t))}g.Ej=function(){this.i.Nd()},g.qj=function(){if(this.g.ya()){var e=this.g.Qc(),t=Jv(this.h.buffered);if(t!=null&&t>=e)return!0}return!1};function L4(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function R4(e,t){var n=e.l.rebufferingGoal,r=e.l.safeSeekOffset,i=e.g.Kb(),o=e.g.Eb(),u=e.g.getDuration();o-i<3&&(i=o-3);var l=e.g.ue(n),h=e.g.ue(r);return n=e.g.ue(n+r),t>=u?L4(e,t):t>o?o-e.l.safeSeekEndOffset:t<i?e.g.isLive()&&e.l.returnToEndOfLiveWindowWhenOutside?o-e.l.safeSeekEndOffset:Qv(e.h.buffered,h)?h:n:t>=l||Qv(e.h.buffered,t)?t:n}function N4(e,t){var n=e.g.Kb();return t<n?n:(e=e.g.Eb(),t>e?e:t)}function Et(e){this.g=e,this.m=null,this.i=0,this.o=!1}g=Et.prototype,g.getNumReferences=function(){return this.g.length},g.getNumEvicted=function(){return this.i},g.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},g.Wl=function(){this.o=!0},g.Jb=function(e){for(var t=x(this.g),n=t.next();!n.done;n=t.next())e(n.value)},g.Ib=function(){return this.g[0]||null},g.find=function(e){var t=this.g.length-1;if(t<0)return null;if(e<this.g[0].startTime)return this.i;var n=ve(this.g,function(i){return i.startTime<=e})-1;if(n<0)return null;var r=this.g[n];return t=n<t?this.g[n+1].startTime:r.endTime,e>=r.startTime&&e<t?n+this.i:null},g.get=function(e){return this.g.length==0?null:(e-=this.i,e<0||e>=this.g.length?null:this.g[e])},g.offset=function(e){if(!this.o)for(var t=x(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},g.Pf=function(e){if(!this.o&&e.length){var t=Math.round(e[0].startTime*1e3)/1e3,n=ve(this.g,function(r){return Math.round(r.startTime*1e3)/1e3<t});this.g.length=n,this.g.push.apply(this.g,se(e))}},g.Ld=function(e,t){for(var n=Math.max(t,this.g.length>0?this.g[0].startTime:-1/0),r=0;r<e.length&&e[r].endTime<=n;)r++;r>0&&(e=e.slice(r)),this.Pf(e),this.Za(t)},g.Za=function(e){if(!this.o){var t=ve(this.g,function(n){return n.endTime<=e});t>0&&(this.i+=t,this.g=this.g.slice(t))}},g.xd=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();var r=ve(this.g,function(i){return i.endTime<=e});r>0&&(n||(this.i+=r),this.g=this.g.slice(r)),this.g.length!=0&&(n=this.g[this.g.length-1],t=new nt(n.startTime,t,n.D,n.startByte,n.endByte,n.ia,n.timestampOffset,n.appendWindowStart,n.appendWindowEnd,n.h,n.tilesLayout,n.B,n.g,n.status,n.aesKey),t.mimeType=n.mimeType,t.codecs=n.codecs,t.i=n.i,this.g[this.g.length-1]=t)}},g.og=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new ft(function(){var r=t();r?n.g.push.apply(n.g,se(r)):(n.m.stop(),n.m=null)}),this.m.Ka(e))},Et.prototype[Symbol.iterator]=function(){return this.Yb(0)},Et.prototype.Yb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this.find(e);if(r==null)return null;var i=this.get(r);n?r++:r--;var o=-1;if(i&&i.h.length>0)for(var u=i.h.length-1;u>=0;--u){var l=i.h[u];if(e>=l.startTime&&e<l.endTime){if(!t){for(;u&&!l.l;)u--,l=i.h[u];if(!l.l)return Xt("No independent partial segment found!"),null}n?r--:r++,o=u-1;break}}return new la(this,r,o,n)},Et.prototype.pf=function(){return-1};function l0(e,t,n){return e=new nt(e,e+t,function(){return n},0,null,null,e,e,e+t),new Et([e])}Te("shaka.media.SegmentIndex",Et),Et.forSingleSegment=l0,Et.prototype.getIteratorForTime=Et.prototype.Yb,Et.prototype.updateEvery=Et.prototype.og,Et.prototype.fit=Et.prototype.xd,Et.prototype.evict=Et.prototype.Za,Et.prototype.mergeAndEvict=Et.prototype.Ld,Et.prototype.offset=Et.prototype.offset,Et.prototype.get=Et.prototype.get,Et.prototype.find=Et.prototype.find,Et.prototype.markImmutable=Et.prototype.Wl,Et.prototype.release=Et.prototype.release,Et.prototype.getNumEvicted=Et.prototype.getNumEvicted,Et.prototype.getNumReferences=Et.prototype.getNumReferences;function la(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}g=la.prototype,g.Xd=function(e){this.reverse=e},g.Nk=function(){return this.h},g.current=function(){var e=this.i.get(this.h);return e&&e.h.length>0&&e.m&&this.g>=e.h.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.h.length>0?e.h[this.g]:e},g.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.h.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.h.length>0?e.h.length-1:0)):(this.h--,this.g=0):e&&e.h.length>0?(this.g++,e.m&&this.g==e.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},g.ai=function(){var e=this.current();if(e&&e.gd&&!e.l&&(e=this.i.get(this.h))&&e.h.length>0)for(var t=e.h[this.g];t.l&&!(this.g<=0);)this.g--,t=e.h[this.g]},Te("shaka.media.SegmentIterator",la),la.prototype.resetToLastIndependent=la.prototype.ai,la.prototype.next=la.prototype.next,la.prototype.current=la.prototype.current,la.prototype.currentPosition=la.prototype.Nk,la.prototype.setReverse=la.prototype.Xd;function bn(){Et.call(this,[]),this.h=[]}K(bn,Et),g=bn.prototype,g.clone=function(){var e=new bn;return e.h=this.h.slice(),e.i=this.i,e},g.release=function(){this.h=[]},g.Jb=function(e){for(var t=x(this.h),n=t.next();!n.done;n=t.next())n.value.Jb(e)};function lV(e,t){e=x(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}g.find=function(e){for(var t=this.i,n=x(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.find(e);if(i!=null)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null};function cV(e,t){e=x(e.h);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.find(t)!=null)return n.pf();return-1}g.get=function(e){for(var t=this.i,n=x(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},g.offset=function(){},g.Pf=function(){},g.Za=function(e){if(this.h.length){var t=this.h[0];t.Za(e),t.getNumReferences()==0&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Za(e))}},g.Ld=function(){},g.xd=function(){},g.og=function(){},Te("shaka.media.MetaSegmentIndex",bn),bn.prototype.updateEvery=bn.prototype.og,bn.prototype.fit=bn.prototype.xd,bn.prototype.mergeAndEvict=bn.prototype.Ld,bn.prototype.evict=bn.prototype.Za,bn.prototype.merge=bn.prototype.Pf,bn.prototype.offset=bn.prototype.offset,bn.prototype.get=bn.prototype.get,bn.prototype.find=bn.prototype.find,bn.prototype.forEachTopLevelReference=bn.prototype.Jb,bn.prototype.release=bn.prototype.release;function c0(e){var t=this;this.g=e,this.j=!1,this.h=this.g.ph(),this.i=new ft(function(){t.g.isPaused()||t.g.Zl(t.h*.25)})}c0.prototype.release=function(){this.set(this.zd()),this.i&&(this.i.stop(),this.i=null),this.g=null},c0.prototype.set=function(e){this.h=e,ex(this)},c0.prototype.zd=function(){return this.g.zd()};function ex(e){e.i.stop();var t=e.j?0:e.h;if(t>=0&&t<=16)try{e.g.ph()!=t&&e.g.Zj(t);return}catch{}e.i.Ka(.25),e.g.ph()!=0&&e.g.Zj(0)}function tx(e){var t=this;this.j=e,this.h=new he,this.g=new Set,this.i=new ft(function(){O4(t,!1)}).Va(),e.paused||this.i.Ka(.25),this.h.G(e,"playing",function(){t.i.Va().Ka(.25)}),this.h.G(e,"pause",function(){t.i.stop()}),this.h.G(e,"seeked",function(){t.i.Va(),e.paused||t.i.Ka(.25)})}tx.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=x(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function O4(e,t){var n=e.j.currentTime;e=x(e.g);for(var r=e.next();!r.done;r=e.next())r.value.j(n,t)}function d0(e){Bt.call(this),this.g=new Map,this.h=e}K(d0,Bt),d0.prototype.release=function(){this.g.clear(),Bt.prototype.release.call(this)};function dV(e,t){var n=e.g.get(t);return n||(n={He:[],Qg:null,contentType:t},e.g.set(t,n)),n}function fV(e,t,n){var r=dV(e,t.contentType);hV(e,r),e={Jd:t,position:n},r=r.He,t=r.findIndex(function(i){return i.position>=n}),t>=0?r.splice(t,r[t].position==n?1:0,e):r.push(e)}d0.prototype.j=function(e){for(var t=x(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var r=n.Qg;e:{for(var i=n.He,o=i.length-1;o>=0;o--){var u=i[o];if(u.position<=e){i=u.Jd;break e}}i=null}o=i&&!(r===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width),u=i&&r&&i.label&&r.label&&r.label!==i.label;var l=i&&r&&i.language&&r.language&&r.language!==i.language;r=i&&r&&i.roles&&r.roles&&!xe(r.roles,i.roles),(u||l||r)&&j4(this,e,i.contentType)&&(n.Qg=i,r=new Ge("audiotrackchange",new Map([["quality",i],["position",e]])),this.dispatchEvent(r)),o&&j4(this,e,i.contentType)&&(n.Qg=i,JSON.stringify(i),n=new Ge("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}};function j4(e,t,n){return!!((e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function hV(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,r=e[e.length-1].end,i=t.He;t.He=i.filter(function(o,u){return!(o.position<=n&&u+1<i.length&&i[u+1].position<=n||o.position>=r)})}else t.He=[]}function nx(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function lp(e){Bt.call(this),this.g=new Map,this.i=e,this.h=null}K(lp,Bt),lp.prototype.release=function(){this.g.clear(),this.h&&(this.h.stop(),this.h=null),Bt.prototype.release.call(this)};function rx(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.g.has(n)||(e.g.set(n,t),t=new Ge("regionadd",new Map([["region",t]])),e.dispatchEvent(t),pV(e))}function pV(e){e.h||(e.h=new ft(function(){for(var t=e.i(),n=x(e.g),r=n.next();!r.done;r=n.next()){var i=x(r.value);r=i.next().value,i=i.next().value,i.endTime<t.start&&(e.g.delete(r),r=new Ge("regionremove",new Map([["region",i]])),e.dispatchEvent(r))}!e.g.size&&e.h&&(e.h.stop(),e.h=null)}).Ka(2))}function f0(e,t,n,r,i,o){function u(l,h){return!(h.fastSwitching&&l.gd&&l.ze)}this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=r,this.B=i||u,this.u=o||function(){return 1}}function gV(e,t){e.l=t,e=x(e.g.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function cp(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.h||(e.h=e.i.segmentIndex.Yb(t,!0,e.o)),!e.h))return Promise.resolve();for(n&&e.h.next(),t=[],n=Math.abs(e.u()),n=Math.ceil(e.m*n);e.g.size<n;){var r=e.h.next().value;if(!r)break;var i=!0;if(r.isPreload()&&r.endByte!=null&&(i=!1),r.tc()==2&&(i=!1),r.$b(!1)&&(i=!1),i&&r.ia&&t.push(U4(e,r.ia)),i&&!e.g.has(r)&&(i=new ax(e.l),t.push(V4(i,r,e.i)),e.g.set(r,i)),!e.B(r,e.i))break}return ix(e),Promise.all(t)}function U4(e,t){if(!e.i.segmentIndex||t.$b()||Array.from(e.j.keys()).some(function(i){return tp(i,t)}))return Promise.resolve();var n=new ax(e.l),r=V4(n,t,e.i);return e.j.set(t,n),r}function F4(e,t){t=x(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&dp(e,n)}function Ba(e){F4(e,e.g),F4(e,e.j),e.h=null}f0.prototype.Za=function(e,t){t=t===void 0?!1:t;for(var n=x(this.g.keys()),r=n.next();!r.done;r=n.next())r=r.value,e>r.endTime&&dp(this,r);t&&ix(this)},f0.prototype.Xd=function(e){this.o=e,this.h&&this.h.Xd(e)};function ix(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=x(e.j.keys()),r=n.next(),i={};!r.done;i={uh:void 0},r=n.next())i.uh=r.value,t.some((function(o){return function(u){return tp(u.ia,o.uh)}})(i))||dp(e,i.uh)}function B4(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var r=n.pop();r&&dp(e,r)}ix(e)}function mV(e,t){t&&t!==e.i&&(Ba(e),e.i=t)}function dp(e,t){var n=e.g;t instanceof Ci&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function ax(e){this.g=e,this.Ee=this.oi=null}function V4(e,t,n){var r=new Uint8Array(0);return e.Ee=e.g(t,n,function(i){return P(function(o){if(o.h==1)return r.byteLength>0?r=Dn(r,i):r=i,e.oi?o.g(e.oi(r),3):o.A(0);r=new Uint8Array(0),o.j()})}),e.Ee.promise.catch(function(i){return i instanceof B&&i.code==7001?Promise.resolve():Promise.reject(i)})}ax.prototype.abort=function(){this.Ee&&this.Ee.abort()},Te("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function vV(e){var t=0,n=_e(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,(i&1)!=0||i+e>n.byteLength){n=[];break e}var o=H(n,e,i);t.push({type:r,value:o}),e+=i}n=t}return n}function yV(e){return e=vV(e).find(function(t){return t.type===bV}),e?(e=$n(e.value,!0),(e=sd(e,"WRMHEADER"))?e:null):null}function $4(e){return e=wi(mn(e)),H4(e)}function z4(e){var t=8;e=_e(e);var n=e.getUint8(t);return t+=20,n>0&&(t+=4+16*e.getUint32(t)),t=H(e,t+4),H4(t)}function H4(e){try{var t=yV(e);if(t)e:{for(var n=x(Ko(t,"DATA")),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.children)for(var o=x(i.children),u=o.next();!u.done;u=o.next()){var l=u.value;if(l.tagName=="LA_URL"){var h=mn(l);break e}}}h=""}else h="";return h}catch{return""}}var bV=1;function ox(e){var t=ki(e),n=t.split("/")[0];return e=Qr(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Ne:null,colorGamut:null,frameRate:null,timescale:null,drmInfos:[]}}function wV(e,t,n){function r(W){G=W.name;var Se=W.reader;Se.skip(24);var Ee=Se.Da(),Xe=Se.Da();Se.skip(50),k=String(Ee),T=String(Xe),W.reader.La()&&qt(W)}function i(W){var Se=PI(W.reader);S=Se.channelCount,A=Se.sampleRate,o(W.name),W.reader.La()&&qt(W)}function o(W){switch(W=W.toLowerCase(),W){case"avc1":case"avc3":l.push(W+".42E01E"),m=!0;break;case"hev1":case"hvc1":l.push(W+".1.6.L93.90"),m=!0;break;case"dvh1":case"dvhe":l.push(W+".05.04"),m=!0;break;case"vp09":l.push(W+".00.10.08"),m=!0;break;case"av01":l.push(W+".0.01M.08"),m=!0;break;case"mp4a":u.push("mp4a.40.2"),p=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":u.push(W),p=!0;break;case"apac":u.push("apac.31.00"),p=!0}}var u=[],l=[],h=[],p=!1,m=!1,b=!1,w=null,T=null,k=null,S=null,A=null,M=null,_=null,R=null,U=null,N=new Map,j=new Set,V=null,q=null,G,z=0,J=[],ie=new Map,le=null,be=new Map;if(e&&t){U=H(e);var ce=H(t);ce=Dn(U,ce)}else t?ce=H(t):e&&(ce=H(e));var ae;if(new Tt().ua([].concat(se(Qo),se(Dl)),qt).T("tkhd",function(W){le=Nw(W.reader,W.version).trackId}).T("mdhd",function(W){W=Xv(W.reader,W.version),w=W.language,le!==null&&ie.set(le,W.timescale)}).T("stsd",Ua).T("tfhd",function(W){W=Nl(W.reader,W.flags),W.nc&&(z=W.nc)}).T("trun",function(W){J=Ol(W.reader,W.version,W.flags).Vc}).box("mp4a",function(W){var Se=PI(W.reader);S=Se.channelCount,A=Se.sampleRate,W.reader.La()?qt(W):o(W.name)}).box("esds",function(W){W=W.reader;for(var Se="mp4a",Ee,Xe;W.La();){Ee=W.Z();for(var vt=W.Z();vt&128;)vt=W.Z();if(Ee==3)W.Da(),vt=W.Z(),vt&128&&W.Da(),vt&64&&W.skip(W.Z()),vt&32&&W.Da();else if(Ee==4)Xe=W.Z(),W.skip(12);else if(Ee==5)break}Xe&&(Se+="."+Zh(Xe),Ee==5&&W.La()&&(Ee=W.Z(),Xe=(Ee&248)>>3,Xe===31&&W.La()&&(Xe=32+((Ee&7)<<3)+((W.Z()&224)>>5)),Se+="."+Xe)),u.push(Se),p=!0}).ua(lI,i).ua([].concat(se(uI),["vp09","av01"]),r).box("avcC",function(W){var Se=G||"";switch(G){case"dvav":Se="avc3";break;case"dva1":Se="avc1"}W=W.reader,W.skip(1),W=Se+"."+Zh(W.Z())+Zh(W.Z())+Zh(W.Z()),l.push(W),m=!0}).box("hvcC",function(W){var Se=G||"";switch(G){case"dvh1":Se="hvc1";break;case"dvhe":Se="hev1"}var Ee=W.reader;Ee.skip(1),W=Ee.Z();var Xe=["","A","B","C"][W>>6],vt=W&31,wn=Ee.S(),bt=(W&32)>>5?"H":"L";W=[Ee.Z(),Ee.Z(),Ee.Z(),Ee.Z(),Ee.Z(),Ee.Z()],Ee=Ee.Z();for(var cn=0,Nt=0;Nt<32&&(cn|=wn&1,Nt!=31);Nt++)cn<<=1,wn>>=1;for(Se=Se+("."+Xe+vt)+("."+Zh(cn,!0)),Se+="."+bt+Ee,Xe="",vt=W.length;vt--;)((bt=W[vt])||Xe)&&(Xe="."+bt.toString(16).toUpperCase()+Xe);Se+=Xe,l.push(Se),m=!0}).box("dvcC",function(W){var Se=G||"";switch(G){case"hvc1":Se="dvh1";break;case"hev1":Se="dvhe";break;case"avc1":Se="dva1";break;case"avc3":Se="dvav";break;case"av01":Se="dav1"}var Ee=W.reader;Ee.skip(2),W=Ee.Z(),Ee=Ee.Z(),l.push(Se+"."+Ti(W>>1&127)+"."+Ti(W<<5&32|Ee>>3&31)),m=!0}).box("dvvC",function(W){var Se=G||"";switch(G){case"hvc1":Se="dvh1";break;case"hev1":Se="dvhe";break;case"avc1":Se="dva1";break;case"avc3":Se="dvav";break;case"av01":Se="dav1"}var Ee=W.reader;Ee.skip(2),W=Ee.Z(),Ee=Ee.Z(),l.push(Se+"."+Ti(W>>1&127)+"."+Ti(W<<5&32|Ee>>3&31)),m=!0}).T("vpcC",function(W){var Se=G||"",Ee=W.reader;W=Ee.Z();var Xe=Ee.Z();Ee=Ee.Z()>>4&15,l.push(Se+"."+Ti(W)+"."+Ti(Xe)+"."+Ti(Ee)),m=!0}).box("av1C",function(W){var Se=G||"";switch(G){case"dav1":Se="av01"}var Ee=W.reader;Ee.skip(1),W=Ee.Z(),Ee=Ee.Z();var Xe=W>>>5,vt=(Ee&64)>>6;l.push(Se+"."+Xe+"."+Ti(W&31)+(Ee>>>7?"H":"M")+"."+Ti(Xe===2&&vt?(Ee&32)>>5?12:10:vt?10:8)+"."+((Ee&16)>>4)+"."+((Ee&8)>>3)+((Ee&4)>>2)+(Ee&3)+"."+Ti(1)+"."+Ti(1)+"."+Ti(1)+".0"),m=!0}).ua(["wvtt","stpp"],function(W){h.push(W.name),b=!0}).box("c608",function(){be.set("CC1","CC1"),le!==null&&ie.delete(le)}).box("enca",i).box("encv",r).box("sinf",qt).box("frma",function(W){W=Yv(W.reader).codec,o(W)}).box("colr",function(W){l=l.map(function(Xe){if(Xe.startsWith("av01.")){var vt=W.reader,wn=vt.Ia(),bt=vt.Ja(4,!1),cn=String.fromCharCode(bt[0]);if(cn+=String.fromCharCode(bt[1]),cn+=String.fromCharCode(bt[2]),cn+=String.fromCharCode(bt[3]),cn==="nclx"){bt=vt.Da(),cn=vt.Da();var Nt=vt.Da(),ya=vt.Z()>>7,si=Xe.split(".");si.length==10&&(si[6]=Ti(bt),si[7]=Ti(cn),si[8]=Ti(Nt),si[9]=String(ya),Xe=si.join("."))}vt.seek(wn)}return Xe});var Se=$F(W.reader),Ee=Se.colorGamut;M=Se.Ne,_=Ee}).T("schm",function(W){V=_l(W.reader.S())}).box("schi",qt).T("tenc",function(W){q=Ow(W.reader,W.version).defaultKID}).T("pssh",function(W){var Se=H(W.reader.h,-12,W.size),Ee=Yr(Se);if(!j.has(Ee)&&(j.add(Ee),Ee=W.reader.Ja(16,!1),Ee=Yr(Ee),ae||(ae=t5(!0)),Ee=ae[Ee.toLowerCase()])){var Xe=Go(Ee,"cenc",[{initDataType:"cenc",initData:Se}]);if(qo(Ee)&&(Xe.licenseServerUri=z4(Se)),W.version>0){Se=W.reader.S();for(var vt=0;vt<Se;vt++){var wn=W.reader.Ja(16,!1);Xe.keyIds.add(Yr(wn))}}N.set(Ee,Xe)}}).parse(ce,!0,!0),!u.length&&!l.length&&!h.length)return null;if(U=ie.values().next().value,ce=p&&!m,m&&!n&&t&&!be.size){n=new Oa("video/mp4"),e&&n.init(e);try{Q2(n,t);for(var de=x(n.g.getStreams()),re=de.next();!re.done;re=de.next()){var pe=re.value;be.set(pe,pe)}}catch{}n.g.clear()}for(e=u.concat(l).concat(h),V==="cbcs"&&q&&!N.has("com.apple.fps")&&N.set("com.apple.fps",Go("com.apple.fps",V,null)),t=x(N.values()),de=t.next();!de.done;de=t.next())de=de.value,V&&(de.encryptionScheme=V),q&&de.keyIds.add(q);if(t="video",de="video/mp4",b?(t="text",de="application/mp4"):ce&&(t="audio",de="audio/mp4"),t==="video"&&U!=null&&J.length){for(ce=U,re=0,pe=x(J),n=pe.next();!n.done;n=pe.next()){var Re=void 0;re+=(Re=n.value.Ud)!=null?Re:z}re>0&&(R=ce*J.length/re)}return{type:t,mimeType:de,codecs:h0(e).join(", "),language:w,height:T,width:k,channelCount:S,sampleRate:A,closedCaptions:be,Ne:M,colorGamut:_,frameRate:R,timescale:U,drmInfos:Array.from(N.values())}}function h0(e){var t=new Set,n=[];e=x(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=yu(r);t.has(i)||(n.push(r),t.add(i))}return t=W2("audio",n),r=W2("video",n),e=W2(mt,n),r=xV(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function xV(e){if(e.length<=1)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Si('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function kV(e){var t=null;return new Tt().ua([].concat(se(Qo),["sinf","schi"]),qt).T("stsd",Ua).box("encv",Pl).box("enca",Yh).T("tenc",function(n){t=Ow(n.reader,n.version).defaultKID}).parse(e,!0),t}function sx(e,t,n){var r,i,o,u,l,h,p,m,b;return P(function(w){if(w.h==1)return r=t,r.cryptoKey?w.A(2):w.g(r.fetchKey(),3);if(t.blockCipherMode=="GCM"&&t.bitsKey==256){if(i=H(e),i.byteLength<32)throw new B(2,4,4060);return o=i.slice(0,16),u=i.slice(16),l={name:"AES-GCM",iv:o,tagLength:128},w.return(d.crypto.subtle.decrypt(l,r.cryptoKey,u))}if(h=r.iv,!h)for(h=H(new ArrayBuffer(16)),p=r.firstMediaSequenceNumber+n,m=h.byteLength-1;m>=0;m--)h[m]=p&255,p>>=8;return t.blockCipherMode=="CBC"?b={name:"AES-CBC",iv:h}:b={name:"AES-CTR",counter:h,length:64},w.return(d.crypto.subtle.decrypt(b,r.cryptoKey,e))})}function Pd(e,t,n){var r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:var m;return(r=(m=TV.get(_d(e)))!=null?m:"")?p.return(r):(i=0,o=yn([e],n),p.m(2),o.method="HEAD",p.g(t.request(i,o).promise,4));case 4:u=p.i,r=u.headers["content-type"],p.o(3);break;case 2:if(l=p.l(),!l||l.code!=1002&&l.code!=1001){p.A(3);break}return o.method="GET",p.g(t.request(i,o).promise,6);case 6:h=p.i,r=h.headers["content-type"];case 3:return p.return(r?r.toLowerCase().split(";").shift():"")}})}function _d(e){for(var t=e.length,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r===63||r===35){t=n;break}}for(n=t-1;n>=0;n--){if(r=e.charCodeAt(n),r===46){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(r===47)break}return""}function fp(e,t,n,r,i){return e=yn(e,r,i),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}var TV=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("cmfv","video/mp4").set("cmfa","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("opus","audio/opus").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function q4(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.P=new Map,this.B=1,this.C=this.o=null,this.W=0,this.h=new Map,this.J=!1,this.Y=null,this.D=!1,this.l=new gd(function(){return SV(n)}),this.R=Date.now()/1e3,this.m=new Map,this.V={projection:null,hfov:null},this.ha=0,this.ba=1/0,this.F=null,this.O=[],this.M=new he,this.u=new ft(function(){if(n.j&&n.g)if(n.j.presentationTimeline.ya()){var r=n.j.presentationTimeline.Kb(),i=n.j.presentationTimeline.Eb();i-r>1?QB(n.g.X,r,i):Kw(n.g.X)}else Kw(n.g.X),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.H=null,this.I=!1,this.L=new ft(function(){var r=n.g.video;!r.ended&&n.H&&(n.I=!0,r.currentTime=n.H,n.H=null)}),this.K=new he}g=q4.prototype,g.destroy=function(){return this.l.destroy()};function SV(e){var t,n,r,i,o,u,l,h,p,m,b;return P(function(w){if(w.h==1){for((t=e.u)==null||t.stop(),e.u=null,(n=e.M)==null||n.release(),e.M=null,(r=e.L)==null||r.stop(),e.L=null,(i=e.K)==null||i.release(),e.K=null,o=[],u=x(e.h.values()),l=u.next();!l.done;l=u.next())h=l.value,So(h),o.push(b0(h)),h.ka&&(Ba(h.ka),h.ka=null);for(p=x(e.m.values()),m=p.next();!m.done;m=p.next())b=m.value,Ba(b);return w.g(Promise.all(o),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.H=null,w.j()})}g.configure=function(e){if(this.i=e,this.Y=new bw({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.ka&&(Ba(t.ka),t.ka=null),t=x(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Ba(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(mt))&&t.ka&&(Ba(t.ka),t.ka=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.ka&&(Ba(t.ka),t.ka=null),t=x(this.h.keys()),n=t.next();!n.done;n=t.next())n=this.h.get(n.value),n.ka?(B4(n.ka,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(Ba(n.ka),n.ka=null)):e.segmentPrefetchLimit>0&&(n.ka=cx(this,n.stream));e.disableAudioPrefetch||_V(this)};function CV(e,t,n){e.j.presentationTimeline.ya()||(e.ha=t,e.ba=n)}g.start=function(e){var t=this;return P(function(n){if(n.h==1)return n.g(PV(t,e||new Map),2);Zt(t.l),t.J=!0,n.j()})};function AV(e,t){var n,r,i,o,u,l;P(function(h){switch(h.h){case 1:return n=Ln,e.W++,r=e.W,h.m(2),h.g(u4(e.g.X,n.Xa),4);case 4:h.o(3);break;case 2:i=h.l(),e.g&&e.g.onError(i);case 3:o=tr(t.mimeType,t.codecs),ip(e.g.X,o,t.external),u=e.g.X.ba,u.isTextVisible()&&e.W==r&&(l=p0(e,t),e.h.set(n.Xa,l),yr(e,l,0)),h.j()}})}function EV(e){var t=e.h.get(mt);t&&(So(t),b0(t).catch(function(){}),e.F=e.h.get(mt),e.h.delete(mt),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.C=null}function G4(e,t){for(var n=e.g.eb()<0,r=x(e.h.values()),i=r.next();!i.done;i=r.next())i=i.value,i.va&&i.va.Xd(n),i.ka&&i.ka.Xd(n),n&&(i.va=null,i.endOfStream=!1,i.Ma||i.pb||i.Nb||i.Mb||yr(e,i,0));for(r=x(e.m.values()),i=r.next();!i.done;i=r.next())i.value.Xd(n);(n=e.h.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.Uc&&(Dd(e,t,!1,0,!1),n.Uc=r):(t=n.Uc)&&(n.Uc=null,Dd(e,t,!0,0,!1)))}function K4(e,t,n,r,i,o){n=n===void 0?!1:n,r=r===void 0?0:r,i=i===void 0?!1:i,o=o===void 0?!1:o,e.o=t,e.J&&(t.video&&Dd(e,t.video,n,r,i,o),t.audio&&Dd(e,t.audio,n,r,i,o))}function ux(e,t){P(function(n){if(n.h==1)return e.F=null,e.C=t,e.J?t.segmentIndex?n.A(2):n.g(t.createSegmentIndex(),2):n.return();Dd(e,t,!0,0,!1),n.j()})}function IV(e){var t=e.h.get(mt);t&&Dd(e,t.stream,!0,0,!0)}function MV(e,t){for(var n=x(e.P.entries()),r=n.next();!r.done;r=n.next()){var i=x(r.value);r=i.next().value,i=i.next().value,r.includes(t.type)&&(i(),e.P.delete(r))}}function Dd(e,t,n,r,i,o){var u=e.h.get(t.type);u||t.type!=mt?u&&(u.Uc&&(t.trickModeVideo?(u.Uc=t,t=t.trickModeVideo):u.Uc=null),u.stream!=t||i)&&(e.m.has(t)?u.ka=e.m.get(t):u.ka&&mV(u.ka,t),t.type==mt&&u.stream!=t&&(i=tr(t.mimeType,t.codecs),ip(e.g.X,i,t.external)),e.m.has(u.stream)||u.stream.closeSegmentIndex&&(u.Ma?e.P.getOrInsert("("+u.type+":"+u.stream.id+")",u.stream.closeSegmentIndex):u.stream.closeSegmentIndex()),i=u.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,u.stream=t,u.va=null,u.Fg=!!o,t.dependencyStream?u.Lc=p0(e,t.dependencyStream):u.Lc=null,J4(e),i&&(u.rb=null,u.vc=null,u.uc=null,t.isAudioMuxedInVideo&&(t=null,u.type==="video"?t=e.h.get("audio"):u.type==="audio"&&(t=e.h.get("video")),t&&(b0(t).catch(function(){}),t.rb=null,t.vc=null,t.uc=null,lx(e,t),W4(e,t).catch(function(l){e.g&&e.g.onError(l)})))),n?u.Nb?u.ae=!0:u.Ma?(u.Mb=!0,u.rd=r,u.ae=!0):(So(u),hx(e,u,!0,r).catch(function(l){e.g&&e.g.onError(l)})):u.Ma||u.pb||yr(e,u,0),W4(e,u).catch(function(l){e.g&&e.g.onError(l)})):AV(e,t)}function W4(e,t){var n,r,i;return P(function(o){if(o.h==1)return t.ab?(n=t.stream,r=t.ab,n.segmentIndex?o.A(2):o.g(n.createSegmentIndex(),2)):o.return();if(o.h!=4)return i=n.dependencyStream,!i||i.segmentIndex?o.A(4):o.g(i.createSegmentIndex(),4);if(t.ab!=r||t.stream!=n)return o.return();var u=e.g.Zb(),l=Su(e.g.X,t.type),h=t.stream.segmentIndex.find(dx(e,t,u)),p=h==null?null:t.stream.segmentIndex.get(h);h=p?jw(p):null,p&&!h&&(h=(p.endTime-p.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),h?((p=p.ia)&&(h+=(p.endByte?p.endByte+1-p.startByte:null)||0),p=e.g.getBandwidthEstimate(),u=h*8/p<(l||0)-u-e.i.rebufferingGoal||t.ab.h.g>h):u=!0,u&&t.ab.abort(),o.j()})}g.kd=function(){if(this.g){for(var e=this.g.Zb(),t=x(this.h.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=this.h.get(r);var i;if((i=!this.I)&&(i=this.g.X,r==mt?(i=i.h,i=i.g==null||i.h==null?!1:e>=i.g&&e<i.h):(i=zl(i,r),i=Qv(i,e)),i=!i),i){if(this.R=0,n.ka&&(n.ka.h=null),n.type==="audio"){i=x(this.m.values());for(var o=i.next();!o.done;o=i.next())o.value.h=null}n.va=null,(Su(this.g.X,r)!=null||n.Ma)&&lx(this,n),n.ab&&(n.ab.abort(),n.ab=null),r===mt&&(r=this.g.X,r.I&&r.I.g.clear()),n.kd=!0}!this.I||n.Nb||n.Ma||n.pb||yr(this,n,0)}gp(this)&&Q4(this)}};function lx(e,t){t.Nb||t.Mb||(t.Ma?(t.Mb=!0,t.rd=0):o0(e.g.X,t.type)==null?t.pb==null&&yr(e,t,0):(So(t),hx(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function PV(e,t){var n,r,i,o,u,l,h,p;return P(function(m){if(m.h==1){if(!e.o)throw new B(2,5,5006);return n=w0(e,!0),r=e.g.X,m.g(r.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(Zt(e.l),e.updateDuration().catch(function(){}),i=x(n.keys()),o=i.next();!o.done;o=i.next())u=o.value,l=n.get(u),!e.h.has(u)&&(h=p0(e,l),(p=t.get(l.id))&&(gV(p,function(b,w,T){return y0(b,w,T||null,e.i.retryParameters,e.g.xc)}),h.ka=p),e.h.set(u,h),yr(e,h,0));J4(e),m.j()})}function p0(e,t){var n={stream:t,type:t.type,va:null,ka:cx(e,t),Sa:null,rb:null,Nf:null,vc:null,uc:null,Lf:null,Mf:null,Uc:null,endOfStream:!1,Ma:!1,pb:null,Mb:!1,rd:0,ae:!1,Nb:!1,kd:!0,Fg:!1,Uh:!1,Ed:!1,ab:null,Lc:null};return t.dependencyStream&&(n.Lc=p0(e,t.dependencyStream)),n}function cx(e,t){if(e.j.type=="MSF"||t.type==="video"&&e.i.disableVideoPrefetch||t.type==="audio"&&e.i.disableAudioPrefetch||t.type===mt&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===mt&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.ka)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new f0(e.i.segmentPrefetchLimit,t,function(r,i,o){return y0(r,i,o||null,e.i.retryParameters,e.g.xc)},e.g.eb()<0,e.g.Hm,e.g.eb):null}function _V(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,r=x(e.j.variants),i=r.next(),o={};!i.done;o={Lb:void 0},i=r.next())if(o.Lb=i.value,o.Lb.audio)if(e.m.has(o.Lb.audio)){if(i=e.m.get(o.Lb.audio),B4(i,t),!(t>0&&n.some((function(l){return function(h){return q2(l.Lb.audio.language,h)}})(o)))){var u=e.h.get(o.Lb.audio.type);i!==(u&&u.ka)&&Ba(i),e.m.delete(o.Lb.audio)}}else t<=0||!n.some((function(l){return function(h){return q2(l.Lb.audio.language,h)}})(o))||!(i=cx(e,o.Lb.audio))||(o.Lb.audio.segmentIndex||o.Lb.audio.createSegmentIndex(),e.m.set(o.Lb.audio,i))}g.updateDuration=function(){var e=this,t,n;return P(function(r){return r.h==1?(t=RI(),n=e.j.presentationTimeline.getDuration(),e.M.Ea(),n<1/0?(t&&(e.u&&e.u.stop(),Kw(e.g.X)),r.g(e.g.X.Sb(n),0)):t?r.g(e.g.X.Sb(1/0),5):(e.g.X.Sb(4294967296),r.A(0))):(e.u&&(e.u.Va(),e.M.oa(e.g.video,"timeupdate",function(){e.u.Va().Ka(.5)})),r.A(0))})};function DV(e,t){var n,r,i,o,u,l,h,p,m,b,w,T;return P(function(k){switch(k.h){case 1:if(Zt(e.l),n=Ln,t.Ma||t.pb==null||t.Nb)return k.return();if(t.pb=null,!t.Mb){k.A(2);break}return k.g(hx(e,t,t.ae,t.rd),3);case 3:return k.return();case 2:if(MV(e,t),t.stream.segmentIndex){k.A(4);break}return r=t.stream,i=t.stream.codecs,o=t.stream.mimeType,k.m(5),k.g(t.stream.createSegmentIndex(),7);case 7:k.o(6);break;case 5:return u=k.l(),k.g(px(e,t,u),8);case 8:return k.return();case 6:if(t.type!==n.Xa||i==t.stream.codecs&&o==t.stream.mimeType||(l=tr(t.stream.mimeType,t.stream.codecs),ip(e.g.X,l,t.stream.external)),r!=t.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),t.Ma||t.pb||yr(e,t,0),k.return();case 4:if(!t.Lc){k.A(9);break}if(t.Lc.stream.segmentIndex){k.A(9);break}return k.m(11),k.g(t.Lc.stream.createSegmentIndex(),13);case 13:k.o(9);break;case 11:k.l();case 9:k.m(14),h=LV(e,t),h!=null&&(yr(e,t,h),t.Ed=!1),k.o(15);break;case 14:return p=k.l(),k.g(px(e,t,p),16);case 16:return k.return();case 15:if(t.type===n.Xa)return k.return();if(m=[],t.stream&&!t.stream.isAudioMuxedInVideo&&m.push(t),b=t.type===n.aa?n.Ba:n.aa,(w=e.h.get(b))&&w.stream&&!w.stream.isAudioMuxedInVideo&&m.push(w),!e.J||!m.every(function(S){return S.endOfStream})){k.A(0);break}return k.g(e.g.X.endOfStream(),18);case 18:Zt(e.l),T=e.g.X.getDuration(),T!=0&&T<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.Sb(T),k.j()}})}function LV(e,t){if(v0(t))return YB(e.g.X,t.stream.originalId||""),null;if(t.type==mt&&JB(e.g.X),t.stream.isAudioMuxedInVideo&&t.type=="audio")return null;if(t.type!=mt&&a0(e.g.X))return pp(e,!0),null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.eb()));if(!s4(e.g.X)&&t.type!=mt)return n/2;var r=e.g.Zb(),i=e.g.eb()<0;if(t.type==="audio")for(var o=x(e.m.keys()),u=o.next();!u.done;u=o.next())u=e.m.get(u.value),u.Za(r,!0),cp(u,r);o=dx(e,t,r);var l=i?KB(e.g.X,t.type,r):GB(e.g.X,t.type,r);u=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.B);var h=e.j.presentationTimeline.ya()?1/0:e.j.presentationTimeline.getDuration()-o,p=Su(e.g.X,t.type);if(!i&&h<1e-6&&p)return t.endOfStream=!0,t.type=="video"&&((n=e.h.get(mt))&&v0(n)&&(n.endOfStream=!0),(n=e.h.get("audio"))&&n.stream.isAudioMuxedInVideo&&(n.endOfStream=!0)),null;if(t.endOfStream=!1,i){var m=e.j.presentationTimeline.Kb();if(p!=null&&o<=m+1e-6)return null}if(l>0&&e.i.stopFetchingOnPause&&e.g.video.paused||l>=u)return n/2;if(l=!t.va,p=g0(e,t,r,p),!p)return!e.j.presentationTimeline.ya()&&h<1e-6?(t.endOfStream=!0,t.type=="video"&&(n=e.h.get(mt))&&v0(n)&&(n.endOfStream=!0),null):(e=1/0,(t=t.Sa)&&(e=t.endTime-t.startTime),Math.min(e/2,n));h=t.rb,m=p.ia,h&&m&&tp(m,h)&&(h.g=m.g),h=!1,l&&t.Fg&&(h=!0,t.Fg=!1),l=1/0,m=-1/0;for(var b=x(e.h.values()),w=b.next();!w.done;w=b.next())w=w.value,v0(w)||w.stream.isAudioMuxedInVideo||w.va&&!w.va.current()||(w=dx(e,w,r),l=Math.min(l,w),m=Math.max(m,w));return(i?m-o:o-l)>=e.j.presentationTimeline.i?n:(t.ka&&t.va&&!e.m.has(t.stream)&&(t.ka.Za(p.startTime+.001),cp(t.ka,p.startTime).catch(function(){})),gp(e)&&UV(e,t,p)||(RV(e,t,r,p,h).catch(function(){}),t.Lc&&X4(e,t.Lc,r,u)),null)}function dx(e,t,n){return t.Sa?e.g.eb()<0?t.Sa.startTime:t.Sa.endTime:n}function g0(e,t,n,r){if(t.va){var i=t.va.current();return i&&t.Sa&&(n=t.Sa.endTime,Tu(t.Sa.startTime,i.startTime,.002)&&Tu(n,i.endTime,.002)&&(i=t.va.next().value)),i}if(t.Sa||r)return(i=e.g.eb()<0)?(e=o0(e.g.X,t.type),n=t.Sa?t.Sa.startTime:null,n!=null&&(e==null||n<e)&&(e=n),n=e!=null?e-.001:r):n=t.Sa?t.Sa.endTime:r,t.stream.segmentIndex&&(t.va=t.stream.segmentIndex.Yb(n,!1,i)),t.va&&t.va.next().value;r=e.j.sequenceMode||gp(e)||e.j.type==="MSF"?0:e.i.inaccurateManifestTolerance;var o=Math.max(n-r,0),u=e.g.X.getDuration();for(Math.abs(o-u)<1&&(r=1,o=Math.max(n-r,0)),u=e.g.eb()<0,e=null,r&&(t.stream.segmentIndex&&(t.va=t.stream.segmentIndex.Yb(o,!1,u)),e=t.va&&t.va.next().value),e||(t.stream.segmentIndex&&(t.va=t.stream.segmentIndex.Yb(n,!1,u)),e=t.va&&t.va.next().value);((i=e)==null?void 0:i.tc())===2;)r=n=void 0,e=(r=(n=t.va)==null?void 0:n.next().value)!=null?r:null;return e}function RV(e,t,n,r,i){var o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V;return P(function(q){switch(q.h){case 1:if(o=Ln,u=t.stream,l=t.va,t.Ma=!0,q.m(2),r.tc()==2)throw new B(1,1,1011);return q.g(OV(e,t,r,i),4);case 4:return Zt(e.l),e.D?q.return():(h=u.mimeType=="video/mp4"||u.mimeType=="audio/mp4",p=d.ReadableStream,m=e.i.lowLatencyMode&&e.j.isLowLatency,b={ed:null},m&&p&&h&&(e.j.type!="HLS"||r.o)?(k=new Uint8Array(0),A=S=!1,_=function(G){var z,J,ie,le;return P(function(be){switch(be.h){case 1:if(S||(A=!0,Zt(e.l),e.D))return be.return();if(be.m(2),k=Dn(k,G),z=!1,J=0,new Tt().box("mdat",function(ce){J=ce.size+ce.start,z=!0}).parse(k,!1,!0),!z){be.A(4);break}return ie=k.subarray(0,J),k=k.subarray(J),be.g(fx(e,t,n,u,r,ie,!0,i),5);case 5:le=be.i,b.ed==null&&(b=le),t.ka&&t.va&&cp(t.ka,r.startTime,!0);case 4:be.o(0);break;case 2:M=be.l(),be.j()}})},q.g(hp(e,t,r,_),9)):(w=hp(e,t,r),q.g(w,7)));case 7:return T=q.i,Zt(e.l),e.D?q.return():(Zt(e.l),t.Mb?(t.Ma=!1,yr(e,t,0),q.return()):q.g(fx(e,t,n,u,r,T,!1,i),8));case 8:b=q.i,q.A(6);break;case 9:if(R=q.i,M)throw M;if(A){q.A(10);break}return S=!0,Zt(e.l),e.D?q.return():t.Mb?(t.Ma=!1,yr(e,t,0),q.return()):q.g(fx(e,t,n,u,r,R,!1,i),11);case 11:b=q.i;case 10:t.ka&&t.va&&cp(t.ka,r.startTime,!0);case 6:if(Zt(e.l),e.D)return q.return();t.Sa=r,l.next(),t.Ma=!1,t.Uh=!1,U=e.g.X.Nc(),N=U[t.type],JSON.stringify(N),t.Mb||(j=null,t.type===o.Ba?j=e.h.get(o.aa):t.type===o.aa&&(j=e.h.get(o.Ba)),j&&j.type==o.aa?e.g.Nd(r,t.stream,j.stream.isAudioMuxedInVideo,!1,b.ed):e.g.Nd(r,t.stream,t.stream.codecs.includes(","),!1,b.ed)),So(t),yr(e,t,0),q.o(0);break;case 2:if(V=q.l(),Zt(e.l,V),e.D)return q.return();if(t.Ma=!1,V.code==7001)t.Ma=!1,So(t),yr(e,t,0),q.A(0);else if(t.type==o.Xa&&e.i.ignoreTextStreamFailures)e.h.delete(o.Xa),q.A(0);else return V.code==3017?q.g(NV(e,t,V),0):(t.Ed=!0,V.category==1&&t.ka&&dp(t.ka,r),V.severity=2,q.g(px(e,t,V),0))}})}function X4(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A;return P(function(M){switch(M.h){case 1:for(i=Ln,o=t.stream,h=(l=(u=o.segmentIndex)&&u.Yb(n))&&l.next().value;h&&e.O.includes(h.startTime);)h=l&&l.next().value;if(!h){M.A(0);break}if(p=h.ia,!p||tp(p,t.rb)){M.A(3);break}return t.rb=p,M.m(4),M.g(hp(e,t,p),6);case 6:if(m=M.i,!e.g)return M.return();var _=e.g.X;_.H&&X2(_.H,m,0,o),e.O=[],M.o(3);break;case 4:throw b=M.l(),t.rb=null,b;case 3:if(t.Sa&&t.Sa==h){M.A(0);break}return t.Sa=h,M.m(8),M.g(hp(e,t,h),10);case 10:if(w=M.i,!e.g)return M.return();_=e.g.X,_.H&&X2(_.H,w,0,o),e.O.push(h.startTime),M.o(9);break;case 8:throw T=M.l(),t.Sa=null,T;case 9:if(!e.g)return M.return();if(t.Mb||(k=null,t.type===i.Ba?k=e.h.get(i.aa):t.type===i.aa&&(k=e.h.get(i.Ba)),k&&k.type==i.aa?e.g.Nd(h,t.stream,k.stream.isAudioMuxedInVideo,!0,null):e.g.Nd(h,t.stream,t.stream.codecs.includes(","),!0,null)),S=Math.max.apply(Math,[0].concat(se(e.O))),A=e.g.Zb(),A+r>S)return M.g(X4(e,t,h.startTime,r),0);M.A(0)}})}function NV(e,t,n){var r,i,o,u,l,h,p,m,b,w;return P(function(T){switch(T.h){case 1:for(r=!1,i=x(e.h.values()),o=i.next();!o.done;o=i.next())if(u=o.value,u!=t&&u.Uh){r=!0;break}if(r){T.A(2);break}if(e.i.avoidEvictionOnQuotaExceededError)return l=gx(e,n),e.g.disableStream(t.stream,l)||yr(e,t,4),T.return();if(h=Math.round(100*e.B),h>20){e.B-=.2,T.A(3);break}if(h>4){e.B-=.04,T.A(3);break}if(p=gx(e,n),m=e.g.disableStream(t.stream,p),!m){t.Ed=!0,e.D=!0,e.g.onError(n),T.A(5);break}return e.B=1,b=e.g.Zb(),T.g(m0(e,t,b),5);case 5:return T.return();case 3:return t.Uh=!0,w=e.g.Zb(),T.g(m0(e,t,w),2);case 2:yr(e,t,4),T.j()}})}function OV(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:if(i=Ln,o=t.Sa==null,u=[],l=Math.max(0,Math.max(n.appendWindowStart,e.ha)-.1),h=Math.min(n.appendWindowEnd,e.ba)+.1,e.i.clampAppendWindowToDuration&&(p=e.j.presentationTimeline.getDuration(),p<1/0&&(h=Math.min(h,p))),m=n.codecs||t.stream.codecs,b=yu(m),w=ki(n.mimeType||t.stream.mimeType),T=n.timestampOffset,T==t.Nf&&l==t.vc&&h==t.uc&&b==t.Lf&&w==t.Mf){N.A(2);break}if(k=t.Lf&&t.Mf&&iV(e.g.X,t.type,w,m,w0(e)),!k){N.A(3);break}if(S=null,t.type===i.Ba?S=e.h.get(i.aa):t.type===i.aa&&(S=e.h.get(i.Ba)),!S){N.A(3);break}return N.g(b0(S).catch(function(){}),5);case 5:S.rb=null,S.vc=null,S.uc=null,lx(e,S);case 3:return N.g(Y4(e,t,T,l,h,n,b,w),2);case 2:return tp(n.ia,t.rb)||(t.rb=n.ia,n.l&&n.ia&&(A=hp(e,t,n.ia),M=function(){var j,V,q,G,z,J,ie,le,be,ce,ae;return P(function(de){switch(de.h){case 1:return de.m(2),de.g(A,4);case 4:return j=de.i,Zt(e.l),V=null,q=new Map,G={projection:null,hfov:null},t.stream&&(z=t.stream.videoLayout)&&(J=z.split("/"),J.includes("PROJ-RECT")?G.projection="rect":J.includes("PROJ-EQUI")?G.projection="equi":J.includes("PROJ-HEQU")?G.projection="hequ":J.includes("PROJ-PRIM")?G.projection="prim":J.includes("PROJ-AIV")&&(G.projection="aiv")),ie=new Tt,ie.ua(["moov","trak","mdia"],qt).T("mdhd",function(re){V=Xv(re.reader,re.version).timescale}).T("hdlr",function(re){switch(re=re.reader,re.skip(4),re=re.Ja(4,!1),String.fromCharCode(re[0],re[1],re[2],re[3])){case"soun":q.set(i.aa,V);break;case"vide":q.set(i.Ba,V)}V=null}),t.type!==i.Ba||G.projection||ie.ua(["minf","stbl"],qt).T("stsd",Ua).ua([].concat(se(Aw),["encv"]),Pl).ua(["vexu","proj"],qt).T("prji",function(re){re=re.reader.Rd(),G.projection=re}).box("hfov",function(re){re=re.reader.S()/1e3,G.hfov=re}),ie.parse(j,!0,!0),t.type===i.Ba&&jV(e,G),q.has(t.type)?n.ia.timescale=q.get(t.type):V!=null&&(n.ia.timescale=V),le=t.stream.segmentIndex,le instanceof bn&&(be=cV(le,n.startTime)),ce=t.stream.closedCaptions&&t.stream.closedCaptions.size>0,de.g(e.g.Pi(t.type,j),5);case 5:return de.g(s0(e.g.X,t.type,j,null,t.stream,ce,t.kd,r,!1,!1,be),6);case 6:de.o(0);break;case 2:throw ae=de.l(),t.rb=null,ae}})},_=n.startTime,o&&(R=Su(e.g.X,t.type),R!=null&&(_=R)),e.g.dm(_,n.ia),u.push(M()))),U=t.Sa?t.Sa.i:-1,n.i!=U&&u.push(c4(e.g.X,t.type,n.startTime)),N.g(Promise.all(u),0)}})}function Y4(e,t,n,r,i,o,u,l){var h,p,m,b,w;return P(function(T){switch(T.h){case 1:if(h=Ln,p=w0(e),T.m(2),t.vc=r,t.uc=i,u&&(t.Lf=u),l&&(t.Mf=l),t.Nf=n,m=e.j.sequenceMode||e.j.type=="HLS",b=null,t.type===h.Ba?b=e.h.get(h.aa):t.type===h.aa&&(b=e.h.get(h.Ba)),!(b&&b.stream&&b.stream.isAudioMuxedInVideo)){T.A(4);break}return T.g(l4(e.g.X,b.type,n,r,i,m,b.stream.mimeType,b.stream.codecs,p),4);case 4:return T.g(l4(e.g.X,t.type,n,r,i,m,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,p),6);case 6:T.o(0);break;case 2:throw w=T.l(),t.vc=null,t.uc=null,t.Lf=null,t.Mf=null,t.Nf=null,w}})}function fx(e,t,n,r,i,o,u,l){u=u===void 0?!1:u,l=l===void 0?!1:l;var h,p,m,b,w;return P(function(T){switch(T.h){case 1:return h=r.closedCaptions&&r.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(p=r.mimeType=="video/mp4"||r.mimeType=="audio/mp4",m=null,i.ia&&(m=i.ia.timescale),p&&m&&r.type==="video"&&e.j.type=="DASH"&&new Tt().ua(Dl,qt).T("tfdt",function(k){var S,A,M,_,R,U;return P(function(N){return S=Wv(k.reader,k.version),A=S.Oa,A?(M=-A/m,_=Number(t.Nf)||0,_<M?(R=t.vc,U=t.uc,N.g(Y4(e,t,M,R,U,i),0)):N.A(0)):N.return()})}).parse(o,!1,u)),T.g(m0(e,t,n),2);case 2:return Zt(e.l),b=t.kd,t.kd=!1,T.g(e.g.Pi(t.type,o),3);case 3:return T.g(s0(e.g.X,t.type,o,i,r,h,b,l,u),4);case 4:return w=T.i,Zt(e.l),T.return(w)}})}function m0(e,t,n){var r,i,o,u,l,h,p,m,b,w;return P(function(T){if(T.h==1)return e.F==t&&(e.F=null),r=t.stream.segmentIndex,r instanceof bn&&(r.Za(e.j.presentationTimeline.Fb()),i=[],lV(r,function(k){i.push(k.pf())})),o=Math.max(e.i.bufferBehind*e.B,e.j.presentationTimeline.i),u=o0(e.g.X,t.type),u==null?T.return():(l=n-u,h=e.i.evictionGoal,p=e.j.presentationTimeline.Kb(),m=e.j.presentationTimeline.Eb(),b=m-p,w=l-o,b>h&&(w=Math.max(l-o,p-h-u)),w<=h?T.return():T.g(e.g.X.remove(t.type,u,u+w,i),2));if(T.h!=4)return Zt(e.l),e.F?T.g(m0(e,e.F,n),4):T.A(0);Zt(e.l),T.j()})}function v0(e){return e&&e.type==mt&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function hp(e,t,n,r){var i,o,u,l,h;return P(function(p){switch(p.h){case 1:if(i=n.$b())return p.return(i);if(o=null,t.ka){var m=t.ka,b=m.g;n instanceof Ci&&(b=m.j),b.has(n)?(m=b.get(n),r&&(m.oi=r),o=m.Ee):o=null}return o||(o=y0(n,t.stream,r||null,e.i.retryParameters,e.g.xc)),u=0,t.va&&(u=t.va.h),t.ab=o,p.g(o.promise,2);case 2:if(l=p.i,t.ab=null,h=l.data,!n.aesKey){p.A(3);break}return p.g(sx(h,n.aesKey,u),4);case 4:h=p.i;case 3:return p.return(h)}})}function y0(e,t,n,r,i,o){o=o===void 0?!1:o;var u=e instanceof nt?e:void 0,l=u?1:0;return e=fp(e.U(),e.startByte,e.endByte,r,n),e.contentType=t.type,i.request(ua,e,{type:l,stream:t,segment:u,isPreload:o})}function hx(e,t,n,r){var i,o;return P(function(u){if(u.h==1)return t.Mb=!1,t.ae=!1,t.rd=0,t.Nb=!0,t.Sa=null,t.va=null,t.ka&&!e.m.has(t.stream)&&Ba(t.ka),r?(i=e.g.Zb(),o=e.g.X.getDuration(),u.g(e.g.X.remove(t.type,i+r,o),3)):u.g(u4(e.g.X,t.type),4);if(u.h!=3)return Zt(e.l),n?u.g(e.g.X.flush(t.type),3):u.A(3);Zt(e.l),t.Nb=!1,t.endOfStream=!1,t.Ma||t.pb||yr(e,t,0),u.j()})}function yr(e,t,n){var r=t.type;(r!=mt||e.h.has(r))&&(t.pb=new ft(function(){var i;return P(function(o){if(o.h==1)return o.m(2),o.g(DV(e,t),4);if(o.h!=2)return o.o(0);i=o.l(),e.g&&e.g.onError(i),o.j()})}).$(n))}function So(e){e.pb!=null&&(e.pb.stop(),e.pb=null)}function b0(e){return P(function(t){return e.ab?t.g(e.ab.abort(),0):t.A(0)})}function px(e,t,n){var r,i,o,u,l,h,p,m,b;return P(function(w){switch(w.h){case 1:return n.code==3024?(t.Ma=!1,So(t),yr(e,t,0),w.return()):w.g(e.Y.attempt(),2);case 2:if(Zt(e.l),n.code!=3015&&n.code!=3014&&(n.category!==1||n.code==1003)){w.A(3);break}if(t.Uc)return G4(e,!1),w.return();if(n.code!=3015&&n.code!=3014){w.A(4);break}return r=n,w.g(pp(e,!0),5);case 5:for(r.handled=w.i,i=x(e.h.values()),o=i.next();!o.done;o=i.next())u=o.value,So(u);Zt(e.l);case 4:l=gx(e,n),n.handled=e.g.disableStream(t.stream,l)||n.handled,n.handled&&(n.severity=1);case 3:if(n.handled||n.code!=1011){w.A(6);break}for(h=e.g.Zb(),p=Su(e.g.X,t.type),m=g0(e,t,h,p);((b=m)==null?void 0:b.tc())===2;)t.Sa=m,m=g0(e,t,h,p);if(!m){w.A(6);break}return w.g(c4(e.g.X,t.type,m.startTime),8);case 8:return t.Ma=!1,t.Ed=!1,So(t),yr(e,t,0),w.return();case 6:(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.i.failureCallback(n),w.j()}})}function gx(e,t){return e.i.maxDisabledTime===0&&t.code==1011?1:t.code==3014||t.code==3015?1/0:e.i.maxDisabledTime}function pp(e,t){t=t===void 0?!1:t;var n,r,i,o,u,l;return P(function(h){return h.h==1?(n=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t&&(!e.i.allowMediaSourceRecoveries||n-e.R<r)?h.return(!1):(e.R=n,i=Ln,(o=e.h.get(i.aa))&&(So(o),o.ab&&(o.ab.abort(),o.ab=null),o.rb=null,o.vc=null,o.uc=null,o.Ma=!1,o.Mb=!1,o.rd=0,o.ae=!1,o.Nb=!1,o.va&&o.va.ai()),(u=e.h.get(i.Ba))&&(So(u),u.ab&&(u.ab.abort(),u.ab=null),u.rb=null,u.vc=null,u.uc=null,u.Ma=!1,u.Mb=!1,u.rd=0,u.ae=!1,u.Nb=!1,u.va&&u.va.ai()),l=e.g.video.paused,h.g(p4(e.g.X,w0(e)),2))):(!u||u.Nb||u.Ma||u.pb||yr(e,u,0),!o||o.Nb||o.Ma||o.pb||yr(e,o,0),l||e.g.video.play(),h.return(!0))})}function jV(e,t){if(e.V.projection!=t.projection||e.V.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new Ge("spatialvideoinfo",n)}else n=new Ge("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.V=t}}function gp(e){if(e.i.crossBoundaryStrategy!=="keep")return!0;var t=Qe(),n=e.g.se();if(t.ub(n)){if(!t.kg()){for(t=x(e.h.keys()),n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==Ln.Xa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1){for(e=new Set,t=x(n.fullMimeTypes),n=t.next();!n.done;n=t.next())e.add(cd(n.value));return e.size>1}}}else for(t=x(e.h.keys()),n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==Ln.Xa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1)return!0;return!1}function J4(e){e.K.Ea(),gp(e)&&e.K.Hb(e.g.video,["waiting","timeupdate"],function(){Q4(e)})}function Q4(e){if(gp(e)){e.L.stop();var t=e.g.Zb(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.rb)&&n.g!==null&&(t=n.g-t,t<0||t>1||(e.H=n.g+.1,e.L.$(t)))}}function UV(e,t,n){if(t.type===mt)return!1;var r=t.rb;if(!r)return!1;var i=n.ia;if(n=r.g!==i.g,e.i.crossBoundaryStrategy==="reset_to_encrypted"&&(r.encrypted||i.encrypted||(n=!1),r.encrypted&&(e.i.crossBoundaryStrategy="keep")),e.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&r.encrypted==i.encrypted&&(n=!1),e.i.crossBoundaryStrategy==="keep"&&r.mimeType&&i.mimeType){var o=Ar(Qr(r.mimeType)),u=Ar(Qr(i.mimeType));r.mimeType==i.mimeType&&o==u&&(n=!1)}return(e.h.get("video")||e.h.get("audio"))===t&&n&&(e.I||t.kd)&&(e.I=!1,pp(e,!0).then(function(){var l=new Map().set("oldEncrypted",r.encrypted).set("newEncrypted",i.encrypted);e.g.onEvent(new Ge("boundarycrossed",l))})),n}function w0(e,t){function n(o){if(o.fullMimeTypes&&o.fullMimeTypes.size>1&&e.h.has(o.type)){var u=e.h.get(o.type),l=Su(e.g.X,u.type),h=e.g.Zb();(u=g0(e,u,h,l))&&u.codecs&&u.mimeType&&(o.codecs=u.codecs,o.mimeType=u.mimeType)}}t=t===void 0?!1:t;var r=new Map,i=e.o.audio;return i&&(n(i),r.set("audio",i)),(i=e.o.video)&&(n(i),r.set("video",i)),t&&e.C&&r.set(mt,e.C),r}function x0(){}function mx(e,t,n,r,i){for(var o=(i in r),u=new Set(["__proto__","constructor","prototype"]),l=o?n.constructor==Object&&Object.keys(r).length==0:n.constructor==Object&&Object.keys(n).length==0,h=o||l,p=!0,m=x(Object.keys(t)),b=m.next();!b.done;b=m.next()){b=b.value;var w=i+"."+b,T=o?r[i]:n[b];u.has(b)?(Xt("Invalid config, dangerous key "+w),p=!1):h||b in n?t[b]===void 0?T===void 0||h?delete e[b]:e[b]=Hi(T):l?e[b]=t[b]:T.constructor==Object&&t[b]&&t[b].constructor==Object?(e[b]||(e[b]=Hi(T)),b=mx(e[b],t[b],T,r,w),p=p&&b):typeof t[b]!=typeof T||t[b]==null||typeof t[b]!="function"&&t[b].constructor!=T.constructor?(Xt("Invalid config, wrong type for "+w),p=!1):typeof n[b]=="function"&&n[b].length!=t[b].length?(ut("Unexpected number of arguments for "+w),e[b]=t[b]):e[b]=Array.isArray(e[b])?t[b].slice():t[b]:(Xt("Invalid config, unrecognized key "+w),p=!1)}return p}function k0(e,t){for(var n={},r=n,i=0,o=0;i=e.indexOf(".",i),!(i<0);)(i==0||e[i-1]!="\\")&&(o=e.substring(o,i).replace(/\\\./g,"."),r[o]={},r=r[o],o=i+1),i+=1;return r[e.substring(o).replace(/\\\./g,".")]=t,n}function Hl(e,t){return e&&t}function Z4(e,t){function n(o){for(var u=x(Object.keys(o)),l=u.next();!l.done;l=u.next())l=l.value,o[l]instanceof HTMLElement||(i(o[l])&&Object.keys(o[l]).length===0||typeof o[l]=="function"?delete o[l]:i(o[l])&&(n(o[l]),Object.keys(o[l]).length===0&&delete o[l]))}function r(o,u){return Object.keys(o).reduce(function(l,h){var p=o[h];return u.hasOwnProperty(h)?p instanceof HTMLElement&&u[h]instanceof HTMLElement?p.isEqualNode(u[h])||(l[h]=p):i(p)&&i(u[h])?(p=r(p,u[h]),(Object.keys(p).length>0||!i(p))&&(l[h]=p)):Array.isArray(p)&&Array.isArray(u[h])?xe(p,u[h])||(l[h]=p):Number.isNaN(p)&&Number.isNaN(u[h])||p!==u[h]&&(l[h]=p):l[h]=p,l},{})}function i(o){return o&&typeof o=="object"&&!Array.isArray(o)}return e=r(e,t),n(e),e}Te("shaka.util.ConfigUtils",x0),x0.getDifferenceFromConfigObjects=Z4,x0.convertToConfigObject=k0,x0.mergeConfigObjects=mx,Te("shaka.config.MsfFilterType",{NONE:0,NEXT_GROUP_START:1,LARGEST_OBJECT:2,ABSOLUTE_START:3,ABSOLUTE_RANGE:4}),Te("shaka.config.MsfVersion",{AUTO:"auto",DRAFT_14:"draft-14",DRAFT_16:"draft-16"}),Te("shaka.config.PositionArea",{DEFAULT:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,CENTER_LEFT:4,CENTER:5,CENTER_RIGHT:6,BOTTOM_LEFT:7,BOTTOM_CENTER:8,BOTTOM_RIGHT:9}),Te("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function ti(){}function eM(e){return e=kt(e),Xh(e)}function mp(e,t,n){function r(l){_e(o).setUint32(u,l.byteLength,!0),u+=4,o.set(H(l),u),u+=l.byteLength}if(!n||!n.byteLength)throw new B(2,6,6015);var i;typeof t=="string"?i=aa(t,!0):i=t,e=kt(e),e=aa(e,!0);var o=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),u=0;return r(e),r(i),r(n),o}function vx(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=kt(e).split("skd://").pop(),mp(e,n,t))}function T0(e,t){e!==2||t.attempt>0||(e=t.drmInfo)&&wl(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Te("shaka.drm.FairPlay",ti),ti.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&wl(e.keySystem)){try{var n=dt(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch{}e&&(t.data=Vn(wi(n)))}},ti.gumletFairPlayRequest=function(e,t){e!==2||t.attempt>0||(e=t.drmInfo)&&wl(e.keySystem)&&t.body&&(e=H(t.body),e=Ra(e),t.body=Sr(JSON.stringify({Zn:e})),t.headers["Content-Type"]="application/json")},ti.muxFairPlayRequest=function(e,t){T0(e,t)},ti.expressplayFairPlayRequest=function(e,t){T0(e,t)},ti.conaxFairPlayRequest=function(e,t){T0(e,t)},ti.ezdrmFairPlayRequest=function(e,t){T0(e,t)},ti.verimatrixFairPlayRequest=function(e,t){e!==2||t.attempt>0||(e=t.drmInfo)&&wl(e.keySystem)&&(e=H(t.body),e=Ra(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Sr("spc="+e))},ti.muxInitDataTransform=function(e,t,n){return vx(e,t,n)},ti.expressplayInitDataTransform=function(e,t,n){return vx(e,t,n)},ti.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=kt(e).split("skd://").pop().split("?").shift(),n=d.atob(n);var r=new ArrayBuffer(n.length*2);r=Pe(r);for(var i=0,o=n.length;i<o;i++)r[i]=n.charCodeAt(i);return mp(e,r,t)},ti.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=kt(e).split(";").pop(),mp(e,n,t))},ti.verimatrixInitDataTransform=function(e,t,n){return vx(e,t,n)},ti.initDataTransform=mp,ti.defaultGetContentId=eM,ti.isFairPlaySupported=function(){var e;return P(function(t){return t.h==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.h!=2?t.return(!0):(t.l(),t.return(!1))})};function S0(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=x(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}S0.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var r;if(!(r=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(r=n.audio&&e.audio)){r=n.audio;var i=e.audio;r=!(!((!r.channelsCount||!i.channelsCount||r.channelsCount>2||i.channelsCount>2)&&r.channelsCount!=i.channelsCount||r.spatialAudio!==i.spatialAudio||t&&!tM(r,i))&&Fe(r.roles,i.roles)&&r.groupId===i.groupId)}return!r&&(r=n.video&&e.video)&&(n=n.video,r=e.video,r=!((!t||tM(n,r))&&Fe(n.roles,r.roles))),r?!1:(this.g.add(e),!0)},S0.prototype.values=function(){return this.g.values()};function tM(e,t){return e.mimeType!=t.mimeType?!1:(e=e.codecs.split(",").map(function(n){return yu(n)}),t=t.codecs.split(",").map(function(n){return yu(n)}),Fe(e,t))}Te("shaka.media.AdaptationSet",S0);function vp(){this.h=this.g=null}vp.prototype.configure=function(e){this.g=e},vp.prototype.getConfiguration=function(){return this.g},vp.prototype.create=function(e){e=FV(e,this.g.preferredAudio,this.g.audioCodec,this.g.activeAudioCodec);e:for(var t=x(this.g.preferredVideo),n=t.next();!n.done;n=t.next()){n=n.value;var r=e;if(!(n.role&&(r=$V(r,n.role),!r.length))&&!(n.language&&(r=zV(r,n.language),!r.length))&&!(n.label&&(r=qV(r,n.label),!r.length))&&!(n.hdrLevel&&(r=KV(r,n.hdrLevel),!r.length))&&!(n.layout&&(r=WV(r,n.layout),!r.length))){if(n.codec)if(n=YV(r,n.codec),n.length)r=n;else continue;if(r.length){e=r;break e}}}return t=Qe(),n=this.g.keySystem,t=this.g.codecSwitchingStrategy=="smooth"&&t.ub(n),this.h=new S0(e[0],e,!t)},vp.prototype.getLastAdaptationSet=function(){return this.h};function FV(e,t,n,r){t=x(t);for(var i=t.next(),o={};!i.done;o={sd:void 0},i=t.next()){i=i.value;var u=e;if(!(i.language&&(u=BV(u,i.language),!u.length))&&!(i.role&&(u=VV(u,i.role),!u.length))&&!(i.label&&(u=HV(u,i.label),!u.length))&&!(i.channelCount&&(u=GV(u,i.channelCount),!u.length))){o.sd=[],i.codec&&o.sd.push(i.codec),n&&o.sd.push(n),r&&o.sd.push(r);var l=o.sd.filter((function(m){return function(b,w){return m.sd.indexOf(b)===w}})(o));if(l.length){o=!1,l=x(l);for(var h=l.next();!h.done;h=l.next())if(h=nM(u,h.value),h.length){u=h,o=!0;break}if(!o&&i.codec)continue}if(i.spatialAudio!==void 0)if(i=XV(u,i.spatialAudio),i.length)u=i;else continue;if(u.length)return u}}var p=[];if(n&&p.push(n),r&&p.push(r),n=p.filter(function(m,b){return p.indexOf(m)===b}),n.length){for(n=x(n),r=n.next();!r.done;r=n.next())if(r=nM(e,r.value),r.length){e=r;break}}return n=e.filter(function(m){return m.primary}),n.length?n:e}function BV(e,t){t=Ft(t);var n=Av(t,e.map(function(r){return K2(r)}));return n?e.filter(function(r){return n==K2(r)}):[]}function VV(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function $V(e,t){return e.filter(function(n){return n.video?t?n.video.roles.includes(t):n.video.roles.length==0:!1})}function zV(e,t){var n=Ft(t);return e.filter(function(r){return r.video&&r.video.language?Ft(r.video.language)==n:!1})}function HV(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function qV(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function GV(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,r){return n.audio||r.audio?n.audio?r.audio?(r.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function KV(e,t){if(t=="AUTO"){var n=e.some(function(r){return!!(r.video&&r.video.hdr&&r.video.hdr=="HLG")});t=Qe().Pc(n)}return e.filter(function(r){return!(r.video&&r.video.hdr&&r.video.hdr!=t)})}function WV(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function XV(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function nM(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function YV(e,t){return e.filter(function(n){return!(n.video&&n.video.codecs!=t)})}function C0(){}function Ld(){var e=1/0,t=Qe();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:ei(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(u,l,h){return d.shakaMediaKeysPolyfill==="apple"&&l=="skd"&&(l=h.serverCertificate,h=eM(u),u=mp(u,h,l)),u},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE",renewalIntervalSec:0,failureCallback:function(u){return Hl([u])}},r="reload";t.ub("")&&(r="smooth");var i={trackSelectionCallback:function(u){return P(function(l){return l.return(u)})},downloadSizeCallback:function(u){var l;return P(function(h){return h.h==1?navigator.storage&&navigator.storage.estimate?h.g(navigator.storage.estimate(),3):h.return(!0):(l=h.i,h.return(l.usage+u<l.quota*.95))})},progressCallback:function(u,l){return Hl([u,l])},usePersistentLicense:!0,numberOfParallelDownloads:5},o={drm:n,manifest:{retryParameters:ei(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,disableChapters:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:t5(!1,!0),manifestPreprocessorTXml:iM,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:!1,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1,chaptersUri:""},msf:{fingerprintUri:"",namespaces:[],authorizationToken:"",subscribeFilterType:2,useFetchCatalog:!1,version:"auto",catalogPreprocessor:QV}},streaming:{retryParameters:ei(),failureCallback:function(u){return Hl([u])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1,stopFetchingOnPause:!1,clampAppendWindowToDuration:!1,processSrcEqualMetadata:!0},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,commonAccessTokenHeaderName:"cta-common-access-token"},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(u){return Hl([u],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(u,l,h){return Hl([u,l,h])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0,transmuxWorkerUrl:"",repairIFrames:!0},offline:i,abrFactory:function(){return new vn},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(vp,[null].concat(se(oe.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5,droppedFramesThreshold:.15,droppedFramesInterval:2,droppedFramesBanDuration:30},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,droppedFrames:!0},preferredAudio:[{language:"",role:"",label:"",channelCount:2,codec:""}],preferredText:[],preferredVideo:[{label:"",role:"",language:"",codec:"",hdrLevel:"AUTO",layout:""}],preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{fontScaleFactor:1,positionArea:0,subtitleDelay:0,suspendRenderingWhenHidden:!0},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,eventTargets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0,disableTrackingEvents:!1,disableSnapback:!1,interstitialPreloadAheadTime:10,disablePlayedLinearAdSkip:!1,disableTrackingForPlayedLinearAds:!1},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:1/0,preloadPrevItem:!0,repeatMode:0},accessibility:{handleForcedSubtitlesAutomatically:!0,speechToText:{enabled:!1,maxTextLength:140,processLocally:!1,languagesToTranslate:[]}}};return i.trackSelectionCallback=function(u){var l,h;return P(function(p){return l=o.preferredAudio.map(function(m){return m.language}).filter(Boolean),h=o.preferredVideo[0]&&o.preferredVideo[0].hdrLevel||"",p.return(JV(u,l,h))})},t.cb(o)}function rM(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function Us(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return mx(e,t,n||Ld(),r,"")}function ql(e){var t=e.preferredAudio[0],n=e.preferredVideo[0],r;e.language=(r=t?.language)!=null?r:"";var i;e.role=(i=t?.role)!=null?i:"";var o;e.channelCount=(o=t?.channelCount)!=null?o:2;var u;e.spatialAudio=(u=t?.spatialAudio)!=null?u:!1;var l;e.audioLabel=(l=t?.label)!=null?l:"";var h;e.videoRole=(h=n?.role)!=null?h:"";var p;e.hdrLevel=(p=n?.hdrLevel)!=null?p:"";var m;e.videoLayout=(m=n?.layout)!=null?m:"";var b;e.videoLabel=(b=n?.label)!=null?b:"",e.preferredAudioCodecs=e.preferredAudio.map(function(T){return T.codec}).filter(Boolean);var w;e.preferredAudioChannelCount=(w=t?.channelCount)!=null?w:2}function JV(e,t,n){var r=n;r=="AUTO"&&(n=e.some(function(p){return!!(p.hdr&&p.hdr=="HLG")}),r=Qe().Pc(n));var i=e.filter(function(p){return!(p.type!="variant"||p.hdr&&p.hdr!=r)});n=[];var o=i.map(function(p){return p.language}),u=null;t=x(t);for(var l=t.next();!l.done&&!(u=Av(l.value,o));l=t.next());u&&(n=i.filter(function(p){return Ft(p.language)==u})),n.length==0&&(n=i.filter(function(p){return p.primary})),n.length==0&&(i.map(function(p){return p.language}),n=i);var h=n.filter(function(p){return p.height&&p.height<=480});for(h.length&&(h.sort(function(p,m){return m.height-p.height}),n=h.filter(function(p){return p.height==h[0].height})),t=[],n.length&&(i=Math.floor(n.length/2),n.sort(function(p,m){return p.bandwidth-m.bandwidth}),t.push(n[i])),e=x(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=mt&&n.type!="image"&&n.type!="chapter"||t.push(n);return t}function iM(e){return Hl([e],e)}function QV(e){return Hl([e],e)}Te("shaka.util.PlayerConfiguration",C0),C0.mergeConfigObjects=Us,C0.createDefaultForLL=rM,C0.createDefault=Ld;function ZV(){this.g=null,this.h=[]}function yx(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=x(e.h);for(var r=e.next();!r.done;r=e.next())r=r.value,n+=r.state==t?r.duration:0;return n}function e$(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],r=x(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}function t$(){this.i=this.h=null,this.g=[]}function aM(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function A0(){this.D=this.Y=NaN,this.l="",this.i=this.wj=this.B=this.C=this.L=this.F=this.u=this.m=this.K=this.o=this.H=this.h=this.V=this.W=this.O=this.P=this.R=NaN,this.M=0,this.I=this.J=NaN,this.g=new ZV,this.j=new t$}function n$(e,t,n){e.R=t,e.P=n}function oM(e,t,n){e.Y=t,e.D=n}function r$(e,t){e.h=isNaN(e.h)?t:Math.max(e.h,t)}function i$(e,t){t>=0&&(e.u=t)}function a$(e,t){t>=0&&(e.F=t)}function o$(e,t){t>=0&&(e.L=t)}function sM(e,t){e.i=isNaN(e.i)?t:e.i+t}function s$(e){var t=e.Y,n=e.D,r=e.l,i=e.C,o=e.P,u=e.R,l=e.O,h=e.W,p=e.V,m=e.B,b=e.h,w=e.H,T=e.o,k=e.K,S=e.m,A=yx(e.g,"playing"),M=yx(e.g,"paused"),_=yx(e.g,"buffering"),R=e.u,U=e.F,N=e.L,j=e.wj,V=e.i,q=e.M,G=e.J,z=e.I,J=e$(e.g),ie=[];e=x(e.j.g);for(var le=e.next();!le.done;le=e.next())le=le.value,ie.push({timestamp:le.timestamp,id:le.id,type:le.type,fromAdaptation:le.fromAdaptation,bandwidth:le.bandwidth});return{width:t,height:n,currentCodecs:r,streamBandwidth:i,decodedFrames:o,droppedFrames:u,corruptedFrames:l,stallsDetected:h,gapsJumped:p,estimatedBandwidth:m,completionPercent:b,loadLatency:w,timeToFirstFrame:T,manifestTimeSeconds:k,drmTimeSeconds:S,playTime:A,pauseTime:M,bufferingTime:_,licenseTime:R,liveLatency:U,maxSegmentDuration:N,manifestSizeBytes:j,bytesDownloaded:V,nonFatalErrorCount:q,manifestPeriodCount:G,manifestGapCount:z,stateHistory:J,switchHistory:ie}}function ca(e,t,n,r){Bt.call(this),this.O=e,this.V=t,this.za=r.networkingEngine,this.B=n,this.m=null,this.xa=0,this.Fa=r.td,this.I=r.Tl,this.Ha=r.Ul,this.i=r.config,this.o=this.J=this.g=null,this.ma=!1,this.K=r.jm,this.ra=!1,this.j=null,this.ba=!1,this.C=null,this.D=new Map,this.wa=!1,this.Aa=r.im,this.W=new A0,this.ha=Promise.withResolvers(),this.F=Promise.withResolvers(),this.P=null,this.l=!1,this.Y=r.Bk,this.u=this.h=null,this.R=!1,this.M=[],this.L=[],this.H=!0}K(ca,Bt);function Gl(e,t,n){(e=t?e.L:e.M)?e.push(n):n()}function u$(e){if(e.L)for(var t=x(e.L),n=t.next();!n.done;n=t.next())n=n.value,n();e.L=null}function uM(e,t){if(e.P=t,e.R=!0,e.M){t=x(e.M);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.M=null}g=ca.prototype,g.getStartTime=function(){return this.B},g.Af=function(){return this.V},g.$c=function(){return this.O},g.nh=function(){return this.g};function l$(e){return e.ra=!0,e.K}g.getStats=function(){return this.W};function c$(e){return e.ba=!0,e.j}g.xl=function(){return this.h?dd(this.h):null},g.wl=function(){return this.u?Gh(this.u):null};function d$(e){return e.wa=!0,e.D}g.start=function(){var e=this;(function(){var t;return P(function(n){switch(n.h){case 1:return n.g(Promise.resolve(),2);case 2:return n.m(3),n.g(f$(e),5);case 5:if(Cu(e),d.shakaMediaKeysPolyfill==="webkit"){n.A(6);break}return n.g(lM(e),7);case 7:Cu(e);case 6:return n.g(p$(e),8);case 8:if(Cu(e),!e.Y){n.A(9);break}return n.g(g$(e),10);case 10:Cu(e);case 9:if(!e.Y||!e.j){n.A(11);break}return n.g(IF(e.j),12);case 12:Cu(e);case 11:e.F.resolve(),n.o(0);break;case 3:t=n.l(),t instanceof B&&(t.code==7001||t.code==7003)||e.F.reject(t),n.j()}})})()},g.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):Bt.prototype.dispatchEvent.call(this,e)},g.onError=function(e){e.severity===2&&(this.F.reject(e),this.destroy());var t=new Map().set("detail",e);t=new Ge("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Cu(e){if(e.l)throw new B(2,7,7003)}function bx(e,t){e.dispatchEvent(new Ge("onstatechange",new Map().set("state",t)))}function f$(e){var t,n,r,i,o,u;return P(function(l){switch(l.h){case 1:if(bx(e,"manifest-parser"),e.o||(e.J=u5(e.O,e.V),e.o=e.J(),e.o.configure(e.i.manifest,function(){return e.H})),t=Date.now()/1e3,bx(e,"manifest"),e.g){l.A(2);break}return l.g(e.o.start(e.O,e.Ha),3);case 3:return e.g=l.i,fM(e.g),l.g(h$(e),2);case 2:return e.ha.resolve(),n=new Ge("manifestparsed",void 0),l.g(Promise.resolve(),5);case 5:if(e.dispatchEvent(n),e.g.variants.length==0)throw new B(2,4,4036);if(fM(e.g),r=CI(e.I,e.g),!r){l.A(6);break}return i=new Ge("trackschanged",void 0),l.g(Promise.resolve(),7);case 7:Cu(e),e.dispatchEvent(i);case 6:o=Date.now()/1e3,u=o-t,u>=0&&(e.W.K=u),l.j()}})}function lM(e,t){var n,r,i,o,u;return P(function(l){switch(l.h){case 1:return!e.g||e.j?l.return():(bx(e,"drm-engine"),e.xa=Date.now()/1e3,e.j=e.Fa(),e.I.g=e.j,e.j.configure(e.i.drm,function(){return e.H}),n=Wh(e.g.variants),r=!0,e.g&&e.g.presentationTimeline&&(r=e.g.presentationTimeline.ya()),l.g(cI(e.j,n,e.g.offlineSessionIds,r),2));case 2:if(Cu(e),!t){l.A(3);break}return l.g(e.j.Ub(t),4);case 4:Cu(e);case 3:return e.m&&(i=e.m.getConfiguration(),i.keySystem=wx(e),e.m.configure(i)),l.g(SI(e.I,e.g),5);case 5:if(o=l.i,!o){l.A(0);break}return u=new Ge("trackschanged",void 0),l.g(Promise.resolve(),7);case 7:e.dispatchEvent(u),l.j()}})}g.configure=function(e,t){e=k0(e,t),Us(this.i,e),m$(this)},g.getConfiguration=function(){return Hi(this.i)};function h$(e){var t;return P(function(n){return e.m||(e.m=e.i.adaptationSetCriteriaFactory(),t={preferredAudio:e.i.preferredAudio,preferredVideo:e.i.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.i.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:wx(e)},ql(t),e.m.configure(t)),e.h||!e.g.variants.length||e.g.variants.length!=1&&e.g.type!="HLS"?n.A(0):(e.h=E0(e),e.h?n.g(dM(e.h),0):n.A(0))})}function p$(e){return P(function(t){return t.h==1?!e.h||e.g.variants.includes(e.h)?t.A(0):t.g(v$(e.h),3):(e.h=E0(e),e.h?t.g(dM(e.h),0):t.A(0))})}function g$(e){var t,n,r,i,o;return P(function(u){return!e.h&&(t=E0(e))&&(e.h=t),e.h?(n=e.g.presentationTimeline.isLive(),r=[],i=e.h,i.video&&r.push(yp(e,i.video,n)),i.audio&&r.push(yp(e,i.audio,n)),(o=cM(e,i))&&(r.push(yp(e,o,n)),e.u=o),u.g(Promise.all(r),0)):u.A(0)})}function E0(e){if(!e.C){var t=e.i.abrFactory;e.C=t(),e.C.configure(e.i.abr)}t=e.g.isLowLatency&&e.i.streaming.lowLatencyMode;var n=Wh(e.g.variants);return n=e.m.create(n),e.C.setVariants(Array.from(n.values()),t),e.C.chooseVariant(!0)}function cM(e,t){for(var n=null,r=x(e.i.preferredText),i=r.next();!i.done;i=r.next())if(i=i.value,i.language&&(i=Ps(e.g.textStreams,i.language,i.role,i.forced),i.length)){n=i[0];break}return!n&&t!=null&&t.audio&&e.i.accessibility.handleForcedSubtitlesAutomatically&&(e=Ps(e.g.textStreams,t.audio.language,"",!0),e.length&&(n=e[0])),n}function yp(e,t,n){var r,i,o,u,l;return P(function(h){return h.h==1?(r=e.i.streaming.segmentPrefetchLimit||2,i=new f0(r,t,function(p,m,b){return y0(p,m,b||null,e.i.streaming.retryParameters,e.za,e.H)},!1),e.D.set(t.id,i),t.segmentIndex?h.A(2):h.g(t.createSegmentIndex(),2)):(o=typeof e.B=="number"?e.B:0,u=t.segmentIndex.Yb(o),l=null,u&&(l=u.current(),l||(l=u.next().value)),l||(l=t.segmentIndex.Ib()),l?n?l.ia?h.g(U4(i,l.ia),0):h.A(0):h.g(cp(i,l.startTime),0):h.A(0))})}function m$(e){var t,n,r,i,o,u,l,h,p,m,b,w,T;P(function(k){if(k.h==1)return e.h?(t=e.g.presentationTimeline.isLive(),n=[],r=function(S){S&&(e.D.has(S.id)&&(Ba(e.D.get(S.id)),e.D.delete(S.id)),S.segmentIndex&&S.closeSegmentIndex&&n.push(S.closeSegmentIndex()))},i=function(){var S=e.h;S=x([S.video,S.audio]);for(var A=S.next();!A.done;A=S.next())r(A.value);e.u=null},o=function(){r(e.u),e.u=null},u=e.m.getConfiguration(),l={preferredAudio:e.i.preferredAudio,preferredVideo:e.i.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.i.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:wx(e)},ql(l),ja(u)!=ja(l)&&(e.m.configure(l),i(),e.h=E0(e)),e.h&&(h=cM(e,e.h))?h!=e.u&&(o(),e.u=h):o(),k.g(Promise.all(n),2)):k.return();if(p=[],e.h){for(m=e.h,b=x([m.video,m.audio]),w=b.next();!w.done;w=b.next())T=w.value,p.push(yp(e,T,t));e.u&&p.push(yp(e,e.u,t))}return k.g(Promise.all(p),0)})}function dM(e){var t,n,r,i;return P(function(o){for(t=[],n=x([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&!i.segmentIndex&&t.push(i.createSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}function v$(e){var t,n,r,i;return P(function(o){for(t=[],n=x([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&i.segmentIndex&&i.closeSegmentIndex&&t.push(i.closeSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}g.Rm=function(){return this.F.promise},g.destroy=function(){var e=this,t,n,r;return P(function(i){if(i.h==1)return e.l=!0,!e.o||e.ma?i.A(2):i.g(e.o.stop(),2);if(i.h!=4)return e.C&&e.C.release(),e.K&&!e.ra&&e.K.release(),!e.j||e.ba?i.A(4):i.g(e.j.destroy(),4);if(e.D.size>0&&!e.wa)for(t=x(e.D.values()),n=t.next();!n.done;n=t.next())r=n.value,Ba(r);i.j()})};function wx(e){return mr(e.j?e.j.Xb():null)}function fM(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Te("shaka.media.PreloadManager",ca),ca.prototype.destroy=ca.prototype.destroy,ca.prototype.waitForFinish=ca.prototype.Rm,ca.prototype.getPrefetchedTextTrack=ca.prototype.wl,ca.prototype.getPrefetchedVariantTrack=ca.prototype.xl;function I0(e){Bt.call(this),this.g=e,this.h=null}K(I0,Bt),I0.prototype.release=function(){this.g=null,Bt.prototype.release.call(this)},I0.prototype.j=function(e){if(this.g&&(e=this.g.oh(e))){var t=e.Ph-e.start;this.h!=null&&Math.abs(t-this.h)>.5&&this.dispatchEvent(new Ge("change",new Map([["programDateTime",new Date(e.Ph*1e3)],["timestamp",e.start]]))),this.h=t}};function Kl(e,t){Bt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{pd:null,od:Rd,dd:function(r,i){return Fs(n,"enter",r,i)}},{pd:bp,od:Rd,dd:function(r,i){return Fs(n,"enter",r,i)}},{pd:wp,od:Rd,dd:function(r,i){return Fs(n,"enter",r,i)}},{pd:Rd,od:bp,dd:function(r,i){return Fs(n,"exit",r,i)}},{pd:Rd,od:wp,dd:function(r,i){return Fs(n,"exit",r,i)}},{pd:bp,od:wp,dd:function(r,i){i?Fs(n,"skip",r,i):(Fs(n,"enter",r,i),Fs(n,"exit",r,i))}},{pd:wp,od:bp,dd:function(r,i){return Fs(n,"skip",r,i)}}],this.h=new he,this.h.G(this.i,"regionremove",function(r){n.g.delete(r.region)})}K(Kl,Bt),Kl.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,Bt.prototype.release.call(this)},Kl.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=x(this.i.g.values()),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),o=e<r.startTime?bp:e>r.endTime?wp:Rd;this.g.set(r,o);for(var u=x(this.m),l=u.next();!l.done;l=u.next())l=l.value,l.pd==i&&l.od==o&&l.dd(r,t)}}};function Fs(e,t,n,r){t=new Ge(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}for(var bp=1,Rd=2,wp=3,Nd={ach:"Lwo",ady:"\u0410\u0434\u044B\u0433\u044D\u0431\u0437\u044D",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili","be-BY":"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F",bg:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438","bg-BG":"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",bn:"\u09AC\u09BE\u0982\u09B2\u09BE","bn-IN":"\u09AC\u09BE\u0982\u09B2\u09BE (\u09AD\u09BE\u09B0\u09A4)","bn-BD":"\u09AC\u09BE\u0982\u09B2\u09BE(\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)","bs-BA":"Bosanski",ca:"Catal\xE0","ca-ES":"Catal\xE0",cak:"Maya Kaqchikel","ck-US":"\u13E3\u13B3\u13A9 (tsalagi)",cs:"\u010Ce\u0161tina","cs-CZ":"\u010Ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\xD6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC","el-GR":"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\xF1ol","es-AR":"Espa\xF1ol (Argentine)","es-419":"Espa\xF1ol (Latinoam\xE9rica)","es-CL":"Espa\xF1ol (Chile)","es-CO":"Espa\xF1ol (Colombia)","es-EC":"Espa\xF1ol (Ecuador)","es-ES":"Espa\xF1ol (Espa\xF1a)","es-LA":"Espa\xF1ol (Latinoam\xE9rica)","es-NI":"Espa\xF1ol (Nicaragua)","es-MX":"Espa\xF1ol (M\xE9xico)","es-US":"Espa\xF1ol (Estados Unidos)","es-VE":"Espa\xF1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06CC","fa-IR":"\u0641\u0627\u0631\u0633\u06CC","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\xF8royskt",fr:"Fran\xE7ais","fr-CA":"Fran\xE7ais (Canada)","fr-FR":"Fran\xE7ais (France)","fr-BE":"Fran\xE7ais (Belgique)","fr-CH":"Fran\xE7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\xF1e'\u1EBD","gu-IN":"\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0","gx-GR":"\u1F19\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE \u1F00\u03C1\u03C7\u03B1\u03AF\u03B1",he:"\u05E2\u05D1\u05E8\u05D9\u05EA\u200F","he-IL":"\u05E2\u05D1\u05E8\u05D9\u05EA\u200F",hi:"\u0939\u093F\u0928\u094D\u0926\u0940","hi-IN":"\u0939\u093F\u0928\u094D\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\xF2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\xCDslenska","is-IS":"\xCDslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65E5\u672C\u8A9E","ja-JP":"\u65E5\u672C\u8A9E","jv-ID":"Basa Jawa","ka-GE":"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8","kk-KZ":"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",km:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A","km-KH":"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A",kab:"Taqbaylit",kn:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1","kn-IN":"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (India)",ko:"\uD55C\uAD6D\uC5B4","ko-KR":"\uD55C\uAD6D\uC5B4 (\u97E9\u56FD)",ku:"Kurd\xEE","ku-TR":"Kurd\xEE",la:"Latin","la-VA":"Latin",lb:"L\xEBtzebuergesch","li-NL":"L\xE8mb\xF6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092E\u0948\u0925\u093F\u0932\u0940, \u09AE\u09C8\u09A5\u09BF\u09B2\u09C0","mg-MG":"Malagasy",mk:"\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438","mk-MK":"\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438 (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438)",ml:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02","ml-IN":"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02","mn-MN":"\u041C\u043E\u043D\u0433\u043E\u043B",mr:"\u092E\u0930\u093E\u0920\u0940","mr-IN":"\u092E\u0930\u093E\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102C\u1005\u1000\u102C",nb:"Norsk (bokm\xE5l)","nb-NO":"Norsk (bokm\xE5l)",ne:"\u0928\u0947\u092A\u093E\u0932\u0940","ne-NP":"\u0928\u0947\u092A\u093E\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\xEB)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0B13\u0B21\u0B3C\u0B3F\u0B06",pa:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40","pa-IN":"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (\u0A2D\u0A3E\u0A30\u0A24 \u0A28\u0A42\u0A70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067E\u069A\u062A\u0648",pt:"Portugu\xEAs","pt-BR":"Portugu\xEAs (Brasil)","pt-PT":"Portugu\xEAs (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\xE2n\u0103","ro-RO":"Rom\xE2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","ru-RU":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D","se-NO":"Davvis\xE1megiella","si-LK":"\u0DB4\u0DC5\u0DCF\u0DAD",sk:"Sloven\u010Dina","sk-SK":"Sloven\u010Dina (Slovakia)",sl:"Sloven\u0161\u010Dina","sl-SI":"Sloven\u0161\u010Dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043F\u0441\u043A\u0438","sr-RS":"\u0421\u0440\u043F\u0441\u043A\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD","ta-IN":"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD",te:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41","te-IN":"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",tg:"\u0437\u0430\u0431\u043E\u0301\u043D\u0438 \u0442\u043E\u04B7\u0438\u043A\u04E3\u0301","tg-TJ":"\u0442\u043E\u04B7\u0438\u043A\u04E3",th:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22","th-TH":"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22 (\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"T\xFCrk\xE7e","tr-TR":"T\xFCrk\xE7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430","uk-UA":"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",ur:"\u0627\u0631\u062F\u0648","ur-PK":"\u0627\u0631\u062F\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1EBFng Vi\u1EC7t","vi-VN":"Ti\u1EBFng Vi\u1EC7t","xh-ZA":"isiXhosa",yi:"\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9","yi-DE":"\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9 (German)",zh:"\u4E2D\u6587","zh-HANS":"\u4E2D\u6587\u7B80\u4F53","zh-HANT":"\u4E2D\u6587\u7E41\u9AD4","zh-CN":"\u4E2D\u6587\uFF08\u4E2D\u56FD\uFF09","zh-HK":"\u4E2D\u6587\uFF08\u9999\u6E2F\uFF09","zh-SG":"\u4E2D\u6587\uFF08\u65B0\u52A0\u5761\uFF09","zh-TW":"\u4E2D\u6587\uFF08\u53F0\u7063\uFF09","zu-ZA":"isiZulu",ase:"American Sign Language",bfi:"British Sign Language",bzs:"Brazilian Sign Language",csn:"Colombian Sign Language",dse:"Dutch Sign Language",dsl:"Danish Sign Language",fsl:"French Sign Language",gsg:"German Sign Language",gss:"Greek Sign Language",isg:"Irish Sign Language",ise:"Italian Sign Language",jsl:"Japanese Sign Language",mfs:"Mexican Sign Language",ncs:"Nicaraguan Sign Language",nsl:"Norwegian Sign Language",psr:"Portuguese Sign Language",sfb:"French Belgian Sign Language",sfs:"South African Sign Language",sgg:"Swiss German Sign Language",ssp:"Spanish Sign Language",swl:"Swedish Sign Language",vgt:"Flemish Sign Language"},hM=x(Object.keys(Nd)),xx=hM.next();!xx.done;xx=hM.next()){var pM=xx.value;Nd[pM.toLowerCase()]=Nd[pM]}function gM(e,t){if(e.lineBreak)return`
`;if(e.nestedCues.length)return e.nestedCues.map(function(u){return gM(u,e)}).join("");if(!e.payload)return e.payload;var n=[],r=e.fontWeight>=Fh,i=e.fontStyle==Bh,o=e.textDecoration.includes(ud);return r&&n.push(["b"]),i&&n.push(["i"]),o&&n.push(["u"]),i=e.color,i==""&&t&&(i=t.color),r="",(i=kx(i))&&(r+="."+i),i=e.backgroundColor,i==""&&t&&(i=t.backgroundColor),(t=kx(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight(function(u,l){var h=x(l);return l=h.next().value,h=h.next().value,"<"+l+(h===void 0?"":h)+">"+u+"</"+l+">"},e.payload)}function kx(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&e.length>7&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Tx(e,t){var n=[];e=x(mM(e));for(var r=e.next();!r.done;r=e.next())if(r=r.value,r.isContainer)n.push.apply(n,se(Tx(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=gM(r,t),n.push(i)}return n}function mM(e){var t=[];e=x(e);for(var n=e.next(),r={};!n.done;r={Ng:void 0},n=e.next())r.Ng=n.value,t.some((function(i){return function(o){return Nh(i.Ng,o)}})(r))||t.push(r.Ng);return t}function y$(e){function t(r){for(var i=5381,o=r.length;o;)i=i*33^r.charCodeAt(--o);return(i>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function b$(e,t){var n=Tx(t),r=[];t=e.cues?Array.from(e.cues):[],n=x(n);for(var i=n.next(),o={};!i.done;o={Fd:void 0},i=n.next())o.Fd=i.value,!t.some((function(u){return function(l){return l.startTime==u.Fd.startTime&&l.endTime==u.Fd.endTime&&l.text==u.Fd.payload}})(o))&&o.Fd.payload&&(i=y$(o.Fd))&&r.push(i);for(t=r.slice().sort(function(u,l){return u.startTime!=l.startTime?u.startTime-l.startTime:u.endTime!=l.endTime?u.endTime-l.startTime:"line"in VTTCue.prototype?r.indexOf(l)-r.indexOf(u):r.indexOf(u)-r.indexOf(l)}),t=x(t),n=t.next();!n.done;n=t.next())e.addCue(n.value)}function w$(e,t){var n=!1;e.mode==="disabled"&&(n=!0,e.mode="hidden");for(var r=0;r<e.cues.length;){var i=e.cues[r];t(i)?e.removeCue(i):r++}n&&(e.mode="disabled")}function x$(e){function t(r){r.line=n.line,r.lineAlign=n.lineAlign,r.position=n.position,r.positionAlign=n.positionAlign,r.size=n.size,r.displayAlign=n.displayAlign,r.region=n.region,r=x(r.nestedCues);for(var i=r.next();!i.done;i=r.next())t(i.value)}var n=new rn(0,0,"");t(e)}function lr(e){var t=this;this.h=e,this.o=new he,this.m=new he,this.j=this.B=null,this.g=new Map,this.i=-1,this.u=!1,this.l=null,this.o.G(e,"loaded",function(){return bM(t)}),bM(this)}g=lr.prototype,g.configure=function(e){this.B=e},g.remove=function(e,t){if(!this.h)return!1;var n=Sx(this);return n&&w$(n,function(r){return r.startTime<t&&r.endTime>e}),!0},g.append=function(e){var t=Sx(this);if(t){var n,r,i=(r=(n=this.B)==null?void 0:n.subtitleDelay)!=null?r:0;e=i!==0?e.map(function(o){return o=o.clone(),o.startTime=Math.max(0,o.startTime+i),o.endTime=Math.max(0,o.endTime+i),o}):e,b$(t,e)}},g.destroy=function(){this.h&&(this.j&&vM(this),this.h=null);var e;(e=this.l)==null||e.stop(),this.l=null;var t;(t=this.o)==null||t.release(),this.o=null;var n;return(n=this.m)==null||n.release(),this.m=null,Promise.resolve()},g.isTextVisible=function(){return this.u},g.setTextVisibility=function(e){this.u=e;var t=Sx(this);t?t.mode!=="disabled"&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e)):this.h&&this.h.Bd()===E$&&T$(this,e)},g.setTextLanguage=function(){};function vM(e){var t;(t=e.l)==null||t.stop(),e.l=null;var n;for((n=e.m)==null||n.Ea(),t=x(e.g.values()),n=t.next();!n.done;n=t.next())n.value.remove();e.g.clear(),e.i=-1,e.j=null}function yM(e){var t=new Map,n=e.h.Gb();n=x(n);for(var r=n.next();!r.done;r=n.next()){if(r=r.value,e.g.has(r.id)){var i=e,o=i.g.get(r.id);r.active||o.track.mode==="disabled"||(o.track.mode="disabled"),i.g.delete(r.id),i=o}else{i=e,o=i.j.ownerDocument.createElement("track");var u=Qe();u=r.forced&&u.Qa()==="WEBKIT"?"forced":r.kind==="caption"?"captions":"subtitles",o.kind=u,o.label=C$(r);var l=void 0;u=r.language?r.language in Nd?r.language:(l=Ph(r.language))!=null?l:"und":"und",o.srclang=u,o.src="data:,WEBVTT",o.track.mode="disabled",i.j.appendChild(o),i=o}t.set(r.id,i),r.active&&(e.i=r.id)}for(n=x(e.g.values()),r=n.next();!r.done;r=n.next())r.value.remove();e.g=t,e.i<=-1||(e.g.has(e.i)?(t=e.g.get(e.i).track,t.mode==="disabled"&&(t.mode=e.u?"showing":"hidden")):e.i=-1)}function k$(e){if(!e.l){var t=e.j;e.l=new ft(function(){if(e.l=null,e.j===t){e:{var n=-1;if(e.g.has(e.i)){var r=e.g.get(e.i).track.mode;if(r==="showing"){n=e.i;break e}r==="hidden"&&(n=e.i)}r=x(e.g.keys());for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=e.g.get(i);if(o.track.mode==="showing"){n=i;break e}n<0&&o.track.mode==="hidden"&&(n=i)}}for(r=e.g.get(n),i=x(e.g.values()),o=i.next();!o.done;o=i.next())o=o.value,o!==r&&o.track.mode!=="disabled"&&(o.track.mode="disabled");e.i!==n&&(e.i=n,S$(e,n))}}).$(0)}}function Sx(e){return e.g.has(e.i)?e.g.get(e.i).track:null}function T$(e,t){if(e=Array.from(e.h.Db().textTracks).filter(function(n){return["captions","subtitles","forced"].includes(n.kind)}),t)!e.some(function(n){return n.mode==="showing"})&&(t=e.find(function(n){return n.mode==="hidden"}))&&(t.mode="showing");else for(t=x(e),e=t.next();!e.done;e=t.next())e=e.value,e.mode==="showing"&&(e.mode="hidden")}function S$(e,t){if(t>-1){var n=e.h.Gb().find(function(r){return r.id===t});if(n){e.h.Dc(n);return}}e.h.Dc(null)}function bM(e){!e.j&&e.h&&e.h.Bd()===A$&&(e.j=e.h.Db(),e.o.oa(e.h,"unloading",function(){return vM(e)}),e.m.G(e.h,"textchanged",function(){return yM(e)}),e.m.G(e.j.textTracks,"change",function(){return k$(e)}),yM(e))}function C$(e){if(e.label)return e.label;if(e.language){var t=Ph(e.language);if(d.Intl&&"DisplayNames"in Intl)try{var n=new Intl.DisplayNames(e.language,{type:"language",languageDisplay:"standard"}).of(e.language);if(n&&n.toLowerCase()!=e.language.toLowerCase())return n.charAt(0).toUpperCase()+n.slice(1)}catch{}if(n=Nd[e.language])return n;if(n=t&&Nd[t])return t===e.language?n:n+" ("+e.language+")"}var r;return t=String((r=e.originalTextId)!=null?r:""),e.language&&e.language!==e.originalTextId?t+" ("+e.language+")":t}Te("shaka.text.NativeTextDisplayer",lr),lr.prototype.setTextLanguage=lr.prototype.setTextLanguage,lr.prototype.setTextVisibility=lr.prototype.setTextVisibility,lr.prototype.isTextVisible=lr.prototype.isTextVisible,lr.prototype.destroy=lr.prototype.destroy,lr.prototype.append=lr.prototype.append,lr.prototype.remove=lr.prototype.remove,lr.prototype.configure=lr.prototype.configure;var A$=2,E$=3;function wM(e){var t=this;this.l=e,this.o=null,this.j=new he,this.I=_$.value(),this.g=null,this.u=!1,this.B=new SM,this.K=new ft(function(){xp(t)}),this.J=1e15,this.F=kM(this),this.i=[this.F],this.D=this.H=this.h=this.m=null,this.C=new kp(this.B,this.K,function(n){if(t.u&&t.g){var r=t.o.maxTextLength;if(!(n.length<=r)){for(r=n.length-r;r>0&&n[r-1]!==" ";)r--;n="..."+n.slice(r).trimStart()}var i;(i=t.h)!=null&&i.h&&(i.g||(i.g=document.createElement("span"),i.g.setAttribute("translate","no"),i.g.style.backgroundColor="rgba(0,0,0,0.8)",i.g.style.padding="0px 5px",i.g.style.margin="2.5% 5%",i.h.appendChild(i.g)),i.g.textContent=n)}},function(){var n;(n=t.h)!=null&&n.g&&(n.g.textContent="")})}g=wM.prototype,g.configure=function(e){this.o=e,M$(this)},g.release=function(){this.m=null,this.j.Ea(),M0(this),this.l=null,this.j.release();var e;(e=this.h)==null||e.release(),this.g&&this.g.parentElement&&(this.g.remove(),this.g=null)},g.enable=function(e){var t=this;this.I&&(this.g||(this.g=xM(this)),this.g&&(this.h||(this.h=new TM(this.g)),this.u&&e.id==this.m||(this.u=!0,this.m=e.id,this.j.G(this.l,"audiotrackschanged",function(){xp(t)}),e=this.l.Db(),this.j.G(e,"seeking",function(){xp(t)}),this.j.G(e,"pause",function(){M0(t,!1)}),this.j.G(e,"play",function(){xp(t)}),e.paused||xp(this))))},g.disable=function(){if(this.u){this.u=!1,this.m=null,this.j.Ea(),M0(this);var e;(e=this.h)==null||e.release(),this.h=null,this.B.release(),this.C.release()}},g.isSupported=function(){return this.I?(this.g||(this.g=xM(this)),!!this.g):!1},g.Gb=function(){if(!this.isSupported())return[];for(var e=x(this.i),t=e.next();!t.done;t=e.next())t=t.value,t.active=t.id==this.m;return this.i};function xp(e){var t,n,r,i,o,u,l,h;P(function(p){switch(p.h){case 1:if((t=e.h)!=null&&t.g&&(t.g.textContent=""),n=e.l.getAudioTracks(),!n.length||(r=I$(e),!r))return p.return();if(i=n.find(function(m){return m.active}),o="en",i&&i.language&&i.language!="und"&&(o=i.language),u=e.i.find(function(m){return m.id==e.m}),l="",u&&u.language&&u.language!="und"&&(l=u.language),!e.C.isActive()||e.H!==o||e.D===l){p.A(2);break}return e.D=l,p.g(CM(e.B,o,l),3);case 3:return p.return();case 2:return M0(e),p.m(4),p.g(CM(e.B,o,l),6);case 6:p.o(5);break;case 4:if(h=p.l(),h.name=="NotSupportedError")return p.return();case 5:return p.g(e.C.start(r,o,e.o.processLocally),7);case 7:e.H=o,e.D=l,p.j()}})}function M0(e,t){e.C.stop(t===void 0?!0:t)}function I$(e){var t=e.l.Db();return t?P$.getOrInsertComputed(t,function(){var n=new(d.AudioContext||d.webkitAudioContext),r=n.createMediaElementSource(t),i=n.createMediaStreamDestination();r.connect(i),r.connect(n.destination);var o=i.stream.getAudioTracks()[0];return{Hn:n,Yn:r,Qn:i,Ek:o}}).Ek:null}function xM(e){if(e=e.l.Gc,!e)return null;var t=document.createElement("div");return t.classList.add("shaka-speech-to-text-container"),t.style.textAlign="center",t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.justifyContent="flex-end",e.appendChild(t),t}function M$(e){var t=e.i.map(function(i){return i.language}).filter(function(i){return i});if(!Fe(e.o.languagesToTranslate,t)&&"Translator"in d){e.i=e.i.filter(function(i){return i.id==e.F.id||e.o.languagesToTranslate.includes(i.language)?!0:(i.id==e.m&&e.disable(),!1)}),t=x(e.o.languagesToTranslate);for(var n=t.next(),r={};!n.done;r={Dh:void 0},n=t.next())r.Dh=n.value,n=e.i.find((function(i){return function(o){return o.language==i.Dh}})(r)),n||(n=kM(e),n.language=r.Dh,e.i.push(n));t=new Ge("textchanged"),e.l.dispatchEvent(t)}}function kM(e){return{id:e.J++,active:!1,type:mt,bandwidth:0,language:"",label:null,kind:null,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:!1,originalTextId:null,originalLanguage:"speech-to-text"}}var P$=new Map,_$=new et(function(){var e=document.body.appendChild(document.createElement("iframe")),t=e.contentWindow;if(t=t.SpeechRecognition||t.webkitSpeechRecognition,!t)return e.remove(),!1;t=new t,e.remove();try{return t.start(0),t.stop(),!1}catch(n){return n.name=="TypeError"}});function TM(e){this.h=e,this.g=null}TM.prototype.release=function(){this.h&&Vl(this.h),this.g=null};function kp(e,t,n,r){this.m=e,this.i=t,this.u=n,this.o=r,this.h=new he,this.l=null,this.g=0,this.j=!1}kp.prototype.start=function(e,t,n){var r=this,i,o,u,l,h;return P(function(p){switch(p.h){case 1:if(r.stop(),r.g++,i=r.g,r.j=!0,o=d.SpeechRecognition||d.webkitSpeechRecognition,u=new o,r.l=u,u.lang=t,u.continuous=!0,u.interimResults=!0,!(n&&"install"in o&&"available"in o)){p.A(2);break}return p.m(3),p.g(o.available({langs:[t],processLocally:!0}),5);case 5:switch(l=p.i,l){case"available":u.processLocally=!0;break;case"downloading":case"downloadable":return p.A(6);default:return p.return()}p.A(7);break;case 6:return p.g(o.install({langs:[t],processLocally:!0}),8);case 8:u.processLocally=!0,p.A(7);break;case 7:p.o(2);break;case 3:p.l();case 2:if(i!==r.g)return p.return();h=!1,r.h.G(u,"start",function(){i===r.g&&r.i.$(5)}),r.h.G(u,"result",function(m){var b,w,T,k;return P(function(S){if(S.h==1){if(i!==r.g)return S.return();for(b=m,w="",T=b.resultIndex;T<b.results.length;T++)w+=b.results[T][0].transcript;return S.g(D$(r.m,w),2)}if(k=S.i,k===null||i!==r.g)return S.return();r.u(k),r.i.$(.75),S.j()})}),r.h.G(u,"error",function(m){i===r.g&&(h=!0,r.o(),m.error=="network"&&r.i.$(30))}),r.h.G(u,"end",function(){r.j&&i===r.g&&(h||r.start(e,t,n))}),u.start(e),p.j()}})},kp.prototype.stop=function(e){e=e===void 0?!0:e,this.g++,this.j=!1,this.h.Ea(),this.i.stop(),this.l&&(this.l.stop(),this.l=null),e&&this.o()},kp.prototype.release=function(){this.stop(),this.m.release()},kp.prototype.isActive=function(){return this.j};function SM(){this.h=this.g=null,this.m=this.l=0,this.j=this.i=null}function CM(e,t,n){var r,i,o;return P(function(u){if(u.h==1)return e.i===t&&e.j===n&&e.g||(e.release(),e.l++,r=e.l,!(n&&t!=n&&"Translator"in d))?u.return():(e.h=new AbortController,u.m(2),u.g(Translator.create({sourceLanguage:t,targetLanguage:n,signal:e.h.signal}),4));if(u.h!=2)return i=u.i,r!==e.l?(i.destroy(),u.return()):(e.g=i,e.i=t,e.j=n,u.o(0));if(o=u.l(),o.name=="NotSupportedError")throw o;u.j()})}function D$(e,t){var n,r;return P(function(i){return i.h==1?e.g?(e.m++,n=e.m,i.m(2),i.g(e.g.translate(t),4)):i.return(t):i.h!=2?(r=i.i,n!==e.m?i.return(null):i.return(r)):(i.l(),i.return(null))})}SM.prototype.release=function(){var e;(e=this.h)==null||e.abort(),this.h=null;var t;(t=this.g)==null||t.destroy(),this.j=this.i=this.g=null};function zr(){}g=zr.prototype,g.configure=function(){},g.remove=function(){},g.append=function(){},g.destroy=function(){},g.isTextVisible=function(){return!1},g.setTextVisibility=function(){},g.setTextLanguage=function(){},Te("shaka.text.StubTextDisplayer",zr),zr.prototype.setTextLanguage=zr.prototype.setTextLanguage,zr.prototype.setTextVisibility=zr.prototype.setTextVisibility,zr.prototype.isTextVisible=zr.prototype.isTextVisible,zr.prototype.destroy=zr.prototype.destroy,zr.prototype.append=zr.prototype.append,zr.prototype.remove=zr.prototype.remove,zr.prototype.configure=zr.prototype.configure;function cr(e){var t=this;this.C=!1,this.i=[],this.P=e,this.l=e.Db(),this.j=e.Gc,this.H=null,this.I=!1,this.R=!0,this.F=this.o=this.B=null,this.L=!1,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.D=new ft(function(){Co(t),Bs(t)}),Bs(this),this.m=new ft(function(){Cx(t)}),this.u=new Map,this.h=new he,this.h.G(document,"fullscreenchange",function(){Co(t,!0)}),this.h.G(this.l,"seeking",function(){Co(t,!0),Bs(t)}),this.h.Hb(this.l,["play","playing","pause","waiting"],function(){Bs(t)}),this.h.G(this.P,"ratechange",function(){Bs(t)}),this.h.G(this.l,"resize",function(){var n=t.l,r=n.videoWidth;n=n.videoHeight,r&&n?t.H=r/n:t.H=null}),this.O=!1,this.K=null,"ResizeObserver"in d&&(this.K=new ResizeObserver(function(){t.O||(t.O=!0,requestAnimationFrame(function(){t.O=!1,t.g&&t.g.parentElement&&t.C&&Co(t,!0)}))}),this.K.observe(this.j)),this.J=new Map,this.M=null,"IntersectionObserver"in d&&(this.M=new IntersectionObserver(function(n){n.length&&(n=n[n.length-1],t.R=n.isIntersecting&&n.intersectionRatio>0,t.m.$(.25))},{root:null,threshold:[.01]}),this.M.observe(this.j)),this.h.G(document,"visibilitychange",function(){t.m.Va()}),this.h.G(document,"fullscreenchange",function(){t.m.Va()}),this.h.Hb(this.l,["enterpictureinpicture","leavepictureinpicture"],function(){t.m.Va()}),"documentPictureInPicture"in d&&this.h.G(d.documentPictureInPicture,"enter",function(n){t.m.Va(),t.h.oa(n.window,"pagehide",function(){t.m.Va()})}),e=this.l,(e.webkitPresentationMode||e.webkitSupportsFullscreen)&&this.h.G(e,"webkitpresentationmodechanged",function(){t.m.Va()}),Cx(this)}g=cr.prototype,g.configure=function(e){this.B=e,Bs(this),Cx(this),Co(this,!0)},g.Gm=function(e,t){this.o=Object.assign({},e),this.F=new rn(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,t),Co(this,!0)},g.Lk=function(){(this.o||this.F)&&(this.F=this.o=null,this.L=!1,Co(this,!0))},g.append=function(e){var t=[].concat(se(this.i));e=x(mM(e));for(var n=e.next(),r={};!n.done;r={Og:void 0},n=e.next())r.Og=n.value,t.some((function(i){return function(o){return Nh(o,i.Og)}})(r))||this.i.push(r.Og);this.i.length&&Bs(this),Co(this)},g.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.j.removeChild(this.g),this.g=null,this.C=!1,this.i=[],this.F=this.o=null,this.L=!1;var e;(e=this.D)==null||e.stop(),this.D=null;var t;(t=this.m)==null||t.stop(),this.m=null,this.u.clear();var n;(n=this.h)==null||n.release(),this.h=null;var r;(r=this.K)==null||r.disconnect(),this.K=null;var i;return(i=this.M)==null||i.disconnect(),this.M=null,Promise.resolve()},g.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter(function(r){return r.startTime<e||r.endTime>=t}),Co(this,n>this.i.length),this.i.length||Bs(this),!0},g.isTextVisible=function(){return this.C},g.setTextVisibility=function(e){(this.C=e)?(this.g.parentElement||this.j.appendChild(this.g),Co(this,!0)):this.g.parentElement&&this.j.removeChild(this.g)},g.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")};function Bs(e){if(e.D)if(!e.i.length||e.I||e.l.paused)e.D.stop();else{var t,n,r=(n=(t=e.o||e.B)==null?void 0:t.subtitleDelay)!=null?n:0;t=e.l.currentTime-r,n=1,r=AM(e,e.i,t),r!=null&&e.l.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(n=Math.min(n,Math.max(0,r-t))),e.D.$(Math.max(F$,n/(Math.abs(e.P.eb())||1)))}}function AM(e,t,n){function r(u){u>n&&(i==null||u<i)&&(i=u)}var i=null;t=x(t);for(var o=t.next();!o.done;o=t.next())o=o.value,r(o.startTime),r(o.endTime),o.nestedCues.length&&(o=AM(e,o.nestedCues,n),o!=null&&r(o));return i}function Cx(e){var t=e.l,n=!1;(d.documentPictureInPicture&&d.documentPictureInPicture.window||document.pictureInPictureElement===t)&&(n=!0);var r=!1;document.fullscreenEnabled&&document.fullscreenElement===e.j?r=!0:t.webkitSupportsFullscreen&&(r=t.webkitDisplayingFullscreen),t=document.visibilityState==="visible";var i,o;(o=(i=e.B)==null?void 0:i.suspendRenderingWhenHidden)!=null&&!o||n||r||t&&e.R?e.I&&(e.I=!1,Bs(e),requestAnimationFrame(function(){e.g&&e.g.parentElement&&e.C&&Co(e)})):e.I||(e.I=!0,e.D&&e.D.stop())}function L$(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function EM(e,t,n){var r=t,i=e.u.get(t)||null;if(!i&&n&&n.positionArea!=0){n=x(e.u.keys());for(var o=n.next();!o.done;o=n.next())o=o.value,Nh(t,o)&&(r=o,i=e.u.get(o))}return{key:r,Lj:i}}function IM(e,t,n,r,i){var o=e.o||e.B,u=!1,l=[],h=[];t=x(t);for(var p=t.next();!p.done;p=t.next()){p=p.value,i.push(p);var m=EM(e,p,o),b=m.key;m=m.Lj;var w=p.startTime<=r&&p.endTime>r,T=m?m.yk:null;m&&(l.push(m.Pg),m.jd&&l.push(m.jd),w||(u=!0,e.u.delete(b),m=null)),w&&(h.push(p),m?L$(e,T)||(u=!0):(N$(e,p,i),m=e.u.get(b),T=m.yk,u=!0)),p.nestedCues.length>0&&T&&IM(e,p.nestedCues,T,r,i),i.pop()}if(u){for(r=x(l),i=r.next();!i.done;i=r.next())i=i.value,i.parentElement&&i.parentElement.removeChild(i);for(h.sort(function(k,S){return k.startTime!=S.startTime?k.startTime-S.startTime:k.endTime-S.endTime}),h=x(h),r=h.next();!r.done;r=h.next())r=EM(e,r.value,o).Lj,r.jd?(r.jd.contains(n)&&r.jd.removeChild(n),n.appendChild(r.jd),r.jd.appendChild(r.Pg)):n.appendChild(r.Pg)}}function R$(e,t,n){return t.some(function(r){return r.startTime<=n&&r.endTime>n&&MM(e,r)})}function MM(e,t){return!!t.payload.replace(/[\u00a0\u200B]/g," ").trim()||!!t.backgroundImage||t.nestedCues.some(function(n){return MM(e,n)})}function Co(e,t){if(t=t===void 0?!1:t,e.g&&!e.I){var n=e.o||e.B,r,i=(r=n?.subtitleDelay)!=null?r:0;r=e.l.currentTime-i,i=!!e.F&&!R$(e,e.i,r),i!=e.L&&(t=!0,e.L=i),i&&(t=!0);var o=e.C||i;if(o?e.g.parentElement||e.j.appendChild(e.g):e.g.parentElement&&e.j.removeChild(e.g),!o||t){t=x(e.J.values());for(var u=t.next();!u.done;u=t.next())Vl(u.value);Vl(e.g),e.u.clear(),e.J.clear()}o&&(t=i&&e.F?[e.F]:e.i,n&&n.positionArea!=0&&(t=t.map(function(l){var h=e.o||e.B;switch(l=l.clone(),x$(l),l.region=B$.value(),h.positionArea){case 1:l.textAlign="left",l.displayAlign="before";break;case 2:l.textAlign=Yo,l.displayAlign="before";break;case 3:l.textAlign="right",l.displayAlign="before";break;case 4:l.textAlign="left",l.displayAlign="center";break;case 5:l.textAlign=Yo,l.displayAlign="center";break;case 6:l.textAlign="right",l.displayAlign="center";break;case 7:l.textAlign="left",l.displayAlign=Oh;break;case 8:l.textAlign=Yo,l.displayAlign=Oh;break;case 9:l.textAlign="right",l.displayAlign=Oh}return l})),IM(e,t,e.g,r,[]))}}function N$(e,t,n){var r=n.length>1,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&t.nestedCues.length>0;var o=document.createElement(i);if(i!="br"&&j$(e,o,t,n,r),n=null,t.region&&t.region.id){var u=t.region,l=e.H===4/3?2.5:1.9;if(n=u.id+"_"+u.width+"x"+u.height+(u.heightUnits==xi?"%":"px")+"-"+u.viewportAnchorX+"x"+u.viewportAnchorY+(u.viewportAnchorUnits==xi?"%":"px")+"-"+u.regionAnchorX+"x"+u.regionAnchorY,e.J.has(n))n=e.J.get(n);else{i=document.createElement("span");var h=u.heightUnits==xi?"%":"px",p=u.widthUnits==xi?"%":"px",m=u.viewportAnchorUnits==xi?"%":"px";i.id="shaka-text-region---"+n,i.classList.add("shaka-text-region"),i.style.position="absolute";var b=u.height,w=u.width;u.heightUnits===2&&(b=u.height*5.33,h="%"),u.widthUnits===2&&(w=u.width*l,p="%"),i.style.height=b+h,i.style.width=w+p,u.viewportAnchorUnits===2?(l=u.viewportAnchorY/75*100,h=u.viewportAnchorX/(e.H===4/3?160:210)*100,l-=u.regionAnchorY*b/100,h-=u.regionAnchorX*w/100,i.style.top=l+"%",i.style.left=h+"%"):(i.style.top=u.viewportAnchorY-u.regionAnchorY*b/100+m,i.style.left=u.viewportAnchorX-u.regionAnchorX*w/100+m),u.heightUnits!==0&&u.widthUnits!==0&&u.viewportAnchorUnits!==0&&(u=Math.max(0,Math.min(100-(parseInt(i.style.width.slice(0,-1),10)||0),parseInt(i.style.left.slice(0,-1),10)||0)),i.style.top=Math.max(0,Math.min(100-(parseInt(i.style.height.slice(0,-1),10)||0),parseInt(i.style.top.slice(0,-1),10)||0))+"%",i.style.left=u+"%"),i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.justifyContent=PM(t.displayAlign),e.J.set(n,i),n=i}}i=o,r&&(i=document.createElement("span"),i.classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",o.appendChild(i)),e.u.set(t,{Pg:o,yk:i,jd:n})}function O$(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Rv?n:e==="left"||e==="start"&&t===jh||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===jh?"line-right":"center"}function j$(e,t,n,r,i){var o=t.style,u=n.nestedCues.length==0,l=r.length>1;o.whiteSpace="pre-wrap";var h=n.payload.replace(/\s+$/g,function(m){return"\xA0".repeat(m.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Ax(n.linePadding,n,e.j),o.paddingRight=Ax(n.linePadding,n,e.j),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage.replace(/['"()\\]/g,"")+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var p=t;else p=document.createElement("span"),t.appendChild(p);n.border&&(p.style.border=n.border),i||((t=U$(r,function(m){return m.backgroundColor}))?p.style.backgroundColor=t:h&&(p.style.backgroundColor="rgba(0, 0, 0, 0.8)")),h&&(p.setAttribute("translate","no"),p.textContent=h)}l&&!r[r.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="flex-start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="flex-end"),o.justifyContent=PM(n.displayAlign)),u||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,r=(r=e.o||e.B)?r.fontScaleFactor:1,(r!==1||n.fontSize)&&(o.fontSize=Ax(n.fontSize||"1em",n,e.j,r)),r=n.line,r!=null&&(u=n.lineInterpretation,u==Uh&&(u=1,l=16,e.H&&e.H<1&&(l=32),r=r<0?100+r/l*100:r/l*100),u==1&&(o.position="absolute",n.writingMode==Cl?(o.width="100%",n.lineAlign==Al?o.top=r+"%":n.lineAlign=="end"&&(o.bottom=100-r+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==Al?o.left=r+"%":n.lineAlign=="end"&&(o.right=100-r+"%")):(o.height="100%",n.lineAlign==Al?o.right=r+"%":n.lineAlign=="end"&&(o.left=100-r+"%")))),o.lineHeight=n.lineHeight,e=O$(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==Cl?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==Cl?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==Cl?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%",n.size&&(o.transform="translateX(-50%)")),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==Cl?o.width=n.size+"%":o.height=n.size+"%")}function Ax(e,t,n,r){r=r===void 0?1:r;var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;switch(e=i.unit,r*=i.value,e){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return r+e}}function U$(e,t){for(var n=e.length-1;n>=0;n--){var r=t(e[n]);if(r||r===0)return r}return null}function PM(e){switch(e){case"before":return"flex-start";case"center":return"center";default:return"flex-end"}}Te("shaka.text.UITextDisplayer",cr),cr.prototype.setTextLanguage=cr.prototype.setTextLanguage,cr.prototype.setTextVisibility=cr.prototype.setTextVisibility,cr.prototype.isTextVisible=cr.prototype.isTextVisible,cr.prototype.remove=cr.prototype.remove,cr.prototype.destroy=cr.prototype.destroy,cr.prototype.append=cr.prototype.append,cr.prototype.clearTextStylePreview=cr.prototype.Lk,cr.prototype.setTextStylePreview=cr.prototype.Gm,cr.prototype.configure=cr.prototype.configure;var F$=1/60,B$=new et(function(){var e=new oa;return e.id="shaka-custom-region",e.height=90,e.width=90,e.viewportAnchorX=5,e.viewportAnchorY=5,e});function V$(e,t){function n(u){var l=[];switch(u.textAlign){case"left":l.push("align:left");break;case"right":l.push("align:right");break;case Yo:l.push("align:middle");break;case"start":l.push("align:start");break;case"end":l.push("align:end")}switch(u.writingMode){case"vertical-lr":l.push("vertical:lr");break;case"vertical-rl":l.push("vertical:rl")}return l.length?" "+l.join(" "):""}function r(u){for(var l=u,h=x(t),p=h.next();!p.done;p=h.next())p=p.value,p.end&&p.start<u&&(l+=p.end-p.start);return u=Math.floor(l/3600),h=Math.floor(l/60%60),p=Math.floor(l%60),l=Math.floor(l*1e3%1e3),(u<10?"0":"")+u+":"+(h<10?"0":"")+h+":"+(p<10?"0":"")+p+"."+(l<100?l<10?"00":"0":"")+l}var i=Tx(e);e=`WEBVTT

`,i=x(i);for(var o=i.next();!o.done;o=i.next())o=o.value,e+=r(o.startTime)+" --> "+r(o.endTime)+n(o)+`
`,e+=o.payload+`

`;return e}Te("shaka.text.WebVttGenerator",function(){});/*
 @license
 Copyright 2024 Streaming Video Technology Alliance
 SPDX-License-Identifier: Apache-2.0
*/var Ex=["cen","e","h","ts"],Ix="ab bg bl br bs bsa bsd bsda cdn cid cs d dfa dl ec lab lb ltc msd mtp nor nr ot pb pr pt rtp sf sid sn st sta su tab tb tbl tpb v".split(" "),Mx="cmsdd cmsds rc smrt ttfb ttfbb ttlb url".split(" "),Px="bl br bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),_M=new Map([["ps","sta"],["pr","pr"],["c","cid"],["b","bg"],["bc","br"]]);function Ei(e,t){Array.isArray(e)&&(e=e.map(function(n){return n instanceof Ei?n:new Ei(n)})),this.value=e,this.yc=t}function DM(e){this.description=e}function es(e,t){var n=Error;return e=Array.isArray(e)?JSON.stringify(e):e instanceof Map?"Map{}":e instanceof Set?"Set{}":typeof e=="object"?JSON.stringify(e):String(e),n('failed to serialize "'+e+'" as '+t,{cause:void 0})}function LM(e,t){return e<0?-LM(-e,t):(t=Math.pow(10,t),Math.abs(e*t%1-.5)<Number.EPSILON?(e=Math.floor(e*t),(e%2===0?e:e+1)/t):Math.round(e*t)/t)}function RM(e){if(e<-999999999999999||999999999999999<e)throw es(e,"Integer");return e.toString()}var $$=/[\x00-\x1f\x7f]+/;function NM(e){if(e=e.description||e.toString().slice(7,-1),/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw es(e,"Token");return e}function _x(e){switch(typeof e){case"number":if(!Number.isFinite(e))throw es(e,"Bare Item");if(Number.isInteger(e))e=RM(e);else{var t=LM(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw es(e,"Decimal");e=t.toString(),e=e.includes(".")?e:e+".0"}return e;case"string":if($$.test(e))throw es(e,"String");return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"';case"symbol":return NM(e);case"boolean":if(typeof e!="boolean")throw es(e,"Boolean");return e?"?1":"?0";case"object":if(e instanceof Date)return"@"+RM(e.getTime()/1e3);if(e instanceof Uint8Array){if(ArrayBuffer.isView(e)===!1)throw es(e,"Byte Sequence");return":"+btoa(String.fromCharCode.apply(String,se(e)))+":"}if(e instanceof DM)return NM(e);default:throw es(e,"Bare Item")}}function Dx(e){if(/^[a-z*][a-z0-9\-_.*]*$/.test(e)===!1)throw es(e,"Key");return e}function Lx(e){return e==null?"":Object.entries(e).map(function(t){var n=x(t);return t=n.next().value,n=n.next().value,n===!0?";"+Dx(t):";"+Dx(t)+"="+_x(n)}).join("")}function OM(e){return e instanceof Ei?_x(e.value)+Lx(e.yc):_x(e)}function P0(e){var t={xk:!1};if(t=t===void 0?{xk:!0}:t,typeof e!="object"||e==null)throw es(e,"Dict");return e=e instanceof Map?e.entries():Object.entries(e),t=t.xk?" ":"",Array.from(e).map(function(n){n=x(n);var r=n.next().value;return n=n.next().value,!(n instanceof Ei)&&(n=new Ei(n)),r=Dx(r),n.value===!0?r+=Lx(n.yc):(r+="=",Array.isArray(n.value)?(n="("+n.value.map(OM).join(" ")+")"+Lx(n.yc),n=r+n):n=r+OM(n),r=n),r}).join(","+t)}function z$(e,t){try{var n=new URL(e)}catch{return e}if(t=new URL(t),n.origin!==t.origin)return e;e=n.pathname.split("/").slice(1),t=t.pathname.split("/").slice(1,-1);for(var r=Math.min(e.length,t.length),i=0;i<r&&e[i]===t[i];i++)e.shift(),t.shift();for(;t.length;)t.shift(),e.unshift("..");return e.join("/")+n.search+n.hash}function H$(e){return e=new URL(e),e.origin+e.pathname.substring(0,e.pathname.lastIndexOf("/")+1)}function jM(e){return e instanceof Ei?new Ei(Math.round(e.value),e.yc):Math.round(e)}function Rx(e){return Array.isArray(e)?e.map(jM):jM(e)}function Nx(e,t){return Array.isArray(e)?e.map(function(n){return Nx(n,t)}):e instanceof Ei&&typeof e.value=="string"?new Ei(Nx(e.value,t),e.yc):(t.ge&&(e=z$(e,H$(t.ge))),t.version===1?encodeURIComponent(e):e)}function UM(e){return e instanceof Ei?new Ei(Math.round(e.value/100)*100,e.yc):Math.round(e/100)*100}function _0(e){return Array.isArray(e)?e.map(UM):UM(e)}var q$={br:Rx,d:Rx,bl:_0,dl:_0,mtp:_0,nor:function(e,t){var n=e;return t.version>=2&&(e instanceof Ei&&typeof e.value=="string"?n=new Ei([e]):typeof e=="string"&&(n=[e])),Nx(n,t)},rtp:_0,tb:Rx},G$=new Set("ab bl br bsa bsd bsda lab lb mtp pb tab tb tbl tpb".split(" ")),FM=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/,K$=new Set(Ix);function BM(e){return K$.has(e)||FM.test(e)}var VM=new Set(Mx),W$=new Set(Ex),X$=new Set(Px);function Y$(e){return X$.has(e)||FM.test(e)}var J$=new Set(["ot","sf","st","e","sta"]);function Q$(e){return typeof e=="number"?Number.isFinite(e):e!=null&&e!==""&&e!==!1}var Ox={},Z$=(Ox.event=function(e){return BM(e)||VM.has(e)||W$.has(e)},Ox.request=BM,Ox);function $M(e,t){if(Array.isArray(e)){var n;return t&&(n=e.find(function(r){return r&&r.yc&&r.yc.ot===t})),n||(n=e[0]),$M(n)}return e instanceof Ei?e.value:e}function ez(e){for(var t={},n=x(Object.entries(e)),r=n.next();!r.done;r=n.next()){var i=x(r.value);r=i.next().value,i=i.next().value,i==null?t[r]=i:r==="nor"?(r=(Array.isArray(i)?i:[i])[0],r instanceof Ei?(t.nor=r.value,(r=r.yc)&&r.r&&(t.nrr=r.r)):t.nor=r):G$.has(r)?t[r]=$M(i,e.ot):t[r]=i}return t}function jx(e,t){t=t||{};var n={};if(e==null||typeof e!="object")return n;var r=t.version||e.v||2,i=t.Xh||"request";e=r===1?ez(e):e;var o=r===1?Y$:Z$[i],u=Object.keys(e).filter(o);if(e.e&&e.e!=="rr"&&(u=u.filter(function(m){return!VM.has(m)})),o=t.filter,typeof o=="function"&&(u=u.filter(o)),o=i==="event"){var l=e.e;u.includes("e")||l==null||u.push("e"),u.includes("ts")||u.push("ts"),u.includes("cen")||e.cen==null||l!=="ce"||u.push("cen"),(l=l?_M.get(l):void 0)&&e[l]!=null&&!u.includes(l)&&u.push(l)}if(u.length===0)return n;for(r>1&&!u.includes("v")&&u.push("v"),i={version:r,Xh:i,ge:t.ge},u.sort(),u=x(u),l=u.next();!l.done;l=u.next()){l=l.value;var h=e[l],p=t.Uk&&t.Uk[l]||q$[l];if(typeof p=="function"&&(h=p(h,i)),l==="v"){if(r===1)continue;h=r}(l!=="pr"||h!==1||o&&e.e==="pr")&&(o&&l==="ts"&&!Number.isFinite(h)&&(h=Date.now()),p=o&&h===!1&&l==="bg"&&e.e==="b",(Q$(h)||p)&&(J$.has(l)&&typeof h=="string"&&(h=new DM(h)),n[l]=h))}return n}var tz={Gn:"CMCD-Object",br:"CMCD-Object",d:"CMCD-Object",Tn:"CMCD-Object",Un:"CMCD-Object",ot:"CMCD-Object",ao:"CMCD-Object",tb:"CMCD-Object",co:"CMCD-Object",bl:"CMCD-Request",Mn:"CMCD-Request",Rn:"CMCD-Request",dl:"CMCD-Request",ltc:"CMCD-Request",mtp:"CMCD-Request",nor:"CMCD-Request",nrr:"CMCD-Request",Xn:"CMCD-Request",sn:"CMCD-Request",Im:"CMCD-Request",su:"CMCD-Request",bo:"CMCD-Request",cid:"CMCD-Session",msd:"CMCD-Session",sf:"CMCD-Session",sid:"CMCD-Session",st:"CMCD-Session",v:"CMCD-Session",bg:"CMCD-Status",bs:"CMCD-Status",In:"CMCD-Status",Jn:"CMCD-Status",Kn:"CMCD-Status",Ln:"CMCD-Status",Sn:"CMCD-Status",Wn:"CMCD-Status",pr:"CMCD-Status",pt:"CMCD-Status",rtp:"CMCD-Status"};function nz(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return r&&r.forEach(function(i){return t[i]=n}),t},{})}function zM(e,t,n){var r=new Set(t.sc||[]);return{version:t.version||2,Xh:e,filter:function(i){return r.has(i)},ge:n}}function rz(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r!==i){if(typeof r=="number"||typeof i=="number")return!1;var o=i;if(r.value!==o.value)return!1;i=r.params,r=o.params,o=i&&Object.keys(i)[0];var u=r&&Object.keys(r)[0];if(o!==u||o&&u&&i&&r&&i[o]!==r[u])return!1}}return!0}function iz(e){return e}for(var HM=(function(){var e=[];return _M.forEach(function(t,n){t==="br"?e.push({event:n,oe:t,Tg:function(r,i){return r===void 0||i===void 0?r===i:rz(r,i)},ek:function(r){return r.slice()}}):e.push({event:n,oe:t,Tg:Object.is,ek:iz})}),e})(),qM=new Map,GM=x(HM),Ux=GM.next();!Ux.done;Ux=GM.next()){var KM=Ux.value;qM.set(KM.event,KM)}function D0(e,t){this.u=performance.timeOrigin||performance.timing&&performance.timing.fetchStart||Date.now()-performance.now(),this.g={};var n=e.version||2,r=e.eventTargets||[],i=e.sid||crypto.randomUUID(),o=e.zi||"query",u=[];r=x(r);for(var l=r.next();!l.done;l=r.next())(l=l.value)&&l.url&&l.events&&l.events.length&&u.push({version:l.version||2,sc:l.sc?[].concat(l.sc):[],url:l.url,events:[].concat(l.events),interval:l.interval!=null?l.interval:30,batchSize:l.batchSize||1});for(this.h=Object.assign({},e,{version:n,zi:o,sid:i,cid:e.cid,sc:e.sc,eventTargets:u}),this.j=NaN,this.i=new Map,this.m={sn:0,Ce:!1},this.o=t,this.l={},this.g={cid:this.h.cid,sid:this.h.sid,v:this.h.version},e=x(this.h.eventTargets||[]),t=e.next();!t.done;t=e.next())this.i.set(t.value,{wh:void 0,sn:0,Ce:!1,queue:[]})}D0.prototype.start=function(){var e=this;this.i.forEach(function(t,n){if(Fx(t),n.interval!==0&&n.events&&n.events.includes("t")){var r=function(){WM(e,t,n,"t"),L0(e)};t.wh=setInterval(r,n.interval*1e3),r()}})},D0.prototype.stop=function(e){e!==void 0&&e&&this.flush(),this.i.forEach(function(t){Fx(t)})},D0.prototype.flush=function(){L0(this,!0)};function Tp(e,t){t.sid&&t.sid!==e.g.sid&&uz(e),t.msd&&!isNaN(t.msd)&&(e.j=t.msd),e.g=Object.assign({},e.g,t,{msd:void 0});for(var n=x(HM),r=n.next();!r.done;r=n.next())r=r.value,r.oe in t&&!r.Tg(e.g[r.oe],e.l[r.oe])&&Ao(e,r.event)}function Ao(e,t,n){var r=n||{};if(n=qM.get(t)){var i=n.oe,o=r[i];if(o!==void 0&&(e.g[i]=o),o=e.g[i],o===void 0||n.Tg(o,e.l[i]))return;e.l[i]=n.ek(o)}e.i.forEach(function(u,l){WM(e,u,l,t,r)}),L0(e)}function WM(e,t,n,r,i){i=i||{},n.events&&n.events.includes(r)&&(n=Object.assign({},e.g,i,{e:r,ts:i.ts!=null?i.ts:Date.now(),sn:t.sn++}),isNaN(e.j)||t.Ce||(n.msd=e.j,t.Ce=!0),t.queue.push(n))}function az(e,t,n){var r=t.customData||{};if(t=Object.assign({},t,{headers:Object.assign({},t.headers||{}),Ui:Object.assign({},r,{cmcd:{}})}),!e.h.sc||!e.h.sc.length||!t.url)return t;r=new URL(t.url),n=Object.assign({},e.g,n||{},{sn:e.m.sn++});var i=zM("request",e.h,t.url);isNaN(e.j)||e.m.Ce||(n.msd=e.j,e.m.Ce=!0);var o=t.Ui.cmcd=jx(n,i);switch(e.h.zi){case"query":(e=P0(o))&&(r.searchParams.set("CMCD",e),t.url=r.toString());break;case"headers":e=Object,r=e.assign,n=t.headers;var u={},l=i.Nn;if(i={},o){var h=Object.keys(o);l=l?nz(l):{},h=x(h);for(var p=h.next();!p.done;p=h.next()){p=p.value;var m=tz[p]||l[p]||"CMCD-Request";(i[m]||(i[m]={}))[p]=o[p]}}for(o=x(Object.entries(i)),i=o.next();!i.done;i=o.next())l=x(i.value),i=l.next().value,l=l.next().value,(l=P0(l))&&(u[i]=l);r.call(e,n,u)}return t}function L0(e,t){t=t===void 0?!1:t;var n=!1;e.i.forEach(function(r,i){var o=r.queue;if(o.length&&(!(o.length<i.batchSize)||t)){var u=o.splice(0,t?o.length:i.batchSize);oz(e,i,u).catch(function(){r.queue.unshift.apply(r.queue,se(u))}),n=n||o.length>0}}),n&&L0(e)}function oz(e,t,n){var r,i,o;return P(function(u){if(u.h==1)return r=zM("event",t),u.g(e.o({url:t.url,method:"POST",headers:{"Content-Type":"application/cmcd"},body:n.map(function(l){return l?(l=jx(l,r),l=P0(l)):l="",l}).join(`
`)+`
`}),2);if(i=u.i,o=i.status,o===410)sz(e,t);else if(o===429||o>499&&o<600)throw Error("Event report failed with status "+o);u.j()})}function Fx(e){clearInterval(e.wh),e.wh=void 0}function sz(e,t){var n=e.i.get(t);n&&(Fx(n),e.i.delete(t))}function uz(e){e.i.forEach(function(t){t.sn=0}),e.m.sn=0,e.l={}}var XM=/CMCD=[^&#]+/;function YM(e,t,n){return t?(t?(t?(t=jx(t,n),t=P0(t)):t="",t=encodeURIComponent(t)):t="",t="CMCD="+t):t="",t?XM.test(e)?e.replace(XM,t):(n=e.includes("?")?"&":"?",e+n+t):e}function Bx(e,t){this.j=e,this.l=t,this.m=this.g=this.h=null,this.B=void 0,this.o=new Map,this.i=new he,this.u=0}Bx.prototype.setMediaElement=function(e){this.h=e,JM(this),this.g&&t8(this)},Bx.prototype.configure=function(e){var t=this.l;if(this.l=e,this.g){var n=t&&e.enabled&&(t.sessionId!==e.sessionId||t.contentId!==e.contentId||t.version!==e.version||t.useHeaders!==e.useHeaders||t.eventTargets!==e.eventTargets);(t&&t.enabled&&!e.enabled||n)&&(this.g.stop(!0),this.m=this.g=null)}!this.g&&this.h&&(JM(this),this.g&&t8(this))};function lz(e){e.g&&(e.g.stop(!0),e.g=null),e.m=null,e.B=void 0,e.o.clear(),e.u=0,e.i.Ea()}function cz(e,t){e.g&&(e.u=t,e.h&&e.h.autoplay&&(t=e.h.play())&&t.catch(function(){e.u=0}))}function dz(e,t,n){if(!e.g)return t;try{var r=ZM(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i="a";break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i="av";break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/x-mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i="m";break e}i=void 0}return r.ot=i,r.su=!0,YM(t,r,e8(e,t))}catch(o){return vi("CMCD_SRC_ERROR","Could not generate src CMCD data.",o),t}}function JM(e){if(!e.g&&e.l&&e.l.enabled&&e.h){var t=fz(e.l);e.g=new D0(t,hz(e)),e.g.start()}}function fz(e){e.sessionId||(e.sessionId=d.crypto.randomUUID());var t=e.includeKeys&&e.includeKeys.length?e.includeKeys:QM(e.version);t={sid:e.sessionId,cid:e.contentId,zi:e.useHeaders?"headers":"query",sc:t,version:e.version===2?2:1};var n=e.eventTargets;return n&&n.length&&(t.eventTargets=n.filter(function(r){return r.enabled!==!1&&r.url&&r.events&&r.events.length}).map(function(r){var i=r.includeKeys&&r.includeKeys.length?r.includeKeys:QM(r.version||e.version);return{url:r.url,events:r.events,interval:r.interval,batchSize:r.batchSize,sc:i,version:2}})),t}function QM(e){return e===2||e===2?Array.from(new Set([].concat(Ix,Mx,Ex))):[].concat(Px)}function hz(e){return function(t){var n,r,i,o,u,l;return P(function(h){return h.h==1?(n=iI,r=ei(),i=t.url,o=yn([i],r),o.method=t.method||"POST",o.headers=t.headers||{},o.body=Sr(t.body),h.m(2),u=e.j.hb(),h.g(u.request(n.$m,o).promise,4)):h.h!=2?h.return({status:200}):(l=h.l(),h.return({status:l&&l.status?l.status:0}))})}}function Au(e,t){e.g&&e.m!==t&&(e.m=t,Tp(e.g,{Im:t}))}function Od(e,t,n){try{var r={url:t.uris[0],headers:Object.assign({},t.headers||{}),Ui:{}},i=az(e.g,r,n),o=i.headers||{},u=Object.keys(r.headers).length;if(Object.keys(o).length>u){t.headers||(t.headers={});for(var l=x(Object.keys(o)),h=l.next();!h.done;h=l.next()){var p=h.value;p in r.headers||(t.headers[p]=o[p])}}var m=i.url;if(m&&m!==r.url)if(t.uris.length===1)t.uris=[m];else{e=null;try{e=new URL(m).searchParams.get("CMCD")}catch{}if(e!=null){var b=e;t.uris=t.uris.map(function(w){if(w.includes("offline:"))return w;try{var T=new URL(w);return T.searchParams.set("CMCD",b),T.toString()}catch{return w}})}}}catch(w){vi("CMCD_REQUEST_ERROR","Could not apply CMCD data to request.",w)}}function pz(e){return(e=e.l.eventTargets)?e.some(function(t){return t.enabled!==!1&&t.events&&t.events.includes("rr")}):!1}function ZM(e){return{v:e.l.version,sid:e.l.sessionId,cid:e.l.contentId,sf:e.B,mtp:e.j.getBandwidthEstimate()/1e3}}function e8(e,t){var n={};if(t&&!t.includes("offline:"))try{n.ge=new URL(t).origin}catch{}return e.l.version!=null&&(n.version=e.l.version),n.Xh="request",n}function t8(e){e.i.G(e.h,"pause",function(){Au(e,"a")}),e.i.G(e.h,"playing",function(){Au(e,"p"),e.g&&e.u&&(Tp(e.g,{msd:Date.now()-e.u}),e.u=0)}),e.i.G(e.h,"seeking",function(){Au(e,"k")}),e.i.G(e.h,"ended",function(){Au(e,"e")}),e.i.G(e.h,"volumechange",function(){e.g&&e.h&&Ao(e.g,e.h.muted?"m":"um")}),e.i.G(e.j,"buffering",function(n){Au(e,n.buffering?"r":"p")}),e.i.G(e.j,"adaptation",function(){if(e.g&&e.j){var n=e.j.Sc().find(function(r){return r.active});n&&n.bandwidth&&Tp(e.g,{br:[n.bandwidth/1e3]})}}),e.i.G(e.j,"error",function(){Au(e,"f"),e.g&&Ao(e.g,"e")}),e.i.G(document,"fullscreenchange",function(){e.g&&Ao(e.g,document.fullscreenElement?"pe":"pc")});var t=e.h;(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.i.G(t,"webkitpresentationmodechanged",function(){e.g&&(t.webkitPresentationMode?Ao(e.g,t.webkitPresentationMode!=="inline"?"pe":"pc"):t.webkitSupportsFullscreen&&Ao(e.g,t.webkitDisplayingFullscreen?"pe":"pc"))}),e.i.G(e.h,"enterpictureinpicture",function(){e.g&&Ao(e.g,"pe")}),e.i.G(e.h,"leavepictureinpicture",function(){e.g&&Ao(e.g,"pc")}),"documentPictureInPicture"in d&&e.i.G(d.documentPictureInPicture,"enter",function(n){e.g&&(Ao(e.g,"pe"),e.i.oa(n.window,"pagehide",function(){e.g&&Ao(e.g,"pc")}))}),e.i.G(document,"visibilitychange",function(){e.g&&Tp(e.g,{bg:document.hidden})}),e.i.G(e.j,"complete",function(){Au(e,"e")})}function gz(e){if(e.type===0)return"i";if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?"av":"v";if(t=="audio")return"a";if(t=="text")return e.mimeType==="application/mp4"?"tt":"c"}}function mz(e,t){if(t=e.j.Nc()[t],!t.length)return NaN;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:NaN}function n8(e,t){if(t=e.j.Nc()[t],!t.length)return 0;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:0}function vz(e,t){var n=e.j.Sc();if(!n.length)return NaN;e=n[0],n=x(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.type==="variant"&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case"v":return e.videoBandwidth||NaN;case"a":return e.audioBandwidth||NaN;default:return e.bandwidth}}Te("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yn:"s",OTHER:"o"}),Te("shaka.util.CmcdManager.EventType",{Zm:"bc",qn:"ps",mn:"pr",ERROR:"e",Bn:"t",an:"c",Ym:"b",ln:"m",Dn:"um",on:"pe",nn:"pc",vn:"rr",Vm:"as",Um:"ae",Tm:"abs",Sm:"abe",xn:"sk",cn:"ce"}),Te("shaka.util.CmcdManager.PlayerState",{An:"s",pn:"p",wn:"k",un:"r",PAUSED:"a",Fn:"w",dn:"e",fn:"f",tn:"q",rn:"d"});function da(e){this.h=e,this.g=null}g=da.prototype,g.configure=function(e){this.h=e},g.fj=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(a8)?this.g.get(a8)*1e3:null},g.dj=function(){return this.h.enabled&&this.g&&this.g.has(i8)?this.g.get(i8)*1e3:null},g.zl=function(){return this.h.enabled&&this.g&&this.g.has(o8)?this.g.get(o8):null},g.Al=function(){return this.h.enabled&&this.g&&this.g.has(s8)?this.g.get(s8):null},g.getBandwidthEstimate=function(e){var t=this.dj();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e};function r8(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Te("shaka.util.CmsdManager",da),da.prototype.getBandwidthEstimate=da.prototype.getBandwidthEstimate,da.prototype.getRoundTripTime=da.prototype.Al,da.prototype.getResponseDelay=da.prototype.zl,da.prototype.getEstimatedThroughput=da.prototype.dj,da.prototype.getMaxBitrate=da.prototype.fj;var i8="etp",a8="mb",o8="rd",s8="rtt";function u8(){this.g=null,this.h=[]}function Vx(e,t){return P(function(n){if(n.h==1)return e.g?n.g(new Promise(function(r){return e.h.push(r)}),2):n.A(2);e.g=t,n.j()})}u8.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function R0(e){this.g=e,this.i=this.h=null}R0.prototype.start=function(e,t){function n(i,o){r.g&&r.i===n&&e(i,o),r.g&&r.i===n&&!t&&(r.h=r.g.requestVideoFrameCallback(n))}var r=this;return t=t===void 0?!1:t,l8(this),this.g&&"requestVideoFrameCallback"in this.g?(this.i=n,this.h=this.g.requestVideoFrameCallback(n),!0):!1},R0.prototype.release=function(){l8(this),this.g=null};function l8(e){if(e.h!==null){var t,n;(t=e.g)==null||(n=t.cancelVideoFrameCallback)==null||n.call(t,e.h),e.h=null}e.i=null}function ye(e,t,n){t=t===void 0?null:t,Bt.call(this);var r=this;this.l=Ip,this.h=null,this.Gc=t,this.Fa=!1,this.$e=new he,this.Qe=new he,this.m=new he,this.ec=new he,this.$d=new he,this.F=this.H=this.B=this.K=null,this.bf=0,this.wa=new u8,this.P=this.R=this.ba=this.i=this.Bc=this.I=this.j=this.Pe=this.W=this.Ji=this.Aa=this.M=this.kb=this.ra=this.Ec=this.V=this.ib=this.L=this.bc=null,this.ha=!1,this.Ue=this.u=null,this.Te=1e9,this.Ze=[],this.Ac=new Map,this.Ye=[],this.yg=-1,this.g=Eo(this),this.Cg=rM(),this.Y=null,this.df=-1,this.cc=null,this.Ha={width:1/0,height:1/0},this.Se=new Rw(this.g,this.Ha,null),this.We=[],this.o=null,this.O=this.g.adaptationSetCriteriaFactory(),t={preferredAudio:this.g.preferredAudio,preferredVideo:this.g.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:this.keySystem()},ql(t),this.O.configure(t);var i;this.Xe=((i=this.g.preferredText[0])==null?void 0:i.language)||"";var o;this.Ag=((o=this.g.preferredText[0])==null?void 0:o.role)||"";var u;this.zg=((u=this.g.preferredText[0])==null?void 0:u.forced)||!1,this.Re=[],n&&n(this),this.M=new Bx(this,this.g.cmcd),this.Aa=new da(this.g.cmsd),this.K=v8(this),this.xa=this.za=this.Pa=this.C=null,this.Eg=!1,this.Bg=[],this.Dg=new ft(function(){return P(function(l){if(l.h==1)return r.za?l.g(r.Ub(r.xa,!0),3):l.A(0);if(l.h!=4)return l.g(r.load(r.za),4);r.Eg?r.xa.pause():r.xa.play(),r.za=null,r.Eg=!1,l.j()})}),z0&&(this.C=z0(this),this.C.configure(this.g.ads),this.$d.G(this.C,"ad-content-pause-requested",function(l){var h,p;return P(function(m){if(m.h==1)return r.Dg.stop(),r.za?m.A(0):(r.xa=r.h,r.Eg=r.Gd(),h=l.saveLivePosition||!1,p=!0,r.isLive()&&(p=h),m.g(r.Xi(!0,p),3));r.za=m.i,m.j()})}),this.$d.G(this.C,"ad-content-resume-requested",function(l){if(l=l.offset||0,r.za){var h=r.za;h.B&&l&&(typeof h.B=="number"?h.B+=l:h.B.setTime(h.B.getTime()+l*1e3))}r.Dg.$(.1)}),this.$d.G(this.C,"ad-content-attach-requested",function(){return P(function(l){if(l.h==1)return r.h||!r.xa?l.A(0):l.g(r.Ub(r.xa,!0),3);r.xa=null,l.j()})})),H0&&(this.Pa=H0(this),this.Pa.configure(this.g.queue)),this.$e.G(d,"online",function(){Kx(r),r.di()}),this.Ve=new ft(function(){for(var l=Date.now()/1e3,h=!1,p=!0,m=x(r.i.variants),b=m.next();!b.done;b=m.next())b=b.value,b.disabledUntilTime>0&&b.disabledUntilTime<=l&&(b.disabledUntilTime=0,h=!0),b.disabledUntilTime>0&&(p=!1);p&&r.Ve.stop(),h&&Ud(r,!1,void 0,!1,!1)}),this.J=this.D=this.sb=null,this.ce=new Set,this.ma=null,this.Hi=new fd,this.cf=null,e&&(ut("Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ub(e,!0))}K(ye,Bt);function N0(e){e.W!=null&&(s5(e.W),e.W.release(),e.W=null)}function yz(e,t,n){n||t.lcevc.enabled?(N0(e),e.W==null&&(e.W=new _h(e.h,e.Ji,t.lcevc,n),e.H&&(e.H.H=e.W))):N0(e)}function Kt(e,t){return new Ge(e,t)}g=ye.prototype,g.destroy=function(){var e=this,t;return P(function(n){switch(n.h){case 1:return e.l==ha?n.return():(N0(e),t=e.detach(),e.l=ha,n.g(t,2));case 2:return n.g(e.Sg(),3);case 3:if(e.$e&&(e.$e.release(),e.$e=null),e.Qe&&(e.Qe.release(),e.Qe=null),e.m&&(e.m.release(),e.m=null),e.ec&&(e.ec.release(),e.ec=null),e.$d&&(e.$d.release(),e.$d=null),e.Ue=null,e.g=null,e.o=null,e.Gc=null,e.M=null,e.Aa=null,!e.K){n.A(4);break}return n.g(e.K.destroy(),5);case 5:e.K=null;case 4:e.u&&(e.u.release(),e.u=null),e.Pa&&(e.Pa.destroy(),e.Pa=null),e.J&&(e.J.release(),e.J=null),e.ma&&(e.ma.release(),e.ma=null),Bt.prototype.release.call(e),n.j()}})};function c8(e,t){V8.set(e,t)}function jd(e,t){e.dispatchEvent(Kt("onstatechange",new Map().set("state",t)))}g.Ub=function(e,t){t=t===void 0?!0:t;var n=this,r,i,o;return P(function(u){switch(u.h){case 1:if(n.l==ha)throw new B(2,7,7e3);if(r=n.h&&n.h==e,!n.h||n.h==e){u.A(2);break}return u.g(n.detach(),2);case 2:return u.g($x(n,"attach"),4);case 4:if(u.i)return u.return();if(u.m(5,6),r||(jd(n,"attach"),i=function(){var l=Wx(n,!1);l&&Fd(n,l)},n.Qe.G(e,"error",i),n.h=e,n.M&&n.M.setMediaElement(e)),Qe(),!t||!rs()||n.H){u.A(6);break}return u.g(zx(n),6);case 6:u.u(),n.wa.release(),u.B(0);break;case 5:return o=u.l(),u.g(n.detach(),10);case 10:throw o}})},g.Dk=function(e){this.Ji=e},g.detach=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this;return P(function(r){if(r.h==1){if(n.l==ha)throw new B(2,7,7e3);return r.g(n.Fc(!1,e,t),2)}if(r.h!=3)return r.g($x(n,"detach"),3);if(r.i)return r.return();try{n.h&&(n.Qe.Ea(),n.h=null),jd(n,"detach"),n.C&&!e&&n.C.release()}finally{n.wa.release()}r.j()})};function $x(e,t){var n;return P(function(r){return r.h==1?(n=++e.bf,r.g(Vx(e.wa,t),2)):n!=e.bf?(e.wa.release(),r.return(!0)):r.return(!1)})}g.Fc=function(e,t,n){e=e===void 0?!0:e,t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:return r.l!=ha&&(r.l=Ip),N.g($x(r,"unload"),2);case 2:return N.i?N.return():(N.D(3),r.ha=!1,jd(r,"unload"),N0(r),i=r.Re.map(function(j){return j()}),r.Re=[],N.g(Promise.all(i),5));case 5:if(o=new Map().set("isSwitchingContent",n),r.dispatchEvent(Kt("unloading",o)),r.Ec&&(r.Ec.release(),r.Ec=null),r.ra&&(r.ra.release(),r.ra=null),r.kb&&(r.kb.release(),r.kb=null),r.h&&(r.m.Ea(),r.ec.Ea()),r.Ve.stop(),r.bc&&(r.bc.release(),r.bc=null),r.ib&&(r.ib.stop(),r.ib=null),!r.I){N.A(6);break}return N.g(r.I.stop(),7);case 7:r.I=null,r.Bc=null;case 6:if(r.u&&r.u.stop(),!r.j){N.A(8);break}return N.g(r.j.destroy(),9);case 9:r.j=null;case 8:if(r.L&&(r.L.release(),r.L=null),r.F&&(r.F.release(),r.F=null),d.shakaMediaKeysPolyfill!=="webkit"||!r.B){N.A(10);break}return N.g(r.B.destroy(),11);case 11:r.B=null;case 10:if(!r.H){N.A(12);break}return N.g(r.H.destroy(),13);case 13:r.H=null;case 12:if(r.C&&!t&&r.C.onAssetUnload(),r.za&&!t&&(r.za.destroy(),r.za=null),t||r.Dg.stop(),r.M&&lz(r.M),r.Aa&&(r.Aa.g=null),!r.D){N.A(14);break}return N.g(r.D.destroy(),15);case 15:r.D=null;case 14:return r.Fa=!1,r.J&&r.J.disable(),r.ce.clear(),r.ma&&(r.ma.release(),r.ma=null),N.g(r.Hi.destroy(),16);case 16:if(r.h){for(u=x(r.Bg),l=u.next();!l.done;l=u.next())h=l.value,h.src.startsWith("blob:")&&URL.revokeObjectURL(h.src),h.remove();r.Bg=[],t0(r.h)&&r.h.load()}if(!r.B){N.A(17);break}return N.g(r.B.destroy(),18);case 18:r.B=null;case 17:if(r.sb&&r.ba!=r.sb.$c()&&(r.sb.l||r.sb.destroy(),r.sb=null),r.ba=null,r.R=null,r.V=null,r.i){for(p=x(r.i.variants),m=p.next();!m.done;m=p.next())for(b=m.value,w=x([b.audio,b.video]),T=w.next();!T.done;T=w.next())(k=T.value)&&k.segmentIndex&&k.segmentIndex.release();for(S=x(r.i.textStreams),A=S.next();!A.done;A=S.next())M=A.value,M.segmentIndex&&M.segmentIndex.release()}for(r.g&&r.g.streaming.clearDecodingCache&&(Bv.clear(),nd.clear()),r.i=null,r.o=new A0,r.Ii=null,r.cc=null,r.Y=null,r.df=-1,r.Ze=[],_=x(r.Ac.values()),R=_.next();!R.done;R=_.next())U=R.value,U.stop();r.Ac.clear(),r.Ye=[],r.yg=-1,r.K&&r.K.Ri(),r.cf&&(URL.revokeObjectURL(r.cf),r.cf=null),Sp(r);case 3:N.u(),r.wa.release(),N.B(4);break;case 4:if(Qe(),e&&rs()&&!r.H&&r.h)return N.g(zx(r),0);N.A(0)}})},g.Qm=function(e){this.P=e},g.load=function(e,t,n){t=t===void 0?null:t;var r=this,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R;return P(function(U){switch(U.h){case 1:if(r.l==ha)throw new B(2,7,7e3);if(r.h||!r.xa){U.A(2);break}return U.g(r.Ub(r.xa,!0),3);case 3:r.xa=null;case 2:if(i=null,o="",n=(u=n)==null?void 0:u.toLowerCase(),e instanceof ca){if(e.l)throw new B(2,7,7006);i=e,o=i.$c()||""}else o=e||"";return U.g(Vx(r.wa,"load"),4);case 4:if(r.wa.release(),!r.h)throw new B(2,7,7002);if(!r.ba){U.A(5);break}return r.ba=o,U.g(r.Fc(!1,!1,!0),5);case 5:if(l=++r.bf,h=function(){return P(function(N){if(N.h==1)return r.bf==l?N.A(0):i?N.g(i.destroy(),3):N.A(3);throw new B(2,7,7e3)})},p=function(N,j){return P(function(V){switch(V.h){case 1:return V.D(2),V.g(Vx(r.wa,j),4);case 4:return V.g(h(),5);case 5:return V.g(N(),6);case 6:return V.g(h(),7);case 7:i&&r.g&&(i.i=r.g);case 2:V.u(),r.wa.release(),V.B(0)}})},U.m(7,8),t==null&&i&&(t=i.getStartTime()),r.P=t,r.ha=!1,r.dispatchEvent(Kt("loading")),i){n=i.Af(),U.A(10);break}if(n){U.A(10);break}return U.g(p(function(){return P(function(N){if(N.h==1)return N.g(p8(r,o),2);n=N.i,N.j()})},"guessMimeType_"),10);case 10:if(m=!!i,i){uM(i,r),r.o=i.getStats(),U.A(13);break}return U.g(f8(r,o,t,n,!0,r.g),14);case 14:(i=U.i)?(i.H=!1,uM(i,r),r.o=i.getStats(),i.start(),i.F.promise.catch(function(){})):r.o=new A0;case 13:return b=!i,w=Date.now()/1e3,r.o=i?i.getStats():new A0,r.ba=o,r.R=n||null,Sp(r),T=function(){var N=r.h?r.h.buffered:null;return{start:zI(N)||0,end:Jv(N)||0}},r.ra=new lp(T),r.ra.addEventListener("regionadd",function(N){Hx(r,N.region,"metadataadded")}),b?U.g(p(function(){return P(function(N){return N.g(kz(r,n),0)})},"initializeSrcEqualsDrmInner_"),25):(r.kb=new lp(T),U.g(p(function(){return P(function(N){if(N.h==1)return N.g(Promise.race([i.ha.promise,i.F.promise]),2);r.Bc=i.J;var j=i;j.ma=!0,r.I=j.o,r.i=i.nh(),N.j()})},"waitForFinish"),17));case 17:if(r.H){U.A(18);break}return U.g(p(function(){return P(function(N){return N.g(zx(r),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return U.g(p(function(){return P(function(N){return N.g(i.F.promise,0)})},"waitForFinish"),20);case 20:if(r.g=i.getConfiguration(),r.Se=i.I,r.I&&r.I.setMediaElement&&r.h&&r.I.setMediaElement(r.h),r.Ec=l$(i),r.Pe=i.Aa,(k=i.m)&&(r.O=k),m&&r.h&&r.h.nodeName==="AUDIO"&&(bz(r),r.configure("manifest.disableVideo",!0)),i.j){U.A(21);break}return U.g(p(function(){return P(function(N){return N.g(lM(i,r.h),0)})},"drmEngine_.init"),21);case 21:return r.B=c$(i),U.g(p(function(){return P(function(N){return N.g(r.B.Ub(r.h),0)})},"drmEngine_.attach"),23);case 23:return r.O&&(S=r.O.getConfiguration(),S.keySystem=r.keySystem(),r.O.configure(S)),A=r.g.abrFactory,r.u&&r.Ue==A||(r.Ue=A,r.u&&r.u.release(),r.u=A(),r.u.configure(r.g.abr)),M=d$(i),_=i.h,U.g(p(function(){return P(function(N){return N.g(xz(r,w,_,M),0)})},"loadInner_"),24);case 24:u$(i),r.R&&Qe().jk()&&Vh(r.R)&&zB(r.H,r.ba,r.R),U.A(16);break;case 25:return U.g(p(function(){return P(function(N){return N.g(Tz(r,w,n),0)})},"srcEqualsInner_"),16);case 16:r.dispatchEvent(Kt("loaded"));case 8:if(U.u(),!i){U.A(27);break}return U.g(i.destroy(),27);case 27:r.sb=null,U.B(0);break;case 7:if(R=U.l(),!R||R.code==7e3){U.A(29);break}return U.g(r.Fc(!1),29);case 29:throw R}})};function bz(e){for(var t=x(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(r){return r.audio})}g.rk=function(e,t,n,r){e=e===void 0?!0:e,t=t===void 0?!1:t,n=n===void 0?!1:n,r=r===void 0?!1:r;var i=this,o;return P(function(u){return u.h==1?u.g(d8(i,n),2):u.h!=3?(o=u.i,u.g(i.Fc(e,t,r),3)):u.return(o)})},g.Xi=function(e,t,n){e=e===void 0?!1:e,t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this,i;return P(function(o){return o.h==1?o.g(d8(r,t),2):o.h!=3?(i=o.i,o.g(r.detach(e,n),3)):o.return(i)})};function d8(e,t){t=t===void 0?!1:t;var n,r,i;return P(function(o){if(o.h==1)return n=null,e.i&&e.I&&e.Bc&&e.ba&&e.g?(r=e.h.currentTime,t||(r=null),o.g(h8(e,e.ba,r,e.R,e.g,!0,!1),3)):o.A(2);if(o.h!=2){n=o.i,e.We.push(n),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(i=e.j?e.j.o:null)&&(n.h=i);var u=n,l=e.I,h=e.Bc;u.g=e.i,u.o=l,u.J=h,n.m=e.O,n.start(),e.i=null,e.I=null,e.Bc=null,e.u=null,e.Ue=null}return o.return(n)})}g.preload=function(e,t,n,r,i){t=t===void 0?null:t,i=i===void 0?!1:i;var o=this,u,l,h,p;return P(function(m){if(m.h==1)return n=(u=n)==null?void 0:u.toLowerCase(),l=Eo(o),Us(l,r||o.g,Eo(o)),m.g(f8(o,e,t,n,!1,l),2);if(h=m.i)h.start();else{if(p=new B(2,7,7005),i)throw p;Fd(o,p)}return m.return(h)})},g.Sg=function(){var e=this,t,n,r,i;return P(function(o){for(t=[],n=x(e.We),r=n.next();!r.done;r=n.next())i=r.value,i.l||t.push(i.destroy());return e.We=[],o.g(Promise.all(t),0)})};function f8(e,t,n,r,i,o){i=i===void 0?!1:i;var u,l,h;return P(function(p){return p.h==1?r?p.A(2):p.g(p8(e,t),3):(p.h!=2&&(r=p.i),wz(e,r)?p.return(null):(u=o||e.g,l=!1,i&&e.h&&e.h.nodeName==="AUDIO"&&(l=!0),h=h8(e,t,n,r||null,u,!i,l),h=i?h.then(function(m){return m.H=!1,m}):h.then(function(m){return e.We.push(m),m}),p.return(h)))})}function h8(e,t,n,r,i,o,u){o=o===void 0?!0:o,u=u===void 0?!1:u;var l,h,p,m,b,w,T,k,S,A,M,_,R,U,N;return P(function(j){return j.h==1?(l=null,h=Hi(i),u&&(h.manifest.disableVideo=!0),p=function(){return l.R&&l.l?null:l},m=function(){return p()?p().getConfiguration():e.g},e.Ha.width!=1/0||e.Ha.height!=1/0||e.g.ignoreHardwareResolution?j.A(2):(b=Qe(),j.g(b.Wb(),3))):(j.h!=2&&(w=j.i,e.Ha.width=w.width,e.Ha.height=w.height),T=new Rw(h,e.Ha,null),k={networkingEngine:e.K,filter:function(V){var q,G;return P(function(z){if(z.h==1)return z.g(SI(T,V),2);if(z.h!=4)return q=z.i,q?(G=Kt("trackschanged"),z.g(Promise.resolve(),4)):z.A(0);l.dispatchEvent(G),z.j()})},makeTextStreamsForClosedCaptions:function(V){for(var q=new Set,G=x(V.textStreams),z=G.next();!z.done;z=G.next())z=z.value,z.mimeType!="application/cea-608"&&z.mimeType!="application/cea-708"||q.add(z.originalId);for(G=x(V.variants),z=G.next();!z.done;z=G.next())if((z=z.value.video)&&z.closedCaptions){for(var J=x(z.closedCaptions.keys()),ie=J.next();!ie.done;ie=J.next())if(ie=ie.value,!q.has(ie)){var le=ie.startsWith("CC")?"application/cea-608":"application/cea-708",be=new bn,ce=z.closedCaptions.get(ie);le=_s({id:e.Te++,originalId:ie,segmentIndex:be,mimeType:le,kind:"caption",language:ce,originalLanguage:ce,type:mt,roles:z.roles}),V.textStreams.push(le),q.add(ie)}}},onTimelineRegionAdded:function(V){rx(l.K,V)},onEvent:function(V){return l.dispatchEvent(V)},onError:function(V){return l.onError(V)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){e.j&&l.R&&e.j.updateDuration()},newDrmInfo:function(V){var q=l.j,G=q?q.Xb():null;G&&q.u&&EI(T,G.keySystem,V)},onManifestUpdated:function(){var V=new Map().set("isLive",e.isLive()).set("isInProgress",e.Hd());l.dispatchEvent(Kt("manifestupdated",V)),Gl(l,!1,function(){e.C&&e.C.onManifestUpdated(e.ya())})},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},onMetadata:function(V,q,G,z){var J=V;(V=="com.apple.hls.interstitial"||V=="com.apple.hls.overlay")&&(J="com.apple.quicktime.HLS");var ie={type:J,startTime:q,endTime:G,values:z};V=new Promise(function(ce){Gl(l,!1,function(){return P(function(ae){switch(ae.h){case 1:if(!e.C){ae.A(0);break}if(!e.h){ae.A(3);break}return ae.m(4),ae.g(e.C.onHLSMetadata(ie),6);case 6:ae.o(3);break;case 4:ae.l();case 3:ce(),ae.j()}})})}),z=x(z);for(var le=z.next(),be={};!le.done;be={Oh:void 0},le=z.next())be.Oh=le.value,be.Oh.name!="ID"&&Gl(l,!1,(function(ce){return function(){j0(e,q,G,J,ce.Oh)}})(be));return V},disableStream:function(V){return e.disableStream(V,e.g.streaming.maxDisabledTime)},addFont:function(V,q){return e.addFont(V,q)},getStreamingRetryParameters:function(){return e.g.streaming.retryParameters},onSegmentReceived:function(V,q){Gl(l,!1,function(){var G;(G=e.u)==null||G.segmentDownloaded(V,q,!0)})}},S=new lp(function(){return e.Na()}),S.addEventListener("regionadd",function(V){var q=V.region;Ep(e,"timelineregionadded",q,l),Gl(l,!1,function(){e.C&&e.C.onDASHMetadata(q)})}),A=null,h.streaming.observeQualityChanges&&(A=new d0(function(){return e.Nc()}),A.addEventListener("qualitychange",function(V){U8(e,V.quality,V.position)}),A.addEventListener("audiotrackchange",function(V){U8(e,V.quality,V.position,!0)})),M=!0,_={xc:e.K,onError:function(V){return l.onError(V)},Wf:function(V){Gl(l,!0,function(){e.B&&Fz(e,V)})},onExpirationUpdated:function(V,q){var G=Kt("expirationupdated");l.dispatchEvent(G),(G=l.o)&&G.onExpirationUpdated&&G.onExpirationUpdated(V,q)},onEvent:function(V){if(l.dispatchEvent(V),V.type=="drmsessionupdate"&&M){M=!1,V=Date.now()/1e3-l.xa;var q=e.o||l.getStats();V>=0&&(q.m=V),e.W&&s5(e.W)}}},R=v8(e,p),eI(e.K,R),U=function(){return e.td(_)},N={config:h,Ul:k,jm:S,im:A,td:U,Tl:T,networkingEngine:R,Bk:o},l=new ca(t,r,n,N),j.return(l))})}function p8(e,t){var n,r,i,o;return P(function(u){return u.h==1?(n=e.g.manifest.retryParameters,u.g(Pd(t,e.K,n),2)):(r=u.i,Vh(r)?(i=Qe(),i.Qa()==="WEBKIT"&&(r="application/vnd.apple.mpegurl")):r==="video/quicktime"&&(o=Qe(),o.Qa()==="CHROMIUM"&&(r="video/mp4")),u.return(r))})}function wz(e,t){if(!rs(Qe()))return!0;if(t){if((e.h||$l()).canPlayType(t)=="")return!1;if(!rs(Qe())||!id.has(t))return!0;if(Vh(t))return Qe().Qa()==="WEBKIT"&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function O0(e,t){var n=e.g.textDisplayFactory;e.Ii!==n||t!==void 0&&t?(t=e.D,e.D=n(e),e.D.configure(e.g.textDisplayer),t?(e.D.setTextVisibility(t.isTextVisible()),t.destroy().catch(function(){})):e.D.setTextVisibility(e.Fa),e.H&&ZB(e.H,e.D),e.Ii=n,e.j&&IV(e.j)):e.D&&e.D.configure(e.g.textDisplayer)}function zx(e){var t,n,r;return P(function(i){if(i.h==1)return Qe(),jd(e,"media-source"),e.g.mediaSource.useSourceElements&&t0(e.h),O0(e),t=_z(e.h,e.D,{se:function(){return e.keySystem()},onMetadata:function(o,u,l){o=x(o);for(var h=o.next();!h.done;h=o.next())if(h=h.value,h.data&&typeof h.cueTime=="number"&&h.frames){var p=h.cueTime+u,m=l;m&&p>m&&(m=p);for(var b=x(h.frames),w=b.next();!w.done;w=b.next())j0(e,p,m,"org.id3",w.value);e.C&&e.C.onHlsTimedMetadata(h,p)}},bm:function(o){e.kb&&rx(e.kb,{schemeIdUri:o.schemeIdUri,startTime:o.startTime,endTime:o.endTime,id:String(o.id),emsg:o})},onEvent:function(o){return e.dispatchEvent(o)},fm:function(){e.I&&e.I.update&&e.I.update()},Xb:function(){return e.drmInfo()}},e.W,e.g.mediaSource),n=e.g.manifest,r=n.segmentRelativeVttTiming,t.Aa=r,i.g(t.M.promise,2);e.H=t,i.j()})}function g8(e,t){e.L=new c0({ph:function(){return t.playbackRate},zd:function(){return t.defaultPlaybackRate},Zj:function(n){t.playbackRate=n},Zl:function(n){var r=t.currentTime;if(Qv(t.buffered,r)&&!(t.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){var i=r+n,o=e.Na();if(i<o.start)r!==o.start&&(t.currentTime=o.start);else if(i>o.end)r!==o.end&&(t.currentTime=o.end);else{if(n<0){for(n=Fa(t.buffered),r=n.length-1;r>=0;r--)if(i>=n[r].start){i>n[r].end&&(i=Math.max(n[r].start,n[r].end-.5));break}}t.currentTime=i}}},isPaused:function(){return t.paused}})}function m8(e,t,n){e.m.Hb(t,["playing","pause","ended"],function(){Gx(e)}),e.m.G(t,"ratechange",function(){I8(e)});var r=Jp(Qe(),t);if(r&&(e.m.G(r,"connect",function(){e.j&&r.state=="connected"&&Io(e),fa(e)}),e.m.G(r,"connecting",function(){return fa(e)}),e.m.G(r,"disconnect",function(){return P(function(o){if(o.h==1)return e.j&&r.state=="disconnected"?o.g(pp(e.j),3):o.A(2);o.h!=2&&Io(e),fa(e),o.j()})})),t.audioTracks&&e.m.Hb(t.audioTracks,["addtrack","removetrack","change"],function(){fa(e)}),t.videoTracks&&e.m.Hb(t.videoTracks,["addtrack","removetrack","change"],function(){fa(e)}),(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.m.G(t,"webkitpresentationmodechanged",function(){e.Gc&&O0(e,!0)}),t.textTracks){var i=function(){e.l===ni&&e.D instanceof lr&&Io(e),fa(e)};e.m.G(t.textTracks,"addtrack",function(o){if(o.track)switch(o=o.track,o.kind){case"metadata":Az(e,o);break;case"chapters":Ez(e,o);break;default:i()}}),e.m.Hb(t.textTracks,["removetrack","change"],i)}t.preload!="none"&&(e.m.oa(t,"loadedmetadata",function(){var o=e.o,u=Date.now()/1e3-n;u>=0&&(o.H=u)}),e.pj()||(e.ma=new R0(t),e.ma.start(function(){e.ma.release(),e.ma=null;var o=e.o,u=Date.now()/1e3-n;u>=0&&(o.o=u)},!0)||e.m.oa(t,"loadeddata",function(){var o=e.o,u=Date.now()/1e3-n;u>=0&&(o.o=u)})))}function xz(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de;return P(function(re){switch(re.h){case 1:for(jd(e,"load"),i=e.h,g8(e,i),m8(e,i,t),("onchange"in d.screen)&&e.m.G(d.screen,"change",function(){if(e.O.getConfiguration){var pe=e.O.getConfiguration();pe.preferredVideo.some(function(Re){return Re.hdrLevel=="AUTO"})?Eu(e):e.g.preferredVideo.some(function(Re){return Re.hdrLevel=="AUTO"})&&e.g.abr.enabled&&(pe.preferredVideo=e.g.preferredVideo,ql(pe),e.O.configure(pe),Eu(e))}}),o=!1,u=x(e.i.variants),l=u.next();!l.done;l=u.next())h=l.value,(p=h.video&&h.video.dependencyStream)&&(o=Y2(p));yz(e,e.g,o),e.Xe=e.g.preferredText[0]&&e.g.preferredText[0].language||"",e.Ag=e.g.preferredText[0]&&e.g.preferredText[0].role||"",e.zg=((m=e.g.preferredText[0])==null?void 0:m.forced)||!1,Xx(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.u.init(function(pe,Re,W){e.i&&e.j&&pe!=e.j.o&&Ap(e,pe,!0,Re===void 0?!1:Re,W===void 0?0:W)},function(pe,Re){var W,Se=(W=e.j)==null?void 0:W.o;(pe=Se&&Se[pe])&&e.disableStream(pe,Re)}),e.u.setMediaElement(i),e.u.setCmsdManager(e.Aa),e.j=Dz(e),e.j.configure(e.g.streaming),e.l=nr,e.dispatchEvent(Kt("streaming")),b=n;case 2:for(T=e.j.o,T||(k=_8(e,!0),n||(b=k)),S=[],w=T||b,A=x([w.video,w.audio]),M=A.next();!M.done;M=A.next())(_=M.value)&&!_.segmentIndex&&(S.push(_.createSegmentIndex()),_.dependencyStream&&S.push(_.dependencyStream.createSegmentIndex()));if(!(S.length>0)){re.A(4);break}return re.g(Promise.all(S),4);case 4:if(!w||w.disabledUntilTime!=0){re.A(2);break}return Eu(e),e.I&&e.I.onInitialVariantChosen&&e.I.onInitialVariantChosen(w),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Cg):ut("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.M&&cz(e.M,t*1e3),Xx(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),CV(e.j,e.g.playRangeStart,e.g.playRangeEnd),re.g(F8(e),7);case 7:if(e.ha=!0,e.dispatchEvent(Kt("canupdatestarttime")),R=function(pe){e.F=Iz(e,pe),e.bc=Mz(e,pe),y8(e,i,!1)},e.g.streaming.startAtSegmentBoundary||(U=e.P,U==null&&e.i.startTime&&(U=e.i.startTime),R(U)),T){re.A(8);break}if(!e.g.streaming.startAtSegmentBoundary){re.A(9);break}return N=e.i.presentationTimeline,e.P instanceof Date&&(V=N.j||N.h,q=e.P.getTime()/1e3-V,q!=null&&(j=q)),j==null&&(j=typeof e.P=="number"?e.P:e.isLive()?1/0:e.h.currentTime),e.P==null&&e.i.startTime&&(j=e.i.startTime),G=N.Kb(),z=N.Eb(),j<G?j=G:j>z&&(j=z),re.g(Oz(b,j),10);case 10:J=re.i,R(J);case 9:Ap(e,b,!0,!1,0);case 8:return e.F.ready(),ie=e.Gb().find(function(pe){return pe.active}),ie||((le=jz(e,b))&&(aM(e.o.j,le,!0),le?(e.Fa=!0,e.D.setTextVisibility(!0)):(e.Fa=!1,e.D.setTextVisibility(!1))),le&&e.Fa&&(ux(e.j,le),$0(e))),re.g(e.j.start(r),11);case 11:e.g.abr.enabled&&(e.u.enable(),j8(e)),fa(e),e.i.variants.some(function(pe){return pe.primary}),((be=e.ya())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(ce=function(){return P8(e)},e.m.G(i,"timeupdate",ce)),be||(ae=function(){return V0(e)},e.m.G(i,"timeupdate",ae),V0(e),e.i.nextUrl&&(e.g.streaming.preloadNextUrlWindow>0&&(de=function(){var pe;return P(function(Re){if(Re.h==1)return pe=e.Na().end-e.h.currentTime,isNaN(pe)||!(pe<=e.g.streaming.preloadNextUrlWindow)?Re.A(0):(e.m.Ua(i,"timeupdate",de),Re.g(e.preload(e.i.nextUrl),4));e.sb=Re.i,Re.j()})},e.m.G(i,"timeupdate",de)),e.m.G(i,"ended",function(){e.load(e.sb||e.i.nextUrl)}))),e.C&&e.C.onManifestUpdated(be),re.j()}})}function kz(e,t){var n,r,i;return P(function(o){return o.h==1?(n=Date.now()/1e3,r=!0,e.B=e.td({xc:e.K,onError:function(u){Fd(e,u)},Wf:function(){},onExpirationUpdated:function(){var u=Kt("expirationupdated");e.dispatchEvent(u)},onEvent:function(u){if(e.dispatchEvent(u),u.type=="drmsessionupdate"&&r){r=!1,u=e.o;var l=Date.now()/1e3-n;l>=0&&(u.m=l)}}}),e.B.configure(e.g.drm),i=G5([t]),e.B.O=!0,o.g(cI(e.B,[i],[]),2)):o.g(e.B.Ub(e.h),0)})}function Tz(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be;return P(function(ce){switch(ce.h){case 1:if(jd(e,"src-equals"),r=e.h,e.F=new I4(r),i=!1,e.Re.push(function(){i=!0}),e.dispatchEvent(Kt("canupdatestarttime")),e.P!=null&&e.F.xg(e.P),e.bc=Pz(e,e.P||0),g8(e,r),y8(e,r,!0),r.textTracks&&(O0(e),o=function(ae){if(!(e.D instanceof lr)){var de=U0(e).find(function(re){return re.mode!=="disabled"});de&&(de.mode=ae?"showing":"hidden")}},e.m.G(r,"enterpictureinpicture",function(){return o(!0)}),e.m.G(r,"leavepictureinpicture",function(){return o(!1)}),u=Qe(),(l=Jp(u,r))?e.m.Hb(l,["connect","connecting","disconnect"],function(){o(!1)}):"webkitCurrentPlaybackTargetIsWireless"in r&&e.m.G(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),h=r,(h.webkitPresentationMode||h.webkitSupportsFullscreen)&&e.m.G(h,"webkitpresentationmodechanged",function(){h.webkitPresentationMode?o(h.webkitPresentationMode!=="inline"):h.webkitSupportsFullscreen&&o(h.webkitDisplayingFullscreen)})),m8(e,r,t),p=dz(e.M,e.ba,n),!(e.R&&e.g.streaming.processSrcEqualMetadata&&KI(e.R))){ce.A(2);break}return b=!1,w=e.g.streaming.retryParameters,T=yn([p],w),k=e.K.request(0,T),wu(e.Hi,k),S=function(ae){ae.request===T&&(ae=ae.headers,!ae["content-length"]||ae["icy-br"]||ae["icy-description"]||ae["icy-genre"]||ae["icy-name"]||ae["icy-url"])&&(b=!0,k.abort())},e.addEventListener("downloadheadersreceived",S),ce.m(3,4),ce.g(k.promise,6);case 6:A=ce.i,m=H(A.data),M=new Blob([A.data],{type:e.R}),p=URL.createObjectURL(M),e.cf=p;case 4:ce.u(),e.removeEventListener("downloadheadersreceived",S),ce.B(2);break;case 3:if(_=ce.l(),!b)throw _;ce.A(4);break;case 2:if(!p.includes("#t=")&&(e.g.playRangeStart>0||isFinite(e.g.playRangeEnd))&&(p+="#t=",e.g.playRangeStart>0&&(p+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(p+=","+e.g.playRangeEnd)),!e.H){ce.A(7);break}return ce.g(e.H.destroy(),8);case 8:e.H=null;case 7:return t0(r),r.src=p,R=Qe(),R.Ra()=="TV"&&r.load(),r.preload!="none"&&!r.autoplay&&Vh(n)&&R.Qa()==="WEBKIT"&&r.load(),e.l=ni,e.dispatchEvent(Kt("streaming")),U=function(){return new Promise(function(ae){var de=new ft(ae);e.m.G(r.textTracks,"change",function(){return de.$(.5)}),de.$(.5)})},N=Promise.withResolvers(),Md(r,HTMLMediaElement.HAVE_METADATA,e.m,function(){return P(function(ae){if(ae.h==1)return e.F.ready(),e.R&&Vh(e.R)?ae.g(U(),3):(N.resolve(),ae.A(0));N.resolve(),ae.j()})}),Md(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,function(){var ae,de,re,pe,Re;return P(function(W){if(W.h==1)return W.g(U(),2);if(i)return W.return();if(Sz(e),ae=U0(e),ae.some(function(Se){return Se.mode==="showing"})&&(e.Fa=!0,e.D.setTextVisibility(!0)),!(e.D instanceof lr))for(de=!1,re=x(ae),pe=re.next();!pe.done;pe=re.next())Re=pe.value,Re.mode!=="disabled"&&(de?(Re.mode="disabled",ut("Found more than one enabled text track, disabling it",Re)):(S8(e,Re),de=!0));Cz(e),W.j()})}),r.error?N.reject(Wx(e)):r.preload=="none"&&(ut('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),N.resolve()),e.m.oa(r,"error",function(){N.reject(Wx(e))}),ce.g(Ov(e.g.streaming.loadTimeout,N.promise),9);case 9:if(((j=e.ya())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(V=function(){return P8(e)},e.m.G(r,"timeupdate",V)),j||(q=function(){return V0(e)},e.m.G(r,"timeupdate",q),V0(e)),e.C&&(e.C.onManifestUpdated(j),j&&(G=e.Na().end,e.m.G(r,"progress",function(){var ae=e.Na().end;G!=ae&&(e.C.onManifestUpdated(e.ya()),G=ae)}))),e.R&&m&&(z=GI(m,e.R),z.length))for(J=e.h.duration,ie=x(z),le=ie.next();!le.done;le=ie.next())be=le.value,j0(e,0,J,"org.id3",be);return ce.g(F8(e),10);case 10:e.ha=!0,ce.j()}})}function Sz(e){var t=e.g.preferredAudio;if(t.length&&e.h&&e.h.audioTracks){var n=e.Sc();t=x(t);for(var r=t.next();!r.done;r=t.next())if(r=r.value,r.language&&(r=Ps(n,r.language,r.role,!1)[0])){e.gi(r);break}}}function Cz(e){var t=e.Gb();if(!t.some(function(i){return i.active})){for(var n=x(e.g.preferredText),r=n.next();!r.done;r=n.next())if(r=r.value,r.language&&(r=Ps(t,r.language,r.role,r.forced),r.length)){e.Dc(r[0]);return}if(e.h&&e.h.audioTracks&&e.g.accessibility.handleForcedSubtitlesAutomatically&&(n=Array.from(e.h.audioTracks).find(function(i){return i.enabled}))&&(t=Ps(t,n.language,"",!0),t.length)){e.Dc(t[0]);return}e.Dc(null)}}function Az(e,t){if(t.kind=="metadata"){t.mode="hidden";var n=function(){if(t.cues){for(var i=[],o=x(t.cues),u=o.next(),l={};!u.done;l={Ob:void 0},u=o.next())l.Ob=u.value,l.Ob.startTime!=null&&"type"in l.Ob&&(u=i.find((function(h){return function(p){return p.startTime==h.Ob.startTime&&p.endTime==h.Ob.endTime}})(l)),u||(u={type:l.Ob.type,startTime:l.Ob.startTime,endTime:l.Ob.endTime,values:[]},i.push(u)),l.Ob.value&&l.Ob.value.key=="X-AD-CREATIVE-SIGNALING"&&(u.type="urn:svta:advertising-wg:ad-creative-signaling"),u.values.push(l.Ob.value));for(i=x(i),o=i.next();!o.done;o=i.next())o=o.value,e.C&&(o.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&(l=o.startTime==0&&!e.ya(),o.values.push({key:"CUE",description:"",data:l?"ONCE,PRE":"ONCE",mimeType:null,pictureType:null})),e.C.onHLSMetadata(o))}};e.m.G(t,"cuechange",function(){if(t.activeCues)for(var i=x(t.activeCues),o=i.next();!o.done;o=i.next())o=o.value,j0(e,o.startTime,o.endTime,o.type,o.value),e.C&&e.C.onCueMetadataChange(o.value);n()}),n();var r=new ft(function(){var i=Rz(e);i=x(i);for(var o=i.next();!o.done;o=i.next())o.value.mode="hidden"}).Va().$(.5);e.Re.push(function(){r.stop()})}}function Hx(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(Kt(n,t))}function j0(e,t,n,r,i){e.ra&&(t={schemeIdUri:r,startTime:t,endTime:n||1/0,id:"",payload:i},t.id=JSON.stringify(t),rx(e.ra,t))}function Ez(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new ft(function(){t.mode="hidden"}).Va().$(.5);e.Re.push(function(){n.stop()})}}g.pm=function(){for(var e=this.wa;e.g;)e.release()},g.td=function(e){return new qv(e)};function v8(e,t){function n(o){t()?t().dispatchEvent(o):e.dispatchEvent(o)}function r(o){t()?Gl(t(),!0,o):o()}t||(t=function(){return null});var i=new ln(function(o,u,l,h,p){r(function(){e.u&&e.u.segmentDownloaded(o,u,l,h,p)})},function(o,u,l){u=new Map().set("headers",o).set("request",u).set("requestType",l),n(Kt("downloadheadersreceived",u)),r(function(){if(e.Aa){var h=e.Aa;if(h.h.enabled){var p=o["cmsd-static"];if(p)try{var m=new Map,b=p.split(",");for(p=0;p<b.length;p++){var w=b[p].split("=");m.set(w[0],r8(w[1]))}}catch{}if(m=o["cmsd-dynamic"]){e:{try{var T=new Map,k=m.split(";");for(m=1;m<k.length;m++){var S=k[m].split("=");T.set(S[0],r8(S[1]))}var A=T;break e}catch{A=null;break e}A=void 0}A&&(h.g=A)}}}})},function(o,u,l,h){o=new Map().set("requestType",o).set("request",u).set("context",l).set("response",h),n(Kt("downloadcompleted",o))},function(o,u,l,h,p,m){o=new Map().set("requestType",o).set("request",u).set("context",l).set("error",h).set("httpResponseCode",p).set("aborted",m),n(Kt("downloadfailed",o))},function(o,u,l){r(function(){if(e.M){var h=e.M,p=l;if(p=p===void 0?{}:p,h.g)if(u.method==="HEAD")Od(h,u,{});else switch(o){case 0:if(p.type){e:{switch(p.type){case 4:p="d";break e;case 3:case 2:p="h";break e}p=void 0}p&&p!==h.B&&(h.B=p,Tp(h.g,{sf:p,st:h.j.isLive()?"l":"v"}))}Od(h,u,{ot:"m",su:h.m===null});break;case ua:var m=p,b=u.uris[0],w=m.segment;p=0,w&&(p=w.endTime-w.startTime),p={d:p*1e3,st:h.j.isLive()?"l":"v"},p.ot=gz(m);var T=p.ot==="v"||p.ot==="a"||p.ot==="av"||p.ot==="tt";if(m=m.stream){var k=h.j.eb();if(T){var S=mz(h,m.type);Number.isFinite(S)&&(p.bl=S),p.ot!=="tt"&&(S=n8(h,m.type),p.dl=k?S/Math.abs(k):S)}m.bandwidth&&(p.br=m.bandwidth/1e3),m.segmentIndex&&w&&((k=m.segmentIndex.Yb(w.endTime,!0,k<0))&&(k=k.next().value)&&k!=w&&(b&&!xe(w.U(),k.U())&&(p.nor=k.U()[0]),!k.startByte&&!k.endByte||w.startByte==k.startByte&&w.endByte==k.endByte||(b=k.startByte+"-",k.endByte&&(b+=k.endByte),p.nrr=b)),b=h.j.eb()||1,k=n8(h,m.type)||500,w=(m=m.bandwidth)?m*(w.endTime-w.startTime)/1e3/(k/b/1e3)*h.l.rtpSafetyFactor:NaN,Number.isFinite(w)&&(p.rtp=w))}T&&p.ot!=="tt"&&(w=vz(h,p.ot)/1e3,Number.isFinite(w)&&(p.tb=w)),h.j.isLive()&&(w=A8(h.j))&&(p.ltc=w),p.su=h.m===null||h.m==="r",h.o.has(u)&&h.o.delete(u),h.o.set(u,Date.now()),Od(h,u,p);break;case 2:case 5:case 6:Od(h,u,{ot:"k"});break;case 4:Od(h,u,{ot:"o"})}}})},function(o,u,l,h){(o=t()?t().o:e.I)&&o.banLocation&&o.banLocation(h)},function(o,u){if(u.data){var l=u.data.byteLength,h=t()?t().getStats():e.o;if(h&&(sM(h,l),o===0&&(h.wj=l)),l=e.M,l.g&&o===ua&&(o=l.o.get(u.originalRequest),l.o.delete(u.originalRequest),pz(l)))try{var p=u.originalUri||u.uri;if(p.includes("CMCD="))try{var m=new URL(p);m.searchParams.delete("CMCD");var b=m.toString()}catch{b=p}else b=p;p={url:b},u.status!=null&&(p.rc=u.status),u.originalRequest&&u.originalRequest.timeToFirstByte!=null&&(p.ttfb=u.originalRequest.timeToFirstByte),u.timeMs!=null&&(p.ttlb=u.timeMs),o!=null&&(p.ts=o),u.headers&&u.headers["CMSD-Static"]&&(p.cmsds=btoa(u.headers["CMSD-Static"])),u.headers&&u.headers["CMSD-Dynamic"]&&(p.cmsdd=btoa(u.headers["CMSD-Dynamic"]));var w=l.g,T={request:{url:b},status:u.status||0};u=p||{};var k=T.request||{},S=T.status,A=T.resourceTiming||null,M=u.url!=null?u.url:k.url;if(M){var _=new URL(M);_.searchParams.delete("CMCD");var R={url:_.toString(),rc:S};A&&(A.startTime!=null&&(R.ts=Math.round(w.u+A.startTime),A.responseStart!=null&&(R.ttfb=Math.round(A.responseStart-A.startTime))),A.duration!=null&&(R.ttlb=Math.round(A.duration)));var U=k.customData||{};Ao(w,"rr",Object.assign({},U.cmcd!=null?U.cmcd:{},R,u))}}catch(N){vi("CMCD_RESPONSE_ERROR","Could not apply CMCD data to response.",N)}}});return i.configure(e.g.networking),i}function Iz(e,t){return new _4(e.h,e.i,e.g.streaming,t,function(){e.bc&&O4(e.bc,!e.F.Fi()),e.j&&e.j.kd(),e.V&&ts(e,"seeking")},function(n){return e.dispatchEvent(n)},function(){return e.eb()})}function Mz(e,t){var n=e.ya()||typeof t=="number"&&t>0;t=new Kl(e.Ec,n),t.addEventListener("enter",function(u){u=u.region,Ep(e,"timelineregionenter",u),Uz(e,u)}),t.addEventListener("exit",function(u){Ep(e,"timelineregionexit",u.region)}),t.addEventListener("skip",function(u){var l=u.region;u.seeking||(Ep(e,"timelineregionenter",l),Ep(e,"timelineregionexit",l))});var r=new Kl(e.ra,n);r.addEventListener("enter",function(u){Hx(e,u.region,"metadata")}),n=new Kl(e.kb,n),n.addEventListener("enter",function(u){u=new Map().set("detail",u.region.emsg),e.dispatchEvent(Kt("emsg",u))});var i=new I0(e.i.presentationTimeline);i.addEventListener("change",function(u){e.dispatchEvent(Kt("timelinechange",new Map([["programDateTime",u.programDateTime],["timestamp",u.timestamp]])))});var o=new tx(e.h);return o.g.add(t),o.g.add(r),o.g.add(n),o.g.add(i),e.Pe&&o.g.add(e.Pe),o}function Pz(e,t){t=new Kl(e.ra,t instanceof Date||t>0),t.addEventListener("enter",function(r){Hx(e,r.region,"metadata")});var n=new tx(e.h);return n.g.add(t),n}function y8(e,t,n){e.V=new VF,Lw(e.V,Ll),b8(e),Sp(e),e.ib=new ft(function(){ts(e)}),e.g.streaming.rebufferingGoal&&e.ib.Ka(.25),e.m.G(t,"waiting",function(){return ts(e,"waiting")}),e.m.G(t,"canplaythrough",function(){return ts(e,"canplaythrough")}),e.m.G(t,"playing",function(){return ts(e,"playing")}),e.m.G(t,"seeked",function(){return ts(e,"seeked")}),e.m.G(t,"timeupdate",function(){return ts(e,"timeupdate")}),n&&(e.m.G(t,"progress",function(){return ts(e,"progress")}),e.m.G(t,"stalled",function(){return ts(e,"stalled")}))}function b8(e){var t=e.g.streaming.rebufferingGoal;e.V.j.set(Rl,Math.min(.5,t/2)).set(Ll,t)}function ts(e,t){if(e.g.streaming.rebufferingGoal){t=e.H?ap(e.H):!1,t=e.Gd()||t||e.F.qj();var n=e.eb()<0?qI(e.h.buffered,e.h.currentTime):HI(e.h.buffered,e.h.currentTime),r=e.V,i=r.j.get(r.g);Lw(r,t||n>=i&&n>0?Rl:Ll)&&Sp(e)}else if(t){n=e.V,r=e.h.currentTime,i=n.h,n.h=r;var o=void 0;switch(t){case"seeking":case"waiting":n.h=-1,o=Ll;break;case"canplaythrough":case"playing":case"seeked":o=Rl;break;case"timeupdate":i>=0&&r-i>.01&&(o=Rl)}o!==void 0&&Lw(n,o)&&Sp(e)}}function _z(e,t,n,r,i){return new a4(e,t,n,i,r)}function Dz(e){return new q4(e.i,{Zb:function(){return e.F?e.F.ee():0},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},eb:function(){return e.eb()},video:e.h,X:e.H,xc:e.K,onError:function(t){return Fd(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Nd:function(t,n,r,i,o){var u=t.startTime,l=t.endTime,h=n.type;if(h!=mt){if(e.F){e.F.Ej();var p=o0(e.H,h);!e.ya()&&e.h.paused&&!e.h.seeking&&!e.H.J&&p!=null&&p>0&&e.F.ee()<p&&!Tu(e.F.ee(),p,.001)&&e.F.xg(p)}ts(e)}r=new Map().set("start",u).set("end",l).set("contentType",h).set("isMuxed",r).set("isDependency",i).set("mediaTimestamp",o),e.dispatchEvent(Kt("segmentappended",r)),e.u&&n.fastSwitching&&t.gd&&t.ze&&e.u.trySuggestStreams()},dm:function(t,n){(n=n.Jd)&&e.Pe&&fV(e.Pe,n,t)},Pi:function(t,n){var r=e.B;if(r.h.parseInbandPsshEnabled&&!r.H&&["audio","video"].includes(t)){t=new Ew(H(n)),n=0;for(var i=x(t.data),o=i.next();!o.done;o=i.next())n+=o.value.length;if(n==0)r=Promise.resolve();else{for(n=new Uint8Array(n),i=0,t=x(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,i),i+=o.length;Jh(r,"cenc",n),r=r.l.promise}}else r=Promise.resolve();return r},disableStream:function(t,n){return e.disableStream(t,n)},Hm:function(t,n){return!(e.g.abr.enabled&&n.fastSwitching&&t.gd&&t.ze)},se:function(){return e.keySystem()}})}g.configure=function(e,t){var n=this.getConfiguration();arguments.length==2&&typeof e=="string"&&(e=k0(e,t)),e.manifest&&e.manifest.dash&&"disableXlinkProcessing"in e.manifest.dash&&(Y5("manifest.dash.disableXlinkProcessing configuration","It is now automatically detected if the manifest has Xlink."),delete e.manifest.dash.disableXlinkProcessing),e.textDisplayer&&"captionsUpdatePeriod"in e.textDisplayer&&(Y5("textDisplayer.captionsUpdatePeriod configuration","Captions are now updated based on the cue timings, so this configuration is no longer needed."),delete e.textDisplayer.captionsUpdatePeriod),Bz(e);var r=Us(this.g,e,Eo(this));return w8(this,n),r},g.Mk=function(e){this.Cg=e};function w8(e,t){if(e.Se=new Rw(e.g,e.Ha,e.B),e.I){var n=Hi(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(n.disableVideo=!0),e.I.configure(n)}if(e.B&&e.B.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.l!=ha&&AI(e.Se,e.i)&&fa(e)}catch(i){Fd(e,i)}e.u&&Eu(e),n=e.j.o,!n||n.allowedByApplication&&n.allowedByKeySystem||Ud(e)}if(e.K&&e.K.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Aa=e.g.manifest.segmentRelativeVttTiming),e.D&&O0(e),e.u&&(e.u.configure(e.g.abr),e.g.abr.enabled?e.u.enable():e.u.disable(),j8(e)),e.V&&b8(e),e.ib&&(e.g.streaming.rebufferingGoal?e.ib.Ka(.25):e.ib.stop()),e.i&&Xx(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.M&&e.M.configure(e.g.cmcd),e.Aa&&e.Aa.configure(e.g.cmsd),e.Pa&&e.Pa.configure(e.g.queue),n=e.l==nr||e.l==ni,e.g.accessibility.speechToText.enabled?e.J?e.J.configure(e.g.accessibility.speechToText):(e.J=new wM(e),e.J.configure(e.g.accessibility.speechToText),n&&Io(e)):e.J&&(e.J.release(),e.J=null,n&&Io(e)),e.l==nr&&e.O.getConfiguration){n=e.O.getConfiguration();var r=!1;ja(t.preferredVideo)!=ja(e.g.preferredVideo)&&(n.preferredVideo=e.g.preferredVideo,r=!0),ja(t.preferredAudio)!=ja(e.g.preferredAudio)&&(n.preferredAudio=e.g.preferredAudio,r=!0),r&&(ql(n),e.O.configure(n),Ud(e))}t=Kt("configurationchanged"),e.dispatchEvent(t)}g.getConfiguration=function(){var e=Eo(this);return Us(e,this.g,Eo(this)),e},g.fl=function(){return this.Cg},g.gj=function(){var e=Eo(this);return Us(e,this.g,Eo(this)),Z4(this.g,Eo(this))},g.cj=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=Math.min(this.h.currentTime+this.g.streaming.bufferingGoal,this.Na().end);if(e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},g.Pj=function(){var e=this.getConfiguration(),t;for(t in this.g)delete this.g[t];Us(this.g,Eo(this),Eo(this)),w8(this,e)},g.Bd=function(){return this.l},g.ej=function(){return this.i?this.i.type:null},g.Db=function(){return this.h},g.hb=function(){return this.K},g.$c=function(){return this.ba},g.Af=function(){return this.R},g.Xk=function(){var e;return Array.from(((e=this.ra)==null?void 0:e.g.values())||[])},g.Wk=function(){var e;return Array.from(((e=this.kb)==null?void 0:e.g.values())||[])},g.Zk=function(){var e;return Array.from(((e=this.Ec)==null?void 0:e.g.values())||[])},g.pe=function(){return this.C?this.C:null},g.jj=function(){return this.Pa?this.Pa:null},g.isLive=function(){return this.i&&!this.Ga()?this.i.presentationTimeline.isLive():this.h&&(this.h.src||this.Ga())?this.h.duration==1/0:!1},g.Hd=function(){return this.i?this.i.presentationTimeline.Hd():!1},g.ya=function(){return this.isLive()||this.Hd()},g.pj=function(){if(this.i&&!this.Ga()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&(this.h.src||this.Ga())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},g.uj=function(){if(this.i&&!this.Ga()){var e=this.i.variants;return e.length?(e=e[0],e.audio||!e.video?!1:!e.video.codecs.includes(",")):!1}return this.h&&(this.h.src||this.Ga())&&this.h.audioTracks?this.h.audioTracks.length==0:!1},g.Na=function(){if(this.i&&!this.Ga()){if(!this.ha&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Kb(),end:e.Eb()}}if(this.h&&(this.h.src||this.Ga())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},g.Hl=function(){this.ya()&&(this.h.currentTime=this.Na().end)},g.sj=function(){return this.ha},g.keySystem=function(){return mr(this.drmInfo())},g.drmInfo=function(){return this.B?this.B.Xb():null},g.re=function(){return this.B?this.B.re():1/0},g.mh=function(){return this.B?this.B.mh():[]},g.Wh=function(e){this.B&&this.B.Wh(e)},g.ci=function(e,t){var n=this,r;return P(function(i){return i.h==1?n.B?i.g(n.B.ci(e,t),3):i.A(2):i.h!=2?(r=i.i,i.return(r)):i.return(!1)})},g.zf=function(){return this.B?this.B.zf():{}},g.xh=function(){return this.V?this.V.g==Ll:!!this.ba},g.eb=function(){return this.h?this.L?this.L.h:1:0},g.Ci=function(e){this.l==nr&&this.j&&G4(this.j,e)},g.Me=function(e,t){if(t=t===void 0?!0:t,e==0)ut("A trick play rate of 0 is unsupported!");else{var n=this.h.playbackRate,r=this.L.h;this.L.set(e),this.l==nr&&(this.u.playbackRateChanged(e),this.Ci(t&&e!=1)),M8(this,e),n===0&&this.h.playbackRate===0&&e!=r&&I8(this)}},g.ie=function(){var e=this.L.zd();this.l==ni&&this.L.set(e),this.l==nr&&(this.L.set(e),this.u.playbackRateChanged(e),this.Ci(!1)),this.ec.Ea()},g.Sc=function(){if(this.i&&!this.Ga()){for(var e=this.j?this.j.o:null,t=[],n=0,r=x(this.i.variants),i=r.next();!i.done;i=r.next())if(i=i.value,Fv(i)){var o=dd(i);o.active=i==e,o.active||n==1||e==null||i.video!=e.video||i.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}if(this.h&&this.h.audioTracks){var u=L8(this);return e=Array.from(this.h.audioTracks),e.length?e.map(function(l){return Uv(l,u)}):u?[Uv(null,u)]:[]}return[]},g.Gb=function(){if(this.i){if(this.Ga())return[];for(var e=this.j?this.j.C:null,t=[],n=x(this.i.textStreams),r=n.next();!r.done;r=n.next()){r=r.value;var i=Gh(r);i.active=r==e,t.push(i)}return this.J&&t.push.apply(t,se(this.J.Gb())),t}if(this.h&&this.h.src&&this.h.textTracks){e=U0(this);var o=this.D.isTextVisible();return e=e.map(function(u){return $5(u,o)}),this.J&&e.push.apply(e,se(this.J.Gb())),e}return[]},g.ll=function(){var e=this.Ze;return this.i&&(e=this.i.imageStreams),e.map(function(t){return gw(t)})},g.Yk=function(e){var t=this,n,r;return P(function(i){return i.h==1?i.g(k8(t,e),2):(n=i.i,n?(r=[],n.segmentIndex.Jb(function(o){var u=x8(o.tilesLayout||n.tilesLayout);if(u)for(var l=u.rows*u.columns,h=(o.j-o.startTime)/l,p=0;p<l;p++){var m=T8(o,n,o.startTime+p*h,u);if(!m)break;r.push(m)}}),i.return(r)):i.return(null))})};function x8(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}g.Cl=function(e,t){var n=this,r,i,o,u;return P(function(l){return l.h==1?l.g(k8(n,e),2):(r=l.i,!r||(i=r.segmentIndex.find(t),i==null)?l.return(null):(o=r.segmentIndex.get(i),(u=x8(o.tilesLayout||r.tilesLayout))?l.return(T8(o,r,t,u)):l.return(null)))})};function k8(e,t){var n,r,i;return P(function(o){return o.h==1?e.l!=nr&&e.l!=ni||(n=e.Ze,e.i&&(n=e.i.imageStreams),r=n[0],!r)?o.return(null):(t!=null&&(r=n.find(function(u){return u.id==t})),r?r.segmentIndex?o.A(2):o.g(r.createSegmentIndex(),2):o.return(null)):(r.closeSegmentIndex&&(e.Ac.has(r)||(i=new ft(function(){r&&(r.closeSegmentIndex(),e.Ac.delete(r))}),e.Ac.set(r,i)),e.Ac.get(r).$(5)),o.return(r))})}function T8(e,t,n,r){var i=e.U();if(!i.length)return null;var o=t.width||0,u=t.height||0,l=o/r.columns,h=u/r.rows,p=r.columns*r.rows,m=e.j-e.startTime;m=e.B||m/p;var b=e.startTime,w=0,T=0;return p>1&&(T=Math.floor((n-e.startTime)/m+1e-4),b=e.startTime+T*m,w=T%r.columns*l,T=Math.floor(T/r.columns)*h),b>=e.endTime||Tu(b,e.endTime,1e-4)?null:(r=!1,(n=e.thumbnailSprite)&&(r=!0,h=n.height,w=n.positionX,T=n.positionY,l=n.width),{segment:e,imageHeight:u,imageWidth:o,height:h,positionX:w,positionY:T,startTime:b,duration:m,uris:i,startByte:e.Rc(),endByte:e.Oc(),width:l,sprite:r,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}g.Dc=function(e){var t=this,n=!1;if(this.J&&e&&(n=this.J.Gb().includes(e)),this.J&&!n&&this.J.disable(),!e||n)this.J&&n&&e&&this.J.enable(e),Io(this),qx(this,!1);else{if(n=function(){var r=t.i.textStreams.find(function(i){return i.id==e.id});r?r!=t.j.C&&(aM(t.o.j,r,!1),ux(t.j,r),Io(t),$0(t),t.Xe=r.language,qx(t,!0)):t.Ga()},this.i&&this.F&&(n(),!this.Ga()))return;(function(){if(t.h&&t.h.textTracks){var r=U0(t),i=r.find(function(l){return Kh(l)===e.id});if(i){if(t.D instanceof lr){r=x(r);for(var o=r.next();!o.done;o=r.next()){o=o.value;var u=o===i?t.Fa?"showing":"hidden":"disabled";o.mode!==u&&(o.mode=u)}}else r=r.find(function(l){return l.mode!=="disabled"}),r!==i&&(r&&(r.mode="disabled",t.m.Ua(r,"cuechange"),t.D.remove(0,1/0)),i&&S8(t,i));Io(t),$0(t),qx(t,!0)}}})()}};function S8(e,t){e.m.G(t,"cuechange",function(){e.D.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0,isMpegTs:!1},r=[],i=Array.from(t.activeCues||[]);i=x(i);for(var o=i.next();!o.done;o=i.next()){if(o=o.value,o.endTime===1/0||o.endTime<o.startTime)o=null;else{var u=new rn(o.startTime,o.endTime,o.text);u.line=typeof o.line=="number"?o.line:null,o.lineAlign&&(u.lineAlign=o.lineAlign),u.lineInterpretation=o.snapToLines?Uh:1,u.position=typeof o.position=="number"?o.position:null,o.positionAlign&&(u.positionAlign=o.positionAlign),u.size=o.size,u.textAlign=o.align,o.vertical==="lr"?u.writingMode="vertical-lr":o.vertical==="rl"&&(u.writingMode="vertical-rl"),o.region&&(u.region.id=o.region.id,u.region.height=o.region.lines,u.region.heightUnits=2,u.region.regionAnchorX=o.region.regionAnchorX,u.region.regionAnchorY=o.region.regionAnchorY,u.region.scroll=o.region.scroll,u.region.viewportAnchorX=o.region.viewportAnchorX,u.region.viewportAnchorY=o.region.viewportAnchorY,u.region.viewportAnchorUnits=xi,u.region.width=o.region.width,u.region.widthUnits=xi),Lv(u),o=u}o&&((u=e.g.mediaSource.modifyCueCallback)&&u(o,null,n),r.push(o))}e.D.append(r)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}g.gi=function(e,t,n){function r(){var o=i.i.variants.find(function(l){return l.id==e.id});if(o){if(Fv(o)){var u=i.j.o;i.g.abr.enabled&&(u.video!=o.video||u.audio&&o.audio&&u.audio.language==o.audio.language&&u.audio.channelsCount==o.audio.channelsCount&&u.audio.label==o.audio.label)&&ut("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.Ga()?Ap(i,o,!1,!1,0):Ap(i,o,!1,t||!1,n||0),o={preferredAudio:[{language:o.language||"",role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",label:o.audio&&o.audio.label||"",channelCount:o.audio&&o.audio.channelsCount||0,codec:o.audio&&o.audio.codecs||"",spatialAudio:o.audio&&o.audio.spatialAudio?o.audio.spatialAudio:!1}],preferredVideo:[{label:o.video&&o.video.label||"",role:o.video&&o.video.roles&&o.video.roles[0]||"",language:o.video&&o.video.language||"",codec:o.video&&o.video.codecs||"",hdrLevel:o.video&&o.video.hdr||"",layout:o.video&&o.video.videoLayout||""}],language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:"",activeAudioCodec:u.audio&&u.audio.codecs?u.audio.codecs:"",activeAudioChannelCount:u.audio&&u.audio.channelsCount?u.audio.channelsCount:0,keySystem:i.keySystem()},ql(o),i.O.configure(o),Eu(i)}}else i.Ga()}var i=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.F&&(r(),!this.Ga()))&&(function(){if(e.originalAudioId&&i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks);o=x(o);for(var u=o.next();!u.done;u=o.next())if(u=u.value,Kh(u)==e.id){D8(i,u);break}}})()},g.ym=function(e,t){function n(){var o=i.O.getConfiguration();o.audioCodec=e.codecs||"",o.preferredAudio=[{language:e.language,role:e.roles[0]||"",label:e.label||"",channelCount:e.channelsCount||0,codec:"",spatialAudio:e.spatialAudio}];var u=i.j.o;(u=u&&u.audio)&&(o.activeAudioCodec=u.codecs||"",o.activeAudioChannelCount=u.channelsCount||0,r(u.language,e.language)),ql(o),i.O.configure(o),Ud(i,!0,t,!1,!1)}function r(o,u){if(o!=u&&i.g.accessibility.handleForcedSubtitlesAutomatically){var l=i.Gb(),h=l.find(function(m){return m.active}),p=h?Ft(h.language):null;o=Ft(o),u=Ft(u),(!h||p==o&&p!=u&&h.forced)&&(l=Ps(l,u,"",!0),l.length&&i.Dc(l[0]))}}var i=this;t=t===void 0?0:t,!(this.i&&this.F&&(n(),!this.Ga()))&&(function(){if(i.h&&i.h.audioTracks){var o=Ft(e.language),u=Array.from(i.h.audioTracks),l=null,h=null;u=x(u);for(var p=u.next();!p.done;p=u.next()){p=p.value;var m=p.language||"und";l||p.label!=e.label||Ft(m)!=o||p.kind!=e.roles[0]||(l=p),p.enabled&&(h=p)}l&&(h&&r(h.language,l.language),D8(i,l))}})()},g.getAudioTracks=function(){if(this.i&&!this.Ga()){var e=this.Sc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.l!=nr||this.Ga()||(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&(o.audioCodec||sa.includes(o.audioMimeType||""))})),!n.length)return[];e=new Map,n=x(n);for(var r=n.next();!r.done;r=n.next()){var i=r.value;r=[i.language,i.originalLanguage,i.label||"",(i.audioRoles||[]).join(","),i.channelsCount,i.spatialAudio,i.audioCodec||"",i.accessibilityPurpose||""].join("_"),i={active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage},e.has(r)?!e.get(r).active&&i.active&&e.set(r,i):e.set(r,i)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(o){var u=o.language;return u={active:o.enabled,language:Ft(u||"und"),label:o.label,mimeType:null,codecs:null,primary:o.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:u},o.kind&&(o.kind=="description"&&(u.accessibilityPurpose="visually impaired"),u.roles.push(o.kind)),o.configuration&&(o.configuration.codec&&(u.codecs=o.configuration.codec),o.configuration.sampleRate&&(u.audioSamplingRate=o.configuration.sampleRate),o.configuration.numberOfChannels&&(u.channelsCount=o.configuration.numberOfChannels)),u}):[]},g.zm=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?0:n;var r=this.Sc();if(r.length){var i=r.find(function(u){return u.active});if(i){r=r.filter(function(u){return(u.videoBandwidth||u.bandwidth)==e.bandwidth&&u.width==e.width&&u.height==e.height&&u.frameRate==e.frameRate&&u.pixelAspectRatio==e.pixelAspectRatio&&u.hdr==e.hdr&&u.colorGamut==e.colorGamut&&u.videoLayout==e.videoLayout&&u.videoMimeType==e.mimeType&&u.videoCodec==e.codecs&&xe(u.videoRoles,e.roles)&&(u.videoLanguage||"und")==(e.language||"und")&&u.videoLabel==e.label});var o;r.length==1?o=r[0]:o=r.find(function(u){return u.audioId===i.audioId}),o||(o=r.find(function(u){return u.language==i.language&&u.label===i.label&&u.channelsCount===i.channelsCount&&u.spatialAudio===i.spatialAudio&&u.audioMimeType===i.audioMimeType&&Ar(u.audioCodec||"")===Ar(i.audioCodec||"")&&xe(u.audioRoles,i.audioRoles)})),o&&!o.active&&this.gi(o,t,n)}}},g.getVideoTracks=function(){if(this.l==ni||this.Ga())return[];var e=this.Sc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.uj()||(n=e.filter(function(o){return o.videoCodec&&o.audioGroupId===t.audioGroupId&&o.originalAudioId===t.originalAudioId?o.audioId===t.audioId?!0:o.language===t.language&&o.label===t.label&&o.channelsCount===t.channelsCount&&o.spatialAudio===t.spatialAudio&&o.audioMimeType===t.audioMimeType&&Ar(o.audioCodec||"")===Ar(t.audioCodec||"")&&xe(o.audioRoles,t.audioRoles):!1})),!n.length)return[];e=new Map,n=x(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.originalVideoId;i||r.videoId==null||(i=String(r.videoId)),i&&e.set(i,{active:r.active,language:r.videoLanguage||"und",bandwidth:r.videoBandwidth||r.bandwidth,width:r.width,height:r.height,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,mimeType:r.videoMimeType,codecs:r.videoCodec,roles:r.videoRoles||[],label:r.videoLabel})}return Array.from(e.values())},g.cl=function(){var e=this.Ye;this.i&&(e=this.i.chapterStreams),e=e.map(function(n){return mw(n)});var t=C8(this);return t.length&&e.push.apply(e,se(t.map(function(n){return{id:Kh(n),type:"chapter",bandwidth:0,language:Ft(n.language||"und")}}))),e},g.al=function(e){var t=this,n,r,i,o,u,l,h,p,m,b,w,T,k;return P(function(S){switch(S.h){case 1:if(n=Lz(t,e),n.length)return S.return(n);if(r=t.Ye,t.i&&(r=t.i.chapterStreams),!r.length)return S.return([]);if(i=Ft(e),o=r.filter(function(A){return Ft(A.language)==i}),!o.length)return S.return([]);u=[],l=new Set,h=x(o),p=h.next(),m={};case 2:if(p.done){S.A(4);break}if(b=p.value,b.segmentIndex){S.A(5);break}return S.g(b.createSegmentIndex(),5);case 5:m.cd=0,w=void 0,t.isLive()&&((w=t.i)==null?void 0:w.type)==="HLS"&&(T=t.i.presentationTimeline,k=void 0,m.cd=Math.max(0,(k=T.j)!=null?k:T.h)),b.segmentIndex.Jb((function(A){return function(M){var _=M.getMetadata();if(_){var R=_.title,U=M.startTime+"-"+M.endTime+"-"+R;A.cd>0&&M.endTime-A.cd<0&&(A.cd=0),M={id:U,title:R,startTime:Math.max(0,M.startTime-A.cd),endTime:Math.max(0,M.endTime-A.cd),images:_.images},l.has(U)||(u.push(M),l.add(U))}}})(m)),m={cd:void 0},p=h.next(),S.A(2);break;case 4:return S.return(u)}})};function Lz(e,t){if(e=C8(e),!e.length)return[];var n=Ft(t),r=e.filter(function(l){return Ft(l.language)==n});if(!r||!r.length)return[];t=[],e=new Set,r=x(r);for(var i=r.next();!i.done;i=r.next())if((i=i.value)&&i.cues){i=x(i.cues);for(var o=i.next();!o.done;o=i.next()){var u=o.value;(o=u.id)&&o!=""||(o=u.startTime+"-"+u.endTime+"-"+u.text),u={id:o,title:u.text,startTime:u.startTime,endTime:u.endTime,images:[]},e.has(o)||(t.push(u),e.add(o))}}return t}function U0(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function Rz(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}function C8(e){return e.h&&e.h.textTracks?Array.from(e.h.textTracks).filter(function(t){return t.kind=="chapters"}):[]}function qx(e,t){t=!!t,e.Fa!=t&&(e.Fa=t,e.l==nr?(e.D.setTextVisibility(t),t?e.j.C||(t=Ps(e.i.textStreams,e.Xe,e.Ag,e.zg),t.length>0&&(ux(e.j,t[0]),Io(e),$0(e))):EV(e.j)):e.h&&e.h.src&&e.h.textTracks&&e.D.setTextVisibility(t))}g.vl=function(){if(this.F)var e=this.F.ee();else{if(this.P==null)return new Date;if(this.P instanceof Date)return this.P;e=this.P}if(this.i&&!this.Ga()){var t=this.i.presentationTimeline,n=t.ij(e);return n!=null?new Date(n*1e3):new Date((t.h+e)*1e3)}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),t instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+e*1e3):null):null},g.hj=function(){if(this.i&&!this.Ga()){var e=this.i.presentationTimeline;return e=e.j||e.h,e===null?null:new Date(e*1e3)}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),e instanceof Date&&!isNaN(e.getTime())?e:null):null},g.Bf=function(){return this.isLive()&&this.i?this.i.presentationTimeline.Bf():null},g.Nc=function(){if(this.l==nr)return this.H.Nc();var e={total:[],audio:[],video:[],text:[]};return this.l==ni&&(e.total=Fa(this.h.buffered)),e};function A8(e){if(!e.h||!e.h.currentTime)return null;var t=e.hj();return t?Math.floor(Date.now()-(t.getTime()+e.h.currentTime*1e3)):null}g.getBandwidthEstimate=function(){return this.u?this.u.getBandwidthEstimate():NaN},g.getStats=function(){if(this.l!=nr&&this.l!=ni)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,timeToFirstFrame:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};Gx(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.ya()||r$(this.o,Math.round(100*t)),this.F&&(this.o.V=this.F.Ei(),this.o.W=this.F.Gi()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),n$(this.o,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.o.O=Number(t.corruptedVideoFrames)),i$(this.o,this.B?AF(this.B):NaN),oM(this.o,e.videoWidth||NaN,e.videoHeight||NaN),this.o.l="",this.ya()&&(e=A8(this),e!=null&&a$(this.o,e/1e3)),t=this.Sc().find(function(i){return i.active}),e=this.Gb().find(function(i){return i.active}),t){if(t.bandwidth){var n=this.L?this.L.h:1,r=n*t.bandwidth;e&&e.bandwidth&&(r+=n*e.bandwidth),this.o.C=r}t.width&&t.height&&oM(this.o,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.o.l=t)}return this.l!=nr||this.Ga()||(this.i&&(this.o.J=this.i.periodCount,this.o.I=this.i.gapCount,this.i.presentationTimeline&&o$(this.o,this.i.presentationTimeline.i)),e=this.u.getBandwidthEstimate(),this.o.B=e),this.l==ni&&sM(this.o,NaN),s$(this.o)},g.Tb=function(e,t,n,r,i,o,u){var l=this;u=u===void 0?!1:u;var h=(function(){var p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:if(l.l!=nr&&l.l!=ni)throw new B(1,7,7004);if(n!="subtitles"&&n!="captions"&&ut("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){N.A(2);break}return N.g(F0(l,e),3);case 3:r=N.i;case 2:if(p=[],l.C&&(p=l.C.getCuePoints()),l.l!=ni){N.A(4);break}return m=Qe(),u&&m.Qa()==="WEBKIT"&&(n="forced"),N.g(Nz(l,e,t,n,r,o||"",p),5);case 5:if(b=N.i,b.track)return fa(l),Io(l),N.return($5(b.track,l.D.isTextVisible()));throw new B(1,2,2012);case 4:if(w=Ln,T=l.Na(),k=T.end-T.start,l.i&&(k=l.i.presentationTimeline.getDuration()),k==1/0)throw new B(1,4,4033);if(!p.length){N.A(6);break}return N.g(B0(l,e),7);case 7:S=N.i,A=E8(l,S,r,p),M=new Blob([A],{type:"text/vtt"}),e=Xw(M),r="text/vtt";case 6:if(_=_s({id:l.Te++,segmentIndex:l0(0,k,[e]),mimeType:r||"",codecs:i||"",kind:n,language:t,originalLanguage:t,label:o||null,type:w.Xa,forced:!!u,external:!0}),R=tr(_.mimeType,_.codecs),U=Hh(R),!U)throw new B(2,2,2014,r);return l.i.textStreams.push(_),fa(l),Io(l),N.return(Gh(_))}})})();return this.ha||Yx(this,h),h},g.lc=function(e,t){var n=this,r=(function(){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N;return P(function(j){switch(j.h){case 1:if(n.l!=nr&&n.l!=ni)throw new B(1,7,7004);if(t){j.A(2);break}return j.g(F0(n,e),3);case 3:t=j.i;case 2:if(t!="text/vtt")throw new B(1,2,2017,e);if(i=Ln,o=n.Na(),u=o.end-o.start,n.i&&(u=n.i.presentationTimeline.getDuration()),u==1/0)throw new B(1,4,4045);return j.g(B0(n,e),4);case 4:if(l=j.i,h=zh(t),!h)throw new B(2,2,2014,t);for(p=h(),m={periodStart:0,segmentStart:0,segmentEnd:u,vttOffset:0,isMpegTs:!1},b=H(l),w=p.parseMedia(b,m,e,[]),T=[],k=x(w),S=k.next(),A={};!S.done;A={ug:void 0,ud:void 0},S=k.next())A.ud=S.value,A.ug=null,M=(function(V){return function(){return V.ug==null&&(V.ug=zn([e],[V.ud.payload])),V.ug||[]}})(A),_=new nt(A.ud.startTime,A.ud.endTime,M,0,null,null,0,0,1/0),A.ud.payload.includes("#xywh")&&(R=A.ud.payload.split("#xywh=")[1].split(","),R.length===4&&_.ig({height:parseInt(R[3],10),positionX:parseInt(R[0],10),positionY:parseInt(R[1],10),width:parseInt(R[2],10)})),T.push(_);if(U=t,!T.length){j.A(5);break}return j.g(F0(n,T[0].U()[0]),6);case 6:U=j.i;case 5:return N=_s({id:n.Te++,segmentIndex:new Et(T),mimeType:U||"",kind:"",language:"und",type:i.wg,tilesLayout:"1x1",external:!0}),n.l==ni?n.Ze.push(N):n.i.imageStreams.push(N),fa(n),j.return(gw(N))}})})();return this.ha||Yx(this,r),r},g.kc=function(e,t,n){var r=this,i=(function(){var o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:if(r.l!=nr&&r.l!=ni)throw new B(1,7,7004);if(n){N.A(2);break}return N.g(F0(r,e),3);case 3:n=N.i;case 2:if(o=Ln,u=r.Na(),l=u.end-u.start,r.i&&(l=r.i.presentationTimeline.getDuration()),l==1/0)throw new B(1,4,4055);if(h=zh(n),!h)throw new B(2,2,2014,n);return N.g(B0(r,e),4);case 4:for(p=N.i,m=h(),b={periodStart:0,segmentStart:0,segmentEnd:l,vttOffset:0,isMpegTs:!1},w=H(p),T=m.parseMedia(w,b,e,[]),k=[],S=x(T),A=S.next();!A.done;A=S.next())M=A.value,_=new nt(M.startTime,M.endTime,function(){return[]},0,null,null,0,0,1/0),R={title:M.payload,images:[]},_.hg(R),k.push(_);return U=_s({id:r.Te++,segmentIndex:new Et(k),mimeType:"text/plain",kind:"",language:t,originalLanguage:t,type:o.zk,external:!0}),r.l==nr?r.i.chapterStreams.push(U):r.Ye.push(U),fa(r),N.return(mw(U))}})})();return this.ha||Yx(this,i),i};function F0(e,t){var n;return P(function(r){switch(r.h){case 1:return r.m(2),r.g(Pd(t,e.K,e.g.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new B(1,2,2011,t)}})}function Nz(e,t,n,r,i,o,u){var l,h,p,m;return P(function(b){if(b.h==1)return i!="text/vtt"||u.length?b.g(B0(e,t),3):b.A(2);b.h!=2&&(l=b.i,h=E8(e,l,i,u),p=new Blob([h],{type:"text/vtt"}),t=Xw(p),i="text/vtt"),m=document.createElement("track");var w=e.M,T=t;if(w.g)try{var k=ZM(w);k.ot="c",k.su=!0;var S=YM(T,k,e8(w,T))}catch(A){vi("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),S=T}else S=T;return m.src=S,m.label=o,m.kind=r,m.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(m),e.Bg.push(m),b.return(m)})}function B0(e,t){var n,r,i,o;return P(function(u){if(u.h==1){n=ua,r=e.g.streaming.retryParameters,i=yn([t],r),i.method="GET";var l=e.M;return l.g&&Od(l,i,{ot:"c",su:!0}),u.g(e.K.request(n,i).promise,2)}return o=u.i,u.return(o.data)})}function E8(e,t,n,r){var i=zh(n);if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0,isMpegTs:!1},t=H(t),t=n.parseMedia(t,e,null,[]),V$(t,r);throw new B(2,2,2014,n)}g.Fm=function(e,t){this.Ha.width=e,this.Ha.height=t},g.di=function(e){if(this.l==nr){var t=this.j;if(e=e===void 0?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=x(t.h.values()),r=n.next();!r.done;r=n.next())r=r.value,!r.Ed||r.Ma||r.pb||(r.Ed=!1,yr(t,r,e));t=!0}}else t=!1;return t},g.nh=function(){return ut("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},g.ql=function(){return this.Bc},g.jl=function(){var e={video:null,audio:null,text:null};if(this.l!=nr)return e;var t=this.j.o,n=this.h.currentTime;t=x([t.video,t.audio,this.j.C]);for(var r=t.next();!r.done;r=t.next())if((r=r.value)&&r.segmentIndex){var i=r.segmentIndex.find(n);i=r.segmentIndex.get(i);var o=void 0,u=void 0,l=void 0,h=void 0,p=void 0,m=void 0,b={codecs:(h=(o=i)==null?void 0:o.codecs)!=null?h:r.codecs,mimeType:(p=(u=i)==null?void 0:u.mimeType)!=null?p:r.mimeType,bandwidth:(m=(l=i)==null?void 0:l.bandwidth)!=null?m:r.bandwidth};r.type=="video"?(b.width=r.width,b.height=r.height,e.video=b):r.type=="audio"?e.audio=b:r.type==mt&&(e.text=b)}return e};function Eo(e){var t=Ld();return t.streaming.failureCallback=function(n){if(e.ya()){var r=null;n.code==1001||n.code==1002?(r=1,e.g.streaming.lowLatencyMode&&(r=.1)):n.code==1003&&(r=.1),r!=null&&(n.severity=1,e.di(r))}},t.textDisplayFactory=function(n){if(e.Gc){var r=e.h;r=!(r.webkitDisplayingFullscreen||r.webkitPresentationMode&&r.webkitPresentationMode!="inline")}else r=!1;return r?new cr(n):"track"in document.createElement("track")?new lr(n):new zr},t}g.ck=function(e){this.Gc=e};function Oz(e,t){var n,r,i,o,u;return P(function(l){return l.h==1?(n=e.audio,r=e.video,i=function(h,p){var m,b,w;return P(function(T){return T.h==1?h?h.segmentIndex?T.A(2):T.g(h.createSegmentIndex(),2):T.return(null):(b=(m=h.segmentIndex.Yb(p))?m.next().value:null,b?(w=b.startTime,T.return(w)):T.return(null))})},l.g(i(n,t),2)):l.h!=3?(o=l.i,l.g(i(r,t),3)):(u=l.i,u!=null&&o!=null?l.return(Math.max(u,o)):u!=null?l.return(u):o!=null?l.return(o):l.return(t))})}function Sp(e){var t=e.xh();if(e.o&&e.V&&e.F){if(e.g.streaming.rebufferingGoal==0){var n=e.L;n.j=!1,ex(n)}else n=e.L,n.j=t,ex(n);if(e.M&&Au(e.M,t?"r":"p"),Gx(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.df<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.Y&&(e.Y=Math.min(e.Y+ ++e.df*i,n-r))}}t=new Map().set("buffering",t),e.dispatchEvent(Kt("buffering",t))}function I8(e){var t=e.h.playbackRate;t==0?(t=e.eb(),t!==0&&t!==1&&(t=Kt("ratechange"),e.dispatchEvent(t))):(e.L&&(e.L.set(t),e.l==nr&&e.u.playbackRateChanged(t),M8(e,t)),t=Kt("ratechange"),e.dispatchEvent(t))}function M8(e,t){e.ec.Ea(),e.ec.G(e.h,"timeupdate",function(){var n=e.h.currentTime,r=e.Na(),i=e.ya(),o=i?e.g.streaming.safeSeekOffset:0;t>0?i&&t>1&&Math.floor(n)>=Math.floor(r.end)&&e.ie():Math.floor(n)<=Math.floor(r.start+o)&&e.ie()})}function Gx(e){if(e.o&&e.V){var t=e.o.g,n="playing";e.V.g==Ll?n="buffering":e.Gd()?n="ended":e.h.paused&&(n="paused");var r=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(Kt("statechanged",n)))}}function P8(e){var t=e.h.playbackRate,n=e.ya();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var r=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.cj();i<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.Me(r,!1):i==1&&t!==e.L.zd()&&e.ie()}if(n&&(n=e.Na(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var u=e.g.streaming.liveSync.targetLatency,l=u+r,h=Math.max(0,u-r),p=e.g.streaming.liveSync.maxPlaybackRate,m=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(u=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?l=e.i.serviceDescription.targetLatency+r:e.i.serviceDescription.maxLatency!=null&&(l=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?h=Math.max(0,e.i.serviceDescription.targetLatency-r):e.i.serviceDescription.minLatency!=null&&(h=e.i.serviceDescription.minLatency),p=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,m=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.Y||typeof u!="number"||(e.Y=u);var b=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;i&&e.cc&&e.Y!==null&&typeof u=="number"&&e.df<b&&Date.now()-e.cc>o*1e3&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.Y=Math.max(e.Y-(u-o)/2,o+r),e.cc=Date.now()),i&&e.Y!==null&&(l=e.Y+r,h=e.Y-r),u=n.end-e.h.currentTime,r=0,e.l==ni&&(i=e.h.buffered,i.length>0&&(r=i.end(i.length-1),r=Math.max(p,r-n.end))),n=e.g.streaming.liveSync.panicMode,i=e.g.streaming.liveSync.panicThreshold*1e3,o=Date.now()-e.V.i,n&&!m&&(m=e.g.streaming.liveSync.minPlaybackRate),n&&m&&o<=i?t!=m&&e.Me(m,!1):l!=null&&p&&u-r>l?(t!=p&&e.Me(p,!1),e.cc=null):h!=null&&m&&u-r<h?(t!=m&&e.Me(m,!1),e.cc=null):t!==e.L.zd()&&(e.ie(),e.cc=Date.now())}}function Cp(e,t,n){return(Tu(t,n,.01)||n>t)&&e.yg<t?(e.yg=t,!0):!1}function V0(e){if(e.h){var t=e.Na();if(t=t.end-t.start,t=t>0?e.h.currentTime/t:0,!isNaN(t)){if(t*=100,Cp(e,0,t))var n=Kt("started");else Cp(e,25,t)?n=Kt("firstquartile"):Cp(e,50,t)?n=Kt("midpoint"):Cp(e,75,t)?n=Kt("thirdquartile"):((Cp(e,100,t)||t>100)&&(n=Kt("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Gd()&&e.h.pause());n&&e.dispatchEvent(n)}}}function Eu(e){try{II(e.Se,e.i)}catch(r){return Fd(e,r),!1}var t=e.i.isLowLatency&&e.g.streaming.lowLatencyMode,n=Wh(e.i.variants);return n=e.O.create(n),e=e.u.setVariants(Array.from(n.values()),t),typeof e=="boolean"?e:!0}function _8(e,t){if(t=t===void 0?!1:t,Eu(e)){if(!e.g.abr.enabled){var n=e.O.getLastAdaptationSet();if(n&&(n=Array.from(n.values()),n.length)){var r=e.j.o;if(r&&r.video&&(n=n.find(function(i){return i.video==r.video})))return n}}return e.u.chooseVariant(t)}return null}function jz(e,t){var n=null,r=Ps(e.i.textStreams,e.Xe,e.Ag,e.zg);return r.length&&(n=r[0]),!n&&t.audio&&e.g.accessibility.handleForcedSubtitlesAutomatically&&(r=Ps(e.i.textStreams,t.audio.language,"",!0),r.length&&(n=r[0])),n}function Ud(e,t,n,r,i){t=t===void 0?!0:t,n=n===void 0?0:n,r=r===void 0?!1:r,i=i===void 0?!0:i;var o=_8(e);o&&Ap(e,o,i,t,n,r)}function Ap(e,t,n,r,i,o){o=o===void 0?!1:o;var u=e.j.o;if(t==u)r&&K4(e.j,t,r,i,!0);else{var l=e.o.j;if(l.h!=t&&(l.h=t,l.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),K4(e.j,t,r,i,o,n),r=null,u&&(r=dd(u)),u=dd(t),u.active=!0,e.W&&(i=e.W,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,l=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.ej()){case"DASH":l=1;break;case"HLS":l=0}i.g&&(i.g.setLevelSwitching(t.id,!0),i.g.setContainerFormat(o),i.g.setStreamingFormat(l))}n?(n=new Map().set("oldTrack",r).set("newTrack",u),n=Kt("adaptation",n),Bd(e,n)):R8(e,r,u),N8(e,r,u)}}function D8(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var r=L8(e);n=Uv(n,r),t=Uv(t,r),R8(e,n,t),N8(e,n,t)}}function L8(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function fa(e){var t=Kt("trackschanged");Bd(e,t),O8(e)}function R8(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=Kt("variantchanged",t),Bd(e,t)}function N8(e,t,n){var r=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(r=!0),r&&O8(e)}function O8(e){var t=Kt("audiotrackschanged");Bd(e,t)}function Io(e){var t=Kt("textchanged");Bd(e,t)}function j8(e){e.g.abr.enabled||Kx(e);var t=new Map().set("newStatus",e.g.abr.enabled);Bd(e,Kt("abrstatuschanged",t))}function $0(e){var t=e.Gb().find(function(n){return n.active});t&&e.D&&e.D.setTextLanguage(t.language)}function Kx(e,t){if(t=t===void 0?!0:t,e.l==nr){e.Ve.stop();for(var n=x(e.i.variants),r=n.next();!r.done;r=n.next())r=r.value,isFinite(r.disabledUntilTime)&&(r.disabledUntilTime=0);t&&Eu(e)}}g.disableStream=function(e,t){if(!this.g.abr.enabled||this.l===ha||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(l){var h=l[e.type];return h&&h.id!==e.id&&!l.disabledUntilTime?e.type=="audio"?e.language===h.language:!0:!1})){for(var n=!1,r=!1,i=x(this.i.variants),o=i.next();!o.done;o=i.next()){o=o.value;var u=o[e.type];u&&(u.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):u.trickModeVideo&&u.trickModeVideo.id==e.id&&(r=!0))}return!n&&r?!1:(this.Ve.Ka(1),t=this.Nc().video.reduce(function(l,h){return l+h.end-h.start},0),Ud(this,!1,t,!0,!1),!0)}return!1};function Fd(e,t){var n,r,i,o;return P(function(u){switch(u.h){case 1:if(e.l==ha)return u.return();if(t.severity===1&&e.o.M++,!e.i||!e.j||t.handled||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3024&&t.code!=3018){u.A(2);break}if(n=Wh(e.i.variants),!(n.length>1||e.ha)){u.A(2);break}return r=Qe(),r.Qa()==="WEBKIT"&&t.code==3016?u.return():(u.m(4),u.g(pp(e.j),6));case 6:if(u.i)return i=Kt("mediasourcerecovered"),e.dispatchEvent(i),u.return();u.o(2);break;case 4:u.l();case 2:t.severity===2&&Kx(e,!1),o=Kt("error",new Map().set("detail",t)),e.dispatchEvent(o),o.defaultPrevented&&(t.handled=!0),u.j()}})}g.addFont=function(e,t){return jB(e,t)};function Ep(e,t,n,r){r=r===void 0?e:r,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventNode:n.eventNode,urlParams:n.urlParams,values:n.values}),r.dispatchEvent(Kt(t,e))}function Uz(e,t){if(t.schemeIdUri==="urn:mpeg:dash:event:callback:2015"&&t.eventNode){var n=mn(t.eventNode);n&&(n=n.trim())&&(n=pd(n,t.urlParams),e.K.request(13,yn([n],ei())).promise.catch(function(){}))}}function U8(e,t,n,r){r=r===void 0?!1:r,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(Kt(r?"audiotrackchanged":"mediaqualitychanged",t))}function Wx(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new B(2,3,3016):null;e=yt(e.h.error);var n=e.code;return t||n!==MediaError.MEDIA_ERR_ABORTED?new B(2,3,3016,n,e.Sk,e.message):null}function Fz(e,t){if(e.j){var n=Kt("keystatuschanged");e.dispatchEvent(n);var r=Object.keys(t);r.length==1&&r[0]==""&&(r=["00"],t={"00":t[""]});var i=r.length==1&&r[0]=="00";if(n=!1,r.length){r=e.keySystem();for(var o=md(e.g.drm.clearKeys),u=function(k,S){k.allowedByKeySystem=!0,S=x(S);for(var A=S.next();!A.done;A=S.next())A=A.value,((A=t[i?"00":A])||e.B.H)&&(k.allowedByKeySystem=k.allowedByKeySystem&&!!A&&!MI.includes(A))},l=x(e.i.variants),h=l.next();!h.done;h=l.next()){h=h.value;var p=iF(h);p=x(p);for(var m=p.next();!m.done;m=p.next()){m=m.value;var b=h.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!o.size&&e.i.type=="HLS")for(var w=x(m.drmInfos),T=w.next();!T.done;T=w.next())T=T.value,T.keySystem==r&&(T.keyIds.size?u(h,T.keyIds):u(h,m.keyIds));else u(h,m.keyIds);b!=h.allowedByKeySystem&&(n=!0)}}}n&&(fa(e),(n=e.j.o)&&!n.allowedByKeySystem?Ud(e):Eu(e))}}function Xx(e,t,n){t>0&&(e.ya()||e.bk(t)),t=e.getDuration(),n<t&&(e.ya()||e.Sb(n))}function Bd(e,t){P(function(n){if(n.h==1)return n.g(Promise.resolve(),2);e.l!=ha&&e.dispatchEvent(t),n.j()})}g.Ga=function(){if(!this.h)return!1;var e=Jp(Qe(),this.h);return e?e.state!="disconnected":!1},g.Gd=function(){return!this.h||this.h.ended?!0:this.ha&&!this.ya()&&this.h.currentTime>=this.Na().end};function Bz(e){function t(u,l){ut(u,"has been deprecated. Please use",l,"instead.")}var n={preferredAudioLanguage:"language",preferredAudioRole:"role",preferredAudioLabel:"label",preferredAudioChannelCount:"channelCount",preferSpatialAudio:"spatialAudio"};if(Object.keys(n).some(function(u){return u in e})){var r={language:"",role:"",label:"",channelCount:0,codec:""};n=x(Object.entries(n));for(var i=n.next();!i.done;i=n.next()){var o=x(i.value);i=o.next().value,o=o.next().value,i in e&&(t(i,"preferredAudio"),r[o]=e[i],delete e[i])}e.preferredAudio||(e.preferredAudio=[r])}if("preferredAudioCodecs"in e&&(t("preferredAudioCodecs","preferredAudio"),r=e.preferredAudioCodecs,Array.isArray(r)&&r.length&&(e.preferredAudio||(e.preferredAudio=r.map(function(u){return{language:"",role:"",label:"",channelCount:0,codec:u}}))),delete e.preferredAudioCodecs),n={preferredTextLanguage:"language",preferredTextRole:"role",preferForcedSubs:"forced"},Object.keys(n).some(function(u){return u in e})){for(r={language:"",role:"",format:""},n=x(Object.entries(n)),i=n.next();!i.done;i=n.next())o=x(i.value),i=o.next().value,o=o.next().value,i in e&&(t(i,"preferredText"),r[o]=e[i],delete e[i]);e.preferredText||(e.preferredText=[r])}if("preferredTextFormats"in e&&(t("preferredTextFormats","preferredText"),r=e.preferredTextFormats,Array.isArray(r)&&r.length&&(e.preferredText||(e.preferredText=r.map(function(u){return{language:"",role:"",format:u}}))),delete e.preferredTextFormats),n={preferredVideoLabel:"label",preferredVideoRole:"role",preferredVideoHdrLevel:"hdrLevel",preferredVideoLayout:"layout"},Object.keys(n).some(function(u){return u in e})){for(r={label:"",role:"",language:"",codec:"",hdrLevel:"",layout:""},n=x(Object.entries(n)),i=n.next();!i.done;i=n.next())o=x(i.value),i=o.next().value,o=o.next().value,i in e&&(t(i,"preferredVideo"),r[o]=e[i],delete e[i]);e.preferredVideo||(e.preferredVideo=[r])}"preferredVideoCodecs"in e&&(t("preferredVideoCodecs","preferredVideo"),r=e.preferredVideoCodecs,Array.isArray(r)&&r.length&&(e.preferredVideo||(e.preferredVideo=r.map(function(u){return{label:"",role:"",language:"",codec:u,hdrLevel:"",layout:""}}))),delete e.preferredVideoCodecs)}function Yx(e,t){e.ce.add(t),t.finally(function(){return e.ce.delete(t)})}function F8(e){return P(function(t){return e.ce.size?t.g(Promise.all([].concat(se(e.ce))),0):t.return()})}Te("shaka.Player",ye),ye.prototype.isEnded=ye.prototype.Gd,ye.prototype.isRemotePlayback=ye.prototype.Ga,ye.prototype.addFont=ye.prototype.addFont,ye.prototype.setVideoContainer=ye.prototype.ck,ye.prototype.getFetchedPlaybackInfo=ye.prototype.jl,ye.prototype.getManifestParserFactory=ye.prototype.ql,ye.prototype.getManifest=ye.prototype.nh,ye.prototype.retryStreaming=ye.prototype.di,ye.prototype.setMaxHardwareResolution=ye.prototype.Fm,ye.prototype.addChaptersTrack=ye.prototype.kc,ye.prototype.addThumbnailsTrack=ye.prototype.lc,ye.prototype.addTextTrackAsync=ye.prototype.Tb,ye.prototype.getStats=ye.prototype.getStats,ye.prototype.getBufferedInfo=ye.prototype.Nc,ye.prototype.getSegmentAvailabilityDuration=ye.prototype.Bf,ye.prototype.getPresentationStartTimeAsDate=ye.prototype.hj,ye.prototype.getPlayheadTimeAsDate=ye.prototype.vl,ye.prototype.getChaptersAsync=ye.prototype.al,ye.prototype.getChaptersTracks=ye.prototype.cl,ye.prototype.getVideoTracks=ye.prototype.getVideoTracks,ye.prototype.selectVideoTrack=ye.prototype.zm,ye.prototype.getAudioTracks=ye.prototype.getAudioTracks,ye.prototype.selectAudioTrack=ye.prototype.ym,ye.prototype.selectVariantTrack=ye.prototype.gi,ye.prototype.selectTextTrack=ye.prototype.Dc,ye.prototype.getThumbnails=ye.prototype.Cl,ye.prototype.getAllThumbnails=ye.prototype.Yk,ye.prototype.getImageTracks=ye.prototype.ll,ye.prototype.getTextTracks=ye.prototype.Gb,ye.prototype.getVariantTracks=ye.prototype.Sc,ye.prototype.cancelTrickPlay=ye.prototype.ie,ye.prototype.trickPlay=ye.prototype.Me,ye.prototype.useTrickPlayTrackIfAvailable=ye.prototype.Ci,ye.prototype.getPlaybackRate=ye.prototype.eb,ye.prototype.isBuffering=ye.prototype.xh,ye.prototype.getKeyStatuses=ye.prototype.zf,ye.prototype.retryLicensing=ye.prototype.ci,ye.prototype.renewLicense=ye.prototype.Wh,ye.prototype.getActiveSessionsMetadata=ye.prototype.mh,ye.prototype.getExpiration=ye.prototype.re,ye.prototype.drmInfo=ye.prototype.drmInfo,ye.prototype.keySystem=ye.prototype.keySystem,ye.prototype.isFullyLoaded=ye.prototype.sj,ye.prototype.goToLive=ye.prototype.Hl,ye.prototype.seekRange=ye.prototype.Na,ye.prototype.isVideoOnly=ye.prototype.uj,ye.prototype.isAudioOnly=ye.prototype.pj,ye.prototype.isDynamic=ye.prototype.ya,ye.prototype.isInProgress=ye.prototype.Hd,ye.prototype.isLive=ye.prototype.isLive,ye.prototype.getQueueManager=ye.prototype.jj,ye.prototype.getAdManager=ye.prototype.pe,ye.prototype.getAllTimelineRegions=ye.prototype.Zk,ye.prototype.getAllEmsgRegions=ye.prototype.Wk,ye.prototype.getAllMetadataRegions=ye.prototype.Xk,ye.prototype.getMimeType=ye.prototype.Af,ye.prototype.getAssetUri=ye.prototype.$c,ye.prototype.getNetworkingEngine=ye.prototype.hb,ye.prototype.getMediaElement=ye.prototype.Db,ye.prototype.getManifestType=ye.prototype.ej,ye.prototype.getLoadMode=ye.prototype.Bd,ye.prototype.resetConfiguration=ye.prototype.Pj,ye.prototype.getBufferFullness=ye.prototype.cj,ye.prototype.getNonDefaultConfiguration=ye.prototype.gj,ye.prototype.getConfigurationForLowLatency=ye.prototype.fl,ye.prototype.getConfiguration=ye.prototype.getConfiguration,ye.prototype.configurationForLowLatency=ye.prototype.Mk,ye.prototype.configure=ye.prototype.configure,ye.prototype.releaseAllMutexes=ye.prototype.pm,ye.prototype.destroyAllPreloads=ye.prototype.Sg,ye.prototype.preload=ye.prototype.preload,ye.prototype.detachAndSavePreload=ye.prototype.Xi,ye.prototype.unloadAndSavePreload=ye.prototype.rk,ye.prototype.load=ye.prototype.load,ye.prototype.updateStartTime=ye.prototype.Qm,ye.prototype.unload=ye.prototype.Fc,ye.prototype.detach=ye.prototype.detach,ye.prototype.attachCanvas=ye.prototype.Dk,ye.prototype.attach=ye.prototype.Ub,ye.probeSupport=function(e){e=e===void 0?!0:e;var t,n,r,i,o,u,l;return P(function(h){switch(h.h){case 1:if(t={},!e){h.A(2);break}return h.g(_F(),3);case 3:t=h.i;case 2:return n=jU(),r=HB(),i=Qe(),h.g(i.Wb(),4);case 4:return o=h.i,u={manifest:n,media:r,drm:t,hardwareResolution:o},l=V8,l.forEach(function(p,m){u[m]=p()}),h.return(u)}})},ye.isBrowserSupported=function(){return d.Promise||ut("A Promise implementation or polyfill is required"),!(d.Promise&&d.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")?!1:(Qe(),rs()?!0:$l().canPlayType("application/x-mpegurl")!="")},ye.setQueueManagerFactory=function(e){H0=e},ye.setAdManagerFactory=function(e){z0=e},ye.registerSupportPlugin=c8,ye.prototype.destroy=ye.prototype.destroy;var ha=0,Ip=1,nr=2,ni=3;ye.LoadMode={DESTROYED:ha,NOT_LOADED:Ip,MEDIA_SOURCE:nr,SRC_EQUALS:ni},ye.version="v5.2.4";var B8=["5","2"];J5=new function(e){this.g=e,this.i=cF,this.h=dF}(new yw(Number(B8[0]),Number(B8[1])));var V8=new Map,z0=null,H0=null;function $8(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function Vz(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function q0(e,t,n){Zr.call(this,n);var r=this;this.g=e,this.h=t,this.i=!1,this.j=this.h.getVolume(),this.l=new he,this.l.G(this.h,google.ima.AdEvent.Type.PAUSED,function(){r.i=!0}),this.l.G(this.h,google.ima.AdEvent.Type.RESUMED,function(){r.i=!1})}K(q0,Zr),g=q0.prototype,g.needsSkipUI=function(){return!1},g.hasCustomClick=function(){return!0},g.isUsingAnotherMediaElement=function(){return!0},g.getDuration=function(){return this.g.getDuration()},g.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},g.getRemainingTime=function(){return this.h.getRemainingTime()},g.isPaused=function(){return this.i},g.isSkippable=function(){return this.g.getSkipTimeOffset()>=0},g.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},g.canSkipNow=function(){return this.h.getAdSkippableState()},g.skip=function(){return this.h.skip()},g.pause=function(){return this.h.pause()},g.play=function(){return this.h.resume()},g.getVolume=function(){return this.h.getVolume()},g.setVolume=function(e){return this.video.volume=e,this.h.setVolume(e)},g.isMuted=function(){return this.h.getVolume()==0},g.isLinear=function(){return this.g.isLinear()},g.resize=function(e,t){this.h.resize(e,t)},g.setMuted=function(e){(this.video.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},g.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},g.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},g.getTitle=function(){return this.g.getTitle()},g.getDescription=function(){return this.g.getDescription()},g.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},g.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},g.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},g.getAdId=function(){return this.g.getAdId()},g.getCreativeAdId=function(){return this.g.getCreativeAdId()},g.getAdvertiserName=function(){return this.g.getAdvertiserName()},g.getMediaUrl=function(){return this.g.getMediaUrl()},g.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},g.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},g.release=function(){this.h=this.g=null},Te("shaka.ads.ClientSideAd",q0);function Jt(){}function z8(){return{impression:null,clickTracking:null,start:null,firstQuartile:null,midpoint:null,thirdQuartile:null,complete:null,skip:null,error:null,resume:null,pause:null,mute:null,unmute:null}}function H8(e){for(var t=z8(),n=x(Rt(e,"Error")),r=n.next();!r.done;r=n.next())(r=mn(r.value))&&(t.error||(t.error=[]),t.error.push(r));for(e=x(Rt(e,"Impression")),n=e.next();!n.done;n=e.next())(n=mn(n.value))&&(t.impression||(t.impression=[]),t.impression.push(n));return t}function Jx(e){var t=z8();e=x(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.type in t&&(t[n.type]?t[n.type].push.apply(t[n.type],se(n.urls)):t[n.type]=n.urls);return t}function q8(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next()){var r=n.value;n=r.attributes.event,n in t&&(r=mn(r))&&(t[n]||(t[n]=[]),t[n].push(r))}}function G8(e,t,n){if(e){switch(t){case"ad-impression":var r=e.impression;break;case"ad-clicked":r=e.clickTracking;break;case"ad-started":r=e.start;break;case"ad-first-quartile":r=e.firstQuartile;break;case"ad-midpoint":r=e.midpoint;break;case"ad-third-quartile":r=e.thirdQuartile;break;case"ad-complete":r=e.complete;break;case"ad-skipped":r=e.skip;break;case"ad-error":r=e.error;break;case"ad-resumed":r=e.resume;break;case"ad-paused":r=e.pause;break;case"ad-muted":r=e.mute;break;case"ad-volume-changed":r=e.unmute}if(r)for(e={type:13},r=x(r),t=r.next();!t.done;t=r.next())t=yn([t.value],ei()),t.method="POST",n.request(7,t,e)}}Te("shaka.ads.Utils",Jt),Jt.ADS_LOADED="ads-loaded",Jt.AD_STARTED="ad-started",Jt.AD_PLAYING="ad-playing",Jt.AD_FIRST_QUARTILE="ad-first-quartile",Jt.AD_MIDPOINT="ad-midpoint",Jt.AD_THIRD_QUARTILE="ad-third-quartile",Jt.AD_COMPLETE="ad-complete",Jt.AD_STOPPED="ad-stopped",Jt.AD_SKIPPED="ad-skipped",Jt.AD_VOLUME_CHANGED="ad-volume-changed",Jt.AD_MUTED="ad-muted",Jt.AD_PAUSED="ad-paused",Jt.AD_RESUMED="ad-resumed",Jt.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Jt.CUEPOINTS_CHANGED="ad-cue-points-changed",Jt.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Jt.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Jt.AD_CLICKED="ad-clicked",Jt.AD_PROGRESS="ad-progress",Jt.AD_BUFFERING="ad-buffering",Jt.AD_IMPRESSION="ad-impression",Jt.AD_DURATION_CHANGED="ad-duration-changed",Jt.AD_CLOSED="ad-closed",Jt.AD_LOADED="ad-loaded",Jt.ALL_ADS_COMPLETED="all-ads-completed",Jt.AD_LINEAR_CHANGED="ad-linear-changed",Jt.AD_METADATA="ad-metadata",Jt.AD_RECOVERABLE_ERROR="ad-recoverable-error",Jt.AD_ERROR="ad-error",Jt.AD_BREAK_READY="ad-break-ready",Jt.AD_BREAK_STARTED="ad-break-started",Jt.AD_BREAK_ENDED="ad-break-ended",Jt.AD_INTERSTITIAL_PRELOAD="ad-interstitial-preload",Jt.AD_INTERSTITIAL_PRELOADED="ad-interstitial-preloaded",Jt.AD_INTERACTION="ad-interaction",Jt.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Jt.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Jt.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function G0(e,t,n,r,i){var o=this;this.u=e,this.i=t,this.F=!1,this.B=this.o=null,this.H=NaN,this.l=i,this.j=null,this.h=new he,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v5.2.4"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.G(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(u){$z(o,u)}),this.h.G(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(u){K8(o,u)}),this.h.G(this.i,"ended",function(){o.m.contentComplete()}),this.h.oa(this.i,"play",function(){o.F=!0})}G0.prototype.configure=function(e){this.o=e},G0.prototype.stop=function(){this.g&&this.g.stop(),this.u&&Vl(this.u)},G0.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()};function K8(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new Ge("ad-error",t)),K0(e,null),e.l(new Ge("ad-cue-points-changed",new Map().set("cuepoints",[])))}function $z(e,t){if(e.l(new Ge("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.H))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.C),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.G(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.G(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.C);e.l(new Ge("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var r=e.g.getCuePoints();if(r.length){t=[],r=x(r);for(var i=r.next();!i.done;i=r.next())t.push({start:i.value,end:null});e.l(new Ge("ad-cue-points-changed",new Map().set("cuepoints",t)))}zz(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight),e.h.G(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),"ResizeObserver"in d?(e.B=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.B.observe(e.i)):e.h.G(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.oa(e.i,"play",function(){e.F=!0,e.g.start()})}catch{K0(e,null)}}function zz(e){function t(n,r){n=new Map().set("originalEvent",n),e.l(new Ge(r,n))}e.h.G(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){K8(e,n)}),e.h.Hb(e.g,[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.STARTED],function(n){var r=n.getAd();r?(e.j=new q0(r,e.g,e.i),n.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new Ge("ad-content-pause-requested")),n=new Map().set("ad",e.j).set("sdkAdObject",r).set("originalEvent",n),e.l(new Ge("ad-started",n)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(n=e.j,n.j=e.i.volume,n.h.setVolume(0)):e.j.setVolume(e.i.volume))):ut("The IMA SDK fired a "+n.type+" event with no associated ad. Unable to play ad!")}),e.h.G(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.G(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.G(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.G(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.G(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){K0(e,n)}),e.h.G(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed"),K0(e,n)}),e.h.G(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.G(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.G(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.G(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.G(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.G(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.G(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.G(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.G(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.G(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.G(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.G(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.G(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.G(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.G(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.G(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.G(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.G(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function K0(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new Ge("ad-content-resume-requested")),e.l(new Ge("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function W8(e){return e.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||e.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025"}function Hz(e){var t=Yt(e.eventNode,"OverlayEvent"),n=t.attributes.uri,r=t.attributes.mimeType,i=t.attributes.loop=="true",o=wt(t,"z",Jr);if(!n||o==0)return null;var u=null,l=Yt(t,"Background");if(l){var h=l.attributes.uri;h?u="center / contain no-repeat url('"+h+"')":u=Cr(l)}l=1920,h=1080;var p=Yt(t,"Viewport");if(p&&(l=wt(p,"x",Jr),l==null||(h=wt(p,"y",Jr),h==null)))return null;var m={viewport:{x:l,y:h},topLeft:{x:0,y:0},size:{x:l,y:h}},b=Yt(t,"Overlay");if(p&&b){var w=Yt(b,"TopLeft");if(b=Yt(b,"Size"),w&&b){if(w=X8(w,b),!w)return null;m.topLeft=w.topLeft,m.size=w.size}}if(w=null,t=Yt(t,"Squeeze"),p&&t&&(p=Yt(t,"TopLeft"),t=Yt(t,"Size"),p&&t)){if(t=X8(p,t),!t)return null;w={viewport:{x:l,y:h},topLeft:t.topLeft,size:t.size}}return{id:e.id,groupId:null,startTime:e.startTime,endTime:e.endTime,uri:n,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:i,overlay:m,displayOnBackground:o==-1,currentVideo:w,background:u,clickThroughUrl:null,tracking:null}}function X8(e,t){var n=wt(e,"x",Jr);e=wt(e,"y",Jr);var r=wt(t,"x",Jr);return t=wt(t,"y",Jr),n==null||e==null||r==null||t==null?null:{topLeft:{x:n,y:e},size:{x:r,y:t}}}function W0(e,t,n,r,i,o){Zr.call(this,e),this.g=t,this.i=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.j=t.skipFor,this.u=n,this.m=r,this.l=i,this.o=o,this.B=t.overlay}K(W0,Zr),g=W0.prototype,g.hasCustomClick=function(){return this.g.clickThroughUrl!=null},g.isUsingAnotherMediaElement=function(){return this.o},g.getDuration=function(){var e=this.video.duration;return isNaN(e)?-1:e},g.getRemainingTime=function(){var e=this.video.duration;return isNaN(e)?-1:e-this.video.currentTime},g.isSkippable=function(){return this.h&&this.j!=null?this.getDuration()-this.getRemainingTime()<this.i+this.j:this.h},g.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.i-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},g.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},g.skip=function(){this.canSkipNow()&&this.u()},g.isLinear=function(){return this.B==null},g.getSequenceLength=function(){return this.m},g.getPositionInSequence=function(){return this.l},g.getAdId=function(){return this.g.id||""},g.getMediaUrl=function(){return this.g.uri},g.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},Te("shaka.ads.InterstitialAd",W0);function X0(e,t,n){Zr.call(this),this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}K(X0,Zr),g=X0.prototype,g.hasCustomClick=function(){return this.g.clickThroughUrl!=null},g.isLinear=function(){return this.i},g.getSequenceLength=function(){return this.j},g.getPositionInSequence=function(){return this.h},g.getAdId=function(){return this.g.id||""},g.getMediaUrl=function(){return this.g.uri},g.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},Te("shaka.ads.InterstitialStaticAd",X0);function Y8(e,t){var n=[];e=x(Rt(e,"Ad"));for(var r=e.next();!r.done;r=e.next()){var i=r.value;if(r=i.attributes.id||null,i=Yt(i,"InLine")){var o=Yt(i,"Creatives");if(o){o=x(Rt(o,"Creative"));for(var u=o.next();!u.done;u=o.next()){u=u.value;var l=Yt(u,"Linear");if(l){var h=H8(i);qz(n,t,l,h,r)}if(u=Yt(u,"NonLinearAds"))for(l=Rt(u,"NonLinear"),l=x(l),h=l.next();!h.done;h=l.next()){var p=h.value;h=H8(i);var m=Yt(u,"TrackingEvents");m&&q8(Sl(m),h);e:{m=n;var b=t,w=Yt(p,"StaticResource");if(w)var T=w.attributes.creativeType;else{if(w=Yt(p,"HTMLResource"),!w)break e;T="text/html"}if(w=Cr(w)){T==="text/html"&&(w="data:text/html;charset=UTF-8,"+encodeURIComponent(w));var k=wt(p,"width",Jr)||wt(p,"expandedWidth",Jr),S=wt(p,"height",Jr)||wt(p,"expandedHeight",Jr);if(k||S){var A=null,M=Yt(p,"NonLinearClickThrough");M&&(M=Cr(M))&&(A=M),M=x(Rt(p,"NonLinearClickTracking"));for(var _=M.next();!_.done;_=M.next())(_=mn(_.value))&&(h.clickTracking||(h.clickTracking=[]),h.clickTracking.push(_));M=null,(p=p.attributes.minSuggestedDuration)&&(M=od(p)),p=0,b!=null&&(p=b),m.push({id:r,groupId:null,startTime:p,endTime:null,uri:w,mimeType:T,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:M,once:!0,pre:b==null,post:b==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:k||0,y:S||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:A,tracking:h})}}}}}}}}return n}function qz(e,t,n,r,i){var o=0;t!=null&&(o=t);var u=null;n.attributes.skipoffset&&(u=od(n.attributes.skipoffset),isNaN(u)&&(u=null));var l=Yt(n,"MediaFiles");if(l){var h=null,p=Yt(n,"VideoClicks");if(p){var m=Yt(p,"ClickThrough");for(m&&(m=Cr(m))&&(h=m),p=x(Rt(p,"ClickTracking")),m=p.next();!m.done;m=p.next())(m=mn(m.value))&&(r.clickTracking||(r.clickTracking=[]),r.clickTracking.push(m))}for((n=Yt(n,"TrackingEvents"))&&q8(Sl(n),r),l=n=Rt(l,"MediaFile"),n=n.filter(function(b){return b.attributes.delivery=="streaming"}),n.length&&(l=n),l=l.sort(function(b,w){return(parseInt(w.attributes.height,10)||0)-(parseInt(b.attributes.height,10)||0)}),l=x(l),n=l.next();!n.done;n=l.next())if(n=n.value,!n.attributes.apiFramework&&(p=Cr(n))){e.push({id:i,groupId:null,startTime:o,endTime:null,uri:p,mimeType:n.attributes.type||null,isSkippable:u!=null,skipOffset:u,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:h,tracking:r});break}}}function Gz(e){var t=[];e=x(Rt(e,"vmap:AdBreak"));for(var n=e.next();!n.done;n=e.next()){var r=n.value,i=r.attributes.timeOffset;i&&(n=null,i=="start"?n=null:i=="end"?n=1/0:n=od(i),(r=Yt(r,"vmap:AdSource"))&&(r=Yt(r,"vmap:AdTagURI"))&&(r=mn(r))&&t.push({time:n,uri:r}))}return t}function J8(e,t,n){function r(o){return o?o.overlay?!0:i.M?o.post:!i.g.paused:!1}var i=this;this.H=null,this.B=e,this.o=t,this.g=t.Db(),this.F=null,this.C=!0,this.h=this.g,this.Pa=n,this.ba=new Set,this.xa=new Set,this.I=new Set,this.R=null,this.K=new Set,this.W=new Map,this.J=new Map,this.P=new Map,this.i=new ye,Zx(this),this.L=new he,this.m=new he,this.D=this.M=!1,this.O=this.l=this.ha=this.u=this.j=null,this.Aa=!1,this.za=this.ra=null,this.Y=new Map,this.wa=function(){if(!i.D&&i.j&&!i.o.Ga()){i.M=i.g.ended,i.j=i.g.currentTime;var o=Vd(i);o&&r(o)&&Q0(i,o,1,1,Date.now())}},this.Fa=function(){if(!(i.D||i.j||i.o.Ga())){i.M=i.g.ended,i.g.paused||(i.j=i.g.currentTime);var o;i.u||(o=Vd(i,!0)),o||(o=Vd(i)),o&&r(o)&&Q0(i,o,1,1,Date.now())}},this.Ha=function(){if(!i.D&&i.j&&!i.o.Ga()){i.M=i.g.ended;var o=i.g.currentTime;if(i.u&&!i.u.pre&&!i.u.post&&o<i.u.startTime&&(i.u=null),i.H&&i.H.allowStartInMiddleOfInterstitial&&i.o.isLive())for(var u=x(i.K),l=u.next();!l.done;l=u.next()){var h=l.value;if(h.ag&&(l=h.endTime,o>=h.startTime&&(l==null||l==1/0||o<l)&&(h.ag=!1,l=i,h=h.id,h!=null)))for(var p=x(Array.from(l.I)),m=p.next();!m.done;m=p.next())m=m.value,m.groupId===h&&r6(l,m)}}},this.ma=new ft(this.wa),this.V=new ft(function(){if(!i.D&&i.j!=null&&(i.I.size||i.K.size)){var o=i.o.Bd();if(o!=ha&&o!=Ip){o=!1;for(var u=i.o.Na(),l=x(Array.from(i.K)),h=l.next();!h.done;h=l.next())h=h.value,u.start-(h.endTime||h.startTime)>=1?(i.K.delete(h),Mp(i),o=!0):h.bi||h.ag||!i6(i,h)||(h.bi=!0,Zz(i,h));for(l=Array.from(i.I),l=x(l),h=l.next();!h.done;h=l.next())if(h=h.value,h!=i.u){if(u.start-(h.endTime||h.startTime)>=1)r6(i,h),Mp(i),h.overlay||(o=!0);else if(c6(i,h)){if(!i.J.has(h)&&s6(h)){var p=new tk(i.i,h,function(m,b){an(i,m,b)});i.J.set(h,p)}u6(i,h)}}o&&$d(i)}}}),this.configure(this.o.getConfiguration().ads)}g=J8.prototype,g.configure=function(e){this.H=e,this.D||Y0(this)};function Q8(e){if(!e.Aa&&(e.I.size||e.K.size)){e.L.Hb(e.g,["playing","timeupdate"],e.Fa),e.L.G(e.g,"seeked",e.Ha),e.L.G(e.g,"ended",e.wa);var t=!0;if(!ek()){var n;(n=e.ra)==null||n.release(),e.ra=new R0(e.g),t=!e.ra.start(function(){e.wa()})}t&&e.ma.Ka(.025),e.V&&e.V.Ka(1),e.Aa=!0}}function Mp(e){if(e.Aa&&!e.I.size&&!e.K.size){e.L.Ua(e.g,"playing",e.Fa),e.L.Ua(e.g,"timeupdate",e.Fa),e.L.Ua(e.g,"seeked",e.Ha),e.L.Ua(e.g,"ended",e.wa);var t;(t=e.ra)==null||t.release(),e.ra=null;var n;(n=e.ma)==null||n.stop();var r;(r=e.V)==null||r.stop(),e.Aa=!1}}function Y0(e,t){if(t=t===void 0?!1:t,e.B&&e.H){var n=e.H.supportsMultipleMediaElements,r=e.g;(r.controls||r.webkitPresentationMode&&r.webkitPresentationMode!=="inline"||r.webkitDisplayingFullscreen)&&(n=!1),(t||e.C==n)&&(e.C=!n,e.C?(e.h=e.g,e.F&&(e.F.parentElement&&e.B.removeChild(e.F),e.F=null)):(t&&e.F&&(e.F.parentElement&&e.B.removeChild(e.F),e.F=null),e.F||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.F=t),e.h=e.F))}else e.C=!0}g.stop=function(){this.m&&this.m.Ea(),this.ba.clear(),this.xa.clear(),this.I.clear(),this.R=null,this.K.clear(),this.W.clear(),this.i.Sg();var e=Array.from(this.J.values());e=x(e);for(var t=e.next();!t.done;t=e.next())t.value.release();if(this.J.clear(),this.P.size)for(e=Array.from(this.P.keys()),e=x(e),t=e.next();!t.done;t=e.next())l6(this,t.value);this.P.clear(),this.Y.clear(),this.i.detach(),this.D=this.M=!1,this.ha=this.u=this.j=null,this.C=!0,this.h=this.g,this.za=this.F=null,Qx(this),Mp(this),this.B&&Vl(this.B),this.l&&(this.l.stop(),this.l=null)},g.release=function(){this.stop(),this.L&&this.L.release(),this.m&&this.m.release(),this.ma&&(this.ma.stop(),this.ma=null),this.V&&(this.V.stop(),this.V=null),this.i.destroy()},g.Cd=function(){return this.i};function Kz(e,t){var n,r;return P(function(i){if(i.h==1){if(n=Rn(t,"ID")){if(e.ba.has(n)){var o=Rn(t,"X-PLAYOUT-LIMIT");if(o!=null&&(o=parseFloat(o),!isNaN(o))){for(var u=x(e.I),l=u.next();!l.done;l=u.next())l=l.value,l.id!==n&&l.groupId!==n||Wz(e,l,o);for(u=x(e.K),l=u.next();!l.done;l=u.next())l=l.value,l.id===n&&l.playoutLimit==null&&(l.playoutLimit=o)}return i.return()}e.ba.add(n)}return Zx(e),r=[],Rn(t,"X-OVERLAY-ID")!=null?(r=eH(e,t),i.A(2)):i.g(Qz(e,t),3)}return i.h!=2&&(r=i.i),r.length?i.g(Pp(e,r),0):i.A(0)})}function Wz(e,t,n){if(t.playoutLimit==null){t.playoutLimit=n;var r=!t.overlay&&!(t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html"));if(e.D&&e.u!=null&&(e.u===t||t.groupId!=null&&e.u.groupId===t.groupId)&&r&&e.ha!=null){t=n-(Date.now()-e.ha)/1e3;var i;(i=e.l)==null||i.stop(),e.l=null,t<=0?e.O&&e.O():(e.l=new ft(function(){e.O&&e.O()}).$(t),e.i.configure("playRangeEnd",n))}}}function J0(e,t){var n=null;t.id!=null&&e.W.has(t.id)?n=e.W.get(t.id):t.groupId!=null&&e.W.has(t.groupId)&&(n=e.W.get(t.groupId)),n!=null&&(t.resolutionTimeOffset=Math.max(0,t.startTime-n))}g.addAdUrlInterstitial=function(e){var t=this,n,r,i,o,u,l,h,p,m;return P(function(b){if(b.h==1)return n={type:12},b.g(t.o.hb().request(7,yn([e],ei()),n).promise,2);if(b.h!=3){if(r=b.i,i=Dh(r.data,"VAST,vmap:VMAP"),!i)throw new B(2,10,10007);if(o=[],i.tagName=="VAST")return o=Y8(i,t.j),b.A(3);if(i.tagName!="vmap:VMAP")return b.A(3);for(u=function(w){var T,k;return P(function(S){if(S.h==1)return S.g(t.o.hb().request(7,yn([w.uri],ei()),n).promise,2);if(T=S.i,k=Dh(T.data,"VAST"),!k)throw new B(2,10,10007);o.push.apply(o,se(Y8(k,w.time))),S.j()})},l=[],h=x(Gz(i)),p=h.next();!p.done;p=h.next())m=p.value,l.push(u(m));return l.length?b.g(Promise.all(l),3):b.A(3)}Pp(t,o),b.j()})};function Pp(e,t){var n,r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:n=!1,r=x(t),i=r.next();case 2:if(i.done){p.A(4);break}if(o=i.value,!o.uri){ut("Missing URL in interstitial",o),p.A(3);break}if(o.mimeType){p.A(5);break}return p.m(6),u=e.i.hb(),p.g(Pd(o.uri,u,e.o.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=p.i,p.o(5);break;case 6:p.l();case 5:if(l=o.id||JSON.stringify(o),e.xa.has(l)){p.A(3);break}o.loop&&!o.overlay&&ut("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.xa.add(l),e.I.add(o),e.R=null,J0(e,o),c6(e,o)&&(!e.J.has(o)&&s6(o)&&(h=new tk(e.i,o,function(m,b){an(e,m,b)}),e.J.set(o,h)),u6(e,o));case 3:i=r.next(),p.A(2);break;case 4:n&&$d(e),Q8(e),p.j()}})}function Xz(e){return e.R||(e.R=Array.from(e.I).sort(function(t,n){return n.startTime-t.startTime})),e.R}function Vd(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var r=0,i=null;if(e.I.size&&e.j!=null){var o=Xz(e),u=o;for(u=t?o.filter(function(m){return m.pre}):e.M?o.filter(function(m){return m.post}):o.filter(function(m){return!m.pre&&!m.post}),o=x(u),u=o.next();!u.done;u=o.next()){u=u.value;var l=!1;if(t)l=u.pre;else if(e.M)l=u.post;else if(!u.pre&&!u.post){var h=e.j-Math.round(u.startTime*1e3)/1e3,p=1;e.H.allowStartInMiddleOfInterstitial&&u.endTime&&u.endTime!=1/0&&(p=u.endTime-u.startTime),(h>0||h==0&&e.j==0)&&(h<=p||!u.canJump)&&(l=!(n==null&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=u.startTime))}l&&(!e.u||u.startTime>=e.u.startTime)&&(r==(n||0)?i=u:i&&!u.canJump&&Math.round(u.startTime*1e3)/1e3-Math.round(i.startTime*1e3)/1e3>.001&&(i=u,r=0),r++)}}return i}function Q0(e,t,n,r,i,o){o=o===void 0?0:o,e.u=t,Y0(e),e.C||!e.B||e.h.parentElement||e.B.appendChild(e.h),r==1&&n==1&&(n=Array.from(e.I).filter(function(u){return t.pre?u.pre==t.pre:t.post?u.post==t.post:Math.abs(u.startTime-t.startTime)<.001}).length),t.once&&(o++,e.I.delete(t),e.R=null,Mp(e),t.overlay||$d(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?Yz(e,t,n,r,o):ut("Unsupported interstitial",t):e.C&&t.overlay?ut("Unsupported interstitial",t):Jz(e,t,n,r,i,o)}function Yz(e,t,n,r,i){function o(){e.l&&(e.l.stop(),e.l=null),e.B.removeChild(p),Qx(e,t),an(e,"ad-stopped"),e.m.Ea();var w=Vd(e,t.pre,r-i);w?Q0(e,w,n,++r,Date.now(),i):e.D=!1,e.D||an(e,"ad-break-ended",new Map().set("timeOffset",u))}var u=t.pre?0:t.post?-1:t.startTime;if(!e.D){e.ha=Date.now();var l=new Map().set("timeOffset",u).set("startedAt",e.j);an(e,"ad-break-started",l)}e.D=!0,l=t.overlay;var h=t.mimeType=="text/html"?"iframe":"img",p=document.createElement(h);p.style.objectFit="contain",p.style.position="absolute",p.style.border="none",e6(e,t);var m=new X0(t,n,r);an(e,"ad-impression"),an(e,"ad-started",new Map().set("ad",m)),h=="iframe"?p.src=t.uri:(p.src=t.uri,p.onerror=function(w){an(e,"ad-error",new Map().set("originalEvent",w)),o()}),l.viewport.x==0&&l.viewport.y==0?(p.width=l.size.x,p.height=l.size.y,p.style.bottom="10%",p.style.left="0",p.style.right="0",p.style.width="100%",l.size.y||h!="iframe"||(p.style.height="auto")):Z8(p,l),e.B.appendChild(p);var b=Date.now();e.l&&e.l.stop(),e.l=new ft(function(){t.playoutLimit&&(Date.now()-b)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(an(e,"ad-complete"),o()):e.g.currentTime<t.startTime&&(an(e,"ad-skipped"),o())}),t.playoutLimit&&!t.endTime?e.l.$(t.playoutLimit):t.endTime&&e.l.Ka(.025),e.m.G(e.g,"seeked",function(){var w=e.g.currentTime;(w<t.startTime||t.endTime&&w>t.endTime)&&(e.l&&e.l.stop(),an(e,"ad-skipped"),o())}),t.clickThroughUrl&&e.m.G(p,"click",function(){t.clickThroughUrl&&(an(e,"ad-clicked"),d.open(t.clickThroughUrl,"_blank"))})}function Jz(e,t,n,r,i,o){var u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de;P(function(re){switch(re.h){case 1:if(u=Date.now(),l=t.pre?0:t.post?-1:t.startTime,e.D||(e.ha=Date.now(),h=new Map().set("timeOffset",l).set("startedAt",e.j),an(e,"ad-break-started",h)),e.D=!0,p=!1,m=function(){if(!e.C&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var pe=Date.now();e.g.currentTime+=(pe-i)/1e3,i=pe}},b=function(pe,Re){var W,Se,Ee;return P(function(Xe){switch(Xe.h){case 1:if(Re||m(),W=Vd(e,t.pre,r-o),pe&&t.groupId)for(;W&&W.groupId==t.groupId;)r++,W=Vd(e,t.pre,r-o);if(e.l&&(!t.groupId||W&&W.groupId!=t.groupId)&&(e.l.stop(),e.l=null),Qx(e,t),W&&!W.overlay){Xe.A(2);break}return t.post&&(e.j=null,e.u=null),e.C?Xe.g(e.i.detach(),4):Xe.g(e.i.Fc(),4);case 4:e.C?(Se=t.resumeOffset,Se==null&&(Se=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.j||0):(Date.now()-i)/1e3),an(e,"ad-content-resume-requested",new Map().set("offset",Se))):e.o.isLive()&&t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),an(e,"ad-stopped"),e.m.Ea(),e.D=!1,e.C?$d(e):(e.h.style.display="none",Re||m(),e.M||e.g.play());case 2:if(!(W&&e.C&&ek())){Y0(e),Xe.A(7);break}return Xe.g(e.i.detach(),8);case 8:Y0(e,!0);case 7:W&&(an(e,"ad-stopped"),e.m.Ea(),Q0(e,W,n,++r,i,o)),e.D||(an(e,"ad-break-ended",new Map().set("timeOffset",l)),(Ee=e.l)==null||Ee.stop(),e.l=null),Xe.j()}})},w=function(pe,Re){var W;return P(function(Se){return p?Se.return():(p=!0,W=Re&&pe.code===1001,an(e,"ad-error",new Map().set("originalEvent",pe)),Se.g(b(!1,W),0))})},T=function(){return P(function(pe){if(pe.h==1)return p?pe.return():(p=!0,pe.g(b(!1,!1),2));an(e,"ad-complete"),pe.j()})},e.O=function(){return P(function(pe){return p?pe.return():(p=!0,an(e,"ad-skipped"),pe.g(b(!0,!1),0))})},k=new W0(e.h,t,e.O,n,r,!e.C),e.C||(k.setMuted(e.g.muted),k.setVolume(e.g.volume)),an(e,"ad-impression"),an(e,"ad-started",new Map().set("ad",k)),(S=k.canSkipNow())&&an(e,"ad-skip-state-changed"),e.J.has(t)&&(A=e.J.get(t),M=A.i))return e.J.delete(t),w(M,!0),re.return();if(e.m.oa(e.i,"error",function(pe){w(pe.detail,!1)}),e.m.G(e.h,"timeupdate",function(){if(e.h.duration){var pe=k.canSkipNow();S!=pe&&k.getRemainingTime()>0&&k.getDuration()>0&&an(e,"ad-skip-state-changed"),S=pe,!e.C&&!t.overlay&&t.resumeOffset==null&&t.timelineRange&&t.endTime&&t.endTime!=1/0&&e.g.currentTime!=t.endTime&&e.o.Na().end>=t.endTime&&(e.g.currentTime=t.endTime)}}),e.m.oa(e.i,"firstquartile",function(){m(),an(e,"ad-first-quartile")}),e.m.oa(e.i,"midpoint",function(){m(),an(e,"ad-midpoint")}),e.m.oa(e.i,"thirdquartile",function(){m(),an(e,"ad-third-quartile")}),e.m.oa(e.i,"complete",T),_=!1,e.m.G(e.h,"play",function(){_?an(e,"ad-resumed"):(_=!0,an(e,"ad-playing",new Map().set("ad",k)))}),e.m.G(e.h,"pause",function(){var pe=e.i.getConfiguration();e.h.currentTime>=pe.playRangeEnd?T():an(e,"ad-paused")}),e.m.G(e.h,"volumechange",function(){e.h.muted?an(e,"ad-muted"):an(e,"ad-volume-changed"),e.C||(e.g.volume=e.h.volume,e.g.muted=e.h.muted)}),t.clickThroughUrl&&(R=e.B||e.h,e.m.G(R,"click",function(){t.clickThroughUrl&&(k.isPaused()||k.pause(),d.open(t.clickThroughUrl,"_blank"))})),!e.C||r!=1){re.A(2);break}return an(e,"ad-content-pause-requested",new Map().set("saveLivePosition",!0)),U=Promise.withResolvers(),N=function(pe){return P(function(Re){if(Re.h==1)return pe.state!="detach"?Re.A(0):ek()?Re.g(O5(.1),3):Re.A(3);U.resolve(),e.m.Ua(e.o,"onstatechange",N),Re.j()})},e.m.G(e.o,"onstatechange",N),re.g(U.promise,2);case 2:if(e6(e,t),e.C||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,Z8(e.h,t.overlay)):(e.g.pause(),e.o.isLive()||t.resumeOffset==null||t.resumeOffset==0||(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),re.m(4),Zx(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(j=t.endTime-t.startTime,j>0&&e.i.configure("playRangeEnd",j)),V=null,r==1&&!t.pre&&!t.post&&e.H.allowStartInMiddleOfInterstitial&&e.j!=null&&t.startTime<=e.j&&(!t.endTime||t.endTime>e.j)&&(t.id&&e.Y.has(t.id)?(q=e.Y.get(t.id),e.Y.delete(t.id),Math.abs(q)>.25&&(V=q)):(G=e.j-t.startTime,Math.abs(G)>.25&&(V=G))),r==1&&((z=e.l)==null||z.stop(),e.l=null),(J=t.playoutLimit)&&!e.l&&(V&&(J-=V),e.l=new ft(function(){e.O()}).$(J),e.i.configure("playRangeEnd",J)),e.i.Db()===e.h){re.A(6);break}return re.g(e.i.Ub(e.h),6);case 6:if(e.J.has(t)){if(ie=e.J.get(t),e.J.delete(t),le=ie.i)throw le;return(be=ie.g)?re.g(e.i.load(be,V),9):re.g(e.i.load(t.uri,V,t.mimeType||void 0),9)}return re.g(e.i.load(t.uri,V,t.mimeType||void 0),9);case 9:t.overlay&&e.g.paused?e.h.pause():e.h.play(),ce=(Date.now()-u)/1e3,an(e,"ads-loaded",new Map().set("loadTime",ce)),e.C&&e.g.play(),t.overlay&&(t.pre||t.post||e.o.isLive()&&!(t.startTime>0)||(ae=function(){var pe=e.g.currentTime-t.startTime;Math.abs(pe-e.h.currentTime)>.1&&(e.h.currentTime=pe)},e.m.oa(e.h,"playing",ae),e.m.G(e.g,"seeking",ae)),e.m.G(e.g,"seeked",function(){var pe=e.g.currentTime;(pe<t.startTime||t.endTime&&pe>t.endTime)&&e.O()})),re.o(0);break;case 4:if(de=re.l(),!e.D)return re.return();w(de,!0),re.j()}})}function Z8(e,t){var n=t.viewport,r=t.topLeft;t=t.size,e.style.height=t.y/n.y*100+"%",e.style.left=r.x/n.x*100+"%",e.style.top=r.y/n.y*100+"%",e.style.width=t.x/n.x*100+"%"}function e6(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var r=!0,i=[],o=n.topLeft.x/n.viewport.x*100;o>0&&o<=100&&(i.push("translateX("+o+"%)"),r=!1),o=n.topLeft.y/n.viewport.y*100,o>0&&o<=100&&(i.push("translateY("+o+"%)"),r=!1),o=n.size.x/n.viewport.x,o<1&&i.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,o<1&&i.push("scaleY("+n+")"),i.length&&(e.g.style.transform=i.join(" ")),r&&(e.g.style.transition="transform 250ms")}e.B&&(t.clickThroughUrl?(e.B.setAttribute("ad-active","true"),e.B.style.pointerEvents=""):e.B.style.pointerEvents="none",t.background&&(e.B.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function Qx(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.B&&(e.B.removeAttribute("ad-active"),e.B.style.pointerEvents="",!t||t.background)&&(e.B.style.background=""),e.F&&(e.F.style.background="")}function Qz(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J;return P(function(ie){switch(ie.h){case 1:if(n=[],!t||(r=Rn(t,"X-ASSET-URI"),i=Rn(t,"X-ASSET-LIST"),!r&&!i))return ie.return(n);if(o=Rn(t,"ID"),u=a6(t,o),l=u.startTime,h=u.endTime,p=Rn(t,"X-RESTRICT"),b=m=!0,p!=null&&(m=!p.includes("SKIP"),b=!p.includes("JUMP")),w=m?0:null,T=Rn(t,"X-SKIP-CONTROL-OFFSET"),T!=null&&(w=parseFloat(T),isNaN(w)&&(w=m?0:null)),k=null,S=Rn(t,"X-SKIP-CONTROL-DURATION"),S!=null&&(k=parseFloat(S),isNaN(w)&&(k=null)),A=null,M=Rn(t,"X-RESUME-OFFSET"),M!=null&&(A=parseFloat(M),isNaN(A)&&(A=null)),A!=null&&A!=0&&h&&h!=1/0&&Tu(l+A,h)&&(A=null),_=null,R=Rn(t,"X-PLAYOUT-LIMIT"),R!=null&&(_=parseFloat(R),isNaN(_)&&(_=null)),U=o6(t),N=U.once,j=U.pre,V=U.post,q=!1,G=Rn(t,"X-TIMELINE-OCCUPIES"),G!=null?q=G.includes("RANGE"):M==null&&e.o.isLive()&&(q=!j&&!V),r!=null){if(!r)return ie.return(n);n.push({id:o,groupId:null,startTime:l,endTime:h,uri:Z0(e,r),mimeType:null,isSkippable:m,skipOffset:w,skipFor:k,canJump:b,resumeOffset:A,playoutLimit:_,once:N,pre:j,post:V,timelineRange:q,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null,tracking:null}),ie.A(2);break}if(i==null){ie.A(2);break}if(!i)return ie.return(n);if(z={id:o,groupId:null,startTime:l,endTime:h,Ck:i,isSkippable:m,skipOffset:w,skipFor:k,canJump:b,resumeOffset:A,playoutLimit:_,once:N,pre:j,post:V,timelineRange:q,bi:!1,ag:!1},J0(e,z),!i6(e,z)){ie.A(4);break}return ie.g(t6(e,z),5);case 5:return J=ie.i,J.length&&n6(e,z),ie.return(J);case 4:e.K.add(z),$d(e),Q8(e);case 2:return ie.return(n)}})}function t6(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z;return P(function(J){switch(J.h){case 1:return n=[],r=t.skipOffset,i=t.skipFor,J.m(2),o={type:11},u=0,!t.pre&&!t.post&&e.H.allowStartInMiddleOfInterstitial&&e.o.isLive()&&(h=(l=e.j)!=null?l:e.g.currentTime,u=h-t.startTime),p=Z0(e,t.Ck,u),J.g(e.o.hb().request(7,yn([p],ei()),o).promise,4);case 4:for(m=J.i,b=dt(m.data),w=JSON.parse(b),(T=w["SKIP-CONTROL"])&&(k=T.OFFSET,typeof k=="number"&&(r=parseFloat(k),isNaN(k)&&(r=t.isSkippable?0:null)),S=T.DURATION,typeof S=="number"&&(i=parseFloat(S),isNaN(i)&&(i=null))),M=A=0;M<w.ASSETS.length;M++){if(_=w.ASSETS[M],R=_.URI,U=parseFloat(_.DURATION)||0,u>0&&U>0&&(N=A+U,N<=u)){A=N;continue}R&&(j=hd(m.uri,R),V={id:t.id+"_shaka_asset_"+M,groupId:t.id,startTime:t.startTime,endTime:t.endTime,uri:Z0(e,j),mimeType:null,isSkippable:t.isSkippable,skipOffset:r,skipFor:i,canJump:t.canJump,resumeOffset:t.resumeOffset,playoutLimit:t.playoutLimit,once:t.once,pre:t.pre,post:t.post,timelineRange:t.timelineRange,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null,tracking:null},(q=_["X-AD-CREATIVE-SIGNALING"])&&(G=q.payload&&q.payload[0])&&(V.clickThroughUrl=G.clickThrough,G.tracking&&(V.tracking=Jx(G.tracking))),u>0&&A<u&&(z=u-A,e.Y.set(V.id,z)),n.push(V)),A+=U}J.o(3);break;case 2:J.l();case 3:return J.return(n)}})}function Zz(e,t){var n;P(function(r){return r.h==1?r.g(t6(e,t),2):(n=r.i,t.bi=!1,n.length?(n6(e,t),r.g(Pp(e,n),0)):(e.K.delete(t),$d(e),Mp(e),r.A(0)))})}function n6(e,t){e.H&&e.H.allowStartInMiddleOfInterstitial&&e.o.isLive()?(t.ag=!0,e.K.add(t)):e.K.delete(t)}function r6(e,t){e.J.has(t)&&(e.J.get(t).release(),e.J.delete(t)),l6(e,t);var n=t.id||JSON.stringify(t);e.xa.delete(n),e.I.delete(t),e.R=null,e.u===t&&(e.u=null)}function i6(e,t){if(t.pre||t.post||t.startTime==0&&!t.canJump)return!0;var n=e.j!=null?e.j:e.g.currentTime,r=1/0;return!e.D&&e.g.duration&&(r=e.g.duration),Math.min(t.startTime,r)-n>(t.resolutionTimeOffset||e.H.interstitialPreloadAheadTime)?!1:(e=t.endTime,!(e!=null&&e!=1/0&&n>=e))}function eH(e,t){var n=[];if(!t)return n;var r=Rn(t,"X-ASSET-URI");if(!r)return n;var i=Rn(t,"X-OVERLAY-ID"),o=a6(t,i),u=o.startTime;o=o.endTime;var l=o6(t),h=l.once,p=l.pre;l=l.post;var m=Rn(t,"X-ASSET-MIMETYPE"),b=Rn(t,"X-LOOP")=="YES",w=1,T=Rn(t,"X-DEPTH");T!=null&&(w=parseFloat(T),isNaN(w)&&(w=1)),T=Rn(t,"X-BACKGROUND");var k=1920,S=1080,A=Rn(t,"X-VIEWPORT");if(A!=null){if(S=A.split("x"),S.length!=2)return n;k=parseFloat(S[0]),S=parseFloat(S[1])}if(k={viewport:{x:k,y:S},topLeft:{x:0,y:0},size:{x:k,y:S}},S=Rn(t,"X-OVERLAY-POSITION"),S!=null){if(S=S.split("x"),S.length!=2)return n;k.topLeft.x=parseFloat(S[0]),k.topLeft.y=parseFloat(S[1])}if(S=Rn(t,"X-OVERLAY-SIZE"),S!=null){if(S=S.split("x"),S.length!=2)return n;k.size.x=parseFloat(S[0]),k.size.y=parseFloat(S[1])}if(S=null,A=Rn(t,"X-SQUEEZECURRENT"),A!=null&&(S=parseFloat(A),isNaN(S)&&(S=1),S={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*S,y:1080*S}},t=Rn(t,"X-SQUEEZECURRENT-POSITION"),t!=null)){if(t=t.split("x"),t.length!=2)return n;S.topLeft.x=parseFloat(t[0]),S.topLeft.y=parseFloat(t[1])}return n.push({id:i,groupId:null,startTime:u,endTime:o,uri:Z0(e,r),mimeType:m,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:h,pre:p,post:l,timelineRange:!0,loop:b,overlay:k,displayOnBackground:w==-1,currentVideo:S,background:T,clickThroughUrl:null,tracking:null}),n}function Z0(e,t,n){if(n=n===void 0?0:n,t.startsWith("data:"))return t;e.za||(e.za=d.crypto.randomUUID());var r=new Map;return r.set("_HLS_primary_id",e.za),n>0&&r.set("_HLS_start_offset",String(Math.round(n*1e3)/1e3)),kw(t,r)}function $d(e){function t(o,u){n.find(function(l){return o==l.start&&u==l.end})||n.push({start:o,end:u})}for(var n=[],r=x(e.I),i=r.next();!i.done;i=r.next())i=i.value,i.overlay||(i.pre?t(0,null):i.post?t(-1,null):i.timelineRange?t(i.startTime,i.endTime):t(i.startTime,null));for(r=x(e.K),i=r.next();!i.done;i=r.next())i=i.value,i.pre?t(0,null):i.post?t(-1,null):i.timelineRange?t(i.startTime,i.endTime):t(i.startTime,null);an(e,"ad-cue-points-changed",new Map().set("cuepoints",n))}function Zx(e){e.i.configure(e.o.gj()),e.i.configure("ads.disableHLSInterstitial",!0),e.i.configure("ads.disableDASHInterstitial",!0),e.i.configure("playRangeEnd",1/0),eI(e.o.hb(),e.i.hb())}function Rn(e,t){return(e=e.values.find(function(n){return n.key==t}))?e.data:null}function a6(e,t){var n=t==null?Math.floor(e.startTime*10)/10:e.startTime,r=e.endTime;return e.endTime&&e.endTime!=1/0&&typeof e.endTime=="number"&&(r=t==null?Math.floor(e.endTime*10)/10:e.endTime),{startTime:n,endTime:r}}function o6(e){return e=Rn(e,"CUE"),{once:e!=null&&e.includes("ONCE"),pre:e!=null&&e.includes("PRE"),post:e!=null&&e.includes("POST")}}function s6(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function ek(){var e=Qe().Ra();return e=="TV"||e=="CONSOLE"||e=="CAST"}function u6(e,t){if(!(e.P.has(t)||e.H&&!e.H.allowPreloadOnDomElements)){var n=function(o){var u=document.createElement("link");return u.rel="preload",u.href=o,u.as="image",document.head.appendChild(u),u},r=[];if(t.background){var i=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);i&&r.push(n(i[2]))}t.mimeType&&t.mimeType.startsWith("image/")&&r.push(n(t.uri)),e.P.set(t,r)}}function l6(e,t){if(e.P.has(t)){var n=e.P.get(t);n=x(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.parentNode.removeChild(r);e.P.delete(t)}}function an(e,t,n){e.Pa(new Ge(t,n)),e.H.disableTrackingEvents||G8(e.u&&e.u.tracking,t,e.o.hb())}function c6(e,t){if(t.pre&&e.j==null||t.startTime==0&&!t.canJump)return!0;if(e.j!=null){var n=1/0;if(!e.D&&e.g.duration&&(n=e.g.duration),n=Math.min(t.startTime,n)-e.j,n>0&&n<=(t.resolutionTimeOffset||e.H.interstitialPreloadAheadTime))return!0}return!1}function tk(e,t,n){this.l=e,this.i=this.g=null,this.j=!1,this.h=n===void 0?null:n,tH(this,t)}function tH(e,t){var n,r;P(function(i){switch(i.h){case 1:return i.m(2),e.h&&e.h("ad-interstitial-preload",new Map().set("interstitial",t)),i.g(e.l.preload(t.uri,null,t.mimeType||void 0),4);case 4:if(n=i.i,!e.j){i.A(5);break}if(!n){i.A(6);break}return i.m(7),i.g(n.destroy(),9);case 9:i.o(6,2);break;case 7:i.l(2);case 6:return i.return();case 5:(e.g=n)&&e.h&&e.h("ad-interstitial-preloaded",new Map().set("interstitial",t)),i.o(0);break;case 2:r=i.l(),e.i=r instanceof B?r:null,i.j()}})}tk.prototype.release=function(){this.j=!0,this.g&&(this.g.destroy(),this.g=null)};function _p(e,t,n,r,i){Zr.call(this,i),this.g=e,this.i=od(this.g.skipOffset),this.h=t,this.j=n,this.m=r,this.l=!1}K(_p,Zr),g=_p.prototype,g.isClientRendering=function(){return!1},g.getDuration=function(){return this.g.durationInSeconds},g.getRemainingTime=function(){return this.g.startTimeInSeconds+this.g.durationInSeconds-this.video.currentTime},g.isSkippable=function(){return typeof this.i=="number"},g.getTimeUntilSkippable=function(){if(typeof this.i!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.i-this.getDuration();return Math.max(e,0)},g.canSkipNow=function(){return this.getTimeUntilSkippable()==0},g.skip=function(){this.l=!0,this.video.currentTime+=this.getRemainingTime()},g.isLinear=function(){return this.m},g.getSequenceLength=function(){return this.j?this.j:1},g.getPositionInSequence=function(){return this.h?this.h:1},g.getTitle=function(){return this.g.adTitle},g.getVastAdId=function(){return this.g.vastAdId||""},g.getAdId=function(){return this.g.adId},g.getCreativeAdId=function(){return this.g.creativeId},g.getTimeOffset=function(){return this.g.startTimeInSeconds},g.release=function(){this.j=this.h=this.g=null},Te("shaka.ads.MediaTailorAd",_p);function d6(e,t,n,r){this.o=e,this.O=t,this.u=null,this.i=n,this.l=null,this.V=NaN,this.h=r,this.M=!1,this.F=null,this.j=[],this.J=new Set,this.I=this.m=this.g=null,this.H=new Map,this.C=[],this.D=new Set,this.K="",this.R=!0,this.L="",this.B=new he,this.P=!1}g=d6.prototype,g.configure=function(e){this.u=e},g.stop=function(){for(var e=x(this.C),t=e.next();!t.done;t=e.next())t=t.value,this.B.Ua(t.target,t.type,t.listener);zd(this),this.C=[],this.D.clear(),this.K="",this.R=!0,this.L="",this.F=null,this.j=[],this.J.clear(),this.H.clear(),this.l=null,this.P=!1},g.release=function(){this.stop(),this.B&&this.B.release()},g.onManifestUpdated=function(e){this.M=e,this.K!=""&&(rH(this,this.K,this.R),this.R=!1)},g.getCuePoints=function(){for(var e=new Map,t=x(this.j),n=t.next();!n.done;n=t.next()){n=x(n.value.ads);for(var r=n.next();!r.done;r=n.next()){var i=r.value;if(r=i.startTimeInSeconds,i=r+i.durationInSeconds,isFinite(r)&&isFinite(i)&&!(i<=r)){var o=r.toFixed(1)+"|"+i.toFixed(1);e.has(o)||e.set(o,{start:r,end:i})}}}return Array.from(e.values()).sort(function(u,l){return u.start-l.start})};function nH(e,t,n){var r,i,o,u,l,h,p,m,b,w;P(function(T){if(T.h==1)return r={type:7},i=yn([t],ei()),i.method="POST",n&&(o=JSON.stringify(n),i.body=Sr(o)),u=e.O.request(7,i,r),T.m(2),T.g(u.promise,4);if(T.h!=2){if(l=T.i,h=dt(l.data),p=JSON.parse(h),p.manifestUrl&&p.trackingUrl)e.K=hd(t,p.trackingUrl),m=Date.now()/1e3,b=m-e.V,e.h(new Ge("ads-loaded",new Map().set("loadTime",b))),w=hd(t,p.manifestUrl),e.l.resolve(w),e.l=null;else throw Error("Insufficient data from MediaTailor.");return T.o(0)}if(T.l(),!e.L.length)return e.l.reject(new B(1,10,10010)),e.l=null,T.return();e.l.resolve(e.L),e.l=null,T.j()})}function rH(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_;P(function(R){if(R.h==1)return r={type:8},i=yn([t],ei()),o=e.O.request(7,i,r),R.m(2),R.g(o.promise,4);if(R.h!=2){if(u=R.i,l=[],h=dt(u.data),p=JSON.parse(h),p.avails.length>0){if(ja(e.j)!=ja(p.avails)){for(e.j=p.avails,m=x(e.j),b=m.next();!b.done;b=m.next())for(w=b.value,T=x(w.nonLinearAdsList),k=T.next();!k.done;k=T.next())for(S=k.value,A=x(S.nonLinearAdList),M=A.next();!M.done;M=A.next())_=M.value,iH(e,_);l=e.getCuePoints(),e.h(new Ge("ad-cue-points-changed",new Map().set("cuepoints",l)))}}else e.j.length&&e.h(new Ge("ad-cue-points-changed",new Map().set("cuepoints",l))),zd(e),e.j=[];return n&&(e.M||l.length>0)&&aH(e),R.o(0)}R.l(),R.j()})}function iH(e,t){var n,r,i,o,u,l,h,p;P(function(m){if(m.h==1)return!t.staticResource||(n=f6(t),e.H.has(n))?m.return():(r={type:9},i=yn([t.staticResource],ei()),o=e.O.request(7,i,r),m.m(2),e.H.set(n,[]),m.g(o.promise,4));if(m.h!=2)return u=m.i,l=dt(u.data),h=JSON.parse(l),p=h.apps,e.H.set(n,p),m.o(0);m.l(),e.H.delete(n),m.j()})}function f6(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("|")}function aH(e){e.P||(e.P=!0,p6(e),e.M||(h6(e),e.B.G(e.i,"seeked",function(){h6(e)}),e.B.G(e.i,"ended",function(){zd(e)})),e.B.G(e.i,"timeupdate",function(){p6(e)}))}function h6(e){var t=e.i.currentTime;if(!(e.u&&e.u.disableSnapback||t==0||e.F!=null)){for(var n,r,i=x(e.j),o=i.next();!o.done;o=i.next()){o=o.value;for(var u=x(o.ads),l=u.next();!l.done;l=u.next())if(l=l.value,!r)l.startTimeInSeconds<t&&(r=l,n=o);else if(r.durationInSeconds>0&&l.startTimeInSeconds<t&&l.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=l,n=o;break}}n&&r&&!e.J.has(r.adId)&&(e.F=t,e.i.currentTime=n.startTimeInSeconds)}}function p6(e){if(e.i.duration&&(e.g||e.j.length)){var t=e.i.currentTime,n=!1;if(e.g){n=!0;var r=e.m,i=r.startTimeInSeconds+.5*r.durationInSeconds,o=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.D.has("firstQuartile")?(e.D.add("firstQuartile"),ri(e,"firstQuartile")):t>=i&&!e.D.has("midpoint")?(e.D.add("midpoint"),ri(e,"midpoint")):t>=o&&!e.D.has("thirdQuartile")&&(e.D.add("thirdQuartile"),ri(e,"thirdQuartile")),r=e.g.getRemainingTime(),i=e.g.getDuration(),e.g.canSkipNow()&&r>0&&i>0&&ri(e,"skipStateChanged"),i>0&&(r<=0||r>i)&&zd(e)}if(!e.g||!e.g.isLinear()){e:for(r=x(e.j),i=r.next();!i.done&&(i=i.value,!(e.g&&e.g.isLinear()));i=r.next())for(o=0;o<i.ads.length;o++){var u=i.ads[o],l=u.startTimeInSeconds+u.durationInSeconds;if(u.startTimeInSeconds<=t&&l>t){if((!e.u||!e.u.disablePlayedLinearAdSkip)&&e.J.has(u.adId)){if(e.i.ended)continue;e.i.currentTime=l;break e}zd(e),e.I=i,e.g=new _p(u,o+1,i.ads.length,!0,e.i),e.m=u,o===0&&ri(e,"breakStart"),g6(e);break}}if(!e.g&&e.o){for(r=x(e.j),i=r.next();!i.done&&(i=i.value,!e.g);i=r.next())for(o=0;o<i.nonLinearAdsList.length;o++)if(u=i.nonLinearAdsList[o],u.nonLinearAdList.length){l=i.startTimeInSeconds;var h=e.H.get(f6(u.nonLinearAdList[0]));if(l<=t&&h&&h.length){zd(e),l=e,h=x(h);for(var p=h.next();!p.done;p=h.next())if(p=p.value,p.data.source.length){var m=document.createElement("img");m.src=p.data.source[0].url,m.style.top=(p.placeholder.top||0)+"%",m.style.height=100-(p.placeholder.top||0)+"%",m.style.left=(p.placeholder.left||0)+"%",m.style.maxWidth=100-(p.placeholder.left||0)+"%",m.style.objectFit="contain",m.style.position="absolute",l.o.appendChild(m)}e.I=i,e.g=new _p(u,o+1,i.ads.length,!1,e.i),e.m=u,o===0&&ri(e,"breakStart"),g6(e);break}}}n&&!e.g&&(t=e.i.currentTime,e.F&&e.F>t&&(e.i.currentTime=e.F),e.F=null)}}}function zd(e){if(e.g&&e.m){e.o&&Vl(e.o),e.M||e.J.add(e.m.adId);var t=e.g.l;t!==void 0&&t?ri(e,"skip"):ri(e,"complete"),t=x(e.C);for(var n=t.next();!n.done;n=t.next())n=n.value,e.B.Ua(n.target,n.type,n.listener);e.C=[],e.D.clear(),t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&ri(e,"breakEnd"),e.g=null,e.m=null,e.I=null}}function g6(e){var t=!1;e.i.paused?t=!0:(ri(e,"impression"),ri(e,"start")),e.C.push({target:e.i,type:"volumechange",listener:function(){ri(e,e.i.muted?"mute":"unmute")}}),e.C.push({target:e.i,type:"play",listener:function(){t?(ri(e,"impression"),ri(e,"start"),t=!1):ri(e,"resume")}}),e.C.push({target:e.i,type:"pause",listener:function(){ri(e,"pause")}});for(var n=x(e.C),r=n.next();!r.done;r=n.next())r=r.value,e.B.G(r.target,r.type,r.listener)}function ri(e,t){if(e.m&&e.I){var n=e.m.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.I.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n&&e.u&&!e.u.disableTrackingEvents&&!(e.u.disableTrackingForPlayedLinearAds&&e.m&&e.J.has(e.m.adId))){var r={type:10};n=x(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&i!=""&&(i=yn([i],ei()),i.method="POST",e.O.request(7,i,r))}switch(t){case"impression":e.h(new Ge("ad-impression"));break;case"start":e.h(new Ge("ad-started",new Map().set("ad",e.g)));break;case"mute":e.h(new Ge("ad-muted"));break;case"unmute":e.h(new Ge("ad-volume-changed"));break;case"resume":e.h(new Ge("ad-resumed"));break;case"pause":e.h(new Ge("ad-paused"));break;case"firstQuartile":e.h(new Ge("ad-first-quartile"));break;case"midpoint":e.h(new Ge("ad-midpoint"));break;case"thirdQuartile":e.h(new Ge("ad-third-quartile"));break;case"complete":e.h(new Ge("ad-complete")),e.h(new Ge("ad-stopped"));break;case"skip":e.h(new Ge("ad-skipped")),e.h(new Ge("ad-stopped"));break;case"breakStart":e.o&&e.o.setAttribute("ad-active","true");break;case"breakEnd":e.o&&e.o.removeAttribute("ad-active");break;case"skipStateChanged":e.h(new Ge("ad-skip-state-changed"))}}}function ey(e,t){Zr.call(this,t),this.g=e,this.h=null}K(ey,Zr),g=ey.prototype,g.isClientRendering=function(){return!1},g.hasCustomClick=function(){return!0},g.getDuration=function(){return this.h?this.h.duration:-1},g.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},g.isSkippable=function(){return this.g.isSkippable()},g.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},g.canSkipNow=function(){return this.getTimeUntilSkippable()==0},g.skip=function(){this.video.currentTime+=this.getRemainingTime()},g.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},g.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},g.getTitle=function(){return this.g.getTitle()},g.getDescription=function(){return this.g.getDescription()},g.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},g.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},g.getAdId=function(){return this.g.getAdId()},g.getCreativeAdId=function(){return this.g.getCreativeAdId()},g.getAdvertiserName=function(){return this.g.getAdvertiserName()},g.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},g.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},g.release=function(){this.h=this.g=null},Te("shaka.ads.ServerSideAd",ey);function m6(e,t,n,r){var i=this;this.u=e,this.l=t,this.j=this.D=null,this.H=NaN,this.i=r,this.I=!1,this.B=this.m=this.o=null,this.C="",this.F=[],this.h=new he,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new Ge("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){oH(i,o)}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){i.C.length?i.j.resolve(i.C):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),i.m=new ey(o,i.l),i.B&&(i.m.h=i.B),i.i(new Ge("ad-started",new Map().set("ad",i.m))),i.u.setAttribute("ad-active","true")}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){i.u.removeAttribute("ad-active");var o=i.l.currentTime;i.o&&i.o>o&&(i.l.currentTime=i.o,i.o=null)}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){i.B=o.getStreamData().adProgressData,i.m&&(i.m.h=i.B)}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){i.i(new Ge("ad-first-quartile"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){i.i(new Ge("ad-midpoint"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){i.i(new Ge("ad-third-quartile"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){i.i(new Ge("ad-complete")),i.i(new Ge("ad-stopped")),i.u.removeAttribute("ad-active"),i.m=null}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){i.i(new Ge("ad-skipped")),i.i(new Ge("ad-stopped"))}),this.h.G(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var u=o.getStreamData();o=[],u=x(u.cuepoints);for(var l=u.next();!l.done;l=u.next())l=l.value,o.push({start:l.start,end:l.end});i.F=o,i.i(new Ge("ad-cue-points-changed",new Map().set("cuepoints",o)))})}g=m6.prototype,g.configure=function(e){this.D=e},g.stop=function(){this.g.reset(),this.C="",this.o=null,this.F=[]},g.release=function(){this.stop(),this.h&&this.h.release()},g.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},g.getCuePoints=function(){return this.F};function oH(e,t){e.i(new Ge("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.H))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.I||e.h.G(e.l,"seeked",function(){var n=e.l.currentTime;if(!(e.D&&e.D.disableSnapback||n==0)){e.g.streamTimeForContentTime(n);var r=e.g.previousCuePointForStreamTime(n);r&&!r.played&&(e.o=n,e.l.currentTime=r.start)}})}function ty(e,t){Zr.call(this,e),this.g=t}K(ty,Zr),g=ty.prototype,g.isClientRendering=function(){return!1},g.getDuration=function(){return this.g.endTime?this.g.endTime-this.g.startTime:-1},g.getRemainingTime=function(){return this.g.endTime?this.g.endTime-this.video.currentTime:-1},g.getSequenceLength=function(){return this.g.sequenceLength},g.getPositionInSequence=function(){return this.g.position},g.getTimeOffset=function(){return this.g.startTime},Te("shaka.ads.SvtaAd",ty);function ny(e,t){var n=this;this.C=null,this.g=e,this.D=t,this.j=null,this.o=!1,this.l=new Map,this.h=null,this.B=new he,this.u=new he,this.i=new he,this.B.G(this.g,"loading",function(){v6(n)}),this.B.G(this.g,"unloading",function(){y6(n)}),this.m=new ft(function(){if(n.l.size){var r=n.g.Bd();if(r!=ha&&r!=Ip){var i=!1,o=Array.from(n.l.values());r=n.g.Na(),o=x(o);for(var u=o.next();!u.done;u=o.next())u=u.value,u!=n.h&&r.start-(u.endTime||u.startTime)>=1&&(i=JSON.stringify(u),n.l.delete(i),i=!0);i&&w6(n)}}}),this.g.$c()&&v6(this)}ny.prototype.configure=function(e){this.C=e},ny.prototype.stop=function(){y6(this)},ny.prototype.release=function(){this.stop(),this.g=null,this.B&&this.B.release(),this.u&&this.u.release(),this.i&&this.i.release(),this.m&&(this.m.stop(),this.m=null)};function sH(e,t){if(e.o&&ry.has(t.type)){var n=t.values.find(function(h){return h.key=="X-AD-CREATIVE-SIGNALING"});if(n){n=n.data;try{var r=JSON.parse(d.atob(n))}catch{return}if(r.payload){n=[];for(var i=0;i<r.payload.length;i++){var o=r.payload[i],u=t.startTime+o.start||0,l=o.duration?t.startTime+o.duration:t.endTime;o&&o.tracking&&(o={startTime:u,endTime:l,tracking:Jx(o.tracking),position:i+1,sequenceLength:r.payload.length},n.push(o))}nk(e,n)}}}}function nk(e,t){if(e.o&&t.length)if(e.g.sj()){for(var n=!1,r=x(t),i=r.next();!i.done;i=r.next()){i=i.value;var o=JSON.stringify(i);e.l.getOrInsert(o,i)===i&&(n=!0)}n&&w6(e),b6(e),e.u.G(e.j,"timeupdate",function(){return b6(e)}),e.m&&e.g.isLive()&&e.m.Ka(1)}else e.u.oa(e.g,"loaded",function(){nk(e,t)})}function v6(e){e.o||(e.o=!0,e.j=e.g.Db())}function y6(e){e.o&&(e.o=!1,e.j=null,e.u.Ea(),e.l.clear(),rk(e),e.i.Ea(),e.m&&e.m.stop())}function b6(e){if(e.l.size&&!e.h&&e.j.duration){for(var t=e.j.currentTime,n=x(e.l.values()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startTime<=t&&r.endTime&&t<=r.endTime&&!e.g.Gd()){e.h=r;break}e.h&&(t=!1,e.g.isLive()||(t=e.g.Na(),t=t.start===e.h.startTime&&t.end===e.h.endTime),uH(e),t?lH(e):cH(e))}}function rk(e,t){e.h&&(t!==void 0&&t||(br(e,"ad-skipped"),br(e,"ad-stopped")),e.i.Ea(),e.h=null)}function uH(e){var t=new ty(e.j,e.h);br(e,"ad-impression"),br(e,"ad-started",new Map().set("ad",t)),e.i.G(e.g,"error",function(n){br(e,"ad-error",new Map().set("originalEvent",n))}),e.i.G(e.j,"play",function(){br(e,"ad-resumed")}),e.i.G(e.j,"pause",function(){br(e,"ad-paused")}),e.i.G(e.j,"volumechange",function(){e.j.muted?br(e,"ad-muted"):br(e,"ad-volume-changed")})}function lH(e){e.i.oa(e.g,"firstquartile",function(){br(e,"ad-first-quartile")}),e.i.oa(e.g,"midpoint",function(){br(e,"ad-midpoint")}),e.i.oa(e.g,"thirdquartile",function(){br(e,"ad-third-quartile")}),e.i.oa(e.g,"complete",function(){br(e,"ad-stopped"),br(e,"ad-complete"),rk(e,!0)})}function cH(e){function t(o,u){return(Tu(o,u)||u>o)&&i<o?(i=o,!0):!1}var n=e.h.endTime;e.g.isLive()&&n||(n=e.g.Na(),n=Math.min(n.end,e.h.endTime||1/0));var r=n-e.h.startTime,i=-1;e.i.G(e.j,"timeupdate",function(){var o=(e.j.currentTime-e.h.startTime)/r;isNaN(o)||(o*=100,t(25,o)?br(e,"ad-first-quartile"):t(50,o)?br(e,"ad-midpoint"):t(75,o)?br(e,"ad-third-quartile"):(t(100,o)||o>100)&&(br(e,"ad-stopped"),br(e,"ad-complete"),rk(e,!0)))})}function br(e,t,n){e.D(new Ge(t,n)),e.C.disableTrackingEvents||G8(e.h&&e.h.tracking,t,e.g.hb())}function w6(e){var t=[];if(e.l.size)for(var n=x(e.l.values()),r=n.next(),i={};!r.done;i={jg:void 0},r=n.next())r=r.value,i.jg={start:r.startTime,end:r.endTime},t.find((function(o){return function(u){return o.jg.start==u.start&&o.jg.end==u.end}})(i))||t.push(i.jg);br(e,"ad-cue-points-changed",new Map().set("cuepoints",t))}var ry=new Set().add("urn:svta:advertising-wg:ad-id-signaling").add("urn:svta:advertising-wg:ad-creative-signaling");function It(e){Bt.call(this),this.B=e,this.m=this.h=this.i=this.l=this.g=null,this.o=new $8,this.F=navigator.language,this.D=this.C=this.u=this.j=null}K(It,Bt),g=It.prototype,g.setLocale=function(e){this.F=e},g.setContainers=function(e,t){this.C=e,this.D=t},g.configure=function(e){this.j=e,this.g&&this.g.configure(this.j),this.l&&this.l.configure(this.j),this.h&&this.h.configure(this.j),this.m&&this.m.configure(this.j),this.i&&this.i.configure(this.j)},g.release=function(){this.l&&(this.l.release(),this.l=null),this.h&&(this.h.release(),this.h=null),this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),this.m&&(this.m.release(),this.m=null),Bt.prototype.release.call(this)},g.onAssetUnload=function(){this.l&&(this.l.release(),this.l=null),this.h&&this.h.stop(),this.i&&this.i.stop(),this.g&&this.g.stop(),this.m&&this.m.stop(),this.u&&(Wl(this,new Ge("ad-stopped")),Wl(this,new Ge("ad-content-attach-requested"))),this.o=new $8};function x6(e,t){if(!d.google||!google.ima||!google.ima.AdsLoader)throw new B(2,10,1e4);if(e.l&&e.l.release(),!e.C)throw new B(2,10,10008);e.l=new G0(e.C,e.B.Db(),e.F,t,function(n){return Wl(e,n)}),e.l.configure(e.j)}g.requestClientSideAds=function(e,t){this.l||x6(this,t),t=this.l,t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.H=Date.now()/1e3,t.m.requestAds(e)},g.updateClientSideAdsRenderingSettings=function(e){this.l||x6(this,e);var t=this.l;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)};function k6(e){if(!d.google||!google.ima||!google.ima.dai)throw new B(2,10,10002);if(e.h&&e.h.release(),!e.D)throw new B(2,10,10009);e.h=new m6(e.D,e.B.Db(),e.F,function(t){return Wl(e,t)}),e.h.configure(e.j)}g.requestServerSideStream=function(e,t){t=t===void 0?"":t,this.h||k6(this),e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v5.2.4",n=this.h,n.j?e=Promise.reject(new B(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.I=!0),n.j=Promise.withResolvers(),n.g.requestStream(e),n.C=t||"",n.H=Date.now()/1e3,e=n.j.promise),e},g.replaceServerSideAdTagParameters=function(e){this.h||k6(this),(e.mpt||e.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v5.2.4",this.h.g.replaceAdTagParameters(e)};function T6(e){e.i&&e.i.release(),e.i=new d6(e.D,e.B.hb(),e.B.Db(),function(t){return Wl(e,t)}),e.i.configure(e.j)}g.requestMediaTailorStream=function(e,t,n){n=n===void 0?"":n,this.i||T6(this);var r=this.i;return r.l?e=Promise.reject(new B(1,10,10004)):(r.l=Promise.withResolvers(),nH(r,e,t),r.L=n||"",r.V=Date.now()/1e3,e=r.l.promise),e},g.addMediaTailorTrackingUrl=function(e){this.i||T6(this);var t=this.i;t.K=e,t.h(new Ge("ads-loaded",new Map().set("loadTime",0)))};function Hd(e){var t=e.C;e.g&&e.g.release(),e.g=new J8(t,e.B,function(n){return Wl(e,n)}),e.g.configure(e.j)}g.addCustomInterstitial=function(e){this.g||Hd(this),Pp(this.g,[e])},g.addAdUrlInterstitial=function(e){return this.g||Hd(this),this.g.addAdUrlInterstitial(e)},g.getInterstitialPlayer=function(){return this.g||Hd(this),this.g.Cd()};function S6(e){e.m&&e.m.release(),e.m=new ny(e.B,function(t){return Wl(e,t)}),e.m.configure(e.j)}g.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},g.getStats=function(){var e=this.o;return{loadTimes:e.g,averageLoadTime:Vz(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},g.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},g.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},g.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},g.onHLSMetadata=function(e){var t=this;return P(function(n){if(e.type!="com.apple.quicktime.HLS"){if(e.type=="com.apple.hls.preload"){if(t.j&&t.j.disableHLSInterstitial)return n.return();if(t.g||Hd(t),t.g)e:{var r=t.g,i=Rn(e,"ID");if(i){if(r.ba.has(i))break e;r.ba.add(i)}if(i=Rn(e,"X-TARGET-ID")){r.W.set(i,e.startTime),i=x(r.I);for(var o=i.next();!o.done;o=i.next())J0(r,o.value);for(i=x(r.K),o=i.next();!o.done;o=i.next())J0(r,o.value)}}}else ry.has(e.type)&&(t.m||S6(t),sH(t.m,e));return n.A(0)}return t.j&&t.j.disableHLSInterstitial?n.return():(t.g||Hd(t),t.g?n.g(Kz(t.g,e),0):n.A(0))})},g.onDASHMetadata=function(e){if(e.schemeIdUri=="urn:google:dai:2018")this.h&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime);else{if(W8(e))var t=!0;else t=e.schemeIdUri,t=(t=="urn:mpeg:dash:event:2012"||t=="urn:scte:dash:scte214-events")&&!!e.eventNode&&!!Yt(e.eventNode,"OverlayEvent");if(t){if((!this.j||!this.j.disableDASHInterstitial)&&(this.g||Hd(this),this.g)){if(W8(e)){t=e.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025";var n=e.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025";if(t||n){for(var r=e.startTime,i=e.endTime,o=null,u=0,l,h=!0,p=null,m=null,b=x(e.eventNode.children),w=b.next();!w.done;w=b.next())if(w=w.value,w.tagName=="AlternativeMPD"){if(w=w.attributes.uri){l=w;break}}else if(w.tagName=="InsertPresentation"||w.tagName=="ReplacePresentation"){var T=w.attributes.uri||w.attributes.url;if(T){l=Fn(T),(b=wt(w,"maxDuration",Jr))&&(o=b/e.timescale),(b=wt(w,"returnOffset",Jr))&&(u=b/e.timescale),t&&u&&(i=r+u),wt(w,"noJump",Jr)&&(h=!1),b=wt(w,"skipAfter",Gi),typeof b=="number"&&(p=b),(w=wt(w,"earliestResolutionTimeOffset",Rh))&&(m=w/e.timescale);break}}l?(l=pd(l,e.urlParams),e={id:e.id,groupId:null,startTime:r,endTime:i,uri:l,mimeType:null,isSkippable:p!=null,skipOffset:p,skipFor:null,canJump:h,resumeOffset:n?u:null,playoutLimit:o,once:!1,pre:!1,post:!1,timelineRange:t&&!n,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null,tracking:null},m!=null&&(e.resolutionTimeOffset=m)):e=null}else e=null}else e=Hz(e);e&&Pp(this.g,[e])}}else if(ry.has(e.schemeIdUri)&&e.eventNode){e:if(this.m||S6(this),l=this.m,l.o&&ry.has(e.schemeIdUri)&&e.eventNode&&(t=mn(e.eventNode))){try{m=JSON.parse(t)}catch{break e}if(m.payload){for(t=[],n=0;n<m.payload.length;n++)r=m.payload[n],i=e.startTime+r.start||0,o=r.duration?e.startTime+r.duration:e.endTime,r&&r.tracking&&(r={startTime:i,endTime:o,tracking:Jx(r.tracking),position:n+1,sequenceLength:m.payload.length},t.push(r));nk(l,t)}}}}},g.getCurrentAd=function(){return this.u};function Wl(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.o.g.push(t.loadTime);break;case"ad-started":e.o.h++,e.u=t.ad,e.u&&!e.u.isLinear()&&e.o.j++;break;case"ad-stopped":e.u=null;break;case"ad-complete":e.o.l++;break;case"ad-skipped":e.o.m++;break;case"ad-error":e.o.i++}e.dispatchEvent(t)}Te("shaka.ads.AdManager",It),It.prototype.getCurrentAd=It.prototype.getCurrentAd,It.prototype.onDASHMetadata=It.prototype.onDASHMetadata,It.prototype.onHLSMetadata=It.prototype.onHLSMetadata,It.prototype.onCueMetadataChange=It.prototype.onCueMetadataChange,It.prototype.onHlsTimedMetadata=It.prototype.onHlsTimedMetadata,It.prototype.onManifestUpdated=It.prototype.onManifestUpdated,It.prototype.getStats=It.prototype.getStats,It.prototype.getCuePoints=It.prototype.getCuePoints,It.prototype.getInterstitialPlayer=It.prototype.getInterstitialPlayer,It.prototype.addAdUrlInterstitial=It.prototype.addAdUrlInterstitial,It.prototype.addCustomInterstitial=It.prototype.addCustomInterstitial,It.prototype.addMediaTailorTrackingUrl=It.prototype.addMediaTailorTrackingUrl,It.prototype.requestMediaTailorStream=It.prototype.requestMediaTailorStream,It.prototype.replaceServerSideAdTagParameters=It.prototype.replaceServerSideAdTagParameters,It.prototype.requestServerSideStream=It.prototype.requestServerSideStream,It.prototype.updateClientSideAdsRenderingSettings=It.prototype.updateClientSideAdsRenderingSettings,It.prototype.requestClientSideAds=It.prototype.requestClientSideAds,It.prototype.onAssetUnload=It.prototype.onAssetUnload,It.prototype.release=It.prototype.release,It.prototype.configure=It.prototype.configure,It.prototype.setContainers=It.prototype.setContainers,It.prototype.setLocale=It.prototype.setLocale,z0=function(e){return new It(e)};function ik(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(t=n instanceof Ge,n instanceof Event||t){var r={};for(o in n){var i=n[o];i&&typeof i=="object"?o=="detail"?r[o]=i:i instanceof Event||i instanceof Ge?r[o]={__type__:"Event",event:ik(i)}:t&&Array.isArray(i)&&(r[o]=i):o in Event||(r[o]=i)}return r}if(n instanceof Error){var o=new Set(["name","message","stack"]);for(r in n)o.add(r);for(t=x(Object.getOwnPropertyNames(n)),r=t.next();!r.done;r=t.next())o.add(r.value);for(t={},o=x(o),r=o.next();!r.done;r=o.next())r=r.value,t[r]=n[r];n={__type__:"Error",contents:t}}else if(n instanceof TimeRanges){for(o={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=x(Fa(n)),t=n.next();!t.done;t=n.next())t=t.value,r=t.end,o.start.push(t.start),o.end.push(r);n=o}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:n<0?"-Infinity":"Infinity":n;return n}})}function iy(e){return JSON.parse(e,function(t,n){if(n=="NaN")var r=NaN;else if(n=="-Infinity")r=-1/0;else if(n=="Infinity")r=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")r=dH(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")r=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(r in t)n[r]=t[r];r=n}else r=n&&typeof n=="object"&&n.__type__=="Event"?iy(n.event):n;return r})}function dH(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var C6="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),fH="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ak=["loop","playbackRate"],hH=["pause","play"],ok=new Map().set("getAssetUri",2).set("getMimeType",2).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isDynamic",10).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),sk=new Map().set("getConfiguration",4).set("getNonDefaultConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2).set("getFetchedPlaybackInfo",2).set("getAllMetadataRegions",1).set("getAllEmsgRegions",1).set("getAllTimelineRegions",1),A6=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20).set("getLiveLatency",1),E6=[["getNonDefaultConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],pH="cancelTrickPlay configure configurationForLowLatency resetConfiguration retryStreaming selectAudioTrack selectTextTrack selectVariantTrack selectVideoTrack trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable setMaxHardwareResolution renewLicense retryLicensing".split(" "),gH="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" "),I6=new Map().set("getCuePoints",4).set("getStats",5),mH="setLocale configure requestClientSideAds updateClientSideAdsRenderingSettings addMediaTailorTrackingUrl replaceServerSideAdTagParameters addCustomInterstitial".split(" "),vH=["requestMediaTailorStream","requestServerSideStream","addAdUrlInterstitial"],M6=new Map().set("needsSkipUI",20).set("isClientRendering",20).set("hasCustomClick",20).set("isUsingAnotherMediaElement",20).set("getDuration",1).set("getMinSuggestedDuration",1).set("getRemainingTime",1).set("getTimeUntilSkippable",1).set("isPaused",1).set("isSkippable",1).set("canSkipNow",1).set("getVolume",1).set("isMuted",1).set("isLinear",20).set("getSequenceLength",20).set("getPositionInSequence",20).set("getTitle",20).set("getDescription",20).set("getVastMediaBitrate",20).set("getVastMediaHeight",20).set("getVastMediaWidth",20).set("getVastAdId",20).set("getAdId",20).set("getCreativeAdId",20).set("getAdvertiserName",20).set("getMediaUrl",20).set("getTimeOffset",20).set("getPodIndex",20),yH="skip play pause setVolume setMuted resize".split(" ");function uk(e,t,n,r,i,o,u){var l=this;this.H=e,this.K=u,this.l=new ft(t),this.L=n,this.u=!1,this.B=r,this.F=i,this.M=o,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return lk(l)},this.D=function(h,p){switch(h=iy(p),h.type){case"event":var m=h.targetName,b=Z5(h.event);l.B(m,b);break;case"update":m=h.update;for(b in m){h=l.g[b]||{};for(var w in m[b])h[w]=m[b][w]}l.u&&(l.L(),l.u=!1);break;case"asyncComplete":if(w=h.id,b=h.error,p=h.res,h=l.h.get(w),l.h.delete(w),h)if(b){w=new B(b.severity,b.category,b.code);for(m in b)w[m]=b[m];h.reject(w)}else h.resolve(p)}},this.g={video:{},player:{},adManager:{},currentAd:{}},this.I=0,this.h=new Map,this.j=null,Lp.add(this)}g=uk.prototype,g.destroy=function(){return Lp.delete(this),ck(this),Va&&_6(this),this.l&&(this.l.stop(),this.l=null),this.F=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.o=null,Promise.resolve()},g.qb=function(){return this.i},g.Th=function(){return this.J},g.init=function(){if(this.H.length)if(d.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Va();var e=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=x(Lp),r=n.next();!r.done;r=n.next()){r=r.value;var i=t;r.j=Promise.withResolvers(),r.u=!0,ay(r,i)}},function(t){for(var n=x(Lp),r=n.next();!r.done;r=n.next())r=r.value,oy=t=="available",r.l.Va()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),oy&&this.l.$(wH),(e=Va)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=Promise.withResolvers(),this.u=!0,ay(this,e)):Va=null}else d.__onGCastApiAvailable!==D6&&(sy=d.__onGCastApiAvailable||null,d.__onGCastApiAvailable=D6)},g.ii=function(e){this.o=e,this.i&&Dp(this,{type:"appData",appData:this.o})},g.cast=function(){var e=this;return P(function(t){if(!e.m)throw new B(1,8,8e3);if(!oy)throw new B(1,8,8001);if(e.i)throw new B(1,8,8002);return e.j=Promise.withResolvers(),chrome.cast.requestSession(function(n){return ay(e,n)},function(n){return P6(e,n)}),t.g(e.j.promise,0)})};function bH(e){e.i&&chrome.cast.requestSession(function(t){return ay(e,t)},function(t){return P6(e,t)})}g.yd=function(){if(this.i){if(ck(this),Va){_6(this);try{Va.stop(function(){},function(){})}catch{}Va=null}lk(this)}},g.get=function(e,t){var n=this,r={video:{Oe:hH},player:{Oe:pH,Rh:gH,Df:[ok,sk],Nj:A6},adManager:{Oe:mH,Rh:vH,Df:[I6]},currentAd:{Oe:yH,Df:[M6]}}[e];return r.Nj&&r.Nj.has(t)&&!this.get("player","isLive")()?function(){}:r.Oe&&r.Oe.includes(t)?function(){return n.rm.apply(n,[e,t].concat(se(oe.apply(0,arguments))))}:r.Rh&&r.Rh.includes(t)?function(){return n.qm.apply(n,[e,t].concat(se(oe.apply(0,arguments))))}:r.Df&&r.Df.some(function(i){return i.has(t)})?function(){return n.g[e][t]}:this.g[e][t]},g.set=function(e,t,n){this.g[e][t]=n,Dp(this,{type:"set",targetName:e,property:t,value:n})};function ay(e,t){var n=e.M();Va=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),lk(e),Dp(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function P6(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new B(2,8,n,t))}g.rm=function(e,t){Dp(this,{type:"call",targetName:e,methodName:t,args:oe.apply(2,arguments)})},g.qm=function(e,t){var n=oe.apply(2,arguments),r=Promise.withResolvers(),i=this.I.toString();this.I++,this.h.set(i,r);try{Dp(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(o){r.reject(o)}return r.promise};function _6(e){var t=Va;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function lk(e){var t=Va?Va.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};ck(e)}e.i=t,e.J=t?Va.receiver.friendlyName:"",e.l.Va()}function ck(e){if(e.h)for(var t=x(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var r=e.h.get(n);e.h.delete(n),r.reject(new B(1,7,7e3))}}function Dp(e,t){t=ik(t);var n=Va;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},La)}catch(r){throw t=new B(2,8,8005,r),n=new Ge("error",new Map().set("detail",t)),e.B("player",n),e.yd(),t}}var wH=.02,oy=!1,Va=null,sy=null,Lp=new Set;function D6(e){if(sy?d.__onGCastApiAvailable=sy:delete d.__onGCastApiAvailable,sy=null,e)for(var t=x(Lp),n=t.next();!n.done;n=t.next())n.value.init();typeof d.__onGCastApiAvailable=="function"&&d.__onGCastApiAvailable(e)}function Mn(e,t,n,r){r=r===void 0?!1:r,Bt.call(this);var i=this;this.i=e,this.h=t,this.m=this.h.pe(),this.l=this.B=this.D=this.o=this.H=this.C=this.F=this.u=null,this.L=n,this.K=r,this.j={lc:[],Tb:[],kc:[]},this.J=new Map,this.I=new Map,this.g=null,d.chrome&&typeof Proxy<"u"&&Qe().Ra()!="CAST"?(this.g=new uk(n,function(){return O6(i)},function(){return j6(i)},function(o,u){return F6(i,o,u)},function(){return U6(i)},function(){return N6(i)},r),xH(this)):(this.u=this.i,this.F=this.h,this.C=this.m)}K(Mn,Bt),g=Mn.prototype,g.destroy=function(e){return this.g&&e!==void 0&&e&&this.g.yd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.H=this.C=this.F=this.u=this.m=this.i=null,Bt.prototype.release.call(this),Promise.all(e)},g.Gl=function(){return this.u},g.Cd=function(){return this.F},g.pe=function(){return this.C},g.Fk=function(){return this.g?this.g.m&&oy:!1},g.qb=function(){return this.g?this.g.qb():!1},g.Th=function(){return this.g?this.g.Th():""},g.cast=function(){var e=this;return P(function(t){return t.h==1?e.g?t.g(e.g.cast(),2):t.return():e.h?t.g(e.h.Fc(),0):t.return()})},g.ii=function(e){this.g&&this.g.ii(e)},g.Jm=function(){this.g&&bH(this.g)},g.yd=function(){this.g&&this.g.yd()},g.Gk=function(e,t){t=t===void 0?!1:t;var n=this;return P(function(r){if(r.h==1)return e==n.L&&t==n.K||(n.L=e,n.K=t,!n.g)?r.return():(n.g.yd(),r.g(n.g.destroy(),2));n.g=null,n.g=new uk(e,function(){return O6(n)},function(){return j6(n)},function(i,o){return F6(n,i,o)},function(){return U6(n)},function(){return N6(n)},t),n.g.init(),r.j()})};function xH(e){e.g.init(),e.l=new he;for(var t=x(C6),n=t.next();!n.done;n=t.next())e.l.G(e.i,n.value,function(r){e.g.qb()||(r=Z5(r),e.o.dispatchEvent(r))});e.l.G(e.h,"__shaka_all_events__",function(r){e.g.qb()||e.D.dispatchEvent(r)}),e.m&&e.l.G(e.m,"__shaka_all_events__",function(r){e.g.qb()||e.B.dispatchEvent(r)}),e.u=new Proxy(e.i,{get:function(r,i){return typeof i!="string"?r[i]:kH(e,i)},set:function(r,i,o){return typeof i!="string"?(r[i]=o,!0):(e.g.qb()?e.g.set("video",i,o):e.i[i]=o,!0)}}),e.F=new Proxy(e.h,{get:function(r,i){return typeof i!="string"?r[i]:uy(e,i)}}),e.m&&(e.C=new Proxy(e.m,{get:function(r,i){return typeof i!="string"?r[i]:TH(e,i)}})),L6(function(r){R6(r,e.h)},e.J),L6(function(r){R6(r,e.m)},e.I),e.o=new Bt,e.o.be=e.u,e.D=new Bt,e.D.be=e.F,e.B=new Bt,e.B.be=e.C,e.l.G(e.h,"unloading",function(){e.g&&e.g.qb()||fk(e)})}function L6(e,t){var n=new Map;e(function(r,i){n.has(i)?(i=n.get(i),r.length<i.length?t.set(r,i):t.set(i,r)):n.set(i,r)})}function R6(e,t){function n(h){return h=="constructor"||typeof t[h]!="function"?!1:!r.has(h)}var r=new Set;for(i in t)n(i)&&(r.add(i),e(i,t[i]));for(var i=Object.getPrototypeOf(t),o=Object.getPrototypeOf({});i&&i!=o;){for(var u=x(Object.getOwnPropertyNames(i)),l=u.next();!l.done;l=u.next())l=l.value,n(l)&&(r.add(l),e(l,t[l]));i=Object.getPrototypeOf(i)}}function N6(e){var t={video:{},player:{},manifest:e.h.$c(),startTime:null,mimeType:e.h.Af(),addThumbnailsTrackCalls:e.j.lc,addTextTrackAsyncCalls:e.j.Tb,addChaptersTrackCalls:e.j.kc};e.i.pause();for(var n=x(ak),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),n=x(E6),r=n.next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}return t}function O6(e){var t=new Ge("caststatuschanged");e.dispatchEvent(t)}function j6(e){var t=new Ge(e.u.paused?"pause":"play");e.o.dispatchEvent(t)}function U6(e){for(var t=x(E6),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.j.lc,o=e.j.Tb,u=e.j.kc;fk(e);var l=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var h=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime"));var p;(r=e.g.get("player","getTextTracks")())&&r.length&&(p=r.find(function(b){return b.active})),l&&(e.i.autoplay=!1,t=e.h.load(l,n));var m={};for(n=x(ak),r=n.next();!r.done;r=n.next())r=r.value,m[r]=e.g.get("video",r);t.then(function(){if(e.i){for(var b=x(i),w=b.next();!w.done;w=b.next()){w=w.value;var T;(T=e.Cd()).lc.apply(T,se(w))}for(b=x(o),T=b.next();!T.done;T=b.next()){T=T.value;var k;(k=e.Cd()).Tb.apply(k,se(T))}for(k=x(u),b=k.next();!b.done;b=k.next()){b=b.value;var S;(S=e.Cd()).kc.apply(S,se(b))}for(S=x(ak),k=S.next();!k.done;k=S.next())k=k.value,e.i[k]=m[k];p?(S=e.h.Gb().find(function(A){return A.language==p.language&&xe(A.roles,p.roles)&&A.forced==p.forced}),e.h.Dc(S)):e.h.Dc(),e.i.autoplay=h,l&&e.i.play()}},function(b){b=new Map().set("detail",b),b=new Ge("error",b),e.h.dispatchEvent(b)})}function dk(e,t,n,r){return e.g.qb()?r=="getCurrentAd"?function(){return e.H}:e.g.get(n,r):(n=t[r],typeof n=="function"?n.bind(t):n)}function kH(e,t){if(t=="addEventListener")return function(r,i,o){return e.o.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.o.removeEventListener(r,i,o)};if(e.g.qb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return dk(e,e.i,"video",t)}function uy(e,t,n){if(n=n===void 0?!1:n,e.J.has(t)&&(t=e.J.get(t)),t=="addEventListener")return function(r,i,o){return e.D.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.D.removeEventListener(r,i,o)};if(t=="getMediaElement")return function(){return e.u};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.hb()};if(t=="getDrmEngine")return function(){return e.h.B};if(t=="getAdManager")return function(){return e.C};if(t=="getQueueManager")return function(){return e.h.jj()};if(t=="setVideoContainer")return function(r){return e.h.ck(r)};if(!n){if(t=="addThumbnailsTrack")return function(){var r=oe.apply(0,arguments);return e.j.lc.push(r),uy(e,t,!0).apply(null,se(r))};if(t=="addTextTrackAsync")return function(){var r=oe.apply(0,arguments);return e.j.Tb.push(r),uy(e,t,!0).apply(null,se(r))};if(t=="addChaptersTrack")return function(){var r=oe.apply(0,arguments);return e.j.kc.push(r),uy(e,t,!0).apply(null,se(r))}}if(e.g.qb()){if(t=="getManifest"||t=="drmInfo")return function(){return ut(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return ut(t+"() does not work while casting!"),Promise.resolve()}}return e.g.qb()&&Object.keys(e.g.g.video).length==0&&(ok.has(t)||sk.has(t))?(n=e.h[t],typeof n!="function"?n:n.bind(e.h)):dk(e,e.h,"player",t)}function TH(e,t){return e.I.has(t)&&(t=e.I.get(t)),t=="addEventListener"?function(n,r,i){return e.B.addEventListener(n,r,i)}:t=="removeEventListener"?function(n,r,i){return e.B.removeEventListener(n,r,i)}:dk(e,e.m,"adManager",t)}function F6(e,t,n){e.g.qb()&&(t=="video"?e.o.dispatchEvent(n):t=="player"?(n.type=="unloading"&&fk(e),e.D.dispatchEvent(n)):t=="adManager"&&(n.type=="ad-started"?e.H=new Proxy(new B6,{get:function(r,i){return typeof i!="string"?r[i]:e.g.qb()?e.g.get("currentAd",i):null}}):n.type=="ad-stopped"&&(e.H=null),e.B.dispatchEvent(n)))}function fk(e){e.j.lc=[],e.j.Tb=[],e.j.kc=[]}Te("shaka.cast.CastProxy",Mn),Mn.prototype.changeReceiverId=Mn.prototype.Gk,Mn.prototype.forceDisconnect=Mn.prototype.yd,Mn.prototype.suggestDisconnect=Mn.prototype.Jm,Mn.prototype.setAppData=Mn.prototype.ii,Mn.prototype.cast=Mn.prototype.cast,Mn.prototype.receiverName=Mn.prototype.Th,Mn.prototype.isCasting=Mn.prototype.qb,Mn.prototype.canCast=Mn.prototype.Fk,Mn.prototype.getAdManager=Mn.prototype.pe,Mn.prototype.getPlayer=Mn.prototype.Cd,Mn.prototype.getVideo=Mn.prototype.Gl,Mn.prototype.destroy=Mn.prototype.destroy;function B6(){Zr.apply(this,arguments)}K(B6,Zr);function dr(e,t,n,r){Bt.call(this);var i=this;this.h=e,this.g=t,this.o=t.pe(),this.u=null,this.i=new he,this.C={video:e,player:t,adManager:this.o,currentAd:this.u},this.J=n||function(){},this.L=r||function(o){return o},this.j=null,this.K=!1,this.B=!0,this.l=0,this.H=!1,this.F=!0,this.D=this.m=null,this.I=new ft(function(){pk(i)}),SH(this)}K(dr,Bt),g=dr.prototype,g.isConnected=function(){return this.K},g.Kl=function(){return this.B},g.Dm=function(e){this.j=e},g.Kk=function(){this.j=null},g.Em=function(e){ly(this),this.j.title=e},g.Cm=function(e){ly(this),this.j.images=[{url:e}]},g.Bm=function(e){ly(this),this.j.artist=e,this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},g.Am=function(e){ly(this),this.j.albumName=e,this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};function ly(e){e.j||(e.j={metadataType:cast.receiver.media.MetadataType.GENERIC})}g.destroy=function(){var e=this,t,n;return P(function(r){if(r.h==1)return e.i&&(e.i.release(),e.i=null),t=[],e.g&&(t.push(e.g.destroy()),e.g=null),e.I&&(e.I.stop(),e.I=null),e.h=null,e.o=null,e.C=null,e.J=null,e.K=!1,e.B=!0,e.m=null,e.D=null,Bt.prototype.release.call(e),r.g(Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),r.j()})};function SH(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return V6(e)},t.onSenderDisconnected=function(){return V6(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&ns(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.m),ns(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.m)},e.D=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.D.onMessage=function(r){return EH(e,r)},e.m=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.m.onMessage=function(r){return AH(e,r)},t.start(),t=x(C6);for(var n=t.next();!n.done;n=t.next())e.i.G(e.h,n.value,function(r){return hk(e,"video",r)});e.i.G(e.g,"__shaka_all_events__",function(r){return hk(e,"player",r)}),e.o&&e.i.G(e.o,"__shaka_all_events__",function(r){r.type=="ad-started"?(e.u=e.o.getCurrentAd(),e.l=0,e.C.currentAd=e.u):r.type=="ad-stopped"&&(e.u=null,e.C.currentAd=e.u),hk(e,"adManager",r)}),e.i.G(e.h,"loadeddata",function(){e.H=!0}),e.i.G(e.g,"loading",function(){e.B=!1,qd(e)}),e.i.G(e.h,"playing",function(){e.B=!1,qd(e)}),e.i.G(e.h,"pause",function(){qd(e)}),e.i.G(e.g,"unloading",function(){e.B=!0,qd(e)}),e.i.G(e.h,"ended",function(){new ft(function(){e.h&&e.h.ended&&(e.B=!0,qd(e))}).$(MH)})}function V6(e){e.l=0,e.F=!0,e.K=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,qd(e)}function qd(e){var t;P(function(n){if(n.h==1)return n.g(Promise.resolve(),2);if(!e.g)return n.return();t=new Ge("caststatuschanged"),e.dispatchEvent(t),$6(e)||Vs(e),n.j()})}function CH(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R;P(function(U){switch(U.h){case 1:for(r in t.player)i=t.player[r],e.g[r](i);return e.J(n),o=e.h.autoplay,t.manifest?(e.h.autoplay=!1,U.m(5),U.g(e.g.load(t.manifest,t.startTime,t.mimeType),7)):U.g(Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(u=x(t.addThumbnailsTrackCalls),l=u.next();!l.done;l=u.next())h=l.value,e.g.lc.apply(e.g,se(h));if(t.addTextTrackAsyncCalls)for(p=x(t.addTextTrackAsyncCalls),m=p.next();!m.done;m=p.next())b=m.value,e.g.Tb.apply(e.g,se(b));if(t.addChaptersTrackCalls)for(w=x(t.addChaptersTrackCalls),T=w.next();!T.done;T=w.next())k=T.value,e.g.kc.apply(e.g,se(k));U.o(3);break;case 5:return S=U.l(),A=new Map().set("detail",S),M=new Ge("error",A),e.g&&e.g.dispatchEvent(M),U.return();case 3:if(!e.g)return U.return();for(_ in t.video)R=t.video[_],e.h[_]=R;e.h.autoplay=o,t.manifest&&(e.h.play(),Vs(e)),U.j()}})}function hk(e,t,n){e.g&&(pk(e),ns(e,{type:"event",targetName:t,event:n},e.m))}function pk(e){e.I.$(IH);for(var t={video:{},player:{},currentAd:{}},n=x(fH),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.h[r];e.g.isLive()&&A6.forEach(function(i,o){e.l%i==0&&(t.player[o]=e.g[o]())}),ok.forEach(function(i,o){e.l%i==0&&(t.player[o]=e.g[o]())}),e.u&&M6.forEach(function(i,o){e.l%i==0&&(t.currentAd[o]=e.u[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),ns(e,{type:"update",update:t},e.m),sk.forEach(function(i,o){e.l%i==0&&(i={player:{}},i.player[o]=e.g[o](),ns(e,{type:"update",update:i},e.m))}),e.o&&I6.forEach(function(i,o){e.l%i==0&&(i={adManager:{}},i.adManager[o]=e.o[o](),ns(e,{type:"update",update:i},e.m))}),e.H&&(e.l+=1),$6(e)}function $6(e){return e.F&&(e.h.duration||e.g.isLive())?(gk(e),e.F=!1,!0):!1}function gk(e,t){t=t===void 0?0:t;var n={contentId:e.g.$c(),streamType:e.g.isLive()?"LIVE":"BUFFERED",contentType:""};e.g.isLive()||(n.duration=e.h.duration),e.j&&(n.metadata=e.j),Vs(e,t,n)}function AH(e,t){var n=iy(t.data);switch(n.type){case"init":e.l=0,e.H=!1,e.F=!0,CH(e,n.initState,n.appData),pk(e);break;case"appData":e.J(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,r=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),i=="volume"){t.setSystemVolumeLevel(n);break}else if(i=="muted"){t.setSystemVolumeMuted(n);break}}e.C[r]&&(e.C[r][i]=n);break;case"call":r=n.methodName,i=n.args,(n=e.C[n.targetName])&&n[r].apply(n,i);break;case"asyncCall":r=n.targetName,i=n.methodName,r=="player"&&i=="load"&&(e.l=0,e.H=!1);var o=n.id,u=t.senderId;t=e.C[r],n=t[i].apply(t,n.args),r=="player"&&i=="load"&&(n=n.then(function(){e.F=!0})),n.then(function(l){return z6(e,u,o,null,l)},function(l){return z6(e,u,o,l,null)})}}function EH(e,t){var n=iy(t.data);switch(n.type){case"PLAY":e.h.play(),Vs(e);break;case"PAUSE":e.h.pause(),Vs(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;t!=null&&(e.h.currentTime=Number(t)),r&&r=="PLAYBACK_START"?(e.h.play(),Vs(e)):r&&r=="PLAYBACK_PAUSE"&&(e.h.pause(),Vs(e));break;case"STOP":e.g.Fc().then(function(){e.g&&Vs(e)});break;case"GET_STATUS":gk(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.h.volume,o=e.h.muted;t!=null&&(e.h.volume=Number(t)),r!=null&&(e.h.muted=r),i==e.h.volume&&o==e.h.muted||Vs(e);break;case"LOAD":e.l=0,e.H=!1,e.F=!1,t=n.media,r=n.currentTime,i=e.L(t.contentId),o=n.autoplay||!0,e.J(t.customData),o&&(e.h.autoplay=!0),e.g.load(i,r).then(function(){e.g&&gk(e)}).catch(function(u){var l="LOAD_FAILED";u.category==7&&u.code==7e3&&(l="LOAD_CANCELLED"),ns(e,{requestId:Number(n.requestId),type:l},e.D)});break;default:ns(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.D)}}function z6(e,t,n,r,i){e.g&&ns(e,{type:"asyncComplete",id:n,error:r,res:i},e.m,t)}function ns(e,t,n,r){e.K&&(e=ik(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Vs(e,t,n){n=n===void 0?null:n;var r={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.B?PH:e.g.xh()?DH:e.h.paused?LH:_H,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(r.media=n),ns(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[r]},e.D)}Te("shaka.cast.CastReceiver",dr),dr.prototype.destroy=dr.prototype.destroy,dr.prototype.setContentAlbumName=dr.prototype.Am,dr.prototype.setContentArtist=dr.prototype.Bm,dr.prototype.setContentImage=dr.prototype.Cm,dr.prototype.setContentTitle=dr.prototype.Em,dr.prototype.clearContentMetadata=dr.prototype.Kk,dr.prototype.setContentMetadata=dr.prototype.Dm,dr.prototype.isIdle=dr.prototype.Kl,dr.prototype.isConnected=dr.prototype.isConnected;var IH=.5,MH=5,PH="IDLE",_H="PLAYING",DH="BUFFERING",LH="PAUSED";function H6(e,t,n,r,i,o){if(o=o===void 0?!1:o,r>=i)return null;for(var u=-1,l=-1,h=0;h<n.length;h++)n[h].some(function(V){return V!=null&&V.g.trim()!=""})&&(u===-1&&(u=h),l=h);if(u===-1||l===-1)return null;for(var p=h=!1,m="white",b="black",w=r,T=mk(r,i,h,p,m,b);u<=l;u++){for(var k=n[u],S=-1,A=-1,M=0;M<k.length;M++)k[M]!=null&&k[M].g.trim()!==""&&(S===-1&&(S=M),A=M);if(S===-1||A===-1)k=q6(r,i),e.nestedCues.push(k);else{for(;S<=A;S++)if(M=k[S]){var _=M.l,R=M.i,U=M.j,N=M.h,j=M.m;j=o&&j!=null&&j>r?j:r,(_!=h||R!=p||U!=m||N!=b||j!=w)&&(T.payload&&e.nestedCues.push(T),T=mk(j,i,_,R,U,N),h=_,p=R,m=U,b=N,w=j),T.payload+=M.g}else T.payload+=" ";T.payload&&e.nestedCues.push(T),u!==l&&(w=q6(r,i),e.nestedCues.push(w)),w=r,T=mk(r,i,h,p,m,b)}}return e.nestedCues.length?{cue:e,stream:t}:null}function mk(e,t,n,r,i,o){return e=new rn(e,t,""),n&&e.textDecoration.push(ud),r&&(e.fontStyle=Bh),e.color=i,e.backgroundColor=o,e}function q6(e,t){return e=new rn(e,t,""),e.lineBreak=!0,e}function vk(e,t){switch(e){case yk:return t==6;case bk:return t==39||t==40;case G6:return t==23||t==24;default:return!1}}var yk=0,bk=1,G6=2;function K6(e,t,n,r,i,o){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i,this.m=o===void 0?null:o}function wk(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.l=this.o=!1,this.m="white",this.B="black",this.u=this.j=null,Rp(this)}function cy(e,t,n,r){r=r===void 0?!1:r;var i="CC"+((e.D<<1|e.C)+1),o=new rn(t,n,"");o.lineInterpretation=1;var u=e.i.findIndex(function(l){return l.some(function(h){return h.g.trim()!=""})});return(u=jH.get(u))&&(o.line=u),e.u!=null&&e.j!=null&&(o.position=10+Math.min(70,e.u*10)+e.j*2.5),H6(o,i,e.i,t,n,r)}function Rp(e){$s(e,0,15),e.g=1,e.j=null,e.u=null}function Gd(e,t,n,r){if(r=r===void 0?null:r,!(n<32||n>127)){var i="";switch(t){case 0:i=X6.has(n)?X6.get(n):String.fromCharCode(n);break;case 1:i=RH.get(n);break;case 2:e.i[e.g].pop(),i=NH.get(n);break;case 3:e.i[e.g].pop(),i=OH.get(n)}i&&e.i[e.g].push(new K6(i,e.o,e.l,e.B,e.m,r))}}function W6(e,t,n,r){if(!(n<0||t<0))if(t>=n)for(--r;r>=0;r--)e.i[t+r]=e.i[n+r].map(function(o){return o});else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map(function(o){return o})}function $s(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var X6=new Map([[39,"\u2019"],[42,"\xE1"],[92,"\xE9"],[94,"\xED"],[95,"\xF3"],[96,"\xFA"],[123,"\xE7"],[124,"\xF7"],[125,"\xD1"],[126,"\xF1"],[127,"\u2588"]]),RH=new Map([[48,"\xAE"],[49,"\xB0"],[50,"\xBD"],[51,"\xBF"],[52,"\u2122"],[53,"\xA2"],[54,"\xA3"],[55,"\u266A"],[56,"\xE0"],[57," "],[58,"\xE8"],[59,"\xE2"],[60,"\xEA"],[61,"\xEE"],[62,"\xF4"],[63,"\xFB"]]),NH=new Map([[32,"\xC1"],[33,"\xC9"],[34,"\xD3"],[35,"\xDA"],[36,"\xDC"],[37,"\xFC"],[38,"\u2018"],[39,"\xA1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\xA9"],[44,"\u2120"],[45,"\xB7"],[46,"\u201C"],[47,"\u201D"],[48,"\xC0"],[49,"\xC2"],[50,"\xC7"],[51,"\xC8"],[52,"\xCA"],[53,"\xCB"],[54,"\xEB"],[55,"\xCE"],[56,"\xCF"],[57,"\xEF"],[58,"\xD4"],[59,"\xD9"],[60,"\xF9"],[61,"\xDB"],[62,"\xAB"],[63,"\xBB"]]),OH=new Map([[32,"\xC3"],[33,"\xE3"],[34,"\xCD"],[35,"\xCC"],[36,"\xEC"],[37,"\xD2"],[38,"\xF2"],[39,"\xD5"],[40,"\xF5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xC4"],[49,"\xE4"],[50,"\xD6"],[51,"\xF6"],[52,"\xDF"],[53,"\xA5"],[54,"\xA4"],[55,"\u2502"],[56,"\xC5"],[57,"\xE5"],[58,"\xD8"],[59,"\xF8"],[60,"\u250C"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),jH=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function dy(e,t){this.h=0,this.o=new wk(e,t),this.i=new wk(e,t),this.g=this.j=new wk(e,t),this.l=0,this.m=null}function xk(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==3&&e.h!==4&&(i=cy(r,e.l,n,e.h===2),n=e.i,n.g=n.h>0?n.h:0,$s(n,0,15),n=e.j,n.g=n.h>0?n.h:0,$s(n,0,15),r.g=15),e.h=3,r.h=t,i}function Y6(e){e.h=1,e.g=e.j,e.g.h=0}function J6(e){vi("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var UH="black green blue cyan red yellow magenta black".split(" "),Q6="white green blue cyan red yellow magenta white_italics".split(" ");function kk(e,t){this.J=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.H=this.L=this.I=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",Tk(this)}function Tk(e){e.i=[];for(var t=0;t<16;t++)e.i.push(Sk())}function Sk(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function Iu(e,t){Z6(e)&&(e.i[e.h][e.g]=new K6(t,e.D,e.B,e.u,e.C),e.g++)}function Z6(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}kk.prototype.isVisible=function(){return this.l};function Xl(e,t,n){var r=new rn(e.j,t,"");r.textAlign=e.F===0?"left":e.F===1?"right":Yo;var i=r.region;switch(e.J&&(i.id+="svc"+e.J),i.id+="win"+e.M,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.I,i.viewportAnchorY=e.L,i.viewportAnchorUnits=e.K?xi:2,e.H){case 0:i.regionAnchorX=0,i.regionAnchorY=0;break;case 1:i.regionAnchorX=50,i.regionAnchorY=0;break;case 2:i.regionAnchorX=100,i.regionAnchorY=0;break;case 3:i.regionAnchorX=0,i.regionAnchorY=50;break;case 4:i.regionAnchorX=50,i.regionAnchorY=50;break;case 5:i.regionAnchorX=100,i.regionAnchorY=50;break;case 6:i.regionAnchorX=0,i.regionAnchorY=100;break;case 7:i.regionAnchorX=50,i.regionAnchorY=100;break;case 8:i.regionAnchorX=100,i.regionAnchorY=100}return(n=H6(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}kk.prototype.display=function(){this.l=!0};function FH(){this.i=[],this.h=null,this.g=0}function BH(e,t){t.type===3?(e.g=(t.value&63)*2-1,e.h=[]):e.h&&(e.g>0&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Np(e.h)),e.h=null,e.g=0))}function Np(e){this.g=0,this.h=e}Np.prototype.La=function(){return this.g<this.h.length},Np.prototype.Ia=function(){return this.g};function Xn(e){if(!e.La())throw new B(2,2,3e3);return e.h[e.g++]}Np.prototype.skip=function(e){if(this.g+e>this.h.length)throw new B(2,2,3e3);this.g+=e},Np.prototype.Rj=function(e){if(this.g-e<0)throw new B(2,2,3e3);this.g-=e};function VH(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function $H(e,t){var n=Xn(t),r=n.value;if(n=n.pts,r===16){var i=Xn(t);r=r<<16|i.value}if(r>=0&&r<=31){if(i=r,i==24)n=Xn(t).value,t=Xn(t).value,e.g&&Iu(e.g,String.fromCharCode(n<<8|t)),e=[];else if(e.g){switch(t=e.g,r=null,i){case 8:!Z6(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:if(t.isVisible()&&(r=Xl(t,n,e.i)),t.h+1>=t.o){for(e=0,n=1;n<16;n++,e++)t.i[e]=t.i[n];for(n=0;n<1;n++,e++)t.i[e]=Sk()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(r=Xl(t,n,e.i)),t.i[t.h]=Sk(),t.g=0;break;case 12:t.isVisible()&&(r=Xl(t,n,e.i)),Tk(t),t.h=0,t.g=0}e=r?[r]:[]}else e=[];return e}return r>=128&&r<=159?zH(e,t,r,n):(r>=4096&&r<=4127?(e=r&255,e>=8&&e<=15?t.skip(1):e>=16&&e<=23?t.skip(2):e>=24&&e<=31&&t.skip(3)):r>=4224&&r<=4255?(e=r&255,e>=128&&e<=135?t.skip(4):e>=136&&e<=143&&t.skip(5)):r>=32&&r<=127?(t=r,e.g&&(t===127?Iu(e.g,"\u266A"):Iu(e.g,String.fromCharCode(t)))):r>=160&&r<=255?e.g&&Iu(e.g,String.fromCharCode(r)):r>=4128&&r<=4223?(t=r&255,e.g&&(nP.has(t)?(t=nP.get(t),Iu(e.g,t)):Iu(e.g,"_"))):r>=4256&&r<=4351&&e.g&&((r&255)!=160?Iu(e.g,"_"):Iu(e.g,"[CC]")),[])}function zH(e,t,n,r){if(n>=128&&n<=135)r=n&7,e.h[r]&&(e.g=e.h[r]);else{if(n===136){n=Xn(t).value,t=[],n=x(Op(e,n));for(var i=n.next();!i.done;i=n.next()){if(i=e.h[i.value],i.isVisible()){var o=Xl(i,r,e.i);o&&t.push(o)}Tk(i)}return t}if(n===137)for(t=Xn(t).value,t=x(Op(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=r),n.display();else{if(n===138){for(n=Xn(t).value,t=null,n=x(Op(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()&&(t=Xl(i,r,e.i)),i.l=!1;return t?[t]:[]}if(n===139){for(n=Xn(t).value,t=null,n=x(Op(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()?t=Xl(i,r,e.i):i.j=r,i.l=!i.l;return t?[t]:[]}if(n===140)return t=Xn(t).value,eP(e,t,r);if(n===143)return r=eP(e,255,r),tP(e),r;if(n===144)t.skip(1),r=Xn(t).value,e.g&&(e.g.B=(r&128)>0,e.g.D=(r&64)>0);else if(n===145)r=Xn(t).value,n=Xn(t).value,t.skip(1),e.g&&(t=rP[(n&48)>>4>>1<<2|(n&12)>>2>>1<<1|(n&3)>>1],e.g.C=rP[(r&48)>>4>>1<<2|(r&12)>>2>>1<<1|(r&3)>>1],e.g.u=t);else if(n===146)r=Xn(t).value,t=Xn(t).value,e.g&&(e=e.g,e.h=r&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),r=Xn(t).value,t.skip(1),e.g&&(e.g.F=r&3);else if(n>=152&&n<=159){n=(n&15)-8,i=e.h[n]!==null,i||(o=new kk(n,e.i),o.j=r,e.h[n]=o),r=Xn(t).value,o=Xn(t).value;var u=Xn(t).value,l=Xn(t).value,h=Xn(t).value;t=Xn(t).value,i&&(t&7)===0||(t=e.h[n],t.h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),t=e.h[n],t.l=(r&32)>0,t.L=o&127,t.I=u,t.H=(l&240)>>4,t.K=(o&128)>0,t.o=(l&15)+1,t.m=(h&63)+1,e.g=e.h[n]}}}return[]}function Op(e,t){for(var n=[],r=0;r<8;r++)(t&1)===1&&e.h[r]&&n.push(r),t>>=1;return n}function eP(e,t,n){var r=[];t=x(Op(e,t));for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=e.h[i];o.isVisible()&&(o=Xl(o,n,e.i))&&r.push(o),e.h[i]=null}return r}function tP(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}var nP=new Map([[32," "],[33,"\xA0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201C"],[52,"\u201D"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215B"],[119,"\u215C"],[120,"\u215D"],[121,"\u215E"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250C"]]),rP="black blue green cyan red magenta yellow white".split(" ");function Ck(){this.g=[],this.h=[],this.i=new FH,this.j=0,this.l=new Map([["CC1",new dy(0,0)],["CC2",new dy(0,1)],["CC3",new dy(1,0)],["CC4",new dy(1,1)]]),this.o=this.m=0,this.C=new Map,this.B=!0,this.u=new Set,Ak(this)}g=Ck.prototype,g.clear=function(){this.j=0,this.g=[],this.h=[];var e=this.i;e.i=[],e.h=null,e.g=0,Ak(this),e=x(this.C.values());for(var t=e.next();!t.done;t=e.next())tP(t.value)};function Ak(e){e.m=0,e.o=0;for(var t=x(e.l.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Rp(n.i),Rp(n.j),Rp(n.o);e.B=!0}g.extract=function(e,t){if(this.B){for(var n=x(this.l.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.B=!1}if(e=new nn(e,0),!(e.$a()<8)&&e.Z()===181&&e.Da()===49&&e.S()===1195456820&&e.Z()===3&&(n=e.Z(),(n&64)!==0))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.Z(),o=(i&4)>>2,u=e.Z(),l=e.Z();o&&(i&=3,i===0||i===1?this.g.push({pts:t,type:i,yb:u,Vb:l,order:this.g.length}):(this.h.push({pts:t,type:i,value:u,order:this.h.length}),this.h.push({pts:t,type:2,value:l,order:this.h.length})))}},g.extractRaw608=function(e,t){for(var n=0;n+1<e.length;n+=2)this.g.push({pts:t,type:0,yb:e[n],Vb:e[n+1],order:this.g.length})},g.decode=function(){function e(i,o){return i.pts-o.pts||i.order-o.order}var t=[];this.g.sort(e),this.h.sort(e);for(var n=x(this.g),r=n.next();!r.done;r=n.next())(r=HH(this,r.value))&&t.push(r);for(n=x(this.h),r=n.next();!r.done;r=n.next())BH(this.i,r.value);for(n=x(this.i.i),r=n.next();!r.done;r=n.next())r=qH(this,r.value),t.push.apply(t,se(r));return this.i.i=[],this.g=[],this.h=[],t};function HH(e,t){var n=t.type;if((t.yb&112)===16){var r=t.yb>>3&1;n===0?e.m=r:e.o=r}var i="CC"+((n<<1|(n?e.o:e.m))+1);if(n=e.l.get(i),t.yb===255&&t.Vb===255||!t.yb&&!t.Vb||!iP(t.yb)||!iP(t.Vb))return++e.j>=45&&Ak(e),null;if(e.j=0,t.yb&=127,t.Vb&=127,r=t.yb,r>=1&&r<=15||!t.yb&&!t.Vb)return null;if(r=null,(t.yb&112)===16)e:{if(e.u.add(i),r=t.yb,e=t.Vb,i=t.pts,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,(r&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(r&7)<<1|e>>5&1],r="white",i=!1;var o=null,u=e>95?e-96:e-64;u<=13?r=Q6[Math.floor(u/2)]:u<=15?i=!0:o=Math.floor((u-16)/2),e=(e&1)===1,n.h!==4&&(u=n.g,n.h===3&&t!==u.g&&(n=1+t-u.h,W6(u,n,1+u.g-u.h,u.h),$s(u,0,n-1),$s(u,t+1,15-t)),u.g=t,u.o=e,u.l=i,u.m=r,u.u=o,u.j=null,u.B="black")}else if((r&247)===17&&(e&240)===32)n.g.o=!1,n.g.l=!1,n.g.m="white",Gd(n.g,0,32,i),t=!1,r=Q6[(e&14)>>1],r==="white_italics"&&(r="white",t=!0),n.g.o=(e&1)===1,n.g.l=t,n.g.m=r;else if((r&247)===16&&(e&240)===32||(r&247)===23&&(e&255)===45)t="black",(r&7)===0&&(t=UH[(e&14)>>1]),n.g.B=t;else if((r&247)===17&&(e&240)===48)Gd(n.g,1,e,i);else if((r&246)===18&&(e&224)===32)Gd(n.g,r&1?3:2,e,i);else{if((r&246)===20&&(e&240)===32){switch(e=t.pts,r=null,t.Vb){case 32:Y6(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:r=xk(n,2,e);break;case 38:r=xk(n,3,e);break;case 39:r=xk(n,4,e);break;case 40:Gd(n.g,0,32,e);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Rp(n.o),J6(n);break;case 43:J6(n);break;case 44:t=n.i,r=null,n.h!==4&&(r=cy(t,n.l,e,n.h===2||n.h===3)),$s(t,0,15);break;case 45:t=n.g,n.h!==3?r=null:(r=cy(t,n.l,e,!0),i=t.g-t.h+1,W6(t,i-1,i,t.h),$s(t,0,i-1),$s(t,t.g,15-t.g),n.l=e);break;case 46:$s(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=cy(n.i,n.l,e,n.h===2||n.h===3)),r=n.j,n.j=n.i,n.i=r,Y6(n),n.l=e,r=t}break e}(r==23||r==31)&&e>=33&&e<=35&&(n.g.j=e-32)}r=null}else e=t.Vb,i=t.pts,Gd(n.g,0,t.yb,i),Gd(n.g,0,e,i);return r}function qH(e,t){var n=[];try{for(;t.La();){var r=Xn(t).value,i=(r&224)>>5,o=r&31;if(i===7&&o!=0&&(i=Xn(t).value&63),i!=0){e.u.add("svc"+i);for(var u=e.C.getOrInsertComputed(i,function(p){return new VH(p)}),l=t.Ia();t.Ia()-l<o;){var h=$H(u,t);n.push.apply(n,se(h))}}}}catch(p){if(p instanceof B&&p.code===3e3)vi("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw p}return n}function iP(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}g.getStreams=function(){return Array.from(this.u)},Te("shaka.cea.CeaDecoder",Ck),Tl=function(){return new Ck};function aP(e){var t=[];e=Sv(e);for(var n=0;n<e.length;){for(var r=0;e[n]==255;)r+=255,n++;r+=e[n++];for(var i=0;e[n]==255;)i+=255,n++;i+=e[n++],r==4&&t.push(e.subarray(n,n+i)),n+=i}return t}function fy(){this.j=new Map,this.i=this.h=0,this.l=null,this.g=Ek}fy.prototype.init=function(e){var t=this,n=[],r=[],i=null;if(new Tt().ua([].concat(se(Qo),["mvex"]),qt).T("trex",function(o){var u=o.reader;u.skip(4),u.skip(4),o=u.S(),u=u.S(),t.h=o,t.i=u}).T("tkhd",function(o){o=Nw(o.reader,o.version),i=o.trackId,n.push(o.trackId)}).T("mdhd",function(o){o=Xv(o.reader,o.version),r.push(o.timescale)}).T("stsd",Ua).ua(Aw,function(o){o=o.name,hy.has(o)&&(t.g=hy.get(o))}).box("encv",Pl).box("sinf",qt).box("frma",function(o){o=Yv(o.reader).codec,hy.has(o)&&(t.g=hy.get(o))}).box("c608",function(){t.g=Ik,t.l=i}).parse(e,!0,!0),!n.length||!r.length||n.length!=r.length)throw new B(2,2,2010);this.g==Ek&&ut("Unable to determine bitstream format for CEA parsing!"),n.forEach(function(o,u){t.j.set(o,r[u])})},fy.prototype.parse=function(e){var t=this;if(this.g==Ek)return[];var n=[],r=0,i=[];return new Tt().box("moof",function(o){r=o.start,i=[],qt(o)}).box("traf",function(o){i.push({trackId:null,Oa:null,nc:t.h,Kc:t.i,Mh:[],timescale:9e4}),qt(o)}).T("trun",function(o){var u=i[i.length-1];o=Ol(o.reader,o.version,o.flags),u.Mh.push(o)}).T("tfhd",function(o){var u=i[i.length-1];o=Nl(o.reader,o.flags),u.trackId=o.trackId,u.nc=o.nc||t.h,u.Kc=o.Kc||t.i,o=o.trackId,t.j.has(o)&&(u.timescale=t.j.get(o))}).T("tfdt",function(o){var u=i[i.length-1];o=Wv(o.reader,o.version),u.Oa=o.Oa}).box("mdat",function(o){for(var u=r-o.start-8,l=o.reader.Ia(),h=x(i),p=h.next();!p.done;p=h.next()){var m=p.value;if(t.g!=Ik||m.trackId===t.l)if(m.Oa===null)ut("Unable to find base media decode time for CEA captions!");else if(o.reader.seek(l),t.g===Ik){p=o.reader;var b=m.timescale,w=m.nc,T=m.Kc,k=m.Oa,S=x(m.Mh);for(m=S.next();!m.done;m=S.next()){m=m.value,m.Ic!=null&&p.seek(u+m.Ic),m=x(m.Vc);for(var A=m.next();!A.done;A=m.next()){A=A.value;var M=k/b,_=p.Ja(A.sampleSize||T,!1);n.push({packet:_,pts:M,format:d5}),k+=A.Ud||w}}}else e:for(p=t,b=o.reader,w=m.timescale,T=m.nc,k=m.Kc,S=m.Oa,m=x(m.Mh),A=m.next();!A.done;A=m.next())for(A=A.value,A.Ic!=null&&b.seek(u+A.Ic),A=x(A.Vc),M=A.next();!M.done;M=A.next()){M=M.value,_=(S+(M.dg||0))/w;for(var R=M.sampleSize||k;R>0&&b.La();){var U=b.S(),N=b.Z(),j=1;switch(p.g){case jp:N&=31,N=vk(yk,N);break;case Kd:case Up:j=2,b.skip(1),N=N>>1&63,N=vk(p.g===Kd?bk:G6,N);break;default:break e}if(N)for(j=b.Ja(U-j,!1),j=x(aP(j)),N=j.next();!N.done;N=j.next())n.push({packet:N.value,pts:_,format:tw});else try{b.skip(U-j)}catch{break e}R-=U+4}S+=M.Ud||T}}}).parse(e,!1,!0),n},Te("shaka.cea.Mp4CeaParser",fy);var Ek=0,jp=1,Kd=2,Up=3,Ik=4,hy=new Map().set("avc1",jp).set("avc3",jp).set("dvav",jp).set("dva1",jp).set("hev1",Kd).set("hvc1",Kd).set("dvh1",Kd).set("dvhe",Kd).set("vvc1",Up).set("vvi1",Up).set("dvc1",Up).set("dvi1",Up);Z2("video/mp4",function(){return new fy});function py(){this.g=null}py.prototype.init=function(){},py.prototype.parse=function(e){this.g?this.g.clearData():this.g=new hn;var t=[];if(e=H(e),!Ad(e))return t;e=this.g.parse(e);var n=e.qe(),r=e.Cf();switch(e=null,n.video){case"avc":e=yk;break;case"hvc":e=bk}if(e==null)return t;for(n=x(r),r=n.next();!r.done;r=n.next())if(r=r.value,r.time!=null&&vk(e,r.type))for(var i=x(aP(r.data)),o=i.next();!o.done;o=i.next())t.push({packet:o.value,pts:r.time,format:tw});return t},Te("shaka.cea.TsCeaParser",py),Z2("video/mp2t",function(){return new py});function oP(){this.g=new Map}oP.prototype.release=function(){this.g.clear()};function sP(e,t,n,r){var i=WH(e,t),o=null;e=[];var u=[];t=null;var l=new Set(i.map(function(p){return p.keyId}));l.delete(null);var h="cenc";if(l.size>1)throw new B(2,4,4010);if(!n){if(u=i.filter(function(p){return p.Vd=="urn:mpeg:dash:sea:2012"}),u.length>1)throw new B(2,4,4050);u.length&&(t=YH(u[0])),(u=i.find(function(p){return p.Vd=="urn:mpeg:dash:mp4protection:2011"}))&&u.encryptionScheme&&(h=u.encryptionScheme),u=i.filter(function(p){return p.Vd=="urn:mpeg:dash:mp4protection:2011"?(o=p.init||o,!1):p.Vd!="urn:mpeg:dash:sea:2012"}),u.length&&(e=KH(o,h,u,r,l),e.length==0&&(e=[Go("",h,o)]))}if(i.length&&!t&&(n||!u.length))for(e=[],n=x(Object.values(r)),r=n.next();!r.done;r=n.next())r=r.value,zi(r)||(r=Go(r,h,o),e.push(r));if(l=Array.from(l)[0]||null)for(h=x(e),n=h.next();!n.done;n=h.next())for(n=x(n.value.initData),r=n.next();!r.done;r=n.next())r.value.keyId=l;return{Vi:l,On:o,drmInfos:e,Gg:t,aj:!0}}function GH(e,t,n,r,i){var o=sP(e,t,r,i);if(n.aj)e=n.drmInfos.length==1&&!n.drmInfos[0].keySystem,t=o.drmInfos.length==0,(n.drmInfos.length==0||e&&!t)&&(n.drmInfos=o.drmInfos),n.aj=!1;else if(o.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(u){return o.drmInfos.some(function(l){return l.keySystem==u.keySystem})}),n.drmInfos.length==0))throw new B(2,4,4008);return o.Vi||n.Vi}function gy(e){var t=qi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=mn(t))?t:(t=qi(e.node,"urn:microsoft:playready","pro"))&&mn(t)?$4(t):(e=qi(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=mn(e))?(e=wi(e),z4(e)):""}function KH(e,t,n,r,i){var o=[];n=x(n);for(var u=n.next();!u.done;u=n.next()){u=u.value;var l=r[u.Vd];if(l){var h;if((h=qi(u.node,"urn:microsoft:playready","pro"))&&mn(h)){h=mn(h),h=wi(h);var p=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Iw(h,p,new Set,0),initDataType:"cenc",keyId:u.keyId}]}else h=null;if(p=null,u.Vd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){p=u;var m=i;if(m.size==0)p=null;else{var b=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),w=new Uint8Array([]);p=[{initData:Iw(w,b,m,1),initDataType:"cenc",keyId:p.keyId}]}}h=Go(l,t,u.init||e||h||p),(l=JH.get(l))&&(h.licenseServerUri=l(u));e:{if((u=qi(u.node,"https://dashif.org/CPS","Certurl"))&&(u=mn(u)))break e;u=""}h.serverCertificateUri=u,o.push(h)}}return o}function WH(e,t){var n=[];t=x(t);for(var r=t.next();!r.done;r=t.next())(r=XH(e,r.value))&&n.push(r);return n}function XH(e,t){var n=t.attributes.schemeIdUri,r=ko(t,"urn:mpeg:cenc:2013","default_KID"),i=h5(t,"urn:mpeg:cenc:2013","pssh").map(Cr),o=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase(),r.includes(" ")))throw new B(2,4,4009);var u=[];try{u=i.map(function(l){return{initDataType:"cenc",initData:e.g.getOrInsertComputed(l,function(){return wi(l)}),keyId:null}})}catch{throw new B(2,4,4007)}return{node:t,Vd:n,keyId:r,init:u.length>0?u:null,encryptionScheme:o}}function YH(e){if(!d.crypto||!d.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new B(2,4,4042);var t=qi(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new B(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new B(2,4,4051);if(t=qi(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new B(2,4,4051);if(e=t.attributes.IV,t=Fn(t.attributes.keyUriTemplate),!e||!t)throw new B(2,4,4051);if(e=gu(e.substr(2)),e.byteLength!=16)throw new B(2,4,4048);return{Pl:t,iv:e}}var JH=new Map().set("com.apple.fps",function(e){if(d.shakaMediaKeysPolyfill==="apple")throw new B(2,4,4054);return(e=qi(e.node,"https://dashif.org/CPS","Laurl"))&&(e=mn(e))?e:""}).set("com.widevine.alpha",function(e){var t=qi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=mn(t))?t:(e=qi(e.node,"urn:microsoft","laurl"))&&Fn(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",gy).set("com.microsoft.playready.recommendation",gy).set("com.microsoft.playready.software",gy).set("com.microsoft.playready.hardware",gy).set("org.w3.clearkey",function(e){var t=qi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=mn(t))?t:(e=qi(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=mn(e))?e:""});function Wd(e,t,n,r,i,o){var u=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",r).set("Bandwidth",i).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(l,h,p,m){if(l=="$$")return"$";var b=u.get(h);if(b==null)return l;switch(h=="RepresentationID"&&p&&(p=void 0),h=="Time"&&typeof b!="bigint"&&(Math.abs(b-Math.round(b))>=.2&&ut("Calculated $Time$ values must be close to integers"),b=Math.round(b)),m){case void 0:case"d":case"i":case"u":l=b.toString();break;case"o":l=b.toString(8);break;case"x":l=b.toString(16);break;case"X":l=b.toString(16).toUpperCase();break;default:l=b.toString()}return p=d.parseInt(p,10)||1,Array(Math.max(0,p-l.length)+1).join("0")+l})}function uP(e,t){var n=$a(e,t,"timescale"),r=1;n&&(r=Lh(n)||1),n=$a(e,t,"duration");var i=(n=Lh(n||""))?n/r:null,o=$a(e,t,"startNumber"),u=Number($a(e,t,"presentationTimeOffset"))||0,l=Ki(o||"");(o==null||l==null)&&(l=1),o=null;var h=Xd(e,t,"SegmentTimeline");if(h){t=[],o=new Map;var p=Rt(h,"Pattern");p=x(p);for(var m=p.next();!m.done;m=p.next()){m=m.value;var b=m.attributes.id;b&&o.set(b,m)}if(h=Rt(h,"S"),o.size)for(h=x(h),p=h.next();!p.done;p=h.next())p=QH(p.value,o),t.push.apply(t,se(p));else t=h;o=r,e=e.qa.duration||1/0,h=l,p=[];var w=-u;for(m=0;m<t.length;++m){var T=t[m],k=t[m+1],S=wt(T,"t",Ki);b=wt(T,"d",Ki);var A=wt(T,"r",Jr);if(T=wt(T,"k",Jr)||0,S!=null&&(S-=u),b){if(S=S??w,A=A||0,A<0)if(k){if(k=wt(k,"t",Ki),k==null||S>=k)break;A=Math.ceil((k-S)/b)-1}else{if(e==1/0||S/o>=e)break;A=Math.ceil((e*o-S)/b)-1}for(p.length>0&&S!=w&&(p[p.length-1].end=S/o),k=0;k<=A;++k)w=S+b,p.push({start:S/o,ng:S,end:w/o,Bi:w,dc:T,xm:p.length+h}),S=w}}o=p}return{timescale:r,mg:n,ob:i,Ke:l,fc:u/r||0,md:u,timeline:o}}function QH(e,t){var n=e.attributes.p;if(!n)return[e];if(!t.has(n))return[];if(t=t.get(n),n=Rt(t,"P"),!n.length)return[];t=[],n=x(n);for(var r=n.next();!r.done;r=n.next()){var i=r.value;if(r=Number(i.attributes.d),i=Number(i.attributes.r||0),Number.isFinite(r)&&!(r<=0))for(var o=0;o<=i;o++)t.push(r)}if(!t.length)return[];n=Number(e.attributes.pE||0),r=Number(e.attributes.r||0)+1,i=Number(e.attributes.k||1),o=[],e=Number(e.attributes.t||0);for(var u=t.length,l=0;l<r;l++){var h=t[(n+l)%u],p={tagName:"S",attributes:{t:String(e),d:String(h)},children:[],parent:null};i>1&&(p.attributes.k=String(i)),o.push(p),e+=h}return o}function lP(e,t){return[t(e.N),t(e.sa),t(e.Ta)].filter(Il)}function $a(e,t,n){t=lP(e,t),e=null,t=x(t);for(var r=t.next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function Xd(e,t,n){t=lP(e,t),e=null,t=x(t);for(var r=t.next();!r.done&&!(e=Yt(r.value,n));r=t.next());return e}function ZH(e,t,n,r){for(var i=[],o=x(Rt(e,"Period")),u=o.next(),l={};!u.done;l={Qd:void 0,xe:void 0},u=o.next())if(l.Qd=u.value,u=Yt(l.Qd,"ImportedMPD")){l.xe=u,u=void 0;var h=(u=Cr(l.xe))==null?void 0:u.trim();h?(u=hd(t,h),l=r.request(0,yn([u],n)).Ya((function(p){return function(m){var b=null;try{b=Dh(m.data,"MPD")}catch{}var w=b?Yt(b,"Period"):null,T;return(T=b&&w)&&(T=b,(T.attributes.type||"static")!=="static"||Rt(T,"Period").length!==1?T=!0:(T=Xo(T.attributes.availabilityEndTime||""),T=T!=null&&T*1e3<Date.now()),T=!T),T?tq(p.Qd,b,w,m.uri):Mk(e,p.Qd,p.xe),e}})(l),(function(p){return function(){return Mk(e,p.Qd,p.xe),e}})(l)),i.push(l)):Mk(e,l.Qd,l.xe)}return i.length?xw(i).Ya(function(){return e}):Ml(e)}function Mk(e,t,n){t.children=t.children.filter(function(r){return r!==n}),eq(t)||(e.children=e.children.filter(function(r){return r!==t}))}function eq(e){return Rt(e,"AdaptationSet").length?!0:Gi(e.attributes.duration||"")===0}function tq(e,t,n,r){for(var i=new Set(["id","start","duration"]),o=x(Object.keys(e.attributes)),u=o.next();!u.done;u=o.next())u=u.value,i.has(u)||u.includes(":")||delete e.attributes[u];var l=new Set(["ServiceDescription","SupplementalProperty","EssentialProperty","EventStream","RequestParam"]);o=Sl(e).filter(function(m){return l.has(m.tagName)||m.tagName.includes(":")}),i=Sl(n).filter(function(m){return m.tagName!=="BaseURL"}).concat(Rt(t,"SupplementalProperty"),Rt(t,"EssentialProperty"));var h=new Set;u=x(i);for(var p=u.next();!p.done;p=u.next())p=cP(p.value),p!=null&&h.add(p);for(o=o.filter(function(m){return m=cP(m),m==null||!h.has(m)}),t=nq(t,n,r).map(function(m){return{tagName:"BaseURL",attributes:{},children:[m],parent:e}}),r=x(i),u=r.next();!u.done;u=r.next())u.value.parent=e;e.children=t.concat(i,o),(n=n.attributes.duration)&&((t=e.attributes.duration)?(t=Gi(t),r=Gi(n),t!=null&&r!=null&&r<t&&(e.attributes.duration=n)):e.attributes.duration=n)}function cP(e){switch(e.tagName){case"ServiceDescription":return"ServiceDescription:"+(e.attributes.id||"");case"SupplementalProperty":case"EssentialProperty":case"EventStream":return e.tagName+":"+(e.attributes.schemeIdUri||"")+":"+(e.attributes.value||"");default:return null}}function nq(e,t,n){function r(i){var o=[];i=x(Rt(i,"BaseURL"));for(var u=i.next();!u.done;u=i.next())(u=Cr(u.value))&&o.push(u);return o}return n=[n],e=r(e),e.length&&(n=zn(n,e)),t=r(t),t.length&&(n=zn(n,t)),n}function rq(e,t,n,r,i,o){for(var u=ko(e,"http://www.w3.org/1999/xlink","href"),l=ko(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",h=x(Object.keys(e.attributes)),p=h.next();!p.done;p=h.next()){p=p.value;var m=p.split(":"),b=aw("http://www.w3.org/1999/xlink");m[0]==b&&delete e.attributes[p]}if(o>=5)return bu(new B(2,4,4028));if(l!="onLoad")return bu(new B(2,4,4027));var w=zn([r],[u]);return i.request(0,yn(w,t)).Ya(function(T){if(T=Dh(T.data,e.tagName),!T)return bu(new B(2,4,4001,u));for(e.children=[];T.children.length;){var k=T.children.shift();e.children.push(k)}k=x(Object.keys(T.attributes));for(var S=k.next();!S.done;S=k.next())S=S.value,e.attributes[S]=T.attributes[S];return my(e,t,n,w[0],i,o+1)})}function my(e,t,n,r,i,o){o=o===void 0?0:o;var u=new Set(["MPD","Period","AdaptationSet","Representation","SegmentList"]);if(ko(e,"http://www.w3.org/1999/xlink","href"))return u=rq(e,t,n,r,i,o),n&&(u=u.Ya(void 0,function(){return my(e,t,n,r,i,o)})),u;for(var l=[],h=x(Sl(e)),p=h.next(),m={};!p.done;m={je:void 0},p=h.next())m.je=p.value,ko(m.je,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter((function(b){return function(w){return w!==b.je}})(m)):u.has(m.je.tagName)&&l.push(my(m.je,t,n,r,i,o));return xw(l).Ya(function(){return e})}function vy(e){return Rt(e,"EssentialProperty").map(dP)}function Fp(e){return Rt(e,"SupplementalProperty").map(dP)}function Pk(e,t,n){return e.find(function(r){return r.schemeIdUri==t&&(n==null||r.value==n)})||null}function dP(e){return{schemeIdUri:e.attributes.schemeIdUri,value:e.attributes.value,id:e.attributes.id,element:e}}function iq(e,t,n,r,i,o,u,l){var h,p=new Tt().T("sidx",function(m){h=aq(t,r,i,o,u,n,m,l)});if(e&&p.parse(e),h)return h;throw new B(2,3,3004)}function aq(e,t,n,r,i,o,u,l){l=l===void 0?!1:l;var h=[];u.reader.skip(4);var p=u.reader.S();if(p==0)throw new B(2,3,3005);if(u.version==0)var m=u.reader.S(),b=u.reader.S();else m=u.reader.Sd(),b=u.reader.Sd();u.reader.skip(2);var w=u.reader.Da();for(e=(l?-u.size:e)+u.size+b,l=0;l<w;l++){var T=u.reader.S();b=(T&2147483648)>>>31,T&=2147483647;var k=u.reader.S();if(u.reader.skip(4),b==1)throw new B(2,3,3006);h.push(new nt(m/p+n,(m+k)/p+n,function(){return o},e,e+T-1,t,n,r,i)),m+=k,e+=T}return u.parser.stop(),h}function Mu(e){this.h=_e(e),this.g=new nn(this.h,0)}Mu.prototype.La=function(){return this.g.La()};function zs(e){var t=fP(e);if(t.length>7)throw new B(2,3,3002);var n=0;t=x(t);for(var r=t.next();!r.done;r=t.next())n=256*n+r.value;t=fP(e);e:{r=x(oq);for(var i=r.next();!i.done;i=r.next())if($i(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.Ia();else{if(t.length==8&&t[1]&224)throw new B(2,3,3001);for(i=r=0;i<t.length;i++){var o=t[i];r=i==0?o&(1<<8-t.length)-1:256*r+o}t=r}return t=e.g.Ia()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ia(),r=_e(e.h,e.g.Ia(),t),e.g.skip(t),new sq(n,r)}function fP(e){var t=e.g.Ia(),n=e.g.Z();if(n==0)throw new B(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),H(e.h,t,n)}var oq=[[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 sq(e,t){this.id=e,this.g=t}function _k(e){if(e.g.byteLength>8)throw new B(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new B(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var r=e.g.getUint8(n);t=256*t+r}return t}function uq(e,t,n,r,i,o,u){if(t=new Mu(t),zs(t).id!=440786851)throw new B(2,3,3008);var l=zs(t);if(l.id!=408125543)throw new B(2,3,3009);t=l.g.byteOffset,l=new Mu(l.g);for(var h=null;l.La();){var p=zs(l);if(p.id==357149030){h=p;break}}if(!h)throw new B(2,3,3010);for(h=new Mu(h.g),p=1e6,l=null;h.La();){var m=zs(h);if(m.id==2807729)p=_k(m);else if(m.id==17545)if(m.g.byteLength==4)l=m.g.getFloat32(0);else if(m.g.byteLength==8)l=m.g.getFloat64(0);else throw new B(2,3,3003)}if(l==null)throw new B(2,3,3011);if(h=p/1e9,l*=h,e=zs(new Mu(e)),e.id!=475249515)throw new B(2,3,3007);return lq(e,t,h,l,n,r,i,o,u)}function lq(e,t,n,r,i,o,u,l,h){function p(){return i}var m=[];e=new Mu(e.g);for(var b=null,w=null;e.La();){var T=zs(e);if(T.id==187){var k=cq(T);k&&(T=n*k.Pm,k=t+k.om,b!=null&&m.push(new nt(b+u,T+u,p,w,k-1,o,u,l,h)),b=T,w=k)}}return b!=null&&m.push(new nt(b+u,r+u,p,w,null,o,u,l,h)),m}function cq(e){var t=new Mu(e.g);if(e=zs(t),e.id!=179)throw new B(2,3,3013);if(e=_k(e),t=zs(t),t.id!=183)throw new B(2,3,3012);t=new Mu(t.g);for(var n=0;t.La();){var r=zs(t);if(r.id==241){n=_k(r);break}}return{Pm:e,om:n}}function hP(e,t,n){if(t=Xd(e,t,"Initialization"),!t)return null;var r=e.N.gb(),i=t.attributes.sourceURL;i&&(r=zn(r,[Fn(i)],e.urlParams())),i=0;var o=null;return(t=wt(t,"range",_v))&&(i=t.start,o=t.end),n=new Ci(function(){return r},i,o,vP(e),null,null,n,e.sa.encrypted),n.codecs=e.N.codecs,n.mimeType=e.N.mimeType,e.qa&&!e.qa.Jf&&(n.g=e.qa.start+e.qa.duration),n}function dq(e,t,n){var r=Number($a(e,Yd,"presentationTimeOffset"))||0,i=$a(e,Yd,"timescale"),o=1;i&&(o=Lh(i)||1);var u=r/o||0,l=hP(e,Yd,n);fq(e,l);var h=mu(e);return{endTime:-1,timeline:-1,Zc:function(){var p=Xd(h,Yd,"RepresentationIndex"),m=h.N.gb();return p&&(p=Fn(p.attributes.sourceURL))&&(m=zn(m,[p],h.urlParams())),p=gP(h),pP(h,t,l,m,p.start,p.end,u)},timescale:o}}function pP(e,t,n,r,i,o,u){var l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z;return P(function(J){if(J.h==1)return l=e.presentationTimeline,h=!e.Ab||!e.qa.Jf,p=e.qa.start,m=e.qa.duration,b=e.N.mimeType.split("/")[1],w=t,T=null,k=[w(r,i,o,!1),b=="webm"?w(n.U(),n.startByte,n.endByte,!0):null],w=null,J.g(Promise.all(k),2);for(S=J.i,A=S[0],M=S[1]||null,_=null,R=p-u,U=p,N=m?p+m:1/0,j=e.N.gb(),V=j.length!=r.length||j.some(function(ie,le){return ie!=r[le]}),_=b=="mp4"?iq(A,i,j,n,R,U,N,V):uq(A,M,j,n,R,U,N),q=x(_),G=q.next();!G.done;G=q.next())z=G.value,z.codecs=e.N.codecs,z.mimeType=e.N.mimeType,z.bandwidth=e.bandwidth;return l.De(_),T=new Et(_),h&&T.xd(U,N,!0),J.return(T)})}function Yd(e){return e.Wd}function gP(e){var t=Xd(e,Yd,"RepresentationIndex");return e=$a(e,Yd,"indexRange"),e=_v(e||""),t&&(e=wt(t,"range",_v,e)),e}function fq(e,t){if(mP(e,t),!gP(e))throw new B(2,4,4002)}function mP(e,t){var n=e.N.mimeType.split("/")[1];if(e.N.contentType!=mt&&n!="mp4"&&n!="webm")throw new B(2,4,4006);if(n=="webm"&&!t)throw new B(2,4,4005)}function vP(e){var t=e.N;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.Vf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.sa.label||null,roles:e.roles||null,language:e.sa.language||null}}function hq(e,t,n){var r=hP(e,yP,n),i=pq(e);if(!i.ob&&!i.timeline&&i.Kd.length>1)throw new B(2,4,4002);if(!i.ob&&!e.qa.duration&&!i.timeline&&i.Kd.length==1)throw new B(2,4,4002);if(i.timeline&&i.timeline.length==0)throw new B(2,4,4002);var o=null,u=null;e.Ta.id&&e.N.id&&(u=t.get(e.Ta.id+","+e.N.id))&&(o=u.segmentIndex);var l=gq(e.qa.start,e.qa.duration,e.N.gb,i,r,n,e.N.mimeType,e.N.codecs,e.bandwidth,e.urlParams);return t=!o,o?(n=e.presentationTimeline.Fb(),o.Ld(l,n)):o=new Et(l),e.presentationTimeline.De(l),e.Ab&&e.qa.Jf||o.xd(e.qa.start,e.qa.duration?e.qa.start+e.qa.duration:1/0,t),u&&(u.segmentIndex=o),{endTime:-1,timeline:-1,Zc:function(){return o&&o.getNumReferences()!=0||o.Pf(l),Promise.resolve(o)},timescale:i.timescale}}function yP(e){return e.Cc}function pq(e){var t=mq(e);e=uP(e,yP);var n=e.Ke;n==0&&(n=1);var r=0;return e.ob?r=e.ob*(n-1):e.timeline&&e.timeline.length>0&&(r=e.timeline[0].start),{ob:e.ob,startTime:r,Ke:n,fc:e.fc,timescale:e.timescale,timeline:e.timeline,Kd:t}}function gq(e,t,n,r,i,o,u,l,h,p){var m=r.Kd.length;r.timeline&&r.timeline.length!=r.Kd.length&&(m=Math.min(r.timeline.length,r.Kd.length));for(var b=e-r.fc,w=t?e+t:1/0,T=[],k=r.startTime,S={},A=0;A<m;S={pg:void 0,eg:void 0},A++){S.eg=r.Kd[A];var M=k;k=void 0,k=r.ob!=null?M+r.ob:r.timeline?r.timeline[A].end:M+t,S.pg=null,S=new nt(e+M,e+k,(function(_){return function(){return _.pg==null&&(_.pg=zn(n(),[_.eg.Xl],p())),_.pg}})(S),S.eg.start,S.eg.end,i,b,e,w,[],"",null,null,Ns,o),S.codecs=l,S.mimeType=u,S.bandwidth=h,T.push(S)}return T}function mq(e){return[e.N.Cc,e.sa.Cc,e.Ta.Cc].filter(Il).map(function(t){return Rt(t,"SegmentURL")}).reduce(function(t,n){return t.length>0?t:n}).map(function(t){t.attributes.indexRange&&!e.rh&&(e.rh=!0);var n=Fn(t.attributes.media);return t=wt(t,"mediaRange",_v,{start:0,end:null}),{Xl:n,start:t.start,end:t.end}})}function bP(e,t,n,r,i,o,u,l,h,p){h||e.N.Gf||(e.N.Gf=$a(e,Pu,"initialization"));var m=e.N.Gf?wq(e,u):null,b=vq(e);yq(b);var w=mu(e);if(b.ye)return mP(e,m),{endTime:-1,timeline:-1,Zc:function(){var M=Wd(b.ye,w.N.originalId,null,null,w.bandwidth||null,null);return M=zn(w.N.gb(),[M]),pP(w,t,m,M,0,null,b.fc)},timescale:b.timescale};if(b.ob)return r||e.sa.contentType==="image"||e.sa.contentType==="text"||(r=e.qa.start,p=e.Ta.id,n=e.qa.duration,p=(p=p!=null&&o.get(p)||n)?r+p:1/0,e.presentationTimeline.Ih(b.ob),e.presentationTimeline.Fj(r,p)),{endTime:-1,timeline:-1,Zc:function(){return bq(w,b,i,m,o,u,l,e.N.fg)},timescale:b.timescale};var T=null;r=r=null,e.Ta.id&&e.N.id&&(r=e.Ta.id+","+e.N.id,r=n.get(r))&&(T=r.segmentIndex);var k=e.qa.start,S=e.qa.duration?k+e.qa.duration:1/0;if(T)p=T,wP(p,b,k,S,m,e.Ab),n=e.presentationTimeline.Fb(),p.Za(n);else{if(n=0,h=-1,e.Ta.id!=null&&e.N.id!=null){var A=p.get(e.Ta.id);if(A)h=A.timeline;else for(p=x(p.values()),A=p.next();!A.done;A=p.next())if(A=A.value,Math.abs(b.fc-A.endTime)<=a5&&A.Yh.includes(e.N.id)){h=A.timeline;break}else A.timeline>=n&&(n=A.timeline+1)}h==-1&&(h=n),T=new Bp(e.Ab,b,e.N.originalId,e.bandwidth,e.N.gb,e.urlParams,k,S,m,u,e.N.fg,h)}return b.timeline&&e.sa.contentType!=="image"&&e.sa.contentType!=="text"&&e.presentationTimeline.Gj(T.h?T.h.timeline:[],k),r&&e.Ab&&(r.segmentIndex=T),r=(r=(r=b.timeline)&&r[r.length-1])?r.end+b.fc:-1,p=-1,T instanceof Bp&&(p=T.pf()),{endTime:r,timeline:p,Zc:function(){return T instanceof Bp&&T.getNumReferences()==0&&wP(T,b,k,S,m,e.Ab),Promise.resolve(T)},timescale:b.timescale}}function Pu(e){return e.Wc}function vq(e){var t=uP(e,Pu),n=$a(e,Pu,"media"),r=$a(e,Pu,"index"),i=$a(e,Pu,"k"),o=0;return i&&(o=parseInt(i,10)),{mg:t.mg,ob:t.ob,timescale:t.timescale,Ke:t.Ke,fc:t.fc,md:t.md,timeline:t.timeline,ac:n&&Fn(n),ye:r,mimeType:e.N.mimeType,codecs:e.N.codecs,bandwidth:e.bandwidth,am:o}}function yq(e){var t=e.ye?1:0;if(t+=e.timeline?1:0,t+=e.ob?1:0,t==0)throw new B(2,4,4002);if(t!=1&&(e.ye&&(e.timeline=null),e.mg=null,e.ob=null),!e.ye&&!e.ac)throw new B(2,4,4002)}function bq(e,t,n,r,i,o,u,l){function h(J){var ie=J-A,le=ie*S,be=t.mg,ce=ie*be;"BigInt"in d&&ce>Number.MAX_SAFE_INTEGER&&(ce=BigInt(ie)*BigInt(be)),le+=w,ie=le+S,be=Math.min(ie,m());var ae=[],de=t.am;if(de)for(var re=(be-le)/de,pe={},Re=0;Re<de;pe={fk:void 0},Re++){var W=le+re*Re,Se=W+re;pe.fk=Re,pe=new nt(W,Se,(function(Ee){return function(){var Xe=Wd(M,R,J,Ee.fk,_,ce);return zn(U(),[Xe],N())}})(pe),0,null,r,j,w,m(),[],"",null,null,Ns,o),pe.codecs=e.N.codecs,pe.mimeType=e.N.mimeType,l==0?Re>0&&pe.Id():Re%l!=0&&pe.Id(),ae.push(pe)}return le=new nt(le,be,function(){if(de)return[];var Ee=Wd(M,R,J,null,_,ce);return zn(U(),[Ee],N())},0,null,r,j,w,m(),ae,"",null,null,Ns,o,ae.length>0),le.codecs=e.N.codecs,le.mimeType=e.N.mimeType,le.bandwidth=e.bandwidth,le.j=ie,le}function p(){var J=[Math.max(b.Fb(),w),Math.min(b.Qc(),m())].map(function(ie){return ie-w});return J=[Math.ceil(J[0]/S),Math.ceil(J[1]/S)-1],e.N.xb&&J[1]++,J.map(function(ie){return ie+A})}function m(){var J=T!=null&&i.get(T)||k;return J?w+J:1/0}var b=e.presentationTimeline,w=e.qa.start,T=e.Ta.id,k=e.qa.duration,S=t.ob,A=t.Ke,M=t.ac,_=e.bandwidth||null,R=e.N.originalId,U=e.N.gb,N=e.urlParams,j=w-t.fc,V=p();n=e.Ab?Math.max(V[0],V[1]-n+1):V[0],u=u||V[1];var q=new Dk(n,u,A,w,S,h);V=b.Qc()<m();var G=b.isLive();if(V||G){var z=Math.max(n,u+1);n=S,e.N.xb&&(n=.1),q.og(n,function(){var J=b.Fb();q.Za(J);var ie=x(p());ie.next(),ie=ie.next().value;for(var le=[];z<=ie;){var be=h(z);le.push(be),z++}return J>m()&&!le.length?null:le})}return Promise.resolve(q)}function wq(e,t){var n=e.N.Gf;if(n||(n=$a(e,Pu,"initialization")),!n)return null;n=Fn(n);var r=e.N.originalId,i=e.bandwidth||null,o=e.N.gb,u=e.urlParams;return t=new Ci(function(){var l=Wd(n,r,null,null,i,null);return zn(o(),[l],u())},0,null,vP(e),null,null,t,e.sa.encrypted),t.codecs=e.N.codecs,t.mimeType=e.N.mimeType,e.qa&&!e.qa.Jf&&(t.g=e.qa.start+e.qa.duration),t}function Dk(e,t,n,r,i,o){Et.call(this,Array(Math.max(0,t-e+1))),this.h=e,this.u=n,this.j=r,this.l=i,this.B=o}K(Dk,Et),g=Dk.prototype,g.find=function(e){var t=this.g.length-1;if(t<0)return null;var n=this.get(this.i);if(!n)return null;if(e<n.startTime)return this.i;if(n=Math.floor((e-this.j)/this.l)+this.u-this.h,n<this.i)return null;var r=this.get(n);return r?(t=(t=n-this.i<t?this.get(n+1):null)?t.startTime:r.endTime,e>=r.startTime&&e<t?n:null):null},g.get=function(e){var t=e-this.i;if(t<0||t>=this.g.length)return null;var n=this.g[t];return n||(n=this.B(this.h+e),this.g[t]=n),n},g.Ib=function(){return this.get(this.i)},g.Jb=function(e){for(var t=0;t<this.g.length;t++){var n=this.get(t+this.i);n&&e(n)}},g.Za=function(e){if(!this.o){var t=this.g.length-1;if(!(t<0)){var n=this.get(this.i);!n||n.endTime>e||(e=(t=this.get(this.i+t))&&t.endTime<=e?this.g.length:Math.max(0,Math.min(this.g.length,Math.floor((e-this.j)/this.l+this.u-1)-(this.h+this.i)+1)),e>0&&(this.i+=e,this.g=this.g.slice(e)))}}};function Bp(e,t,n,r,i,o,u,l,h,p,m,b){Et.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=r,this.F=i,this.J=o,this.j=u,this.l=l,this.u=h,this.B=p,this.I=m,this.K=b,Lk(this)}K(Bp,Et),g=Bp.prototype,g.getNumReferences=function(){return this.h?this.h.timeline.length:0},g.release=function(){Et.prototype.release.call(this),this.h=null},g.Za=function(e){if(this.h){var t=this.h.timeline;if(t){for(var n=0;n<t.length&&t[n].end+this.j<=e;)n++;n>0&&(this.h.timeline=t.slice(n),this.g.length>=n&&(this.g=this.g.slice(n)),this.i+=n,this.getNumReferences()===0&&this.release())}}};function wP(e,t,n,r,i,o){if(xq(e,i),e.D=o,e.h){if(e.h.md!==t.md)for(n=t.md-e.h.md,i=0;i<t.timeline.length;i++)o=t.timeline[i],o.ng+=n,o.Bi+=n,o.start=(o.ng+n)/t.timescale,o.end=(o.Bi+n)/t.timescale;if(e.h.ac!==t.ac&&(e.h.ac=t.ac),n=e.h.timeline,n.length){var u=n[n.length-1];t=t.timeline.filter(function(l){return l.end>u.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,se(t)),e.l!==r&&(e.l=r)}else e.h=t,e.j=n,e.l=r;Lk(e)}function xq(e,t){if(e.u!==t){e.u=t,e=x(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&VI(n,t)}}function Lk(e){if(e.h&&!e.o){for(var t=[],n=x(e.h.timeline),r=n.next();!r.done;r=n.next())r=r.value,r.start>=e.l||r.end<=0||t.push(r);e.h.timeline=t,e.Za(e.j)}}g.find=function(e){var t=this;if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var n=this.h.timeline;if(e<this.j||e>=this.l)return null;var r=n.length-1,i=ve(n,function(l){return l.start+t.j<=e})-1;if(i<0)return null;var o=n[i],u=o.start+this.j;return n=i<r?n[i+1].start+this.j:this.l===1/0?o.end+this.j:this.l,e>=u&&e<n?i+this.i:null},g.get=function(e){var t=this;if(e-=this.i,e<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){n=this.h.timeline[e];var r=n.xm,i=n.ng+this.h.md,o=this.j-this.h.fc,u=this.j+n.end,l=u;e===this.getNumReferences()-1&&this.l!==1/0&&(l=this.D&&Math.abs(l-this.l)>.1?Math.min(l,this.l):this.l);var h=this.h.codecs,p=this.h.mimeType,m=this.h.bandwidth,b=[],w=!1;if(n.dc&&this.h&&this.h.ac&&(w=this.h.ac.includes("$SubNumber$")),w){w=(n.end-n.start)/n.dc;for(var T={},k=0;k<n.dc;T={qg:void 0,gk:void 0},k++){var S=n.start+w*k,A=S+w;T.gk=k,T.qg=null,T=new nt(this.j+S,this.j+A,(function(M){return function(){if(!t.h)return[];if(M.qg==null){var _=t.F,R=t.J,U=Wd(t.h.ac,t.H,r,M.gk,t.C||null,i);_=zn(_(),[U],R()),M.qg=_}return M.qg}})(T),0,null,this.u,o,this.j,this.l,[],"",null,null,Ns,this.B),T.codecs=h,T.mimeType=p,T.bandwidth=m,this.I==0?k>0&&T.Id():k%this.I!=0&&T.Id(),b.push(T)}}n=new nt(this.j+n.start,l,function(){if(b.length>0||!t.h)var M=[];else{M=t.F;var _=t.J,R=Wd(t.h.ac,t.H,r,null,t.C||null,i);M=zn(M(),[R],_())}return M},0,null,this.u,o,this.j,this.l,b,"",null,null,Ns,this.B,b.length>0),n.codecs=h,n.mimeType=p,n.j=u,n.bandwidth=m,this.g[e]=n}return n},g.Jb=function(e){Lk(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},g.pf=function(){return this.K};function Jd(e){this.o=null,this.B=e,this.H=new fd,this.i=[],this.h=null,this.m=[],this.C=null,this.F=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}Jd.prototype.configure=function(e){this.o=e},Jd.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.H.destroy()},Jd.prototype.setManifestType=function(e){this.u=e};function Vp(e,t){var n,r,i,o,u,l,h;return P(function(p){if(p.h==1)return n=zn(e.i,[kq(e,t)]),r=yn(n,e.o.retryParameters),i=e.B.networkingEngine.request(8,r),wu(e.H,i),p.m(2),p.g(i.promise,4);if(p.h!=2)return o=p.i,u=dt(o.data),l=JSON.parse(u),l.VERSION==1&&Tq(e,l,o.uri),p.o(0);if((h=p.l())&&h.code==7001)return p.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new ft(function(){Vp(e,t)}),e.g.$(e.D),p.j()})}function kq(e,t){if(!e.m.length)return t;var n=new Map,r=e.C||e.m[0],i=Math.round(e.B.getBandwidthEstimate());return e.u=="DASH"?(n.set("_DASH_pathway",r),n.set("_DASH_throughput",String(i))):e.u=="HLS"&&(n.set("_HLS_pathway",r),n.set("_HLS_throughput",String(i))),kw(t,n)}function Tq(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new ft(function(){Vp(e,r)}),(n=t.TTL)&&(e.D=n),e.g.$(e.D),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function Qd(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}Jd.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function $p(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var r=[],i=x(e.m),o=i.next(),u={};!o.done;u={Pd:void 0},o=i.next())if(u.Pd=o.value,o=t.get(u.Pd))r.push({Nh:u.Pd,location:o});else if(o=e.F.find((function(h){return function(p){return p.hn==h.Pd}})(u))){var l=t.get(o["BASE-ID"]);l&&(o["URI-REPLACEMENT"].Ak?(o=gF(l,o["URI-REPLACEMENT"].Ak),r.push({Nh:u.Pd,location:o})):r.push({Nh:u.Pd,location:l}))}for(i=Date.now(),u=x(e.j.keys()),o=u.next();!o.done;o=u.next())o=o.value,l=e.j.get(o),i>l&&e.j.delete(o);if(r=r.filter(function(h){h=Xh(h.location);for(var p=x(e.j.keys()),m=p.next();!m.done;m=p.next())if(m.value.includes(h))return!1;return!0}),r.length&&(e.C=r[0].Nh),r=r.map(function(h){return h.location}),!r.length&&e.h)for(i=x(e.h.split(",")),u=i.next();!u.done;u=i.next())(u=t.get(u.value))&&(e.C=e.h,r.push(u));if(!r.length)for(t=x(t.values()),i=t.next();!i.done;i=t.next())r.push(i.value);return n?r:zn(e.i,r)}function ii(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.o=!1,this.m=new Set,this.u=new Map().set("audio",this.h).set("video",this.g).set(mt,this.j).set("image",this.i)}g=ii.prototype,g.release=function(){for(var e=x(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.o=!1,this.m.clear(),this.u.clear()},g.Fl=function(){return this.l},g.qh=function(){return this.j.slice()},g.kl=function(){return this.i},g.Wi=function(e,t){if(e){var n=this.u.get(e.type)||[];n=x(n);for(var r=n.next();!r.done;r=n.next()){r=r.value,xP(r,e),r=LP(r),r=x(r);for(var i=r.next();!i.done;i=r.next())xP(i.value,e)}e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function xP(e,t){var n;e.matchedStreams=(n=e.matchedStreams)==null?void 0:n.filter(function(r){return r!==t})}function yy(e,t){return new Map(e.map(function(n){return[t(n),n]}))}function kP(e,t){var n=[],r=[],i=[],o=[];e=x(e);for(var u=e.next();!u.done;u=e.next()){var l=u.value;u=yy(l.audioStreams,Uk);var h=yy(l.videoStreams,jk),p=yy(l.textStreams,Gp);if(l=yy(l.imageStreams,Kp),t){var m=MP(mt);p.set(Gp(m),m),m=MP("image"),l.set(Kp(m),m)}n.push(u),r.push(h),i.push(p),o.push(l)}return{Mi:n,wk:r,kk:i,oj:o}}g.Mg=function(e,t,n){n=n===void 0?!1:n;var r=this,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe;return P(function(Re){if(Re.h==1){if(i=Ln,!t&&e.length==1)return o=kP(e,!1),u=o.Mi,l=o.wk,h=o.kk,p=o.oj,r.h=Array.from(u[0].values()),r.g=Array.from(l[0].values()),r.j=Array.from(h[0].values()),r.i=Array.from(p[0].values()),Re.A(2);for(m=n?r.m.size:0,b=-1,w=0;w<e.length;w++)T=e[w],r.m.has(T.id)||(r.m.add(T.id),b==-1&&(b=w));return b==-1?Re.return():(k=kP(e,!0),S=k.Mi,A=k.wk,M=k.kk,_=k.oj,Re.g(Promise.all([zp(r,r.h,S,b,Hp,Zd,m),zp(r,r.g,A,b,Hp,Zd,m),zp(r,r.j,M,b,Hp,Zd,m),zp(r,r.i,_,b,Hp,Zd,m)]),2))}if(R=0,U=[],r.g.length&&r.h.length)for(J=x(r.h),ie=J.next();!ie.done;ie=J.next())for(le=ie.value,be=x(r.g),ce=be.next();!ce.done;ce=be.next())ae=ce.value,de=td(le.drmInfos,ae.drmInfos),le.drmInfos.length&&ae.drmInfos.length&&!de.length||(re=(le.bandwidth||0)+(ae.bandwidth||0),le.dependencyStream&&(re+=le.dependencyStream.bandwidth||0),ae.dependencyStream&&(re+=ae.dependencyStream.bandwidth||0),pe=R++,U.push({id:pe,language:le.language,disabledUntilTime:0,primary:le.primary,audio:le,video:ae,bandwidth:re,drmInfos:de,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(N=r.g.length?r.g:r.h,j=x(N),V=j.next();!V.done;V=j.next())q=V.value,G=R++,z=q.bandwidth||0,q.dependencyStream&&(z+=q.dependencyStream.bandwidth||0),U.push({id:G,language:q.language,disabledUntilTime:0,primary:q.primary,audio:q.type==i.aa?q:null,video:q.type==i.Ba?q:null,bandwidth:z,drmInfos:q.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});r.l=U,Re.j()})};function TP(e){var t,n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae;return P(function(de){if(de.h==1){if(t=Ln,e.length==1)return de.return(e[0]);for(n=e.map(function(re){return new Map(re.filter(function(pe){return pe.type===t.aa}).map(function(pe){return[Uk(pe),pe]}))}),r=e.map(function(re){return new Map(re.filter(function(pe){return pe.type===t.Ba}).map(function(pe){return[jk(pe),pe]}))}),i=e.map(function(re){return new Map(re.filter(function(pe){return pe.type===t.Xa}).map(function(pe){return[Gp(pe),pe]}))}),o=e.map(function(re){return new Map(re.filter(function(pe){return pe.type===t.wg}).map(function(pe){return[Kp(pe),pe]}))}),u=x(i),l=u.next();!l.done;l=u.next())h=l.value,p=IP(t.Xa),h.set(Gp(p),p);for(m=x(o),b=m.next();!b.done;b=m.next())w=b.value,T=IP(t.wg),w.set(Kp(T),T);return k=new ii,S=x,de.g(Promise.all([n,r,i,o].map(function(re){return zp(k,[],re,0,Aq,Iq,0)})),2)}if(A=S(de.i),M=A.next().value,_=A.next().value,R=A.next().value,U=A.next().value,N=0,_.length&&M.length)for(z=x(M),J=z.next();!J.done;J=z.next())for(ie=J.value,le=x(_),be=le.next();!be.done;be=le.next())ce=be.value,ae=N++,ce.variantIds.push(ae),ie.variantIds.push(ae);else for(j=_.concat(M),V=x(j),q=V.next();!q.done;q=V.next())G=q.value,G.variantIds=[N++];return de.return(_.concat(M).concat(R).concat(U))})}function zp(e,t,n,r,i,o,u){var l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G;return P(function(z){switch(z.h){case 1:for(l=[],h=0;h<n.length;h++)h>=r?l.push(new Set(n[h].values())):l.push(new Set);p=x(t),m=p.next();case 2:if(m.done){z.A(4);break}return b=m.value,z.g(Sq(e,b,n,r,o,l,u),5);case 5:if(w=z.i,!w)throw new B(2,4,4037);m=p.next(),z.A(2);break;case 4:for(T=x(l),k=T.next();!k.done;k=T.next())for(S=k.value,A=x(S),M=A.next();!M.done;M=A.next())_=M.value,(R=Cq(e,t,_,n,i,o,l))&&t.push(R);for(U=x(l),N=U.next();!N.done;N=U.next())for(j=N.value,V=x(j),q=V.next(),G={};!q.done;G={ni:void 0},q=V.next())if(G.ni=q.value,!Ok(G.ni)&&t.some((function(J){return function(ie){return Nk(J.ni,ie)}})(G)))throw new B(2,4,4037);return z.return(t)}})}function Sq(e,t,n,r,i,o,u){return P(function(l){return l.h==1?(AP(e,n,t,u>0),t.matchedStreams?t.segmentIndex?l.g(SP(t,r+u),2):l.A(2):l.return(!1)):(CP(t,r,i,o,u),l.return(!0))})}function SP(e,t){var n,r,i,o,u,l,h,p,m,b;return P(function(w){if(w.h==1){for(n=[],r=e.matchedStreams,i=t;i<r.length;i++)for(o=r[i],n.push(o.createSegmentIndex()),u=LP(o),l=x(u),h=l.next();!h.done;h=l.next())p=h.value,p.segmentIndex||n.push(p.createSegmentIndex());return w.g(Promise.all(n),2)}if(e.segmentIndex instanceof bn)for(m=t;m<r.length;m++)b=r[m],b.segmentIndex&&e.segmentIndex.h.push(b.segmentIndex);w.j()})}function Cq(e,t,n,r,i,o,u){if(Ok(n))return null;var l=i(n);return AP(e,r,l),l.createSegmentIndex&&(l.createSegmentIndex=function(){return P(function(h){return l.segmentIndex?h.A(0):(l.segmentIndex=new bn,h.g(SP(l,0),0))})},l.closeSegmentIndex=function(){if(l.segmentIndex&&(l.segmentIndex.release(),l.segmentIndex=null),l.matchedStreams)for(var h=x(l.matchedStreams),p=h.next();!p.done;p=h.next()){p=p.value;var m;if(m=p.segmentIndex){e:{m=x(t);for(var b=m.next();!b.done;b=m.next())if(b=b.value,b!==l&&b.segmentIndex&&b.matchedStreams&&b.matchedStreams.includes(p)){m=!0;break e}m=!1}m=!m}m&&(p.segmentIndex.release(),p.segmentIndex=null)}}),!l.matchedStreams||!l.matchedStreams.length?null:(CP(l,0,o,u,0),l)}function CP(e,t,n,r,i){var o=e.matchedStreams;for(t+=i;t<o.length;t++){var u=o[t];n(e,u);var l=!0;if(e.type=="audio"&&xl(e.language,u.language)==0&&(l=!1),l&&((l=r[t-i])&&l.delete(u),u.fullMimeTypes))for(u=x(u.fullMimeTypes.values()),l=u.next();!l.done;l=u.next())e.fullMimeTypes.add(l.value)}}function Hp(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function Aq(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function Rk(e,t){e||(e=[]),t=x(t);for(var n=t.next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}function Zd(e,t){e.roles=Rk(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Rk(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var n=x(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.originalId==null?e.originalId=t.originalId:(n=t.originalId||"")&&!e.originalId.endsWith(n)&&(e.originalId+=","+n),n=td(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!n.length)throw new B(2,4,4038);if(e.drmInfos=n,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=x(t.closedCaptions),r=n.next();!r.done;r=n.next()){var i=x(r.value);r=i.next().value,i=i.next().value,e.closedCaptions.set(r,i)}for(e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),n=x(RP),r=n.next();!r.done;r=n.next())Eq(e,t,r.value)}function Eq(e,t,n){var r=t[n]||null,i=e[n]||null;r?(i||(i=Hp(r),i.matchedStreams=[],i.createSegmentIndex=function(){var o,u,l,h;return P(function(p){switch(p.h){case 1:if(i.segmentIndex)return p.return();o=new bn,u=x(i.matchedStreams),l=u.next();case 2:if(l.done){p.A(4);break}if(h=l.value,h.segmentIndex){p.A(5);break}return p.g(h.createSegmentIndex(),5);case 5:o.h.push(h.segmentIndex),l=u.next(),p.A(2);break;case 4:i.segmentIndex=o,p.j()}})},e[n]=i),i.matchedStreams.push(r),Zd(i,r)):i&&(i.matchedStreams.push(t),Zd(i,t))}function Iq(e,t){e.roles=Rk(e.roles,t.roles);for(var n=x(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,se(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=x(t.closedCaptions),n=t.next();!n.done;n=t.next())r=x(n.value),n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}function AP(e,t,n,r){r=r!==void 0&&r?n.matchedStreams:[],t=x(t);for(var i=t.next();!i.done;i=t.next()){if(i=Mq(e,i.value,n),!i)return;r.push(i)}n.matchedStreams=r}function Mq(e,t,n){var r={audio:Uk,video:jk,text:Gp,image:Kp}[n.type],i=null,o=r(n);if(t.has(o))i=t.get(o);else{o={audio:function(p,m){return Nk(p,m)},video:function(p,m){return Nk(p,m)},text:Pq,image:_q}[n.type];for(var u={audio:Dq,video:Lq,text:Rq,image:Nq}[n.type],l=x(t.values()),h=l.next();!h.done;h=l.next())h=h.value,!o(n,h)||n.fastSwitching!=h.fastSwitching||i&&!u(n,i,h)||(i=h)}return e.o&&!Ok(i)&&t.delete(r(i)),i}function EP(e,t){return e.mimeType!=t.mimeType?!1:DP(e.codecs)===DP(t.codecs)}g.$j=function(e){this.o=e};function Nk(e,t){return!(e.drmInfos&&!ed(e.drmInfos,t.drmInfos))}function Pq(e,t){return t.language?!(e.forced!==t.forced||xl(e.language,t.language)==0||t.kind!=e.kind):!0}function _q(){return!0}function Dq(e,t,n){var r=PP(e,t,n);if(r===Ii)return!0;if(r===pa)return!1;r=xl(e.language,t.language);var i=xl(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(r=qp(e.channelsCount,t.channelsCount,n.channelsCount),r==Ii?!0:r==pa?!1:(r=qp(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),r==Ii?!0:r==pa?!1:!!(e.bandwidth&&_P(e.bandwidth,t.bandwidth,n.bandwidth)==Ii)))}function Lq(e,t,n){var r=PP(e,t,n);if(r===Ii)return!0;if(r===pa)return!1;if(r=qp(e.width*e.height,t.width*t.height,n.width*n.height),r==Ii)return!0;if(r==pa)return!1;if(e.frameRate){if(r=qp(e.frameRate,t.frameRate,n.frameRate),r==Ii)return!0;if(r==pa)return!1}return!!(e.bandwidth&&_P(e.bandwidth,t.bandwidth,n.bandwidth)==Ii)}function Rq(e,t,n){var r=xl(e.language,t.language),i=xl(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function Nq(e,t,n){return qp(e.width*e.height,t.width*t.height,n.width*n.height)==Ii}function IP(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",supplementalCodecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1}}function MP(e){return _s({originalId:"",segmentIndex:new Et([]),type:e})}function qp(e,t,n){if(t==e&&e!=n)return pa;if(n==e&&e!=t)return Ii;if(t>e){if(n<=e||n-e<t-e)return Ii;if(n-e>t-e)return pa}else{if(n>e)return pa;if(e-n<e-t)return Ii;if(e-n>e-t)return pa}return Fk}function PP(e,t,n){var r=e.mimeType===t.mimeType&&e.codecs===t.codecs,i=e.mimeType===n.mimeType&&e.codecs===n.codecs;return r&&!i?pa:!r&&i?Ii:(t=EP(e,t),e=EP(e,n),t&&!e?pa:!t&&e?Ii:Fk)}function _P(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?Ii:t<e?pa:Fk}function Ok(e){switch(e.type){case mt:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function jk(e){var t,n;return by([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,(n=(t=e.dependencyStream)==null?void 0:t.baseOriginalId)!=null?n:e.baseOriginalId,Array.from(e.keyIds)])}function Uk(e){var t,n;return by([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,(n=(t=e.dependencyStream)==null?void 0:t.baseOriginalId)!=null?n:e.baseOriginalId,Array.from(e.keyIds)])}function Gp(e){return by([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Kp(e){return by([e.width,e.codecs,e.mimeType])}function by(e){return JSON.stringify(e)}function DP(e){return Oq.getOrInsertComputed(e,function(){return Ar(e)})}function LP(e){for(var t=[],n=x(RP),r=n.next();!r.done;r=n.next())(r=e[r.value])&&t.push(r);return t}Te("shaka.util.PeriodCombiner",ii),ii.prototype.setUseStreamOnce=ii.prototype.$j,ii.prototype.combinePeriods=ii.prototype.Mg,ii.prototype.deleteStream=ii.prototype.Wi,ii.prototype.getImageStreams=ii.prototype.kl,ii.prototype.getTextStreams=ii.prototype.qh,ii.prototype.getVariants=ii.prototype.Fl;var RP=["trickModeVideo","dependencyStream"],Ii=1,Fk=0,pa=-1,Oq=new Map;function Wp(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Ha=1,this.H=[],this.l={Rf:"",type:"",profiles:[],wc:null,xb:0,gb:null,Ge:0},this.u=new Map,this.C=new Map,this.F=new Map,this.o=new Map,this.O=new Map,this.Aa=new Map,this.m=new ii,this.R=0,this.Fa=new At(5),this.L=new ft(function(){if(e.J&&!e.g.continueLoadingWhenPaused&&(e.I.Ua(e.J,"timeupdate"),e.J.paused)){e.I.oa(e.J,"timeupdate",function(){return $P(e)});return}$P(e)}),this.K=new fd,this.P=null,this.D=[],this.ba=1/0,this.ra=!1,this.i=null,this.M=0,this.V=!1,this.I=new he,this.J=null,this.W=!1,this.xa="",this.za=this.Pa=null,this.ma=function(){return!1},this.Y=[],this.ha=new Set,this.wa=new oP}g=Wp.prototype,g.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.ma=t),n&&this.h&&this.h.presentationTimeline.isLive()&&this.L.Va(),this.i&&this.i.configure(this.g),this.m&&this.m.$j(this.g.dash.useStreamOnceInPeriodFlattening)},g.start=function(e,t){var n=this,r;return P(function(i){if(i.h==1)return n.ra=t.isLowLatencyMode(),n.B=[e],n.j=t,i.g(Bk(n),2);if(r=i.i,n.j&&Vk(n,r),!n.j)throw new B(2,7,7001);return i.return(n.h)})},g.stop=function(){for(var e=x(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.h=null,this.o.clear(),this.O.clear(),this.u.clear(),this.C.clear(),this.F.clear(),this.l={Rf:"",type:"",profiles:[],wc:null,xb:0,gb:null,Ge:0},this.m=null,this.L!=null&&(this.L.stop(),this.L=null),this.i&&this.i.destroy(),this.I&&(this.I.release(),this.I=null),this.ha.clear(),this.wa.release(),this.K.destroy()},g.update=function(){var e=this,t;return P(function(n){if(n.h==1)return n.m(2),n.g(Bk(e),4);if(n.h!=2)return n.o(0);if(t=n.l(),!e.j||!t)return n.return();e.j.onError(t),n.j()})},g.onExpirationUpdated=function(){},g.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.isLive()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Qc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.R=t.endTime-e,Vk(this,0))}}},g.banLocation=function(e){this.i&&this.i.banLocation(e)},g.setMediaElement=function(e){this.J=e};function Bk(e){var t,n,r,i,o,u,l,h,p,m,b;return P(function(w){return w.h==1?(t=4,n="MPD",r=nG(e),i=e.B,r.length?(i=r.map(function(T){return pd(T,e.Pa)}),n="Patch",t=6):(e.B.length>1&&e.i&&(o=$p(e.i,"Location",!0),o.length&&(i=o)),e.za&&(i=i.map(function(T){return pd(T,e.za)}))),u=yn(i,e.g.retryParameters),l=Date.now(),w.g(zk(e,u,0,{type:t}),2)):w.h!=3?(h=w.i,e.j?(h.uri&&h.uri!=h.originalUri&&!e.B.includes(h.uri)&&e.B.unshift(h.uri),p=new URL(h.uri),e.xa=p.searchParams.toString(),w.g(jq(e,h.data,h.uri,n),3)):w.return(0)):(m=Date.now(),b=(m-l)/1e3,e.Fa.sample(1,b),e.ha.clear(),w.return(b))})}function jq(e,t,n,r){return t=Dh(t,r),Uq(e,t,n,r)}function Uq(e,t,n,r){var i,o,u,l,h,p,m;return P(function(b){switch(b.h){case 1:if(!t)throw new B(2,4,4001,n);if(i=e.g.dash.manifestPreprocessorTXml,o=iM,i!=o&&i(t),r==="Patch")return b.return(Fq(e,t));u=t;e:{for(var w=x(Rt(u,"Period")),T=w.next();!T.done;T=w.next())if(Yt(T.value,"ImportedMPD")){w=!0;break e}w=!1}if(!w){b.A(2);break}return l=ZH(u,n,e.g.retryParameters,e.j.networkingEngine),wu(e.K,l),b.g(l.promise,3);case 3:u=b.i;case 2:e:{if(u.attributes["xmlns:xlink"]==="http://www.w3.org/1999/xlink"){w=new Set(["Period","AdaptationSet","SegmentList"]),T=new Set(["MPD","Period","AdaptationSet","Representation","SegmentList"]);for(var k=[u];k.length;){var S=k.pop();if(w.has(S.tagName)&&ko(S,"http://www.w3.org/1999/xlink","href")){w=!0;break e}S=x(Sl(S));for(var A=S.next();!A.done;A=S.next())A=A.value,T.has(A.tagName)&&k.push(A)}}w=!1}return w?(h=e.g.dash.xlinkFailGracefully,p=my(u,e.g.retryParameters,h,n,e.j.networkingEngine),wu(e.K,p),b.g(p.promise,4)):b.return(NP(e,u,n));case 4:return m=b.i,b.return(NP(e,m,n))}})}function NP(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W,Se,Ee,Xe,vt,wn,bt,cn,Nt,ya,si,Wa,Xa,ui,Yi,Sn,Ya,pg,ec,tc,Pi,li,nc,Gs,Ja,sf,uf,Yy,gg,mg,Jy;return P(function(Qa){switch(Qa.h){case 1:for(e.i&&e.i.l.clear(),$q(t),r=[n],i=[],o=new Map,u=Rt(t,"Location"),l=x(u),h=l.next();!h.done;h=l.next())p=h.value,m=p.attributes.serviceLocation,(b=Cr(p))&&(w=zn(r,[b])[0],m&&(e.i?Qd(e.i,"Location",m,w):o.set(m,w)),i.push(w));if(e.i?(T=$p(e.i,"Location",!0),T.length>0&&(r=e.B=T)):i.length&&(r=e.B=i),e.l.Rf=t.attributes.id||"",e.l.Ge=wt(t,"publishTime",Xo)||0,e.H=Rt(t,"PatchLocation"),e.Pa=Hs(e,t,"mpdpatch")||null,e.za=Hs(e,t,"mpd")||null,k=Promise.resolve(),(S=Yt(t,"ContentSteering"))&&e.j)for(A=S.attributes.defaultServiceLocation,e.i?(e.i.i=r,e.i.h=A):(e.i=new Jd(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=r,e.i.h=A,(M=Cr(S))&&(M=pd(M,Hs(e,t,"steering")),wt(S,"queryBeforeStart",p5,!1)?k=Vp(e.i,M):Vp(e.i,M))),_=x(o.keys()),R=_.next();!R.done;R=_.next())U=R.value,N=o.get(U),Qd(e.i,"Location",U,N);if(j=Rt(t,"BaseURL"),V=!1,e.i)for(q=x(j),G=q.next();!G.done;G=q.next())z=G.value,J=z.attributes.serviceLocation,ie=Cr(z),J&&ie&&(Qd(e.i,"BaseURL",J,ie),V=!0);if(e.Y.splice(0),V&&e.i||(le=j.map(Cr),e.Y.push.apply(e.Y,se(zn(r,le)))),be=e.i,ce=e.Y,ae=rG,de=ae.call(Wp,be,V,ce),e.l.gb=de,re=0,j&&j.length&&(re=wt(j[0],"availabilityTimeOffset",Rh)||0),e.l.xb=re,e.R=wt(t,"minimumUpdatePeriod",Gi,-1),pe=wt(t,"availabilityStartTime",Xo),Re=wt(t,"timeShiftBufferDepth",Gi),W=e.g.dash.ignoreSuggestedPresentationDelay,Se=null,W||(Se=wt(t,"suggestedPresentationDelay",Gi)),Ee=e.g.dash.ignoreMaxSegmentDuration,Xe=null,Ee||(Xe=wt(t,"maxSegmentDuration",Gi)),vt=t.attributes.type||"static",wn=vt=="static"||vt=="list",e.h&&e.h.presentationTimeline&&(e.W=e.h.presentationTimeline.isLive()&&wn),e.l.type=vt,e.h)for(bt=e.h.presentationTimeline,cn=bt.Fb(),Nt=x(e.o.values()),ya=Nt.next();!ya.done;ya=Nt.next())si=ya.value,si.segmentIndex&&si.segmentIndex.Za(cn);else Wa=e.g.dash.ignoreMinBufferTime,Xa=0,Wa||(Xa=wt(t,"minBufferTime",Gi)||0),ui=0,ui=Se!=null?Math.min(Se,Re||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(Xa*1.5,Re||1/0),bt=new Ze(pe,ui,e.g.dash.autoCorrectDrift);return bt.Yd(wn),bt.isLive()&&!isNaN(e.g.availabilityWindowOverride)&&(Re=e.g.availabilityWindowOverride),Re==null&&(Re=1/0),bt.li(Re),Yi=t.attributes.profiles||"",e.l.profiles=Yi.split(","),Sn={Ab:!wn,presentationTimeline:bt,Ta:null,qa:null,sa:null,N:null,bandwidth:0,rh:!1,xb:re,wc:null,profiles:Yi.split(","),roles:null,urlParams:GP,name:""},Qa.g(k,2);case 2:return Ya=vy(t),pg=Fp(t),ec=function(lf){return Yp.has(lf.schemeIdUri)},(tc=Ya.find(ec)||pg.find(ec))&&(Pi=Xp(e,tc.element))&&(Sn.urlParams=Pi),(li=Hs(e,t,"segment"))&&(Sn.urlParams=li),e.M=0,nc=FP(e,Sn,de,t,!1),Gs=nc.duration,Ja=nc.periods,(wn&&!e.W||!nc.Yi)&&bt.Sb(Gs||1/0),e.V&&e.ra&&bt.Vj(e.ba),bt.Ih(Xe||1),e.V&&e.ra&&(sf=Se??e.g.defaultPresentationDelay,bt.ji(sf)),e.h?(e.h.periodCount=Ja.length,e.h.gapCount=e.M,Qa.g(OP(e,Ja,!1),4)):Qa.g(e.m.Mg(Ja,Sn.Ab),6);case 6:if(e.h={presentationTimeline:bt,variants:e.m.l,textStreams:e.m.qh(),imageStreams:e.m.i,chapterStreams:[],offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Vq(t),nextUrl:zq(e,t),periodCount:Ja.length,gapCount:e.M,isLowLatency:e.V,startTime:null},!bt.tk()){Qa.A(7);break}return uf=Rt(t,"UTCTiming"),Qa.g(eG(e,de,uf),8);case 8:if(Yy=Qa.i,!e.j)return Qa.return();bt.Wj(Yy);case 7:bt.Eh(),e.m&&!e.h.presentationTimeline.isLive()&&e.m.release(),(gg=Yt(t,"ProgramInformation"))&&(mg=new Map().set("detail",gg),Jy=new Ge("programinformation",mg),e.j.onEvent(Jy));case 4:e.j.makeTextStreamsForClosedCaptions(e.h),qq(e),Gq(e,Ja),Qa.j()}})}function OP(e,t,n){var r;return P(function(i){if(i.h==1)return i.g(e.m.Mg(t,!0,n),2);e.h.variants=e.m.l,r=e.m.qh(),r.length>0&&(e.h.textStreams=r),e.h.imageStreams=e.m.i,e.j.filter(e.h),i.j()})}function Fq(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie;return P(function(le){if(le.h==1){if(n=t.attributes.mpdId,r=wt(t,"originalPublishTime",Xo),!n||n!==e.l.Rf||r!==e.l.Ge)throw e.H=[],new B(1,4,4052);for(i=[],o=[],u=new Set,l=x(Sl(t)),h=l.next();!h.done;h=l.next())if(p=h.value,m=Dv(p.attributes.sel||""),b=m[m.length-1],w=Cr(p)||"",b.name==="MPD")if(b.Hc==="mediaPresentationDuration"){T=Cr(p)||"";var be=Gi(T);if(be!=null){e.l.wc=be;for(var ce=x(e.u.values()),ae=ce.next();!ae.done;ae=ce.next())ae.value.wc=be}}else if(b.Hc==="type"){for(e.h.presentationTimeline.Yd(w=="static"),e.l.type=w,be=x(e.u.values()),ce=be.next();!ce.done;ce=be.next())ce.value.Ab=w=="dynamic";w=="static"&&(e.R=-1)}else b.Hc==="publishTime"?e.l.Ge=Xo(w)||0:b.Hc===null&&p.tagName==="add"&&o.push(p);else if(b.name==="PatchLocation")g5(e.H,p);else if(b.name==="Period")p.tagName==="add"?o.push(p):p.tagName==="remove"&&b.id&&Bq(e,b.id);else if(b.name==="SegmentTemplate"){if(ce=Dv(p.attributes.sel||""),be=ce[ce.length-1],be.Hc){ce=jP(e,ce),ae=Cr(p)||"";for(var de=x(ce),re=de.next();!re.done;re=de.next())re=e.u.get(re.value),v5(re.N.Wc,p.tagName,be.Hc,ae);be=ce}else be=[];for(k=be,S=x(k),A=S.next();!A.done;A=S.next())M=A.value,u.add(M)}else if(b.name==="SegmentTimeline"||b.name==="S"){for(be=Dv(p.attributes.sel||""),be=jP(e,be),ce=x(be),ae=ce.next();!ae.done;ae=ce.next())ae=e.u.get(ae.value),ae=Xd(ae,Pu,"SegmentTimeline"),de=Rt(ae,"S"),g5(de,p),ae.children=de;for(_=be,R=x(_),U=R.next();!U.done;U=R.next())N=U.value,u.add(N)}for(j=x(u),V=j.next();!V.done;V=j.next())q=V.value,UP(e,q);for(G=x(o),z=G.next();!z.done;z=G.next())J=z.value,i.push.apply(i,se(FP(e,{Ab:e.l.type=="dynamic",presentationTimeline:e.h.presentationTimeline,Ta:null,qa:null,sa:null,N:null,bandwidth:0,rh:!1,xb:e.l.xb,profiles:e.l.profiles,wc:e.l.wc,roles:null,urlParams:GP,name:""},e.l.gb,J,!0).periods));return i.length?(e.h.periodCount+=i.length,e.h.gapCount=e.M,le.g(OP(e,i,!0),2)):le.A(2)}e.l.type=="static"&&(ie=e.l.wc,e.h.presentationTimeline.Sb(ie||1/0)),le.j()})}function Bq(e,t){e.h.periodCount--;for(var n=x(e.u.keys()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startsWith(t)){var i=e.u.get(r);Xd(i,Pu,"SegmentTimeline").children=[],UP(e,r),e.u.delete(r)}e.D=e.D.filter(function(o){return o!==t}),e.F.delete(t)}function jP(e,t){var n="",r="",i=-1,o="";t=x(t);for(var u=t.next();!u.done;u=t.next())u=u.value,u.name==="Period"?n=u.id:u.name==="AdaptationSet"?(r=u.id,u.position!==null&&(i=u.position)):u.name==="Representation"&&(o=u.id);if(t=[],o)t.push(n+","+o);else if(r)for(i=x(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.Ta.id===n&&e.sa.id===r&&e.N.id&&t.push(n+","+e.N.id);else if(i>-1)for(r=x(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.Ta.id===n&&e.sa.position===i&&e.N.id&&t.push(n+","+e.N.id);return t}function UP(e,t){var n=e.u.get(t),r=e.o.get(t);r.segmentIndex&&r.segmentIndex.Za(e.h.presentationTimeline.Fb());try{var i=bP(n,function(o,u,l,h){return HP(e,o,u,l,h)},e.o,!0,e.g.dash.initialSegmentLimit,e.Aa,n.N.aesKey,null,!0,e.C);r.createSegmentIndex=function(){return P(function(o){if(o.h==1)return r.segmentIndex?o.A(0):o.g(i.Zc(),3);r.segmentIndex=o.i,o.j()})}}catch(o){if(t=n.N.contentType,t!=mt&&t!="application"&&t!="image"||o.code!=4002)throw o}}function Vq(e){var t=Yt(e,"ServiceDescription");if(!t||(e=Yt(t,"Latency"),t=Yt(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function $q(e){var t=vy(e);if(t.length){e=new Map;var n=0;t=x(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var i=r.id!=null?"id:"+r.id:"no-id:"+n++;e.getOrInsert(i,[]).push(r)}for(e=x(e.values()),n=e.next();!n.done;n=e.next())if(n=n.value,!n.some(function(o){return KP.has(o.schemeIdUri)}))throw new B(2,4,4063,n.map(function(o){return o.schemeIdUri}))}}function zq(e,t){var n=Fp(t);return(n=Pk(n,"urn:mpeg:dash:chaining:2016"))&&n.value?pd(n.value,Hs(e,t,"chaining")):null}function FP(e,t,n,r,i){var o=t.wc;o||(o=wt(r,"mediaPresentationDuration",Gi),e.l.wc=o);var u=0;e.h&&e.h.presentationTimeline&&e.W&&(u=e.h.presentationTimeline.Kb());var l=[],h=u;r=Rt(r,"Period");var p=t.Ab;p||e.F.clear();for(var m=p&&!i?new Set(e.D.slice(1,-1)):null,b=0;b<r.length;b++){var w=r[b],T=r[b+1],k=wt(w,"start",Gi,h),S=w.attributes.id,A=wt(w,"duration",Gi);k=b==0&&k==0&&e.W?u:k;var M=null;if(T){var _=wt(T,"start",Gi);_!=null&&(M=_-k+u)}else o!=null&&(M=o-k+u);if(_=a5,M&&A&&Math.abs(M-A)>_&&M>A&&e.M++,M==null&&(M=A),!(e.P!==null&&S!=null&&k!==null&&k<e.P)||e.D.includes(S)||b+1==r.length){if(k!==null&&(e.P===null||k>e.P)&&(e.P=k),h={start:k,duration:M,node:w,Jf:M==null||!T},w=null,T=b>0&&b<r.length-1,p&&m&&T&&!i&&(S!=null||(S="__shaka_period_"+k),m.has(S)&&(S=e.F.get(S))&&(w=S)),w||(w=Kq(e,t,n,h),p&&w.id&&e.F.set(w.id,w)),l.push(w),w.id&&M&&e.Aa.set(w.id,M),M==null){h=null;break}h=k+M}}if(p&&!i&&Hq(e,l),i)for(t=x(l),n=t.next();!n.done;n=t.next())n=n.value.id,e.D.includes(n)||e.D.push(n);else e.D=l.map(function(R){return R.id});return o!=null?{periods:l,duration:o+u,Yi:!1}:{periods:l,duration:h,Yi:!0}}function Hq(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=x(Array.from(e.F.keys())),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.F.delete(r)}function qq(e){var t=Array.from(e.O.keys()).filter(function(l){return!e.D.includes(l)});t=x(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=!0,i=x(e.O.get(n)),o=i.next();!o.done;o=i.next()){o=o.value;var u=e.o.get(o);u&&(u.segmentIndex&&u.segmentIndex.getNumReferences()!=0?r=!1:(e.m&&e.m.Wi(u,n),e.o.delete(o)))}r&&e.O.delete(n)}}function Gq(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=x(e.C.keys()),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.C.delete(r)}function Kq(e,t,n,r){t.Ta=$k(e,r.node,null,n),t.qa=r,t.Ta.xb=t.xb,t.Ta.id||(t.Ta.id="__shaka_period_"+r.start);var i=Rt(r.node,"EventStream");n=t.presentationTimeline.Fb(),i=x(i);for(var o=i.next();!o.done;o=i.next())tG(e,r.start,r.duration,o.value,n);for(n=Fp(r.node),n=x(n),i=n.next();!i.done;i=n.next())i=i.value,Yp.has(i.schemeIdUri)&&(i=Xp(e,i.element))&&(t.urlParams=i);(n=Hs(e,r.node,"segment"))&&(t.urlParams=n);var u=Rt(r.node,"AdaptationSet").map(function(w,T){return BP(e,t,T,w)}).filter(Il);if(t.Ab){for(n=new Set,o=i=0;o<u.length;o++)for(var l=u[o].tm,h=0;h<l.length;h++)n.add(l[h]),i++;if(i!=n.size)throw new B(2,4,4018)}var p=new Map;for(n=x(u),i=n.next();!i.done;i=n.next())for(i=x(i.value.Pk),o=i.next();!o.done;o=i.next())l=x(o.value),o=l.next().value,l=l.next().value,p.set(o,l);if(p.size){for(n=new Map,i=0;i<u.length;i++)for(o=u[i].streams,l=0;l<o.length;l++)p.has(o[l].originalId)&&(n.has(i)||n.set(i,[]),n.get(i).push(o[l].originalId));if(n.size){var m=Rt(r.node,"AdaptationSet");r=t.name,t.name="dependencyStream",n.forEach(function(w,T){var k=m[T];if(k&&(k=BP(e,t,T,k))){for(var S=[],A={},M=0;M<w.length;A={Hj:void 0},M++)if(A.Hj=w[M],A=k.streams.find((function(R){return function(U){return U.originalId==R.Hj}})(A))){var _=p.get(A.originalId||"");A.dependencyStream=_,A.originalId+=_.originalId,A.baseOriginalId=_.baseOriginalId,S.push(A)}S.length&&u[T].streams.push.apply(u[T].streams,se(S))}}),t.name=r}}for(r=x(fe(u,function(w){return!!w.pk})),n=r.next().value,r=r.next().value,i=x(n),o=i.next();!o.done;o=i.next())for(o=x(o.value.streams),l=o.next();!l.done;l=o.next())l.value.isIframe=!0;if(!e.g.disableIFrames){for(n=x(n),i=n.next();!i.done;i=n.next())for(i=i.value,o=i.pk.split(" "),l=x(r),h=l.next();!h.done;h=l.next())if(h=h.value,o.includes(h.id)){h=x(h.streams);for(var b=h.next();!b.done;b=h.next())H5(b.value,i.streams)}}if(n=wy(e.g.disableAudio,r,"audio"),i=wy(e.g.disableVideo,r,"video"),o=wy(e.g.disableText,r,mt),r=wy(e.g.disableThumbnails,r,"image"),i.length===0&&n.length===0)throw new B(2,4,4004);return{id:t.Ta.id,audioStreams:n,videoStreams:i,textStreams:o,imageStreams:r}}function wy(e,t,n){return e||!t.length?[]:t.reduce(function(r,i){return i.contentType!=n||r.push.apply(r,se(i.streams)),r},[])}function BP(e,t,n,r){function i(J){var ie=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"],ie&&J&&(J=zn(t.sa.gb(),[J],t.urlParams()),e.j.addFont(ie,J[0]))}function o(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function u(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.sa=$k(e,r,t.Ta,null),t.sa.position=n;var l=!1;n=Rt(r,"Role");var h=n.map(function(J){return J.attributes.value}).filter(Il),p=void 0,m=t.sa.contentType==mt;m&&(p="subtitle"),n=x(n);for(var b=n.next();!b.done;b=n.next()){b=b.value;var w=b.attributes.schemeIdUri;if(w==null||w=="urn:mpeg:dash:role:2011")switch(b=b.attributes.value,b){case"main":l=!0;break;case"caption":case"subtitle":p=b}}var T=vy(r);w=Fp(r),n=null;var k=!1;b=null;var S=!1;T=x(T);for(var A=T.next();!A.done;A=T.next()){A=A.value;var M=A.schemeIdUri;if(KP.has(M))if(M=="http://dashif.org/guidelines/trickmode")n=A.value;else if(M=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var _=u(parseInt(A.value,10));else if(M=="urn:mpeg:mpegB:cicp:ColourPrimaries")var R=o(parseInt(A.value,10));else M=="urn:mpeg:dash:ssr:2023"?e.g.dash.enableFastSwitching?k=!0:S=!0:M=="urn:dvb:dash:fontdownload:2014"?i(A.element):Yp.has(M)&&((b=Xp(e,A.element))||(S=!0));else S=!0}if(S)return null;var U=null;for(w=x(w),S=w.next();!S.done;S=w.next())S=S.value,T=S.schemeIdUri,T=="http://dashif.org/guidelines/last-segment-number"?U=parseInt(S.value,10)-1:T=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?_=u(parseInt(S.value,10)):T=="urn:mpeg:mpegB:cicp:ColourPrimaries"?R=o(parseInt(S.value,10)):T=="urn:dvb:dash:fontdownload:2014"?i(S.element):Yp.has(T)&&(b=Xp(e,S.element));(w=Hs(e,r,"segment"))&&(b=w),b&&(t.urlParams=b),b=Rt(r,"Accessibility");var N=new Map,j;for(b=x(b),w=b.next();!w.done;w=b.next())S=w.value,w=S.attributes.schemeIdUri,S=S.attributes.value,w!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText?w!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText?w=="urn:mpeg:dash:role:2011"?S!=null&&(h.push(S),S=="captions"&&(p="caption")):w=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(S=="1"?j="visually impaired":S=="2"?j="hard of hearing":S=="9"&&(j="spoken subtitles")):OU(S,N):NU(S,N);b=Rt(r,"ContentProtection");var V=sP(e.wa,b,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.sa.encrypted=b.length>0;var q=Ft(t.sa.language||"und"),G=t.sa.label,z=new Map;if(r=Rt(r,"Representation"),!e.g.ignoreSupplementalCodecs){for(b=[],w=x(r),S=w.next();!S.done;S=w.next())T=S.value,(S=ko(T,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(T=Hi(T),T.attributes.codecs=S.split(" ").join(","),T.attributes.id&&(T.attributes.supplementalId=T.attributes.id+"_supplementalCodecs"),b.push(T));r.push.apply(r,se(b))}if(b=r.map(function(J){var ie=Wq(e,t,V,p,q,G,l,h,N,J,j,U);return ie&&(ie.hdr=ie.hdr||_,ie.colorGamut=ie.colorGamut||R,ie.fastSwitching=k,J=J.attributes.dependencyId)?(ie.baseOriginalId=J,z.set(J,ie),null):ie}).filter(function(J){return!!J}),b.length==0&&z.size==0){if(n=t.sa.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||m||n)return null;throw new B(2,4,4003)}if(!t.sa.contentType||t.sa.contentType=="application")for(t.sa.contentType=qP(b[0].mimeType,b[0].codecs),m=x(b),w=m.next();!w.done;w=m.next())w.value.type=t.sa.contentType;for(m=t.sa.id||"__fake__"+e.Ha++,w=x(b),S=w.next();!S.done;S=w.next()){for(S=S.value,T=x(V.drmInfos),A=T.next();!A.done;A=T.next())A=A.value,A.keyIds=A.keyIds&&S.keyIds?new Set([].concat(se(A.keyIds),se(S.keyIds))):A.keyIds||S.keyIds;e.g.enableAudioGroups&&(S.groupId=m)}return r=r.map(function(J){return J.attributes.supplementalId||J.attributes.id}).filter(Il),{id:m,contentType:t.sa.contentType,language:q,Vn:l,streams:b,drmInfos:V.drmInfos,pk:n,tm:r,Pk:z}}function Xp(e,t){return(t=qi(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo")||qi(t,"urn:mpeg:dash:schema:urlparam:2016","ExtUrlQueryInfo"))?VP(e,t):null}function Hs(e,t,n){var r;t=x(Rt(t,"RequestParam"));for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=(i.attributes.includeInRequests||"segment").split(/\s+/);(o.includes(n)||o.includes("*"))&&(i=VP(e,i))&&(r=i)}return r}function VP(e,t){var n=wt(t,"useMPDUrlQuery",p5,!1),r=Fn(t.attributes.queryString||""),i=Fn(t.attributes.queryTemplate||"");return i&&(n||r)?function(){var o=[];n&&e.xa&&o.push(e.xa),r&&o.push(r);var u=o.join("&");if(i=="$querypart$")return u;var l;return i.split("&").map(function(h){if(h=="$querypart$")return u;var p=/\$query:(.*?)\$/.exec(h);return p?(h=p[1],l||(l=new URLSearchParams(u)),(p=l.get(h))?h+"="+p:""):h.replace(/\$\$|\$[^$]+\$/g,function(m){return m==="$$"?"$":""})}).filter(Boolean).join("&")}:null}function Wq(e,t,n,r,i,o,u,l,h,p,m,b){function w(pe){return Yp.has(pe.schemeIdUri)}var T=t.Ta.id;t.N=$k(e,p,t.sa,null);var k=t.N.id;if(e.ba=Math.min(e.ba,t.N.xb),e.V=e.ba>0,!Zq(t.N))return null;var S=t.qa.start;t.bandwidth=wt(p,"bandwidth",Lh)||0,t.roles=l;var A=vy(p),M=Fp(p),_=Rt(p,"ContentProtection"),R=null,U=A.find(w)||M.find(w);U&&(R=Xp(e,U.element)),(p=Hs(e,p,"segment"))&&(R=p),R&&(t.urlParams=R),p=t.N.contentType,R=p==mt||p=="application",p=p=="image",_.length&&(t.sa.encrypted=!0);try{var N=void 0;if(n.Gg){var j=t.N.gb,V=t.urlParams,q=zn(j(),[n.Gg.Pl],V()),G=yn(q,e.g.retryParameters);N={bitsKey:128,blockCipherMode:"CBC",iv:n.Gg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var pe,Re,W;return P(function(Se){if(Se.h==1)return Se.g(zk(e,G,6),2);if(Se.h!=3){if(pe=Se.i,!pe.data||pe.data.byteLength!=16)throw new B(2,4,4049);return Re={name:"AES-CBC"},W=N,Se.g(d.crypto.subtle.importKey("raw",pe.data,Re,!0,["decrypt"]),3)}W.cryptoKey=Se.i,N.fetchKey=void 0,Se.j()})}}}if(t.N.aesKey=N,j=function(pe,Re,W,Se){return HP(e,pe,Re,W,Se)},t.N.Wd)var z=dq(t,j,N);else if(t.N.Cc)z=hq(t,e.o,N);else if(t.N.Wc)z=bP(t,j,e.o,!!e.h,e.g.dash.initialSegmentLimit,e.Aa,N,b,!1,e.C);else{var J=t.qa.duration||0,ie=t.N.gb,le=t.N.mimeType,be=t.N.codecs;z={endTime:-1,timeline:-1,Zc:function(){var pe=l0(S,J,ie());return pe.Jb(function(Re){Re.mimeType=le,Re.codecs=be}),Promise.resolve(pe)},timescale:1}}}catch(pe){if((R||p)&&pe.code==4002)return null;throw pe}if(b=GH(e.wa,_,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),b=new Set(b?[b]:[]),_=Pk(M,"tag:dolby.com,2018:dash:EC3_ExtensionType:2018","JOC")!=null,M=Pk(M,"tag:dolby.com,2016:dash:virtualized_content:2016","1")!=null,M=_||M,_=!1,R&&(_=l.includes("forced_subtitle")||l.includes("forced-subtitle")),p){var ce=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];if(A=A.find(function(pe){return ce.includes(pe.schemeIdUri)}))var ae=A.value;if(!ae)return null}var de;A=t.N.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(A.includes("hvc1.2.4.L153.B0")||A.includes("hev1.2.4.L153.B0"))&&(de="PQ"),(R=k?T+","+k:"")&&t.name&&(R+=t.name),e.H.length&&R&&e.u.set(R,Yq(t)),t.N.Yf&&Xq(e,t.N.Yf,z,t.presentationTimeline),z.endTime!=-1&&T!=null&&k!=null&&((p=e.C.get(T))?(p.endTime=z.endTime,p.Yh.includes(k)||p.Yh.push(k),e.C.set(T,p)):e.C.set(T,{endTime:z.endTime,timeline:z.timeline,Yh:[k]}));var re=R&&e.o.has(R)?e.o.get(R):{id:e.Ha++,originalId:k,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){re.segmentIndex&&(re.segmentIndex.release(),re.segmentIndex=null)},segmentIndex:null,mimeType:t.N.mimeType,codecs:A,supplementalCodecs:t.N.supplementalCodecs,frameRate:t.N.frameRate,pixelAspectRatio:t.N.pixelAspectRatio,bandwidth:t.bandwidth,width:t.N.width,height:t.N.height,kind:r,encrypted:n.drmInfos.length>0,drmInfos:n.drmInfos,keyIds:b,language:i,originalLanguage:t.sa.language,label:o,type:t.sa.contentType,primary:u,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.N.emsgSchemeIdUris,roles:l,forced:_,channelsCount:t.N.Vf,audioSamplingRate:t.N.audioSamplingRate,spatialAudio:M,closedCaptions:h,hdr:de,colorGamut:void 0,videoLayout:void 0,tilesLayout:ae,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([tr(t.N.mimeType,t.N.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1};return re.createSegmentIndex=function(){var pe;return P(function(Re){if(Re.h==1)return re.segmentIndex?Re.A(0):(pe=re,Re.g(z.Zc(),3));pe.segmentIndex=Re.i,Re.j()})},R&&t.Ab&&!e.o.has(R)&&(e.o.set(R,re),e.O.getOrInsertComputed(T||"",function(){return[]}).push(R)),re}function Xq(e,t,n,r){if(!e.ha.has(t)){e.ha.add(t);var i=wt(t,"presentationTime",Ki)||0,o=Yt(t,"UTCTiming"),u;(u=o&&o.attributes.schemeIdUri)&&(o=o.attributes.schemeIdUri,u=!(o==="urn:mpeg:dash:utc:http-ntp:2014"||o==="urn:mpeg:dash:utc:ntp:2014"||o==="urn:mpeg:dash:utc:sntp:2014")),u?t=(wt(t,"wallClockTime",Xo)||0)*1e3:(t=wt(t,"wallClockTime",Ki)||0,t=ZI(t)),n=new Date(t-i/n.timescale*1e3),i=n.getTime()/1e3,isNaN(i)||(r.o||r.ki(i),r=new Map().set("detail",{wallClockTime:t,programStartDate:n}),r=new Ge("prft",r),e.j.onEvent(r))}}function Yq(e){function t(n){return n?(n=mu(n),n.Wd=null,n.Cc=null,n.Wc=ow(n.Wc),n.Yf=null,n):null}return e=mu(e),e.Ta=t(e.Ta),e.sa=t(e.sa),e.N=t(e.N),e.qa&&(e.qa=mu(e.qa),e.qa.node=null),e}function $P(e){var t,n;return P(function(r){switch(r.h){case 1:return t=0,r.m(2),r.g(Bk(e),4);case 4:t=r.i,r.o(3);break;case 2:if(n=r.l(),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),r.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return r.return();e.j.onManifestUpdated(),Vk(e,t),r.j()}})}function Vk(e,t){if(!(e.R<0)){var n=e.R;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.L.$(Math.max(n-t,tn(e.Fa)))}}function $k(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",supplementalCodecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vf:null,audioSamplingRate:null,xb:0,fg:1,encrypted:!1},r=r||n.gb;var i=t.attributes.id,o=t.attributes.supplementalId,u=Rt(t,"BaseURL"),l,h=!1;if(e.i)for(var p=x(u),m=p.next();!m.done;m=p.next()){var b=m.value;m=b.attributes.serviceLocation,b=Cr(b),m&&b&&(Qd(e.i,i,m,b),h=!0)}h&&e.i||(l=u.map(Cr));var w=e.i;e=t.attributes.contentType||n.contentType,p=t.attributes.mimeType||n.mimeType,m=h0([t.attributes.codecs||n.codecs]).join(","),b=[ko(t,"urn:scte:dash:scte214-extensions","supplementalCodecs")||n.supplementalCodecs],b=h0(b).join(",");var T=wt(t,"frameRate",VU)||n.frameRate,k=t.attributes.sar||n.pixelAspectRatio,S=Jq(Rt(t,"InbandEventStream"),n.emsgSchemeIdUris),A=Rt(t,"AudioChannelConfiguration");A=Qq(A)||n.Vf;var M=wt(t,"audioSamplingRate",Ki)||n.audioSamplingRate;e||(e=qP(p,m));var _=Yt(t,"SegmentBase"),R=Yt(t,"SegmentTemplate"),U=_&&wt(_,"availabilityTimeOffset",Rh)||0,N=R&&wt(R,"availabilityTimeOffset",Rh)||0,j=u&&u.length&&wt(u[0],"availabilityTimeOffset",Rh)||0;U=n.xb+j+U+N,N=null,(j=Yt(t,"SegmentSequenceProperties"))&&(j=wt(j,"cadence",Lh))&&(N=j),j=t.attributes.label;var V=Rt(t,"Label");return V&&V.length&&(V=V[0],mn(V)&&(j=mn(V))),{gb:function(){return zn(r(),u.length?w&&h?$p(w,i):l||[]:[])},Wd:_||n.Wd,Cc:Yt(t,"SegmentList")||n.Cc,Wc:R||n.Wc,Yf:Yt(t,"ProducerReferenceTime")||n.Yf,width:wt(t,"width",Ki)||n.width,height:wt(t,"height",Ki)||n.height,contentType:e,mimeType:p,codecs:m,supplementalCodecs:b.split(" ").join(","),frameRate:T,pixelAspectRatio:k,emsgSchemeIdUris:S,id:o||i,originalId:i,language:t.attributes.lang,Vf:A,audioSamplingRate:M,xb:U,Gf:null,fg:N||n.fg,label:j||null,encrypted:!1}}function Jq(e,t){t=t.slice(),e=x(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function Qq(e){e=x(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var r=0,i=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(i=r=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&t>0&&t<n.length)return n[t]}}return null}function Zq(e){var t=e.Wd?1:0;return t+=e.Cc?1:0,t+=e.Wc?1:0,t==0?e.contentType==mt||e.contentType=="application":(t!=1&&(e.Wd&&(e.Cc=null),e.Wc=null),!0)}function zP(e,t,n,r){var i,o,u,l,h,p,m;return P(function(b){if(b.h==1)return i=[Fn(n)],o=zn(t(),i),u=yn(o,e.g.retryParameters),u.method=r,l=e.j.networkingEngine.request(4,u,{isPreload:e.ma()}),wu(e.K,l),b.g(l.promise,2);if(h=b.i,r=="HEAD"){if(!h.headers||!h.headers.date)return b.return(0);p=h.headers.date}else p=dt(h.data);return m=Date.parse(p),isNaN(m)?b.return(0):b.return(m-Date.now())})}function eG(e,t,n){var r,i,o,u,l,h,p,m;return P(function(b){switch(b.h){case 1:r=n.map(function(w){return{scheme:w.attributes.schemeIdUri,value:w.attributes.value}}),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),o=x(r),u=o.next();case 2:if(u.done){b.A(4);break}switch(l=u.value,b.m(5),h=l.scheme,p=l.value,h){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return b.A(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 b.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return m=Date.parse(p),b.return(isNaN(m)?0:m-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ut("NTP UTCTiming scheme is not supported");break;default:ut("Unrecognized scheme in UTCTiming element",h)}b.A(9);break;case 7:return b.g(zP(e,t,p,"HEAD"),10);case 10:return b.return(b.i);case 8:return b.g(zP(e,t,p,"GET"),11);case 11:return b.return(b.i);case 9:b.o(3);break;case 5:b.l();case 3:u=o.next(),b.A(2);break;case 4:return ut("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),b.return(0)}})}function tG(e,t,n,r,i){var o=r.attributes.schemeIdUri||"",u=r.attributes.value||"",l=wt(r,"timescale",Ki)||1,h=wt(r,"presentationTimeOffset",Ki)||0,p;o==="urn:mpeg:dash:event:alternativeMPD:insert:2025"||o==="urn:mpeg:dash:event:alternativeMPD:replace:2025"?p="altmpd":o==="urn:mpeg:dash:event:callback:2015"&&(p="callback"),p=p?Hs(e,r,p):void 0,r=x(Rt(r,"Event"));for(var m=r.next();!m.done;m=r.next()){m=m.value;var b=wt(m,"presentationTime",Ki)||0,w=wt(m,"duration",Ki)||0;b=Math.max((b-h)/l+t,t),w=b+w/l,n!=null&&(b=Math.min(b,t+n),w=Math.min(w,t+n)),w<i||(m={schemeIdUri:o,value:u,startTime:b,endTime:w,id:m.attributes.id||"",timescale:l,eventNode:ow(m),urlParams:p},e.j.onTimelineRegionAdded(m))}}function HP(e,t,n,r,i){var o,u,l,h;return P(function(p){return p.h==1?(o=ua,u=i?0:1,l=fp(t,n,r,e.j.getStreamingRetryParameters()),p.g(zk(e,l,o,{type:u}),2)):(h=p.i,p.return(h.data))})}function qP(e,t){return t=tr(e,t),Hh(t)?mt:e.split("/")[0]}function zk(e,t,n,r){return r||(r={}),r.isPreload=e.ma(),t=e.j.networkingEngine.request(n,t,r),wu(e.K,t),t.promise}function nG(e){var t=e.l.Ge;if(!e.l.Rf||!t||!e.H.length)return[];var n=Date.now()/1e3,r=e.H.filter(function(i){return i=Ki(i.attributes.ttl),!i||t+i>n}).map(Cr).filter(Il);return r.length?zn(e.B,r):[]}function GP(){return""}function rG(e,t,n){return function(){return e&&t?$p(e,"BaseURL"):n.slice()}}Te("shaka.dash.DashParser",Wp);var Yp=new Set(["urn:mpeg:dash:urlparam:2014","urn:mpeg:dash:urlparam:2016"]),KP=new Set("http://dashif.org/guidelines/trickmode http://dashif.org/thumbnail_tile http://dashif.org/guidelines/thumbnail_tile urn:mpeg:mpegB:cicp:TransferCharacteristics urn:mpeg:mpegB:cicp:ColourPrimaries urn:mpeg:mpegB:cicp:MatrixCoefficients urn:mpeg:dash:ssr:2023 urn:dvb:dash:fontdownload:2014 urn:mpeg:dash:urlparam:2014 urn:mpeg:dash:urlparam:2016 urn:mpeg:dash:urlparam:2025 urn:mpeg:dash:pattern:2024".split(" "));kl("application/dash+xml",function(){return new Wp}),kl("video/vnd.mpeg.dash.mpd",function(){return new Wp});function _t(){this.j=new et(function(){for(var e=navigator.userAgent.toLowerCase(),t=x([{type:"VR",Vh:/oculus|quest/},{type:"TV",Vh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",Vh:/iphone|ipad|ipod|android/}]),n=t.next();!n.done;n=t.next())if(n=n.value,n.Vh.test(e))return n.type;e=navigator.userAgentData;var r;if(t=(e==null||(r=e.platform)==null?void 0:r.toLowerCase())||"",e){if(e.mobile)return"MOBILE";if(t.includes("android"))return"TV"}return"DESKTOP"}),this.l=new et(function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"})}function rs(){var e=d.ManagedMediaSource||d.MediaSource;return!!(e&&e.isTypeSupported)}g=_t.prototype,g.hc=function(){return!!navigator.mediaCapabilities},g.Ra=function(){return this.j.value()},g.Qa=function(){return this.l.value()},g.Td=function(){return!1},g.$h=function(){return!1},g.Hf=function(){return!1},g.Oj=function(){return!1},g.Ie=function(){return!1},g.ub=function(){var e=d.ManagedSourceBuffer||d.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType},g.Le=function(){return!0},g.Tj=function(){return 0},g.Wb=function(){return Promise.resolve({width:1/0,height:1/0})},g.dk=function(){return!1},g.mi=function(){return!1},g.cb=function(e){var t=this.Ra();return(t==="TV"||t==="CONSOLE"||t==="CAST")&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),t==="TV"&&(e.textDisplayer.suspendRenderingWhenHidden=!1),e},g.ri=function(){return!!d.indexedDB},g.Mj=function(){return[]},g.Pc=function(e){return d.matchMedia!==void 0&&(d.matchMedia("(color-gamut: p3)").matches||d.matchMedia("(dynamic-range: high)").matches)?e?"HLG":"PQ":"SDR"},g.jk=function(){return!1},g.Aj=function(){return!1},g.cg=function(){return!1},g.lg=function(){return!0},g.Bj=function(){return!1},g.ik=function(){return!0},g.ld=function(){return!1},g.Hh=function(e){return e==="com.apple.fps"},g.kg=function(){return!0};function Jp(e,t){return e=e.Ra(),["DESKTOP","MOBILE","VR","APPLE_VR"].includes(e)?t.remote:null}g.Zd=function(){return typeof Worker<"u"},g.lj=function(){return!0},g.toString=function(){return"Device: "+this.Cb()+" v"+this.Ca()+"; Type: "+this.Ra()};function Hk(){_t.call(this),this.g=new et(function(){var e=navigator.userAgent.match(/Version\/(\d+)(?:\.(\d+))?/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_(\d+))?/)),e?[parseInt(e[1],10),parseInt(e[2]||"0",10)]:[0,0]}),this.h=new et(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}K(Hk,_t),g=Hk.prototype,g.Ca=function(){return this.g.value()[0]},g.Cb=function(){return"Apple Browser"},g.Ra=function(){return this.h.value()},g.Qa=function(){return"WEBKIT"},g.hc=function(){return!1},g.Td=function(e,t){return!qk(this)&&t==="audio"},g.Hf=function(){return!qk(this)},g.Oj=function(e){return!qk(this)&&e==="audio"},g.cb=function(e){return _t.prototype.cb.call(this,e),e.abr.minTimeToSwitch=.5,e},g.jk=function(){return!0},g.kg=function(){return!1},g.lj=function(){return!1};function qk(e){return e=e.g.value(),e[0]>=27?!0:e[0]===26&&e[1]>=4}(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Ht=function(){return new Hk});function Gk(){if(!WP())throw Error("Not a Chromecast device!");_t.call(this),this.h=new et(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new et(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return e=e.toLowerCase(),e.includes("android")?XP:e.includes("fuchsia")?YP:Kk})}K(Gk,_t),g=Gk.prototype,g.Ca=function(){return this.h.value()},g.Cb=function(){return"Chromecast with "+this.g.value()},g.Ra=function(){return"CAST"},g.Qa=function(){return"CHROMIUM"},g.hc=function(){return _t.prototype.hc.call(this)&&this.g.value()!==Kk},g.ub=function(e){return _t.prototype.ub.call(this,e)&&this.g.value()!==Kk},g.Tj=function(){switch(this.g.value()){case XP:return 0;case YP:return 3;default:return 1}},g.Wb=function(){var e,t,n,r,i;return P(function(o){switch(o.h){case 1:if(e=d.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},o.m(2),!(n=e)){o.A(4);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=o.i;case 4:if(n){t.width=3840,t.height=2160,o.A(6);break}if(!(r=e)){o.A(7);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=o.i;case 7:r&&(t.width=1920,t.height=1080);case 6:o.o(3);break;case 2:i=o.l(),Xt("Failed to check canDisplayType:",i);case 3:return o.return(t)}})},g.cb=function(e){return _t.prototype.cb.call(this,e),e.streaming.stallSkip=0,e},g.ri=function(){return!1},g.ld=function(){return!0};function WP(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var XP="Android",YP="Fuchsia",Kk="Linux";WP()&&(Ht=function(){return new Gk});function Wk(){_t.call(this),this.i=new et(function(){var e=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return e?parseInt(e[2],10):null}),this.g=new et(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new et(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}),this.o=new et(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new et(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":!!navigator.userAgent.includes("Android")})}K(Wk,_t),g=Wk.prototype,g.Ca=function(){return this.i.value()},g.Cb=function(){return this.g.value()},g.Td=function(e){return qo(e)?this.h.value():!1},g.$h=function(e){return qo(e)||this.g.value()==="Edge"?this.h.value():!1},g.Hf=function(e){return qo(e)||this.g.value()==="Edge"?this.h.value():!1},g.ub=function(e){return this.h.value()&&qo(e)?!1:_t.prototype.ub.call(this,e)},g.cb=function(e){if(_t.prototype.cb.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="SW_SECURE_CRYPTO",e.drm.defaultVideoRobustnessForWidevine="SW_SECURE_CRYPTO"),e},g.cg=function(){return this.g.value()==="Edge"||this.o.value()},g.ld=function(){if(this.Qa()==="GECKO"){var e=this.Ca();return e!==null?e>=100:_t.prototype.ld.call(this)}return _t.prototype.ld.call(this)},g.Hh=function(e){return this.Qa()==="GECKO"?qo(e):_t.prototype.Hh.call(this,e)},ia=function(){return new Wk};function Xk(){_t.apply(this,arguments)}K(Xk,_t),g=Xk.prototype,g.Ca=function(){return null},g.Cb=function(){return"Hisense"},g.Ra=function(){return"TV"},g.hc=function(){return!1},g.ub=function(){return!1},g.Wb=function(){var e={width:1920,height:1080},t=null;if(d.Hisense_Get4KSupportState)try{t=d.Hisense_Get4KSupportState()}catch{}return t==null&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},g.cb=function(e){return _t.prototype.cb.call(this,e),e.streaming.stallSkip=0,e},g.Zd=function(){return!1},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Ht=function(){return new Xk});function Yk(){_t.call(this),this.g=new et(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}K(Yk,_t),g=Yk.prototype,g.Cb=function(){return"PlayStation"},g.Ra=function(){return"CONSOLE"},g.Qa=function(){return"WEBKIT"},g.Ca=function(){return this.g.value()},g.hc=function(){return!1},g.ub=function(){return!1},g.mi=function(){return this.Ca()===4},g.Wb=function(){var e,t,n,r,i;return P(function(o){switch(o.h){case 1:return e={width:1920,height:1080},t=!1,o.m(2),o.g(d.msdk.device.getDisplayInfo(),4);case 4:n=o.i,t=n.resolution==="4K",o.o(3);break;case 2:return o.l(),o.m(5),o.g(d.msdk.device.getDisplayInfoImmediate(),7);case 7:r=o.i,t=r.resolution==="4K",o.o(3);break;case 5:i=o.l(),ut("PlayStation: Failed to get the display info:",i);case 3:return t&&(e.width=3840,e.height=2160),o.return(e)}})},g.cb=function(e){return _t.prototype.cb.call(this,e),this.Ca()===4&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},g.cg=function(){return this.Ca()===4},g.lg=function(){return this.Ca()!==4},navigator.userAgent.includes("PlayStation")&&(Ht=function(){return new Yk});function Jk(){_t.apply(this,arguments)}K(Jk,_t),g=Jk.prototype,g.Ca=function(){return null},g.Cb=function(){return"TitanOS"},g.Ra=function(){return"TV"},g.Wb=function(){var e={width:1920,height:1080};try{SmartTvA_API.hasCapability("UHD")?(e.width=3840,e.height=2160):SmartTvA_API.hasCapability("FHD")?(e.width=1920,e.height=1080):(e.width=1280,e.height=720)}catch(t){ut("Titan OS: Error detecting screen size, default screen size 1920x1080.",t)}return Promise.resolve(e)},g.Pc=function(e){try{if(SmartTvA_API.hasCapability("HDR","HDR10")||SmartTvA_API.hasCapability("HDR","DV"))return e?"HLG":"PQ"}catch(t){return ut("Titan OS: Error checking HDR support",t),_t.prototype.Pc.call(this,e)}return"SDR"},navigator.userAgent.includes("TitanOS")&&(Ht=function(){return new Jk});function Qk(){_t.apply(this,arguments)}K(Qk,_t),g=Qk.prototype,g.Ca=function(){return null},g.Cb=function(){return"TiVoOS"},g.Ra=function(){return"TV"},g.Qa=function(){return"CHROMIUM"},g.ub=function(){return!1},navigator.userAgent.includes("TiVoOS")&&(Ht=function(){return new Qk});function Zk(){_t.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}K(Zk,_t),g=Zk.prototype,g.Ca=function(){return this.g},g.Cb=function(){return"Tizen"},g.Qa=function(){return"CHROMIUM"},g.Ra=function(){return"TV"},g.Td=function(){return!0},g.Ie=function(){return this.Ca()===3},g.hc=function(){return!1},g.ub=function(){return!1},g.Le=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:_t.prototype.Le.call(this)},g.Wb=function(){var e=d.devicePixelRatio;e={width:d.screen.width*e>1920?3840:1920,height:d.screen.height*e>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{ut("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},g.cb=function(e){return _t.prototype.cb.call(this,e),e.drm.ignoreDuplicateInitData=this.Ca()!==2,this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},g.Mj=function(){var e=[];return this.g!==null&&this.g<5&&e.push("opus"),e},g.Pc=function(e){try{if(webapis.avinfo.isHdrTvSupport())return e?"HLG":"PQ"}catch{return _t.prototype.Pc.call(this,e)}return"SDR"},g.Aj=function(){return!0},g.Bj=function(){return this.Ca()===3},g.Zd=function(){var e=this.Ca();return e!==null&&e<3?!1:_t.prototype.Zd.call(this)},navigator.userAgent.includes("Tizen")&&(Ht=function(){return new Zk});function ef(){_t.apply(this,arguments)}K(ef,_t),ef.prototype.Ca=function(){return null},ef.prototype.Cb=function(){return"Vizio"},ef.prototype.Ra=function(){return"TV"},ef.prototype.hc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Ht=function(){return new ef});function eT(){_t.call(this),this.i=new et(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")}),this.h=new et(function(){return navigator.userAgent.includes("SOPOpenBrowser")}),this.g=new et(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}K(eT,_t),g=eT.prototype,g.Ca=function(){return this.g.value()},g.Cb=function(){return"WebKit STB"},g.Ra=function(){return"TV"},g.Qa=function(){return"WEBKIT"},g.hc=function(){return!1},g.Td=function(){return this.h.value()},g.Wb=function(){return Promise.resolve({width:d.screen.width*d.devicePixelRatio,height:d.screen.height*d.devicePixelRatio})},g.lg=function(){return!this.i.value()},g.kg=function(){return!1},!navigator.userAgent.includes("PlayStation")&&(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(Ht=function(){return new eT});function tT(){_t.call(this);var e=this;this.h=iG(),this.g=null;try{var t=new PalmServiceBridge;t.onservicecallback=function(n){n=JSON.parse(n);var r,i,o,u;e.g=(u=(o=(r=n.configs)==null?void 0:r["tv.model.supportHDR"])!=null?o:(i=n.configs)==null?void 0:i["tv.config.supportDolbyHDRContents"])!=null?u:!1},t.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(n){ut("WebOS: getConfigs call failed",n)}}K(tT,_t),g=tT.prototype,g.Ca=function(){return this.h},g.Cb=function(){return"WebOS"},g.Ra=function(){return"TV"},g.Qa=function(){return"CHROMIUM"},g.hc=function(){return!1},g.ub=function(){return!1},g.Le=function(){var e=this.Ca();return e!==null?e>3:_t.prototype.Le.call(this)},g.Wb=function(){var e={width:1920,height:1080};try{var t=JSON.parse(d.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{ut("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},g.cb=function(e){return _t.prototype.cb.call(this,e),this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},g.Pc=function(e){return this.g==null?(ut("WebOS: getConfigs call haven't finished"),_t.prototype.Pc.call(this,e)):this.g?e?"HLG":"PQ":"SDR"};function iG(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;case 132:return 26;default:return null}}if(g.ik=function(){return!1},g.ld=function(){var e=this.Ca();return e!==null?e>=6:_t.prototype.ld.call(this)},g.Zd=function(){var e=this.Ca();return e!==null&&e<4?!1:_t.prototype.Zd.call(this)},navigator.userAgent.includes("Web0S")){var aG=new tT;Ht=function(){return aG}}function nT(){_t.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}K(nT,_t),g=nT.prototype,g.Ca=function(){return this.h},g.Cb=function(){return"Xbox"},g.Ra=function(){return"CONSOLE"},g.Qa=function(){return this.g?"EDGE":"CHROMIUM"},g.Td=function(){return!0},g.$h=function(){return!0},g.Hf=function(){return!0},g.dk=function(){return this.g},g.Wb=function(){var e={width:1920,height:1080},t=JP();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,r=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===r.maybe);t===r.probably&&(e.width=3840,e.height=2160)}catch{ut("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},g.cb=function(e){return _t.prototype.cb.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},g.cg=function(){return!0},g.ri=function(){return!1};function JP(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}(navigator.userAgent.includes("Xbox One")||JP()!==null)&&(Ht=function(){return new nT});function QP(e,t,n){this.type=e,this.ea=t,this.segments=n||null}function Qp(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=r===void 0?null:r}Qp.prototype.toString=function(e){function t(i){return i.name+"="+(isNaN(Number(i.value))?'"'+i.value+'"':i.value)}var n="#"+this.name,r=this.attributes?this.attributes.filter(function(i){return e?!e.has(i.name):!0}).map(t):[];return this.value&&r.unshift(this.value),r.length>0&&(n+=":"+r.join(",")),n};function Yl(e,t){return e.attributes.find(function(n){return n.name===t})||null}function rt(e,t,n){return(e=Yl(e,t))?e.value:n||null}function Wt(e,t){if(e=Yl(e,t),!e)throw new B(2,4,4023,t);return e.value}function ZP(e,t,n){n=n===void 0?[]:n,this.ea=t,this.g=e,this.dc=n}function rT(e,t){this.name=e,this.value=t}function ga(e,t){return e.filter(function(n){return n.name==t})}function e_(e,t){return e.filter(function(n){return Wt(n,"TYPE")==t})}function Gn(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function tf(e,t,n){return n=n===void 0?0:n,(e=Gn(e,t))?Number(e.value):n}function qs(e,t,n){return t?t_(e,[t],n):[]}function t_(e,t,n){if(!t.length)return[];var r=t;return n&&n.size&&(r=t.map(function(i){return n_(i,n)})),zn(e,r)}function n_(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=x(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.slice(2,r.length-1),o=t.get(i);if(o)e=e.replace(r,o);else throw new B(2,4,4039,i)}}return e}function xy(e){e=e.value;var t=e.indexOf(",");return Number(t===-1?e:e.substring(0,t))}function Zp(e){return(e=rt(e,"SUPPLEMENTAL-CODECS"))?e.split(/\s*,\s*/).map(function(t){return t.split("/")[0]}).join(","):""}function oG(){this.g=0}function iT(e,t){var n=dt(t).trim().split(/[\r\n]+/);if(!n[0].startsWith("#EXTM3U"))throw new B(2,4,4015);t=0;for(var r=!1,i=[],o=!0,u=0;u<n.length;u++){var l=n[u],h=n[u+1];if(l.startsWith("#")&&!l.startsWith("#EXT")||o)o=!1;else{if(l=r_(e,l),r||(i_.has(l.name)?(t=1,r=!0):l.name=="EXT-X-STREAM-INF"||l.name=="EXT-X-MEDIA"?r=!0:a_.has(l.name)&&(t=1,r=!0)),a_.has(l.name)){if(t!=1)throw new B(2,4,4017);o=e,e=Array(Math.max(100,Math.floor((n.length-u)/2))),r=0,l=[];var p=[];for(h=null;u<n.length;u++){var m=n[u];m.startsWith("#EXT")?(m=r_(o,m),i_.has(m.name)?i.push(m):m.name=="EXT-X-MAP"?h=m:m.name=="EXT-X-PART"?p.push(m):m.name=="EXT-X-PRELOAD-HINT"?rt(m,"TYPE")=="PART"?p.push(m):rt(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",h=m):l.push(m)):(!m.startsWith("#")||m.startsWith("#EXT"))&&(m=m.trim(),h&&l.push(h),l=new ZP(m,l,p),r<e.length?e[r++]=l:(e.push(l),r++),l=[],p=[])}return p.length&&(h&&l.push(h),n=new ZP("",l,p),r<e.length?e[r++]=n:(e.push(n),r++)),new QP(t,i,r<e.length?e.slice(0,r):e)}i.push(l),l.name=="EXT-X-STREAM-INF"&&(l.attributes.push(new rT("URI",h)),o=!0)}}return new QP(t,i)}function r_(e,t){e=e.g++;var n=t.indexOf(":"),r=n===-1?t.substring(1):t.substring(1,n);if(!r.startsWith("EXT"))throw new B(2,4,4016,t);if(t=n===-1?null:t.substring(n+1),t===null)e=new Qp(e,r,[]);else if(t.indexOf("=")===-1)e=new Qp(e,r,[],t);else{n=[];var i=null,o=0,u=t.indexOf(","),l=t.indexOf("=");for(u!==-1&&u<l&&(i=t.substring(0,u),o=u+1);o<t.length;){for(;t[o]===" ";)o++;if(l=t.indexOf("=",o),l===-1)break;if(u=t.substring(o,l),o=l+1,t[o]==='"'){o++;var h=t.indexOf('"',o);l=h===-1?t.substring(o):t.substring(o,h),o=h===-1?t.length:h+1}else h=t.indexOf(",",o),l=h===-1?t.substring(o):t.substring(o,h),o=h===-1?t.length:h;o<t.length&&t[o]===","&&o++,n.push(new rT(u,l))}e=new Qp(e,r,n,i)}return e}var i_=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),a_=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function o_(){}function s_(e,t){try{var n=ky(e);return Ml({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(r){return bu(r)}}function ky(e){if(!e.startsWith("data:"))throw new B(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new B(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),n=e.split(";"),e=n[0];var r=!1;n.length>1&&n[n.length-1].toLowerCase()=="base64"&&(r=!0,n.pop());var i;return r?i=wi(t):i=Sr(t),{data:i,contentType:e,Ai:n}}Te("shaka.net.DataUriPlugin",o_),o_.parse=s_,Ds("data",s_);function eg(){var e=this;this.g=this.i=null,this.F=1,this.O=new Map,this.P=new Map,this.o=new Map,this.o.set("video",new Map),this.o.set("audio",new Map),this.o.set(mt,new Map),this.o.set("image",new Map),this.Ac=new Map().set("com.apple.streamingkeydelivery",function(t,n,r){return NG(e,t,n,r)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){return OG(e,t)}).set("com.microsoft.playready",function(t){var n=Wt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),t=Wt(t,"URI"),n=ky(t.split("?")[0]),t=H(n.data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);i=Iw(t,i,new Set,0),r=Go("com.microsoft.playready",r,[{initDataType:"cenc",initData:i}],void 0,n.Ai),(t=sd(["<PLAYREADY>",Ra(t),"</PLAYREADY>"].join(`
`)))&&(r.licenseServerUri=$4(t)),r=Promise.resolve(r)}else r=Promise.resolve(null);return r}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){return jG(e,t)}),this.mb=new Set,this.j=new Map,this.l=null,this.H="",this.Ha=new oG,this.K=-1,this.ma=1/0,this.ib=new WeakMap,this.M=this.Gc=this.kb=!1,this.D=new ft(function(){if(e.ba&&!e.g.continueLoadingWhenPaused&&(e.W.Ua(e.ba,"timeupdate"),e.ba.paused)){e.W.oa(e.ba,"timeupdate",function(){return L_(e)});return}L_(e)}),this.u=My,this.h=null,this.Pa=0,this.C=1/0,this.Fa=this.wa=this.V=0,this.ha=new fd,this.I=new Map,this.J=new Map,this.Ec=new Map,this.cc=new Map,this.za=new Map,this.ec=new Map,this.ra=new Map,this.Bc=this.Y=!1,this.sb=new At(5),this.m=null,this.R=!0,this.W=new he,this.B=this.ba=null,this.bc=function(){return!1},this.xa=new Map,this.L=[],this.Aa=new Map}g=eg.prototype,g.configure=function(e,t){var n=this.i&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.bc=t),this.m&&this.m.configure(this.g),n&&this.h&&this.h.presentationTimeline.ya()&&this.D.Va()},g.start=function(e,t){var n=this,r;return P(function(i){return i.h==1?(n.i=t,n.Y=t.isLowLatencyMode(),i.g(pT(n,[e]).promise,2)):i.h!=3?(r=i.i,n.H=r.uri,i.g(lG(n,r.data),3)):i.return(n.h)})},g.stop=function(){this.D&&(this.D.stop(),this.D=null);var e=[];return this.ha&&(e.push(this.ha.destroy()),this.ha=null),this.g=this.i=null,this.mb.clear(),this.h=null,this.j.clear(),this.P.clear(),this.J.clear(),this.O.clear(),this.Ec.clear(),this.cc.clear(),this.za.clear(),this.ec.clear(),this.ra.clear(),this.xa.clear(),this.m&&this.m.destroy(),this.W&&(this.W.release(),this.W=null),Promise.all(e)},g.update=function(){var e=this,t,n,r,i,o,u,l,h,p,m,b,w,T,k;return P(function(S){if(S.h==1){if(!za(e)||(t=[],n=Array.from(e.j.values()),r=n.filter(function(A){return!A.stream.isAudioMuxedInVideo&&A.stream.segmentIndex}),r.length===0))return S.return();for(e.C=1/0,e.h.gapCount=0,i=x(r),o=i.next();!o.done;o=i.next())u=o.value,t.push(sG(e,u));return t.push(uT(e)),S.g(Promise.all(t),2)}for(l=Array.from(e.Aa.values()),h=x(l),p=h.next();!p.done;p=h.next())m=p.value,e.h.chapterStreams.includes(m)||e.h.chapterStreams.push(m);for(y_(e,r.map(function(A){return A.stream})),b=r.some(function(A){return A.ve==0}),r.length&&!b&&(Ay(e,My),Ty(e)),b&&Ty(e),w=x(r),T=w.next();!T.done;T=w.next())k=T.value,k.stream.isAudioMuxedInVideo||!k.stream.segmentIndex||k.stream.segmentIndex.Ib()||e.i.disableStream(k.stream);S.j()})};function aT(e,t){return e.u==as?e.o.get(t.type):t.Of}function sG(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W;return P(function(Se){switch(Se.h){case 1:if(t.stream.isAudioMuxedInVideo)return Se.return();for(n=[],r=x(t.U()),i=r.next();!i.done;i=r.next())o=i.value,u=new Map,t.jf&&(t.Qb>=0&&u.set("_HLS_msn",String(t.Qb)),t.Rb>=0&&u.set("_HLS_part",String(t.Rb))),t.kf?u.set("_HLS_skip","v2"):t.lf&&u.set("_HLS_skip","YES"),n.push(kw(o,u));return Se.m(2),Se.g(pT(e,n,!0).promise,4);case 4:l=Se.i,Se.o(3);break;case 2:throw h=Se.l(),e.i&&e.i.disableStream(t.stream),h;case 3:if(!t.stream.segmentIndex)return Se.return();if(p=iT(e.Ha,l.data),p.type!=1)throw new B(2,4,4017);return m=l.uri,m==l.originalUri||t.U().includes(m)||t.Zf.push(m),b=ga(p.ea,"EXT-X-DEFINE"),w=oT(e,b,m),T=t.stream,k=aT(e,t),Se.g(k_(e,p,T.mimeType,t.U,w),5);case 5:for(S=Se.i,A=S.keyIds,M=S.drmInfos,_=S.encrypted,R=S.Ki,T.encrypted||!_||R||(T.encrypted=!0),U=function(Ee,Xe){return Ee.size===Xe.size&&[].concat(se(Ee)).every(function(vt){return Xe.has(vt)})},U(T.keyIds,A)||(T.keyIds=A,T.drmInfos=M,e.i.newDrmInfo(T)),N=l.uri!==l.originalUri,j=I_(e,p,k,w,t.U,t.type,N,T.segmentIndex),V=j.segments,q=j.Km,(G=j.bandwidth)&&(T.bandwidth=G),z=nx(T),J=x(V),ie=J.next();!ie.done;ie=J.next())le=ie.value,le.ia&&(le.ia.Jd=z);V.length&&T.segmentIndex.Ld(V,e.l.Fb()),q&&(be=tf(p.ea,"EXT-X-MEDIA-SEQUENCE",0),ae=(ce=Gn(p.ea,"EXT-X-SKIP"))?Number(rt(ce,"SKIPPED-SEGMENTS")):0,de=w_(be,V,q),re=de.Qb,pe=de.Rb,t.Qb=re+ae,t.Rb=pe,Re=k.get(be),T.segmentIndex.Za(Re)),M_(e,T,t.type),(W=T.segmentIndex.Ib())&&(t.fd=W.startTime,V.length&&(t.Tc=V[V.length-1].endTime)),Gn(p.ea,"EXT-X-ENDLIST")&&(t.ve=!0),dT(e,p),fT(e,p.ea,T.type,w,t.U),Se.j()}})}g.onExpirationUpdated=function(){},g.onInitialVariantChosen=function(){},g.banLocation=function(e){this.m&&this.m.banLocation(e)},g.setMediaElement=function(e){this.ba=e};function u_(e,t,n){n=n===void 0?!1:n;for(var r=e.K==-1,i=x(t),o=i.next();!o.done;o=i.next()){o=o.value;var u=o.stream.segmentIndex,l=aT(e,o);if(u=u.Ib()){l=x(l);for(var h=l.next();!h.done;h=l.next()){h=x(h.value);var p=h.next().value;if(h.next().value==u.startTime){r&&(e.K=Math.max(e.K,p)),o.Ug=p;break}}}}if(!(e.K<0))for(t=x(t),r=t.next();!r.done;r=t.next())r=r.value,(nf(e,r.type)||n)&&(i=r.stream.segmentIndex)&&(o=e.K-r.Ug,o>0&&(i.g.splice(0,o),i=i.Ib())&&(i=-i.startTime,r.stream.segmentIndex.offset(i),l_(e,r,i)))}function uG(e,t){if(e.ma==1/0){t=x(t);for(var n=t.next();!n.done;n=t.next())n=n.value.stream.segmentIndex.Ib(),n!=null&&n.g!=null&&(e.ma=Math.min(e.ma,n.g))}if(t=e.ma,t!=1/0){n=x(e.j.values());for(var r=n.next();!r.done;r=n.next())if(r=r.value,!nf(e,r.type)){var i=r.stream.segmentIndex;if(i!=null){var o=i.Ib();if(o)if(o.g==null)Xt("Missing EXT-X-PROGRAM-DATE-TIME for stream",r.U(),"Expect AV sync issues!");else for(l_(e,r,o.g-t-o.startTime),r=x(i),i=r.next();!i.done;i=r.next())i.value.si(t)}}}}function l_(e,t,n){if(!(Math.abs(n)<.001)){t.fd+=n,t.Tc+=n,e=aT(e,t);for(var r=x(e),i=r.next();!i.done;i=r.next()){var o=x(i.value);i=o.next().value,o=o.next().value,e.set(i,o+n)}t.U()}}function lG(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de;return P(function(re){switch(re.h){case 1:return n=Ln,r=iT(e.Ha,t),i=ga(r.ea,"EXT-X-DEFINE"),o=[],u=[],l=[],e.l=new Ze(null,0),e.l.Yd(!0),h=function(){return[e.H]},p=null,m=new Map,e.h={presentationTimeline:e.l,variants:o,textStreams:u,imageStreams:l,chapterStreams:[],offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.B},r.type==1?(e.R=!1,N=ga(r.ea,"EXT-X-DEFINE"),m=oT(e,N,e.H),p=n.Ba,j="",V=new Map,q=e.H,re.g(b_(e,e.F++,m,r,h,"",p,j,!0,"Media Playlist",null,V,null,!1,null,!1,"",q),7)):(d_(e,i,e.O,e.H),b=ga(r.ea,"EXT-X-MEDIA"),w=ga(r.ea,"EXT-X-STREAM-INF"),T=ga(r.ea,"EXT-X-IMAGE-STREAM-INF"),k=ga(r.ea,"EXT-X-I-FRAME-STREAM-INF"),S=ga(r.ea,"EXT-X-SESSION-KEY"),A=ga(r.ea,"EXT-X-SESSION-DATA"),M=ga(r.ea,"EXT-X-CONTENT-STEERING"),e.L=fG(e,A),e.g.hls.chaptersUri&&!e.L.includes(e.g.hls.chaptersUri)&&e.L.push(e.g.hls.chaptersUri),re.g(hG(e,M),4));case 4:return e.g.ignoreSupplementalCodecs||(w.push.apply(w,se(f_(w,!0))),k.push.apply(k,se(f_(k,!1)))),dG(e,w),EG(e,b),_=yG(e,k),re.g(bG(e,w,S,b,h,e.O,_),5);case 5:return o=re.i,u=pG(e,b),R=x,re.g(Promise.all([gG(e,T,k),uT(e)]),6);case 6:U=R(re.i),l=U.next().value,re.A(3);break;case 7:return G=re.i,e.j.set(e.H,G),G.stream&&(z=nx(G.stream),G.stream.segmentIndex.Jb(function(pe){pe.ia&&(pe.ia.Jd=z)})),p=G.stream.type,J=!0,(e.g.disableAudio&&G.type=="audio"||e.g.disableVideo&&G.type=="video"&&!G.stream.codecs.includes(","))&&(J=!1),J&&o.push({id:0,language:Ft(j||"und"),disabledUntilTime:0,primary:!0,audio:G.type=="audio"?G.stream:null,video:G.type=="video"?G.stream:null,bandwidth:G.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}),e.g.hls.chaptersUri&&!e.L.includes(e.g.hls.chaptersUri)&&e.L.push(e.g.hls.chaptersUri),re.g(uT(e),3);case 3:if(!e.i)throw new B(2,7,7001);if(S_(e,r),r.type!=1){re.A(9);break}return za(e)&&(C_(e,r),ie=e.C,e.D.$(ie)),le=Array.from(e.j.values()),lT(e,le),Ty(e),re.g(fT(e,r.ea,p,m,h),9);case 9:if(e.h.variants=o,e.h.textStreams=u,e.h.imageStreams=l,e.h.chapterStreams=Array.from(e.Aa.values()),e.h.startTime=e.B,e.M||!e.g.hls.disableCodecGuessing){re.A(11);break}for(be=[],ce=x(e.h.variants),ae=ce.next();!ae.done;ae=ce.next())de=ae.value,de.audio&&de.audio.codecs===""&&be.push(de.audio.createSegmentIndex()),de.video&&de.video.codecs===""&&be.push(de.video.createSegmentIndex());return re.g(Promise.all(be),11);case 11:e.i.makeTextStreamsForClosedCaptions(e.h),re.j()}})}function cG(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M;return P(function(_){if(_.h==1)return n=ox(e.g.hls.mediaPlaylistFullMimeType),t.length?(r=P_(e,t),i=r.segment,o=r.segmentIndex,u=i.U(),(l=_d(u[0]))&&(h=gT.get(l))?_.return(ox(h)):_.g(Promise.all([c_(e,i.ia,0),c_(e,i,o)]),2)):_.return(n);if(p=_.i,m=p[1].mimeType,b=p[0].data,w=p[1].data,T="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),k=["audio/mp4","video/mp4","video/iso.segment"],S=i.ia||k.includes(m),!S&&Ad(H(w))){var R=w,U=e.g.disableAudio,N=e.g.disableVideo,j=e.g.disableText,V=H(R),q=new hn().parse(V),G=q.qe();V=q.kj();var z=[],J=!1,ie=!1;if(!U)switch(G.audio){case"aac":case"aac-loas":q.Bb().length&&(z.push("mp4a.40.2"),J=!0);break;case"mp3":q.Bb().length&&(z.push("mp4a.40.34"),J=!0);break;case"ac3":q.Bb().length&&(z.push("ac-3"),J=!0);break;case"ec3":q.Bb().length&&(z.push("ec-3"),J=!0);break;case"opus":q.Bb().length&&(z.push("opus"),J=!0)}if(!N)switch(G.video){case"avc":V.codec?z.push(V.codec):z.push("avc1.42E01E"),ie=!0;break;case"hvc":V.codec?z.push(V.codec):z.push("hvc1.1.6.L93.90"),ie=!0;break;case"av1":z.push("av01.0.01M.08"),ie=!0}if(z.length){if(U=J&&!ie,N=new Map,ie&&!j){for(j=new Oa("video/mp2t"),Q2(j,R),R=x(j.g.getStreams()),ie=R.next();!ie.done;ie=R.next())ie=ie.value,N.set(ie,ie);j.g.clear()}V={type:U?"audio":"video",mimeType:"video/mp2t",codecs:z.join(", "),language:null,height:V.height,width:V.width,channelCount:null,sampleRate:null,closedCaptions:N,Ne:null,colorGamut:null,frameRate:V.frameRate,timescale:null,drmInfos:[]}}else V=null;if(A=V)return _.return(A)}else if((S||T.includes(l))&&(M=wV(b,w,e.g.disableText)))return _.return(M);return m?_.return(ox(m)):_.return(n)})}function c_(e,t,n){var r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:return t?(r=ua,i=fp(t.U(),t.Rc(),t.Oc(),e.i.getStreamingRetryParameters()),o=t instanceof nt?1:0,p.g(is(e,i,r,{type:o}).promise,2)):p.return({mimeType:null,data:null});case 2:if(u=p.i,l=u.data,!t.aesKey){p.A(3);break}return p.g(sx(l,t.aesKey,n),4);case 4:l=p.i;case 3:return t instanceof nt?t.Je(l,!0):t.Je(l),(h=u.headers["content-type"])&&(h=h.split(";")[0].toLowerCase()),p.return({mimeType:h,data:l})}})}function Ty(e){if(e.u==as){for(var t=1/0,n=1/0,r=x(e.j.values()),i=r.next();!i.done;i=r.next())i=i.value,i.stream.segmentIndex&&i.stream.type!="text"&&!i.stream.isAudioMuxedInVideo&&(t=Math.min(t,i.Tc),n=Math.min(n,i.fd));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.li(t)}else e.l.Sb(v_(e));if(!e.l.o)for(t=x(e.j.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=n.stream.segmentIndex.Ib())&&n.g!=null&&e.l.ki(n.g);e.l.Eh()}function oT(e,t,n){var r=new Map;return d_(e,t,r,n,!0),r}function d_(e,t,n,r,i){i=i===void 0?!1:i,t=x(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var u=rt(o,"NAME"),l=rt(o,"VALUE"),h=rt(o,"QUERYPARAM");if(u&&l&&n.getOrInsert(u,l),h){if(!p)var p=new URL(r).searchParams;(u=p.get(h))&&!n.has(u)&&n.set(h,u)}i&&(o=rt(o,"IMPORT"))&&(h=e.O.get(o))&&n.set(o,h)}}function sT(e,t){var n={};t=x(t);for(var r=t.next();!r.done;r=t.next()){if(r=r.value,e.m){var i=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");i=r.toString(i)}else i=r.toString();n[i]?n[i].push(r):n[i]=[r]}return n}function f_(e,t){var n=[];e=x(e);for(var r=e.next(),i={};!r.done;i={pi:void 0},r=e.next())r=r.value,i.pi=Zp(r),i.pi&&(i=r.attributes.map((function(o){return function(u){var l=u.name,h=u.value;return l=="CODECS"&&(h=o.pi,t&&(u=u.value.split(","),u.length>1&&(u=Vr("audio",u))&&(h+=","+u))),new rT(l,h)}})(i)),n.push(new Qp(r.id,r.name,i,null)));return n}function dG(e,t){t=x(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=rt(r,"AUDIO");n=rt(r,"VIDEO");var o=rt(r,"SUBTITLES");if(r=p_(e,r),o){var u=Vr(mt,r);e.J.set(o,u),ke(r,u)}i&&(o=Vr("audio",r),o||(o=e.g.hls.defaultAudioCodec),e.J.set(i,o)),n&&(i=Vr("video",r),i||(i=e.g.hls.defaultVideoCodec),e.J.set(n,i))}}function fG(e,t){var n=[];t=x(t);for(var r=t.next();!r.done;r=t.next()){var i=r.value;r=rt(i,"DATA-ID");var o=rt(i,"URI"),u=rt(i,"LANGUAGE");i=rt(i,"VALUE");var l=new Map().set("id",r);o&&l.set("uri",qs([e.H],o,e.O)[0]),u&&l.set("language",u),i&&l.set("value",i),r=="com.apple.hls.chapters"&&o&&n.push(l.get("uri")),r=new Ge("sessiondata",l),e.i&&e.i.onEvent(r)}return n}function hG(e,t){var n,r,i,o,u,l;return P(function(h){if(!e.i||!e.g)return h.return();for(r=x(t),i=r.next();!i.done;i=r.next())if(o=i.value,u=rt(o,"PATHWAY-ID"),l=rt(o,"SERVER-URI"),u&&l){e.m=new Jd(e.i),e.m.configure(e.g),e.m.i=[e.H],e.m.setManifestType("HLS"),e.m.h=u,n=Vp(e.m,l);break}return h.g(n,0)})}function pG(e,t){var n=e_(t,"SUBTITLES"),r=sT(e,n);if(t=[],!e.g.disableText)for(var i in r)try{t.push(g_(e,r[i],new Map).stream)}catch(u){if(!e.g.hls.ignoreTextStreamFailures)throw u}for(i=x(n),n=i.next();!n.done;n=i.next())if(r=Wt(n.value,"GROUP-ID"),(n=e.J.get(r))&&(r=e.P.get(r))){r=x(r);for(var o=r.next();!o.done;o=r.next())o=o.value,o.stream.codecs=n,o.stream.mimeType=hT(mt,n)||Cy(mt),Jl(o.stream)}return t.filter(function(u){return u})}function Jl(e){var t=new Set([tr(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Jb(function(n){n.mimeType&&t.add(tr(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function gG(e,t,n){var r,i;return P(function(o){return o.h==1?(r=t.map(function(u){var l,h;return P(function(p){if(p.h==1)return e.g.disableThumbnails?p.return(null):(p.m(2),p.g(IG(e,u),4));if(p.h!=2)return l=p.i,p.return(l.stream);if(h=p.l(),e.g.hls.ignoreImageStreamFailures)return p.return(null);throw h})}).concat(n.map(function(u){if(e.g.disableThumbnails)return null;try{var l=m_(e,u);return l.stream.type!=="image"?null:l.stream}catch(h){if(e.g.hls.ignoreImageStreamFailures)return null;throw h}})),o.g(Promise.all(r),2)):(i=o.i,o.return(i.filter(function(u){return u})))})}function uT(e){var t,n,r,i;return P(function(o){if(e.g.disableChapters)return o.return();for(t=[],n=x(e.L),r=n.next();!r.done;r=n.next())i=r.value,t.push(mG(e,i));return o.g(Promise.all(t),0)})}function mG(e,t){var n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N;return P(function(j){if(j.h==1)return n=yn([t],e.g.retryParameters),j.g(is(e,n,10).promise,2);for(r=j.i,i=dt(r.data),o=JSON.parse(i),u=new Map,l=0;l<o.length;l++)if(h=o[l],h.titles){if(p=[],h.images){for(m=x(h.images),b=m.next();!b.done;b=m.next())if(w=b.value,w.url)for(T=qs([r.uri],w.url),k=x(T),S=k.next();!S.done;S=k.next())A=S.value,M={type:w["image-category"],width:w["pixel-width"],height:w["pixel-height"],url:A},p.push(M)}for(_=x(h.titles),R=_.next();!R.done;R=_.next())U=R.value,N={id:"",title:U.title,startTime:h["start-time"],endTime:h["start-time"],images:p},h.duration?N.endTime+=h.duration:l+1<o.length&&(N.endTime=o[l+1]["start-time"]),u.getOrInsertComputed(U.language,function(){return[]}).push(N)}u.forEach(function(V,q){var G=[];V=x(V);for(var z=V.next();!z.done;z=V.next()){z=z.value;var J=new nt(z.startTime,z.endTime,function(){return[]},0,null,null,0,0,1/0);J.hg({title:z.title,images:z.images}),G.push(J)}V=e.Aa.getOrInsertComputed(q,function(){return _s({id:e.F++,mimeType:"text/plain",kind:"",language:q,originalLanguage:q,type:"chapter",external:!0})}),V.segmentIndex?V.segmentIndex.Ld(G,e.l.Fb()):V.segmentIndex=new Et(G)}),j.j()})}function vG(e,t,n){t=t.filter(function(i){var o=rt(i,"URI")||"";return i=rt(i,"TYPE"),i!="SUBTITLES"&&(o!=""||i=="AUDIO"||i=="VIDEO")}),t=sT(e,t);for(var r in t)g_(e,t[r],n,!1)}function yG(e,t){return t.map(function(n){return n=m_(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function bG(e,t,n,r,i,o,u){var l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re;return P(function(W){switch(W.h){case 1:if(l=[],h=new Set,e.g.ignoreDrmInfo||!(n.length>0)){W.A(2);break}p=x(n),m=p.next(),b={};case 3:if(m.done){W.A(2);break}if(w=m.value,T=Wt(w,"METHOD"),k=rt(w,"KEYFORMAT")||"identity",S=null,T=="NONE"){W.A(4);break}if(Ey(T)){b.Ch=qs(i(),Wt(w,"URI"),o),A=b.Ch.sort().join(""),e.za.getOrInsertComputed(A,(function(Se){return function(){return is(e,yn(Se.Ch,e.g.retryParameters),6).promise}})(b)),W.A(4);break}if(k=="identity")return W.g(R_(e,w,"",i,null,o),12);if(M=e.Ac.get(k),!M){_=null,W.A(10);break}return W.g(M(w,"",null),11);case 11:_=W.i;case 10:S=_,W.A(6);break;case 12:S=W.i;case 6:if(S){if(S.keyIds)for(R=x(S.keyIds),U=R.next();!U.done;U=R.next())N=U.value,h.add(N);l.push(S)}case 4:b={Ch:void 0},m=p.next(),W.A(3);break;case 2:j=sT(e,t),V=[];for(q in j)G=j[q],z=G[0],J=TG(z),ie=Number(Wt(z,"BANDWIDTH"))||Number(rt(z,"AVERAGE-BANDWIDTH")),le=rt(z,"RESOLUTION"),be=x(le?le.split("x"):[null,null]),ce=be.next().value,ae=be.next().value,de=rt(z,"VIDEO-RANGE"),(re=rt(z,"REQ-VIDEO-LAYOUT"))&&re.includes(",")&&(pe=re.split(",").filter(function(Se){return Se=="CH-STEREO"||Se=="CH-MONO"}),re=pe[0]),re=re||"CH-MONO",Re=wG(e,G,r),V.push.apply(V,se(AG(e,Re.audio,Re.video,ie,ce,ae,J,de,re,l,h,u)));return W.return(V.filter(function(Se){return Se!=null}))}})}function wG(e,t,n){for(var r={audio:[],video:[]},i=new Map,o=new Set,u=new Set,l=x(t),h=l.next();!h.done;h=l.next()){var p=h.value;h=rt(p,"AUDIO");var m=rt(p,"VIDEO");(h||m)&&(p=rt(p,"PATHWAY-ID"),h&&!o.has(h)&&(o.add(h),p&&i.set(h,p)),m&&!u.has(m)&&(u.add(m),p&&i.set(m,p)))}var b=[].concat(se(o),se(u));b.length&&n.length&&(n=n.filter(function(T){return b.includes(Wt(T,"GROUP-ID"))}),vG(e,n,i)),r.audio.push.apply(r.audio,se(h_(e,o))),r.video.push.apply(r.video,se(h_(e,u))),i=r.video.find(function(T){return T.stream.isAudioMuxedInVideo}),o=!1;var w=t.map(function(T){return Wt(T,"URI")});return m=r.audio.find(function(T){return T&&T.U().find(function(k){return w.includes(k)})}),u=p_(e,t[0]),n=Vr("video",u),l=Vr("audio",u),h=Zp(t[0]),i?(i="video",l&&n&&!r.audio.length&&(u=[[n,l].join()])):l&&!n?(i="audio",o=r.audio.length>0&&!r.audio.some(function(T){return T.stream.isAudioMuxedInVideo})):!r.audio.length&&!r.video.length&&l&&n?(i="video",u=[[n,l].join()]):r.audio.length&&m?(i="audio",o=!0):i=r.video.length&&!r.audio.length?"audio":"video",o||(e=MG(e,t,u,i,h),t=e.stream,o=i=="audio"?r.audio:r.video,u=o.find(function(T){return T.stream.isAudioMuxedInVideo}),t.type==i&&u?(i=u.stream,t.language=i.language,t.originalLanguage=i.originalLanguage,t.label=i.label,t.channelsCount=i.channelsCount,t.audioSamplingRate=i.audioSamplingRate,t.originalId=i.originalId,t.primary=i.primary,t.roles=i.roles,o.splice(o.indexOf(u),1,e)):(t.type=="audio"?r.audio:r.video).push(e)),r.video=r.video.filter(function(T){return!T.stream.isAudioMuxedInVideo}),r}function h_(e,t){return t.size?(t=[].concat(se(t)).sort().join(","),e.P.get(t)||[]):[]}function p_(e,t){return t=rt(t,"CODECS")||"",e.M=t.length>0,e.M||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),h0(t.split(/\s*,\s*/))}function xG(e){return(e=rt(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function kG(e){return(e=rt(e,"SAMPLE-RATE"))?parseInt(e,10):null}function TG(e){return(e=rt(e,"FRAME-RATE"))?parseFloat(e):null}function SG(e){return e=rt(e,"CHANNELS"),e?(e=e.split("/"),e.length!=2?!1:e[1]==="JOC"||e[1].includes("ATMOS")||e[1].includes("IMSA")):!1}function CG(e){return e=Wt(e,"TYPE").toLowerCase(),e=="subtitles"&&(e=mt),e}function AG(e,t,n,r,i,o,u,l,h,p,m,b){for(var w=x(n),T=w.next();!T.done;T=w.next())D_(T.value.stream,i,o,u,l,h,null);for(i=e.g.disableVideo,(!n.length||i)&&(n=[null]),i&&(t=t.filter(function(M){return!M.stream.isAudioMuxedInVideo})),i=e.g.disableAudio,(!t.length||i)&&(t=[null]),i=[],t=x(t),o=t.next();!o.done;o=t.next())for(o=o.value,u=x(n),l=u.next();!l.done;l=u.next()){var k=l.value;(l=o?o.stream:null)&&(l.drmInfos=p,l.keyIds=m),(h=k?k.stream:null)&&(h.drmInfos=p,h.keyIds=m,e.g.disableIFrames||H5(h,b)),h&&!l&&(h.bandwidth=r),!h&&l&&(l.bandwidth=r),w=o?o.stream.drmInfos:null,T=k?k.stream.drmInfos:null,k=k?k.U().sort().join(","):"";var S=o?o.U().sort().join(","):"",A=[];l&&l.codecs&&A.push(l.codecs),h&&h.codecs&&A.push(h.codecs),k=[k,S,A.sort()].join("-"),l&&h&&!ed(w,T)||e.mb.has(k)||(l={id:e.F++,language:l?l.language:"und",disabledUntilTime:0,primary:!!l&&l.primary||!!h&&h.primary,audio:l,video:h,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(l),e.mb.add(k))}return i}function EG(e,t){t=e_(t,"CLOSED-CAPTIONS"),e.R=t.length==0,t=x(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=rt(r,"LANGUAGE");n=Ft(i||"und"),i||(i=rt(r,"NAME"))&&(n=i),i=Wt(r,"GROUP-ID"),r=Wt(r,"INSTREAM-ID").replace("SERVICE","svc"),e.I.get(i)||e.I.set(i,new Map),e.I.get(i).set(r,n)}}function g_(e,t,n,r){r=r===void 0?!0:r;for(var i=[],o=[],u=new Map,l=x(t),h=l.next(),p={};!h.done;p={nj:void 0},h=l.next()){h=h.value,p.nj=++e.F,p=(function(M){return function(){return"shaka://hls-muxed"+M.nj}})(p);var m=r?Wt(h,"URI"):rt(h,"URI")||p();p=Wt(h,"GROUP-ID"),i.push(m),o.push(p),u.set(p,m),(h=rt(h,"PATHWAY-ID"))&&n.set(p,h)}if(r=o.sort().join(","),h=t[0],t="",l=CG(h),l==mt&&(t=rt(h,"CODECS")||""),!t){for(o=x(o),p=o.next();!p.done;p=o.next())if(p=p.value,e.J.has(p)){t=e.J.get(p);break}}if(p=Zp(h),o=m=i.sort().join(","),l=="audio"&&r&&(o+=r),e.j.has(o))return e.j.get(o);var b=e.F++;if(e.m){u=x(u);for(var w=u.next();!w.done;w=u.next()){var T=x(w.value);w=T.next().value,T=T.next().value,(w=n.get(w))&&Qd(e.m,b,w,T)}}n=rt(h,"LANGUAGE"),u=rt(h,"NAME"),w=rt(h,"DEFAULT")=="YES",T=l=="audio"?xG(h):null;var k=l=="audio"?SG(h):!1,S=rt(h,"CHARACTERISTICS"),A=rt(h,"FORCED")=="YES";return h=l=="audio"?kG(h):null,i=Sy(e,b,i,t,l,n,w,u,T,null,S,A,h,k,p,m),e.P.has(r)?e.P.get(r).push(i):e.P.set(r,[i]),e.j.set(o,i),i}function IG(e,t){var n,r,i,o,u,l,h,p,m,b,w,T;return P(function(k){return k.h==1?(n=Wt(t,"URI"),r=rt(t,"CODECS","jpeg")||"",i=Zp(t),e.j.has(n)?k.return(e.j.get(n)):(o=rt(t,"LANGUAGE"),u=rt(t,"NAME"),l=rt(t,"CHARACTERISTICS"),h=n,p=Sy(e,e.F++,[n],r,"image",o,!1,u,null,null,l,!1,null,!1,i,h),(m=rt(t,"RESOLUTION"))?k.g(p.stream.createSegmentIndex(),3):k.A(2))):(k.h!=2&&(b=p.stream.segmentIndex.Ib(),(w=b.tilesLayout)&&(p.stream.width=Number(m.split("x")[0])*Number(w.split("x")[0]),p.stream.height=Number(m.split("x")[1])*Number(w.split("x")[1])),p.stream.closeSegmentIndex()),(T=rt(t,"BANDWIDTH"))&&(p.stream.bandwidth=Number(T)),e.j.set(n,p),k.return(p))})}function m_(e,t){var n="video",r=Wt(t,"URI"),i=rt(t,"CODECS")||"",o=Zp(t);if(i=="mjpg"&&(n="image"),e.j.has(r))return e.j.get(r);var u=rt(t,"LANGUAGE"),l=rt(t,"NAME"),h=rt(t,"CHARACTERISTICS");return n=Sy(e,e.F++,[r],i,n,u,!1,l,null,null,h,!1,null,!1,o,r),n.stream.isIframe=!0,i=rt(t,"RESOLUTION"),o=x(i?i.split("x"):[null,null]),i=o.next().value,o=o.next().value,n.stream.width=Number(i)||void 0,n.stream.height=Number(o)||void 0,(t=rt(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(r,n),n}function MG(e,t,n,r,i){for(var o=e.F++,u=[],l=x(t),h=l.next();!h.done;h=l.next()){var p=h.value;h=Wt(p,"URI"),p=rt(p,"PATHWAY-ID"),e.m&&p&&Qd(e.m,o,p,h),u.push(h)}if(l=u.sort().join(",")+n.sort().join(","),e.j.has(l))return e.j.get(l);h=u.join(",");e:{if(t=rt(t[0],"CLOSED-CAPTIONS"),r=="video"){if(e.g.disableText){e.R=!1,t=null;break e}if(t){if(t!="NONE"){t=e.I.get(t);break e}e.R=!1}else if(!t&&e.I.size)for(t=x(e.I.keys()),t=t.next();!t.done;t=t.next()){t=e.I.get(t.value);break e}}t=null}return n=rd(r,n),r=Sy(e,o,u,n,r,null,!1,null,null,t,null,!1,null,!1,i,h),e.j.set(l,r),r}function Sy(e,t,n,r,i,o,u,l,h,p,m,b,w,T,k,S){function A(j){var V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W,Se,Ee,Xe,vt,wn;return P(function(bt){switch(bt.h){case 1:return V=Ln,bt.m(2),bt.g(j.promise,4);case 4:if(q=bt.i,j.aborted)return bt.return();if(G=q.uri,G!=q.originalUri&&(z=R.U(),z.includes(G)||R.Zf.push(G)),J=iT(e.Ha,q.data),J.type!=1)throw new B(2,4,4017);return ie=ga(J.ea,"EXT-X-DEFINE"),le=oT(e,ie,G),be=!1,(!e.M&&e.g.hls.disableCodecGuessing||e.R&&i==V.Ba&&!e.g.hls.disableClosedCaptionsDetection)&&J.segments.length>0&&(e.R=!1,be=!0),ce=!e.M&&e.g.hls.disableCodecGuessing,ae=za(e),bt.g(b_(e,0,le,J,M,r,i,o,u,l,h,p,m,b,w,T,k,S,void 0,be,ce),5);case 5:return de=bt.i,j.aborted?bt.return():(re=de.stream,S_(e,J),za(e)&&!ae&&C_(e,J),R.fd=de.fd,R.Tc=de.Tc,R.lf=de.lf,R.kf=de.kf,R.jf=de.jf,R.ve=de.ve,R.Of=de.Of,R.Qb=de.Qb,R.Rb=de.Rb,_.segmentIndex=re.segmentIndex,_.encrypted=re.encrypted,_.drmInfos=re.drmInfos,_.keyIds=re.keyIds,_.mimeType=re.mimeType,_.bandwidth=_.bandwidth||re.bandwidth,_.codecs=_.codecs||re.codecs,_.closedCaptions=_.closedCaptions||re.closedCaptions,_.width=_.width||re.width,_.height=_.height||re.height,_.hdr=_.hdr||re.hdr,_.colorGamut=_.colorGamut||re.colorGamut,_.frameRate=_.frameRate||re.frameRate,_.language=="und"&&re.language!="und"&&(_.language=re.language),_.language=_.language||re.language,_.channelsCount=_.channelsCount||re.channelsCount,_.audioSamplingRate=_.audioSamplingRate||re.audioSamplingRate,Jl(_),R.type!=V.Ba||de.type!=V.aa||e.M&&!sa.includes(_.mimeType)||PG(e,R,re),_.drmInfos.length&&e.i.newDrmInfo(_),pe=!1,(!p&&_.closedCaptions||p&&_.closedCaptions&&p.size!=_.closedCaptions.size)&&(pe=!0),e.h&&pe&&e.i.makeTextStreamsForClosedCaptions(e.h),i==V.Xa&&(Re=re.segmentIndex.Ib())&&Re.ia&&(_.mimeType="application/mp4",Jl(_)),W=nx(_),_.segmentIndex.Jb(function(cn){cn.ia&&(cn.ia.Jd=W)}),_G(e)&&(e.Gc?lT(e,[R]):(e.Gc=!0,Se=Array.from(e.j.values()),Ee=Se.filter(function(cn){return cn.stream.segmentIndex}),lT(e,Ee),Ty(e),Xe=e.C,Xe>0&&e.D.$(Xe))),e.h&&(e.h.startTime=e.B),bt.g(fT(e,J.ea,_.type,le,M),6));case 6:bt.o(0);break;case 2:if(vt=bt.l(),_.closeSegmentIndex(),vt.code===7001)return bt.return();if(wn=e.i.disableStream(_),!wn)throw vt;bt.j()}})}function M(){return e.m&&n.length>1?$p(e.m,t):R.Zf.concat(t_([e.H],n,e.O))}var _=x_(e,r,i,o,u,l,h,p,m,b,w,T,k,S);n.some(function(j){return j.startsWith("shaka://hls-muxed")})&&(_.isAudioMuxedInVideo=!0,i=="audio"&&(_.mimeType="video/mp2t",Jl(_)));var R={stream:_,type:i,Zf:[],fd:0,Tc:0,Of:new Map,lf:!1,kf:!1,jf:!1,ve:!1,Ug:-1,Qb:-1,Rb:-1,U:M},U=null,N;return _.createSegmentIndex=function(){return U||(_.isAudioMuxedInVideo?(_.segmentIndex=new Et([]),Promise.resolve()):(N=pT(e,R.U(),!0),U=new Promise(function(j){j(A(N))})))},_.closeSegmentIndex=function(){U&&!_.segmentIndex&&N.abort(),_.segmentIndex&&(_.segmentIndex.release(),_.segmentIndex=null),U=null},R}function PG(e,t,n){var r=t.stream,i=n.type,o=t.type;if(e.u==as&&(e.o.set(i,e.o.get(o)),e.o.set(o,new Map)),t.type=i,r.type=i,r.codecs=Vr(i,n.codecs.split(/\s*,\s*/))||"",Jl(r),e.h){for(t=x(e.h.variants),n=t.next();!n.done;n=t.next())n=n.value,i=="audio"&&n.video==r&&(n.video=null,n.audio||(n.audio=r,n.language=r.language));e.h.variants=e.h.variants.filter(function(u){return u.audio||u.video})}}function v_(e){var t=1/0;e=x(e.j.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Tc));return t}function y_(e,t){var n=[];t=x(t);for(var r=t.next();!r.done;r=t.next())r=r.value,r.segmentIndex&&r.segmentIndex.Jb(function(i){n.push(i)});e.l.De(n)}function lT(e,t){if(!za(e))for(var n=v_(e),r=x(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.xd(0,n);y_(e,t.map(function(o){return o.stream})),r=Array.from(e.j.values()).filter(function(o){return o.stream.segmentIndex}),n=r.some(function(o){return o.stream.type=="audio"}),i=r.some(function(o){return o.stream.type=="video"}),r=e.u==as&&!e.kb,n=!za(e)&&e.kb&&!(n&&i),e.g.hls.ignoreManifestProgramDateTime||r||n?u_(e,t,r):(uG(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&u_(e,t))}function nf(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function _G(e){if(!e.h||!e.h.variants.length)return!1;var t=[],n=[];e=x(e.h.variants);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&t.push(r.video),r.audio&&n.push(r.audio);return!(t.length>0&&!t.some(function(i){return i.segmentIndex})||n.length>0&&!n.some(function(i){return i.segmentIndex}))}function b_(e,t,n,r,i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U){R=R===void 0?!0:R,U=U===void 0?!0:U;var N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W,Se,Ee,Xe,vt,wn,bt,cn,Nt,ya,si,Wa,Xa,ui,Yi;return P(function(Sn){switch(Sn.h){case 1:if(N=u,j=r.segments||[],V=j.every(function(Ya){return!!Gn(Ya.ea,"EXT-X-GAP")}),!j.length||V)throw new B(2,4,4053);if(DG(e,r),za(e)&&dT(e,r),q=e.u==as?e.o.get(u):new Map,G=I_(e,r,q,n,i,u,!0,null),z=G.segments,J=G.bandwidth,_||u!=mt){Sn.A(2);break}return Sn.g(__(e,u,o,z),3);case 3:_=Sn.i,o||_!="application/mp4"||!z[0]||z[0].ia||(_="text/vtt"),o||_!="application/mp4"||(U=R=!0);case 2:if(ae=ce=be=le=ie=null,!(z.length>0&&R)){Sn.A(4);break}return Sn.g(cG(e,z),5);case 5:de=Sn.i,u!=de.type&&e.u==as&&(e.o.set(de.type,e.o.get(u)),e.o.set(u,new Map)),u=de.type,de.type!="video"&&(l=de.language),m=de.channelCount,k=de.sampleRate,e.g.disableText||(b=de.closedCaptions),le=de.height,ie=de.width,be=de.Ne,ce=de.colorGamut,ae=de.frameRate,U&&(_=de.mimeType,o=de.codecs);case 4:if(_){Sn.A(6);break}return Sn.g(__(e,u,o,z),7);case 7:_=Sn.i;case 6:return N=="video"&&sa.includes(_)&&(u="audio"),Sn.g(k_(e,r,_,i,n),8);case 8:if(re=Sn.i,pe=re.drmInfos,Re=re.keyIds,W=re.encrypted,Se=re.Ki,W&&!pe.length&&!Se)throw new B(2,4,4026);return Ee=x_(e,o,u,l,h,p,m,b,w,T,k,S,A,M),Ee.encrypted=W&&!Se,Ee.drmInfos=pe,Ee.keyIds=Re,Ee.mimeType=_,J&&(Ee.bandwidth=J),Gn(r.ea,"EXT-X-I-FRAMES-ONLY")&&(Ee.isIframe=!0),Jl(Ee),u=="video"&&(ie||le||be||ce)&&D_(Ee,ie,le,ae,be,null,ce),za(e)&&dT(e,r),Xe=z[0].startTime,vt=z[z.length-1],wn=vt.endTime,bt=new Et(z),Ee.segmentIndex=bt,M_(e,Ee,u),Nt=(cn=Gn(r.ea,"EXT-X-SERVER-CONTROL"))?Yl(cn,"CAN-SKIP-UNTIL")!=null:!1,ya=!1,Nt&&(ya=cn?Yl(cn,"CAN-SKIP-DATERANGES")!=null:!1),si=cn?Yl(cn,"CAN-BLOCK-RELOAD")!=null:!1,Wa=tf(r.ea,"EXT-X-MEDIA-SEQUENCE",0),Xa=w_(Wa,z),ui=Xa.Qb,Yi=Xa.Rb,Sn.return({stream:Ee,type:u,Zf:[],U:i,fd:Xe,Tc:wn,lf:Nt,kf:ya,jf:si,ve:!1,Ug:-1,Qb:ui,Rb:Yi,Of:q})}})}function w_(e,t,n){if(n=n===void 0?t.length:n,e=e+n-1,n=-1,!t.length)return e++,{Qb:e,Rb:n};t=t[t.length-1];var r=t.h;return t.h.length?(n=r.length-1,r[r.length-1].isPreload()||(e++,n=0),{Qb:e,Rb:n}):(e++,t.o&&(n=0),{Qb:e,Rb:n})}function cT(e,t,n){return!e||!t.has(n)?null:(t=t.get(n),n=e.find(t),n==null?null:(e=e.get(n))&&e.startTime==t?e:null)}function x_(e,t,n,r,i,o,u,l,h,p,m,b,w,T){var k=hT(n,t)||Cy(n),S=[];if(h){h=x(h.split(","));for(var A=h.next();!A.done;A=h.next())S.push(A.value)}return h=void 0,A=null,n==mt?h=S.includes("public.accessibility.transcribes-spoken-dialog")&&S.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":S.includes("public.accessibility.describes-video")&&(A="visually impaired"),S.length||h!=="subtitle"||S.push("subtitle"),e={id:e.F++,originalId:T,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:k,codecs:t,supplementalCodecs:w,kind:n==mt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ft(r||"und"),originalLanguage:r,label:o,type:n,primary:i,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:S,forced:p,channelsCount:u,audioSamplingRate:m,spatialAudio:b,closedCaptions:l,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:A,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1},Jl(e),e}function k_(e,t,n,r,i){var o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de;return P(function(re){switch(re.h){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments){for(u=x(t.segments),l=u.next();!l.done;l=u.next())if(h=l.value,p=ga(h.ea,"EXT-X-KEY"),m=null,p.length)for(m=A_(e,t,h.ea,r,i),b=x(p),w=b.next();!w.done;w=b.next())T=w.value,o.set(T,m)}S=k=!1,A=[],M=new Set,_=x(o),R=_.next();case 2:if(R.done){re.A(4);break}if(U=R.value,N=x(U),j=N.next().value,V=N.next().value,q=j,G=V,z=Wt(q,"METHOD"),z=="NONE"){re.A(3);break}if(k=!0,J=rt(q,"KEYFORMAT")||"identity",ie=null,Ey(z)){S=!0,re.A(3);break}if(J=="identity")return re.g(R_(e,q,n,r,G,i),11);if(le=e.Ac.get(J),!le){be=null,re.A(9);break}return re.g(le(q,n,G),10);case 10:be=re.i;case 9:ie=be,re.A(6);break;case 11:ie=re.i;case 6:if(ie){if(ie.keyIds)for(ce=x(ie.keyIds),ae=ce.next();!ae.done;ae=ce.next())de=ae.value,M.add(de);A.push(ie)}case 3:R=_.next(),re.A(2);break;case 4:return re.return({drmInfos:A,keyIds:M,encrypted:k,Ki:S})}})}function T_(e,t,n,r,i){if(!d.crypto||!d.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new B(2,4,4042);var o=Wt(t,"METHOD"),u=0,l=rt(t,"IV","");if(o==="AES-256-GCM"){if(l)throw new B(2,4,4059)}else if(l){var h=gu(l.substr(2));if(h.byteLength!=16)throw new B(2,4,4048)}else u=tf(n.ea,"EXT-X-MEDIA-SEQUENCE",0);var p=qs(r(),Wt(t,"URI"),i),m=p.sort().join("");return e.cc.getOrInsertComputed(t.toString()+"-"+u+"-"+m,function(){var b={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:u};switch(o){case"AES-256":b.bitsKey=256;break;case"AES-256-CTR":b.bitsKey=256,b.blockCipherMode="CTR";break;case"AES-256-GCM":b.bitsKey=256,b.blockCipherMode="GCM"}return b.fetchKey=function(){var w,T;return P(function(k){if(k.h==1)return k.g(e.za.getOrInsertComputed(m,function(){return is(e,yn(p,e.g.retryParameters),6).promise}),2);if(k.h!=3){if(w=k.i,!w.data||w.data.byteLength!=b.bitsKey/8)throw new B(2,4,4049);return T={name:b.blockCipherMode==="CBC"?"AES-CBC":b.blockCipherMode==="GCM"?"AES-GCM":"AES-CTR",length:b.bitsKey},k.g(d.crypto.subtle.importKey("raw",w.data,T,!0,["decrypt"]),3)}b.cryptoKey=k.i,b.fetchKey=void 0,k.j()})},b})}function S_(e,t){e.B==null&&(t=Gn(t.ea,"EXT-X-START"))&&(e.B=Number(Wt(t,"TIME-OFFSET")))}function DG(e,t){var n=Gn(t.ea,"EXT-X-PLAYLIST-TYPE");t=Gn(t.ea,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?Ay(e,My):n?Ay(e,as):Ay(e,$G)}function dT(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;i>=0;){var o=Gn(r[i].ea,"EXTINF");if(o){n=xy(o);break}i--}if(r=Gn(t.ea,"EXT-X-TARGETDURATION"),!r)throw new B(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=Gn(t.ea,"EXT-X-PART-INF"))&&(e.V=Number(Wt(i,"PART-TARGET"))),t=Gn(t.ea,"EXT-X-SERVER-CONTROL"),e.Y&&e.V?(e.C=e.Bc?e.V*5<=n?Math.min(e.V,e.C):Math.min(n,e.C):Math.min(e.V,e.C),e.Fa=t?Number(Wt(t,"PART-HOLD-BACK")):0):(e.C=Math.min(n,e.C),n=t?Yl(t,"HOLD-BACK"):null,e.wa=n?Number(n.value):0),e.Pa=Math.max(r,e.Pa)}function C_(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.wa)n=e.wa;else for(var r=t.segments.length,i=r-Math.min(r,e.g.hls.liveSegmentsDelay);i<r;i++){var o=Gn(t.segments[i].ea,"EXTINF");n=o?n+xy(o):n+e.Pa}e.B&&e.B<0&&(n=Math.min(-e.B,n),e.B+=n),e.l.Xj(0),e.l.ji(n),e.l.Yd(!1)}function A_(e,t,n,r,i){var o=Gn(n,"EXT-X-MAP");if(!o)return null;var u=Wt(o,"URI"),l=qs(r(),u,i);return u=[l.toString(),rt(o,"BYTERANGE","")].join("-"),e.Ec.getOrInsertComputed(u,function(){for(var h=void 0,p=void 0,m=!1,b=x(n),w=b.next();!w.done;w=b.next())w=w.value,w.name=="EXT-X-KEY"?(m=Wt(w,"METHOD"),Ey(m)&&w.id<o.id?(m=!1,h=T_(e,w,t,r,i)):m=m!="NONE"):w.name=="EXT-X-BYTERANGE"&&w.id<o.id&&(p=w);return LG(l,o,p,h,m)})}function LG(e,t,n,r,i){var o=0,u=null;return t=rt(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(o=t.split("@"),u=Number(o[0]),o=Number(o[1]),u=o+u-1,r&&(n=u+1-o,n%16&&(u+=16-n%16))),new Ci(function(){return e},o,u,null,null,null,r,i)}function RG(e,t,n,r,i,o,u,l,h,p){var m=r.ea,b=Gn(m,"EXTINF"),w=0,T=0,k=null;r.dc.length&&(e.h.isLowLatency=!0);var S=null;if(!e.g.hls.ignoreManifestProgramDateTime){var A=Gn(m,"EXT-X-PROGRAM-DATE-TIME");A&&A.value&&(S=Xo(A.value),e.kb=!0)}var M=Ns;if(Gn(m,"EXT-X-GAP")&&(e.h.gapCount++,M=2),!b){if(r.dc.length==0)throw new B(2,4,4024,"EXTINF");if(!e.Y)return null}var _=[];A=!1;var R=null,U=!1,N=!1;if(e.Y&&r.dc.length){w=t&&d.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var j=S,V={},q=0;q<r.dc.length;V={rg:void 0,Fe:void 0},q++){var G=r.dc[q],z=q==0?n:_[_.length-1],J=q==0?i:z.endTime,ie=Number(rt(G,"DURATION"))||e.V;if(ie){var le=J+ie,be=0,ce=null;if(G.name=="EXT-X-PRELOAD-HINT"?(be=(be=rt(G,"BYTERANGE-START"))?Number(be):0,(z=rt(G,"BYTERANGE-LENGTH"))?ce=be+Number(z)-1:be&&(ce=Number.MAX_SAFE_INTEGER)):(be=rt(G,"BYTERANGE"),ce=x(E_(z,be)),be=ce.next().value,ce=ce.next().value),V.Fe=rt(G,"URI"),V.Fe){z=Ns,rt(G,"GAP")=="YES"&&(e.h.gapCount++,z=2,U=!0),V.rg=null;var ae=(function(re){return function(){return re.rg==null&&(re.rg=qs(l(),re.Fe,o)),re.rg}})(V);w&&be>=0&&ce!=null&&(R=ae,A=!0),J=new nt(J,le,ae,be,ce,t,0,0,1/0,[],"",null,j,z,p),G.name=="EXT-X-PRELOAD-HINT"&&(J.Fh(),N=!0),rt(G,"INDEPENDENT")!="YES"&&q>0&&J.Id(),G=h,G||(_.length&&_[0].mimeType?G=_[0].mimeType:V.Fe&&(V=_d(V.Fe),G=Iy.get(u).get(V)||null)),G&&(J.mimeType=G,O_.has(G)&&(J.ia=null)),_.push(J),j&&(j+=ie)}}}}if(b){if(b=xy(b),b==0)return null;w=i+b}else if(_.length)w=_[_.length-1].endTime;else return null;A&&(U||_[0].startByte!=0?(A=!1,R=null):_=[]),(b=Gn(m,"EXT-X-BYTERANGE"))?(k=x(E_(n,b.value)),T=k.next().value,k=k.next().value):_.length&&(T=_[0].startByte,k=_[_.length-1].endByte),n="",b=null,u=="image"&&(n="1x1",u=Gn(m,"EXT-X-TILES"))&&(n=Wt(u,"LAYOUT"),(u=rt(u,"DURATION"))&&(b=Number(u)));var de=null;return t=new nt(i,w,function(){return R?R():(de==null&&(de=qs(l(),r.g,o)),de||[])},T,k,t,0,0,1/0,_,n,b,S,M,p,_.length>0&&!!r.g),h&&(t.mimeType=h,O_.has(h)&&(t.ia=null)),A&&(e.Bc=!0,t.xj(),N&&t.Fh()),t}function E_(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.endByte+1,r=n+t-1),[n,r]}function fT(e,t,n,r,i){var o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W,Se;return P(function(Ee){if(o=Ln,n!=o.Ba&&n!=o.aa||(u=e.l.j,u==null||nf(e,n)))return Ee.return();for(l=ga(t,"EXT-X-DATERANGE"),l=l.filter(function(Xe){return Yl(Xe,"START-DATE")!=null}).sort(function(Xe,vt){return Xe=Wt(Xe,"START-DATE"),vt=Wt(vt,"START-DATE"),Xe<vt?-1:Xe>vt?1:0}),h=[],p=0;p<l.length;p++){m=l[p];try{if(b=Wt(m,"START-DATE"),w=Xo(b),!isNaN(w)){if(T=Math.max(0,w-u),k=null,(S=rt(m,"END-DATE"))&&(A=Xo(S),!isNaN(A)&&(k=A-u,k<0))||k==null&&(M=rt(m,"DURATION")||rt(m,"PLANNED-DURATION"))&&(_=parseFloat(M),isNaN(_)||(k=T+_),R=w-u+_,R<0))continue;if(U=rt(m,"CLASS")||"com.apple.quicktime.HLS",N=rt(m,"END-ON-NEXT")=="YES",k==null&&N){for(j=p+1;j<l.length;j++)if(V=rt(l[j],"CLASS")||"com.apple.quicktime.HLS",U==V&&(q=Wt(l[j],"START-DATE"),G=Xo(q),!isNaN(G)&&G&&G>w)){k=Math.max(0,G-u);break}if(k==null)continue}for(z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"],J=[],ie=x(m.attributes),le=ie.next();!le.done;le=ie.next())be=le.value,!z.includes(be.name)&&(ce=n_(be.value,r),(be.name=="X-ASSET-URI"||be.name=="X-ASSET-LIST")&&(ce=qs(i(),be.value,r)[0]),ae={key:be.name,description:"",data:ce,mimeType:null,pictureType:null},J.push(ae));de={schemeIdUri:U,value:"",startTime:T,endTime:k??1/0,id:Wt(m,"ID"),timescale:1,eventNode:null,urlParams:void 0,values:J},e.i.onTimelineRegionAdded(de),J.length>1&&(re=e.i.onMetadata(U,T,k,J),pe=!1,(Re=J.find(function(Xe){return Xe.key=="CUE"}))&&(W=Re.data,W.includes("PRE")&&(pe=!0)),k==null||pe||(Se=void 0,Se=e.h.startTime!=null?e.h.startTime:za(e)?e.h.presentationTimeline.Eb():e.h.presentationTimeline.Kb(),pe=T<=Se&&k>=Se),pe&&h.push(re))}}catch{}}return h.length?Ee.g(Promise.all(h),0):Ee.A(0)})}function I_(e,t,n,r,i,o,u,l){function h(ae){if(ae=_d(ae),!ae)return null;var de=Iy.get(o).get(ae);return de||(de=gT.get(ae)),de}var p=t.segments,m=null,b=null,w=null,T=null,k=void 0,S=tf(t.ea,"EXT-X-DISCONTINUITY-SEQUENCE",-1),A=tf(t.ea,"EXT-X-MEDIA-SEQUENCE",0),M=Gn(t.ea,"EXT-X-SKIP"),_=M?Number(rt(M,"SKIPPED-SEGMENTS")):0,R=A+_,U=0;e.u==as&&n.has(R)&&(U=n.get(R)),U===0&&e.u==as&&n.size>0&&!n.has(R)&&e.l.h!=null&&(U=e.l.Fb());var N=[];M=[];var j=null,V=null,q=[],G=0;if(!u&&l){G=p.length;for(var z=0;z<p.length;z++){if(R=A+_+z,!n.has(R)){G=z;break}if(p[z].dc.length){G=z;break}if(e.Y){var J=Gn(p[z].ea,"EXTINF");if(J&&(J=xy(J),(R=cT(l,n,R))&&Math.abs(R.endTime-R.startTime-J)>.001)){G=z;break}}}G>0&&((j=cT(l,n,A+_+G-1))?V=j:G=0)}for(z=V,!z&&l&&(z=cT(l,n,A+_)||l.get(l.getNumEvicted()+l.getNumReferences()-1)),l=0;l<p.length;l++){var ie=p[l];(R=Gn(ie.ea,"EXT-X-MAP"))&&R.id!==b&&(m=A_(e,t,ie.ea,i,r),b=R.id),R=ie.g,J="",R&&(J=_d(R)),J!==T&&(w=h(R),T=J);var le=l==0?U:j.endTime;R=A+_+l,Gn(ie.ea,"EXT-X-DISCONTINUITY")&&(S++,l>=G&&j&&j.ia&&(j.ia.g=le)),J=x(ie.ea);for(var be=J.next();!be.done;be=J.next())be=be.value,be.name=="EXT-X-KEY"&&(Ey(Wt(be,"METHOD"))?k=T_(e,be,t,i,r):k=void 0);if(!(l<G)&&(J=u||!n.has(R),n.set(R,le),le=RG(e,m,j,ie,le,r,o,i,w,k))){if((j=tf(ie.ea,"EXT-X-BITRATE"))?(q.push({bitrate:j,duration:le.endTime-le.startTime}),le.bandwidth=j):le.endByte?(ie=jw(le))&&(j=le.endTime-le.startTime,ie=ie*8/j/1e3,q.push({bitrate:ie,duration:j}),le.bandwidth=ie):q.length&&(j=q[q.length-1],j.duration+=le.endTime-le.startTime,le.bandwidth=j.bitrate),le.bandwidth)for(j=x(le.h),ie=j.next();!ie.done;ie=j.next())ie.value.bandwidth=le.bandwidth;j=le,le.i=S,nf(e,o)&&e.K!=null&&R<e.K||(N.push(le),!J&&u||M.push(le))}}t=void 0,q.length&&(t=q.reduce(function(ae,de){return ae+de.duration},0),t=Math.round(q.reduce(function(ae,de){return ae+de.bitrate*de.duration},0)/t*1e3));var ce;if(q=!((ce=V)==null||!ce.g)||N.some(function(ae){return ae.g!=null})){for(ce={},n=0;n<N.length;ce={yf:void 0,xf:void 0,ef:void 0,hd:void 0,fe:void 0},n++)if(ce.hd=N[n],ce.hd.g==null)for(ce.xf=0,ce.yf=n,r=(function(ae){return function(){var de=N[ae.yf];if(de){if(de.g!=null)return de.g+ae.xf;ae.xf-=de.endTime-de.startTime,ae.yf+=1}return null}})(ce),ce.fe=0,ce.ef=n,i=(function(ae){return function(){var de=N[ae.ef];if(de){if(de!=ae.hd&&(ae.fe+=de.endTime-de.startTime),de.g!=null)return de.g+ae.fe;--ae.ef}else if(V&&V.g!=null)return V.g+(V.endTime-V.startTime)+ae.fe;return null}})(ce);ce.hd.g==null;)ce.hd.g=i(),ce.hd.g==null&&(ce.hd.g=r())}if(q)for(ce=0,r=V,z&&z.g!=null&&(n=e.ib.get(z),n!=null&&(ce=n-z.g)),z=x(N),n=z.next();!n.done;n=z.next()){for(n=n.value,n.g!=null&&(e.ib.set(n,n.g),r&&r.g!=null&&r.i!=n.i&&(r=n.g-(r.g+(r.endTime-r.startTime))-ce,Math.abs(r)>1&&(ce+=r)),n.g-=ce),r=n.g,i=x(n.h),p=i.next();!p.done;p=i.next())p=p.value,p.g=r,r+=p.endTime-p.startTime;r=n}if(z=e.ma,q&&z!=1/0&&!nf(e,o))for(e=x(N),ce=e.next();!ce.done;ce=e.next())ce.value.si(z);return{segments:u?N:M,Km:G+N.length,bandwidth:t}}function M_(e,t,n){if(n=="video"&&!nf(e,n)&&t.segmentIndex){n=[];var r=null;t=x(t.segmentIndex);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.g!=null){var o=e.ib.get(i);if(o!=null){var u=o-i.g;(r==null||Math.abs(u-r)>.001)&&n.push({start:i.startTime,Ph:o}),r=u}}e.l.Yj(n)}}function hT(e,t){if(e==mt){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Cy(e){return e==mt?"text/vtt":Iy.get(e).get("mp4")}function P_(e,t){e=e.u==as?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.tc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function __(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A;return P(function(M){switch(M.h){case 1:return i=ua,o=P_(e,r),u=o.segment,u.status==2?M.return(Cy(t)):(h=u.U(),(p=_d(h[0]))&&(m=Iy.get(t),(b=m.get(p))||(b=gT.get(p)))?M.return(b):(l=hT(t,n))?M.return(l):(T=1,k=yn(h,e.i.getStreamingRetryParameters()),M.m(2),k.method="HEAD",M.g(is(e,k,i,{type:T}).promise,4)));case 4:S=M.i,w=S.headers["content-type"],M.o(3);break;case 2:if(A=M.l(),!A||A.code!=1002&&A.code!=1001){M.A(3);break}return k.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(k.headers.Range="bytes=0-0"),M.g(is(e,k,i,{type:T}).promise,6);case 6:S=M.i,w=S.headers["content-type"];case 3:if(!w){M.A(7);break}if(l=w.toLowerCase().split(";")[0],!j_.includes(l)){M.A(8);break}if(S.data.byteLength){M.A(9);break}return k.method="GET",M.g(is(e,k,i,{type:T}).promise,10);case 10:S=M.i;case 9:Ad(H(S.data))&&(l="video/mp2t");case 8:if(!j_.includes(l))return M.return(l);case 7:return M.return(Cy(t))}})}function D_(e,t,n,r,i,o,u){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=r||void 0,e.hdr=i||void 0,e.videoLayout=o||void 0,e.colorGamut=u||void 0)}function pT(e,t,n){return is(e,yn(t,e.g.retryParameters),0,{type:n?2:3})}function L_(e){var t,n,r,i,o,u;return P(function(l){switch(l.h){case 1:return e.i?(l.m(2),t=Date.now(),l.g(e.update(),4)):l.return();case 4:n=Date.now(),za(e)&&(r=(n-t)/1e3,e.sb.sample(1,r),i=e.g.updatePeriod>0?e.g.updatePeriod:e.C,o=Math.max(0,i-tn(e.sb)),isFinite(o)?e.D.$(o):e.D.$(1)),l.o(3);break;case 2:if(u=l.l(),!e.i)return l.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(u),l.return();u.severity=1,e.i.onError(u),e.D.$(.1);case 3:if(!e.i)return l.return();e.i.onManifestUpdated(),l.j()}})}function za(e){return e.u!=My}function Ay(e,t){e.u=t,e.l&&e.l.Yd(!za(e)),za(e)||e.D.stop()}function is(e,t,n,r){if(!e.ha)throw new B(2,7,7001);return r||(r={}),r.isPreload=e.bc(),t=e.i.networkingEngine.request(n,t,r),wu(e.ha,t),t}function Ey(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"||e=="AES-256-GCM"}function NG(e,t,n,r){var i,o,u,l,h,p;return P(function(m){if(m.h==1){if(n=="video/mp2t")throw new B(2,4,4040);if(d.shakaMediaKeysPolyfill==="apple")throw new B(2,4,4041);if(i=Wt(t,"METHOD"),o=["SAMPLE-AES","SAMPLE-AES-CTR"],!o.includes(i))return m.return(null);u="cenc",i=="SAMPLE-AES"&&(u="cbcs"),l=Wt(t,"URI"),h=Go("com.apple.fps",u,null,l);var b=Xh(l).replace(/-/g,"").toLowerCase();return(p=b.length===32&&/^[0-9a-f]+$/.test(b)?b:null)||!r?m.A(2):m.g(N_(e,r),3)}return m.h!=2&&(p=m.i),p&&h.keyIds.add(p),m.return(h)})}function OG(e,t){var n=Wt(t,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n))return Promise.resolve(null);var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),n=Wt(t,"URI");var i=ky(n.split("?")[0]);return e=e.xa.getOrInsertComputed(n.split("?")[0],function(){return H(i.data)}),r=Go("com.widevine.alpha",r,[{initDataType:"cenc",initData:e}],void 0,i.Ai),(t=rt(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),Promise.resolve(r)}function jG(e,t){var n=Wt(t,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n))return Promise.resolve(null);var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),n=Wt(t,"URI");var i=ky(n.split("?")[0]);return e=e.xa.getOrInsertComputed(n.split("?")[0],function(){return H(i.data)}),r=Go("com.huawei.wiseplay",r,[{initDataType:"cenc",initData:e}],void 0,i.Ai),(t=rt(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),Promise.resolve(r)}function R_(e,t,n,r,i,o){var u,l,h,p,m,b,w,T,k,S;return P(function(A){switch(A.h){case 1:if(n=="video/mp2t")throw new B(2,4,4040);if(u=Wt(t,"METHOD"),l=["SAMPLE-AES","SAMPLE-AES-CTR"],!l.includes(u))return A.return(null);if(h=qs(r(),Wt(t,"URI"),o),h[0].startsWith("data:text/plain;base64,")){p=Yr(wi(h[0].split("data:text/plain;base64,").pop())),A.A(2);break}return m=h.sort().join(""),A.g(e.ec.getOrInsertComputed(m,function(){return is(e,yn(h,e.g.retryParameters),6).promise}),3);case 3:b=A.i,p=Yr(b.data);case 2:if(w="00000000000000000000000000000000",!i){A.A(4);break}return A.g(N_(e,i),5);case 5:(T=A.i)&&(w=T);case 4:return k=new Map,k.set(w,p),S="cenc",u=="SAMPLE-AES"&&(S="cbcs"),A.return(i5(k,S))}})}function N_(e,t){var n,r,i,o;return P(function(u){return u.h==1?(n=null,e.ra.has(t)?(n=e.ra.get(t),u.A(2)):(r=fp(t.U(),t.Rc(),t.Oc(),e.i.getStreamingRetryParameters()),i=ua,u.g(is(e,r,i,{type:0}).promise,3))):(u.h!=2&&(o=u.i,t.Je(o.data),n=kV(o.data),e.ra.set(t,n)),u.return(n))})}Te("shaka.hls.HlsParser",eg);var gT=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),UG=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),FG=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),BG=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),VG=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Iy=new Map().set("audio",UG).set("video",FG).set("text",BG).set("image",VG),O_=new Set(["video/mp2t"].concat(se(sa))),j_=["application/octet-stream","binary/octet-stream"],My="VOD",$G="EVENT",as="LIVE";kl("application/x-mpegurl",function(){return new eg}),kl("application/vnd.apple.mpegurl",function(){return new eg}),kl("audio/x-mpegurl",function(){return new eg});function tg(){}tg.prototype.parse=function(e){function t(l,h){h&&r.push({key:l,description:"",data:h,mimeType:null,pictureType:null})}function n(l,h){return dt(e.subarray(i+l,i+l+h)).replace(/\0/g,"").trim()}var r=[],i=e.length-128;if(i<0||e[i]!==84||e[i+1]!==65||e[i+2]!==71)return r;t("TIT2",n(3,30)),t("TPE1",n(33,30)),t("TALB",n(63,30)),t("TYER",n(93,4));var o="",u=null;return e[i+125]===0?(o=n(97,28),u=e[i+126]):o=n(97,30),t("COMM",o),u!==null&&t("TRCK",String(u)),t("TCON",String(e[i+127])),r},Te("shaka.metadata.Id3V1Utils",tg),tg.prototype.parse=tg.prototype.parse;for(var U_=x(sa),mT=U_.next();!mT.done;mT=U_.next())ku(mT.value,function(){return new tg});function ng(){}ng.prototype.parse=function(e){var t=[];return new Tt().ua(["moov","udta"],qt).T("meta",qt).box("ilst",function(n){for(;n.reader.La()&&!(n.reader.$a()-n.reader.Ia()<8);){var r=n.reader.S(),i=_l(n.reader.S());if(r<8)break;r=n.reader.Ja(Math.min(r-8,n.reader.$a()-n.reader.Ia()),!1),(i=i==="----"?zG(r):HG(i,r))&&t.push(i)}}).parse(e),t};function zG(e){var t="",n="",r=null;return new Tt().T("mean",function(i){t=dt(i.reader.Ja(i.reader.$a()-i.reader.Ia(),!1))}).T("name",function(i){n=dt(i.reader.Ja(i.reader.$a()-i.reader.Ia(),!1))}).T("data",function(i){r=F_(i)}).parse(e),r&&n?{key:n,data:r.data,description:t?"Domain: "+t:"",mimeType:r.mimeType,pictureType:r.pictureType}:null}function HG(e,t){var n=qG.get(e)||e,r=null;return new Tt().T("data",function(i){i=F_(i,e),r={key:n,data:i.data,description:"",mimeType:i.mimeType,pictureType:i.pictureType}}).parse(t),r}function F_(e,t){t=t===void 0?"":t,e.reader.skip(4);var n=e.reader.Ja(e.reader.$a()-e.reader.Ia(),!1);if((t==="trkn"||t==="disk")&&n.length>=6)return e=_e(n),n=e.getUint16(2,!1),e=e.getUint16(4,!1),{data:e>0?n+"/"+e:""+n,mimeType:null,pictureType:null};switch(e.flags){case 13:return{data:Vn(n),mimeType:"image/jpeg",pictureType:3};case 14:return{data:Vn(n),mimeType:"image/png",pictureType:3};case 21:switch(e=_e(n),n.length){case 1:e=e.getInt8(0);break;case 2:e=e.getInt16(0,!1);break;case 3:e=n[0]<<16|n[1]<<8|n[2],e&8388608&&(e|=-16777216);break;case 4:e=e.getInt32(0,!1);break;default:for(e=0,n=x(n),t=n.next();!t.done;t=n.next())e=e<<8|t.value}return{data:e,mimeType:null,pictureType:null};default:return{data:dt(n).replace(/\0/g,""),mimeType:null,pictureType:null}}}Te("shaka.metadata.IlstUtils",ng),ng.prototype.parse=ng.prototype.parse;var qG=new Map().set("\xA9nam","TIT2").set("\xA9ART","TPE1").set("aART","TPE2").set("\xA9alb","TALB").set("\xA9gen","TCON").set("\xA9day","TDRC").set("\xA9wrt","TEXT").set("trkn","TRCK").set("disk","TPOS").set("\xA9cmt","COMM").set("covr","APIC").set("cprt","TCOP").set("\xA9too","TENC").set("tmpo","TBPM").set("cpil","TCMP");ku("audio/mp4",function(){return new ng});function _u(){}_u.prototype.parse=function(e){if(e.length>=4&&e[0]==102&&e[1]==76&&e[2]==97&&e[3]==67){for(var t=[],n=4;n+4<=e.length;){var r=e[n],i=!!(r&128),o=r&127;if(r=e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4,n+r>e.length)break;var u=e.subarray(n,n+r);if(o==4&&t.push.apply(t,se(B_(u))),o==6){try{var l=new nn(u,0),h=l.S(),p=l.S(),m=dt(l.Ja(p,!0)),b=l.S(),w=dt(l.Ja(b,!0));l.skip(16);var T=l.S(),k=l.Ja(T,!0),S={key:"APIC",data:Vn(k),description:w,mimeType:m,pictureType:h}}catch{S=null}(o=S)&&t.push(o)}if(n+=r,i)break}return t}return e.length>=4&&e[0]==79&&e[1]==103&&e[2]==103&&e[3]==83&&(t=dt(e),n=t.indexOf("OpusTags"),n<0&&(n=t.indexOf("vorbis")),n>=0)?B_(e.subarray(n+8)):[]};function B_(e){var t=[];try{var n=new nn(e,Cw),r=n.S();n.skip(r);var i=n.S();for(e=0;e<i;e++){var o=n.S(),u=dt(n.Ja(o,!1)),l=u.indexOf("=");if(!(l<0)){var h=u.substring(0,l).toUpperCase();t.push({key:GG[h]||h,data:u.substring(l+1),description:"",mimeType:null,pictureType:null})}}}catch{}return t}Te("shaka.metadata.VorbisUtils",_u),_u.prototype.parse=_u.prototype.parse;var GG={TITLE:"TIT2",ARTIST:"TPE1",ALBUM:"TALB",ALBUMARTIST:"TPE2",TRACKNUMBER:"TRCK",DISCNUMBER:"TPOS",DATE:"TDRC",GENRE:"TCON",COMMENT:"COMM",DESCRIPTION:"TIT3",COPYRIGHT:"TCOP",COMPOSER:"TCOM",LYRICS:"USLT",ISRC:"TSRC"};ku("audio/flac",function(){return new _u}),ku("audio/ogg",function(){return new _u}),ku("audio/vorbis",function(){return new _u}),ku("audio/opus",function(){return new _u});function V_(e,t,n,r,i,o,u){if(n>=200&&n<=299&&n!=202||n==304)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=kt(t)}catch{}throw new B(1,1,1001,r,n,o,e,u,i||r)}function vT(){}function Py(e,t,n,r,i,o){var u=new QG;try{md(t.headers).forEach(function(m,b){u.append(b,m)})}catch(m){return bu(new B(1,1,1002,e,m,n))}var l=new YG,h={Qi:!1,nk:!1};if(e=KG(e,t,n,{body:t.body||void 0,headers:u,method:t.method,signal:l.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},h,r,i,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new In(e,function(){return h.Qi=!0,l.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var p=new ft(function(){h.nk=!0,l.abort()});p.$(t/1e3),e.finally(function(){p.stop()})}return e}function KG(e,t,n,r,i,o,u,l,h){var p,m,b,w,T,k,S,A,M,_,R,U,N,j,V;return P(function(q){switch(q.h){case 1:return p=XG,m=JG,w=new ArrayBuffer(0),k=T=0,S={},A=Date.now(),q.m(2),q.g(p(e,r),4);case 4:if(b=q.i,S=WG(b.headers),u(S),r.method=="HEAD"){q.A(5);break}return _=(M=b.headers.get("Content-Length"))?parseInt(M,10):0,b.body?(R=b.clone().body.getReader(),U=function(G){function z(){var J,ie,le,be;return P(function(ce){switch(ce.h){case 1:return ce.m(2),ce.g(R.read(),4);case 4:J=ce.i,ce.o(3);break;case 2:return ce.l(),ce.return();case 3:if(J.done){ce.A(5);break}if(T+=J.value.byteLength,!l){ce.A(5);break}return ce.g(l(J.value),5);case 5:ie=Date.now(),le=T-k,(ie-A>100&&le>=h||J.done)&&(be=J.done?0:_-T,o(ie-A,le,be),k=T,A=ie),J.done?G.close():(G.enqueue(J.value),z()),ce.j()}})}z()},new m({start:U}),q.g(b.arrayBuffer(),8)):q.g(b.arrayBuffer(),9);case 8:w=q.i,q.A(5);break;case 9:w=q.i,N=Date.now(),o(N-A,w.byteLength,0);case 5:t.headers.Range&&(j=t.headers.Range.replace("bytes=","").split("-").filter(function(G){return G}).map(function(G){return parseInt(G,10)}),j.length==2&&w.byteLength!=j[1]-j[0]+1&&ut("Payload length does not match range requested bytes",t,b)),q.o(3);break;case 2:throw V=q.l(),i.Qi?new B(1,1,7001,e,n):i.nk?new B(1,1,1003,e,n):new B(1,1,1002,e,V,n);case 3:return q.return(V_(S,w,b.status,e,b.url,t,n))}})}function WG(e){var t={};return e.forEach(function(n,r){t[r.trim()]=n}),t}function $_(){if(d.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(d.Response){if(!new Response("").body)return!1}else return!1;return!(!d.fetch||"polyfill"in d.fetch||!d.AbortController)}Te("shaka.net.HttpFetchPlugin",vT),vT.isSupported=$_,vT.parse=Py;var XG=d.fetch,YG=d.AbortController,JG=d.ReadableStream,QG=d.Headers;$_()&&(Ds("http",Py,2,!0),Ds("https",Py,2,!0),Ds("blob",Py,2,!0));function z_(){}function _y(e,t,n,r,i,o){var u=new ZG,l=Date.now(),h=0,p=new Promise(function(m,b){u.open(t.method,e,!0),u.responseType="arraybuffer",u.timeout=t.retryParameters.timeout,u.withCredentials=t.allowCrossSiteCredentials;var w={};u.onabort=function(){b(new B(1,1,7001,e,n))},u.onreadystatechange=function(){if(u.readyState===XMLHttpRequest.HEADERS_RECEIVED){var k=u.getAllResponseHeaders().trim().split(`\r
`),S={};k=x(k);for(var A=k.next();!A.done;A=k.next()){A=A.value;var M=A.indexOf(": ");M!==-1&&(S[A.slice(0,M).toLowerCase()]=A.slice(M+2))}w=S,i(w)}},u.onload=function(){var k=u.response;try{var S=V_(w,k,u.status,e,u.responseURL,t,n);m(S)}catch(A){b(A)}},u.onerror=function(k){b(new B(1,1,1002,e,k,n))},u.ontimeout=function(){b(new B(1,1,1003,e,n))},u.onprogress=function(k){var S=Date.now(),A=o.minBytesForProgressEvents||0,M=k.loaded-h;(S-l>100&&M>=A||k.lengthComputable&&k.loaded==k.total)&&(r(S-l,M,u.readyState==4?0:k.total-k.loaded),h=k.loaded,l=S)};for(var T in t.headers)try{u.setRequestHeader(T.toLowerCase(),t.headers[T])}catch(k){throw new B(1,1,1002,e,k,n)}u.send(t.body)});return new In(p,function(){return u.abort(),Promise.resolve()})}Te("shaka.net.HttpXHRPlugin",z_),z_.parse=_y;var ZG=d.XMLHttpRequest;Ds("http",_y,1,!0),Ds("https",_y,1,!0),Ds("blob",_y,1,!0);function H_(e,t,n,r,i){this.g=e,this.i=t,this.groupId=n,this.h=r,this.j=i}function yT(e){var t=e.$b(!1);return t?Ra(t):e.U().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function eK(e,t){return fp(e.g.U(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function q_(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function G_(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}q_.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function K_(e){return e.i==0?0:e.j/e.i}function bT(e){var t=this;this.u=e,this.i=new Map,this.h=new gd(function(){return wT(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new q_,this.l=!1}bT.prototype.destroy=function(){return this.h.destroy()};function tK(e,t,n){e.o=t,e.m=n}function wT(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}bT.prototype.queue=function(e,t,n,r,i){var o=this;Zt(this.h);var u=(this.i.get(e)||Promise.resolve()).then(function(){var l,h,p,m,b,w,T;return P(function(k){if(k.h==1)return k.g(iK(o,t),2);if(l=k.i,o.h.g)throw new B(2,9,7001);if(r)for(m in h=H(l),p=new Ew(h),p.data)b=Number(m),w=p.data[b],T=p.g[b],o.m(w,T);return o.g.close(n,l.byteLength),o.o(K_(o.g),o.g.g),k.return(i(l))})});return this.i.set(e,u),u};function nK(e,t,n,r,i,o){Zt(e.h);var u=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new B(2,9,7001);if(i){var l=H(n);l=new Ew(l);for(var h in l.data){var p=Number(h);e.m(l.data[p],l.g[p])}}return e.g.close(r,n.byteLength),e.o(K_(e.g),e.g.g),o(n)});e.i.set(t,u)}function rK(e){return P(function(t){return t.h==1?t.g(Promise.all(e.i.values()),2):t.return(e.g.g)})}function iK(e,t){var n,r,i,o;return P(function(u){return u.h==1?(n=ua,r=e.u.request(n,t),i=function(){return r.abort()},e.j.push(i),u.g(r.promise,2)):(o=u.i,ke(e.j,i),u.return(o.data))})}function Dy(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=Promise.withResolvers(),e.onabort=function(r){r.preventDefault(),n.g.reject()},e.onerror=function(r){r.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Dy.prototype.abort=function(){var e=this;return P(function(t){if(t.h==1){try{e.i.abort()}catch{}return t.m(2),t.g(e.g.promise,4)}if(t.h!=2)return t.o(0);t.l(),t.j()})};function xT(e,t){return new Promise(function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var o;return P(function(u){if(u.h==1)return i.result==null?(n(),u.return()):(o=i.result,u.g(t(o.key,o.value,o),2));o.continue(),u.j()})}})}Dy.prototype.store=function(){return this.h},Dy.prototype.promise=function(){return this.g.promise};function kT(e){this.h=e,this.g=[]}kT.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Ql(e,t){return Ly(e,t,"readwrite")}function Ly(e,t,n){n=e.h.transaction([t],n);var r=new Dy(n,t);return e.g.push(r),r.promise().then(function(){ke(e.g,r)},function(){ke(e.g,r)}),r}function Zl(e,t,n){this.h=new kT(e),this.i=t,this.g=n}g=Zl.prototype,g.destroy=function(){return this.h.destroy()},g.hasFixedKeySpace=function(){return!0},g.addSegments=function(){return W_(this.i)},g.removeSegments=function(e,t){return X_(this,this.i,e,t)},g.getSegments=function(e){var t=this,n;return P(function(r){return r.h==1?r.g(Y_(t,t.i,e),2):(n=r.i,r.return(n.map(function(i){return t.Ti(i)})))})},g.addManifests=function(){return W_(this.g)},g.updateManifest=function(){return Promise.reject(new B(2,9,9016,"Cannot modify values in "+this.g))};function aK(e,t,n){e=Ql(e.h,e.g);var r=e.store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}g.updateManifestExpiration=function(e,t){var n=Ql(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(i){(i=i.target.result)&&(i.expiration=t,r.put(i,e))},n.promise()},g.removeManifests=function(e,t){return X_(this,this.g,e,t)},g.getManifests=function(e){var t=this,n;return P(function(r){return r.h==1?r.g(Y_(t,t.g,e),2):(n=r.i,r.return(Promise.all(n.map(function(i){return t.le(i)}))))})},g.getAllManifests=function(){var e=this,t,n;return P(function(r){return r.h==1?(t=Ly(e.h,e.g,"readonly"),n=new Map,r.g(xT(t,function(i,o){var u;return P(function(l){if(l.h==1)return l.g(e.le(o),2);u=l.i,n.set(i,u),l.j()})}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},g.Ti=function(e){return e},g.le=function(e){return Promise.resolve(e)};function W_(e){return Promise.reject(new B(2,9,9011,"Cannot add new value to "+e))}g.add=function(e,t){var n=this,r,i,o,u,l,h,p;return P(function(m){if(m.h==1){for(r=Ql(n.h,e),i=r.store(),o=[],u=x(t),l=u.next(),h={};!l.done;h={Zh:void 0},l=u.next())p=l.value,h.Zh=i.add(p),h.Zh.onsuccess=(function(b){return function(){o.push(b.Zh.result)}})(h);return m.g(r.promise(),2)}return m.return(o)})};function X_(e,t,n,r){e=Ql(e.h,t),t=e.store(),n=x(n);for(var i=n.next(),o={};!i.done;o={Bh:void 0},i=n.next())o.Bh=i.value,t.delete(o.Bh).onsuccess=(function(u){return function(){return r(u.Bh)}})(o);return e.promise()}function Y_(e,t,n){var r,i,o,u,l,h,p;return P(function(m){if(m.h==1){for(r=Ly(e.h,t,"readonly"),i=r.store(),o={},u=[],l=x(n),h=l.next(),p={};!h.done;p={$f:void 0,Kf:void 0},h=l.next())p.Kf=h.value,p.$f=i.get(p.Kf),p.$f.onsuccess=(function(b){return function(){b.$f.result==null&&u.push(b.Kf),o[b.Kf]=b.$f.result}})(p);return m.g(r.promise(),2)}if(u.length)throw new B(2,9,9012,"Could not find values for "+u);return m.return(n.map(function(b){return o[b]}))})}function rg(e){this.g=new kT(e)}rg.prototype.destroy=function(){return this.g.destroy()},rg.prototype.getAll=function(){var e=this,t,n;return P(function(r){return r.h==1?(t=Ly(e.g,"session-ids","readonly"),n=[],r.g(xT(t,function(i,o){n.push(o)}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},rg.prototype.add=function(e){var t=Ql(this.g,"session-ids"),n=t.store();e=x(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},rg.prototype.remove=function(e){var t=this,n;return P(function(r){return r.h==1?(n=Ql(t.g,"session-ids"),r.g(xT(n,function(i,o,u){e.includes(o.sessionId)&&u.delete()}),2)):r.g(n.promise(),0)})};function ai(){this.g=new Map}ai.prototype.destroy=function(){for(var e=[],t=x(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},ai.prototype.init=function(){var e=this;ig.forEach(function(i,o){(i=i())&&e.g.set(o,i)});for(var t=[],n=x(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)};function J_(e){var t=null;if(e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){i.hasFixedKeySpace()||t||(t={path:{Pb:r,jb:o},jb:i})})}),t)return t;throw new B(2,9,9013,"Could not find a cell that supports add-operations")}function oK(e,t){e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){t({Pb:r,jb:o},i)})})}function Ry(e,t,n){if(e=e.g.get(t),!e)throw new B(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new B(2,9,9013,"Could not find cell with name "+n);return t}function sK(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function uK(e){var t=Array.from(e.g.keys());if(!t.length)throw new B(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function lK(e){var t,n,r;return P(function(i){return i.h==1?(t=Array.from(e.g.values()),n=t.length>0,n||(r=ig,r.forEach(function(o){(o=o())&&t.push(o)})),i.g(Promise.all(t.map(function(o){return o.erase()})),2)):n?i.A(0):i.g(Promise.all(t.map(function(o){return o.destroy()})),0)})}function Q_(e,t){ig.set(e,t)}Te("shaka.offline.StorageMuxer",ai),ai.unregister=function(e){ig.delete(e)},ai.register=Q_,ai.prototype.destroy=ai.prototype.destroy;var ig=new Map;function ag(){Zl.apply(this,arguments)}K(ag,Zl),ag.prototype.updateManifestExpiration=function(e,t){var n=this,r,i,o;return P(function(u){return r=Ql(n.h,n.g),i=r.store(),o=Promise.withResolvers(),i.get(e).onsuccess=function(l){(l=l.target.result)?(l.expiration=t,i.put(l),o.resolve()):o.reject(new B(2,9,9012,"Could not find values for "+e))},u.g(Promise.all([r.promise(),o.promise]),0)})},ag.prototype.le=function(e){var t,n,r,i,o,u;return P(function(l){if(l.h==1){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,o=cK(e.periods[n],i),t.push(o);return l.g(TP(t),2)}return u=l.i,l.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:u,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function cK(e,t){fK(e);for(var n=x(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map(function(i){return dK(i,e.startTime,t)})}function dK(e,t,n){var r=e.initSegmentUri?Z_(e.initSegmentUri):null,i=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(u){var l=Z_(u.uri);return{startTime:t+u.startTime,endTime:t+u.endTime,dataKey:l,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:o,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null,chapterTitle:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,isIframe:!1}}ag.prototype.Ti=function(e){return{data:e.data}};function Z_(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new B(2,9,9004,"Could not parse uri "+e)}function fK(e){var t=e.streams.filter(function(l){return l.contentType=="audio"});if(e=e.streams.filter(function(l){return l.contentType=="video"}),!t.every(function(l){return l.variantIds})||!e.every(function(l){return l.variantIds})){for(var n=x(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=x(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){r=n++;for(var i=x(e),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=x(t),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r);if(e.length&&t.length)for(t=x(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=x(e),o=i.next();!o.done;o=i.next()){o=o.value;var u=n++;r.variantIds.push(u),o.variantIds.push(u)}}}function Ny(){Zl.apply(this,arguments)}K(Ny,Zl),Ny.prototype.le=function(e){var t,n,r,i,o,u;return P(function(l){if(l.h==1){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var h=e.periods[n],p=[],m=x(h.streams),b=m.next();!b.done;b=m.next())b=b.value,b.variantIds.length!=0&&p.push(hK(b,h.startTime,h.startTime+i));o=p,t.push(o)}return l.g(TP(t),2)}return u=l.i,l.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:u,sequenceMode:!1})})};function hK(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null,chapterTitle:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,isIframe:!1}}function TT(){Zl.apply(this,arguments)}K(TT,Zl),g=TT.prototype,g.hasFixedKeySpace=function(){return!1},g.addSegments=function(e){return this.add(this.i,e)},g.addManifests=function(e){return this.add(this.g,e)},g.updateManifest=function(e,t){return aK(this,e,t)},g.le=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function eD(){this.m=this.j=this.i=this.h=this.g=this.l=null}g=eD.prototype,g.init=function(){var e=this,t=Promise.withResolvers(),n=!1,r=new ft(function(){n=!0,t.reject(new B(2,9,9017))});typeof Oy=="number"&&Oy>0&&r.$(Oy);var i=d.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){if(!n){r.stop();var o=i.result;e.l=o;var u=o.objectStoreNames;u=u.contains("manifest")&&u.contains("segment")?new ag(o,"segment","manifest"):null,e.g=u,u=o.objectStoreNames,u=u.contains("manifest-v2")&&u.contains("segment-v2")?new Ny(o,"segment-v2","manifest-v2"):null,e.h=u,u=o.objectStoreNames,u=u.contains("manifest-v3")&&u.contains("segment-v3")?new Ny(o,"segment-v3","manifest-v3"):null,e.i=u,u=o.objectStoreNames,u=u.contains("manifest-v5")&&u.contains("segment-v5")?new TT(o,"segment-v5","manifest-v5"):null,e.j=u,o=o.objectStoreNames.contains("session-ids")?new rg(o):null,e.m=o,t.resolve()}},i.onupgradeneeded=function(){for(var o=i.result,u=x(["segment-v5","manifest-v5","session-ids"]),l=u.next();!l.done;l=u.next())l=l.value,o.objectStoreNames.contains(l)||o.createObjectStore(l,{autoIncrement:!0})},i.onerror=function(o){n||(r.stop(),t.reject(new B(2,9,9001,i.error)),o.preventDefault())},t.promise},g.destroy=function(){var e=this;return P(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return t.g(e.m.destroy(),10);case 10:e.l&&e.l.close(),t.j()}})},g.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},g.getEmeSessionCell=function(){return this.m},g.erase=function(){var e=this;return P(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:return e.l&&e.l.close(),t.g(pK(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,t.g(e.init(),0)}})};function pK(){var e=Promise.withResolvers(),t=d.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new B(2,9,9001,t.error)),n.preventDefault()},e.promise}var Oy=5;Te("shaka.offline.indexeddb.StorageMechanismOpenTimeout",Oy),Q_("idb",function(){return Qe().ri()?new eD:null});function os(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}os.prototype.Pb=function(){return this.i},os.prototype.jb=function(){return this.h},os.prototype.key=function(){return this.l},os.prototype.toString=function(){return this.j};function ST(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var r=e[3];return r&&t!=null?new os(t,n,r,Number(e[4])):null}function tD(e,t){this.h=e,this.g=t}function nD(e,t){var n=new Ze(null,0);n.Sb(t.duration);var r=t.streams.filter(function(m){return m.type=="audio"}),i=t.streams.filter(function(m){return m.type=="video"});r=gK(e,r,i,n),i=t.streams.filter(function(m){return m.type==mt}).map(function(m){return og(e,m,n)});var o=t.streams.filter(function(m){return m.type=="image"}).map(function(m){return og(e,m,n)}),u=t.streams.filter(function(m){return m.type=="chapter"}).map(function(m){return og(e,m,n)}),l=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var h=x(r.values()),p=h.next();!p.done;p=h.next())p=p.value,p.audio&&p.audio.encrypted&&(p.audio.drmInfos=l),p.video&&p.video.encrypted&&(p.video.drmInfos=l);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:o,chapterStreams:u,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function gK(e,t,n,r){for(var i=new Set,o=x(t),u=o.next();!u.done;u=o.next()){u=x(u.value.variantIds);for(var l=u.next();!l.done;l=u.next())i.add(l.value)}for(o=x(n),u=o.next();!u.done;u=o.next())for(u=x(u.value.variantIds),l=u.next();!l.done;l=u.next())i.add(l.value);for(o=new Map,i=x(i),u=i.next();!u.done;u=i.next())u=u.value,o.set(u,{id:u,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=x(t),i=t.next();!i.done;i=t.next())for(u=i.value,i=og(e,u,r),u=x(u.variantIds),l=u.next();!l.done;l=u.next())l=o.get(l.value),l.language=i.language,l.primary=l.primary||i.primary,l.audio=i;for(n=x(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=og(e,i,r),i=x(i.variantIds),u=i.next();!u.done;u=i.next())u=o.get(u.value),u.primary=u.primary||t.primary,u.video=t;return o}function og(e,t,n){var r=t.segments.map(function(i){return mK(e,i,t)});return n.De(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Et(r),mimeType:t.mimeType,codecs:t.codecs,supplementalCodecs:"",width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([tr(t.mimeType,t.codecs)]),isAudioMuxedInVideo:t.isAudioMuxedInVideo||!1,baseOriginalId:null,isIframe:t.isIframe||!1}}function mK(e,t,n){var r=n.type=="chapter"?"":new os("segment",e.h,e.g,t.dataKey);return e=new nt(t.startTime,t.endTime,function(){return[r.toString()]},0,null,t.initSegmentKey!=null?vK(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.ig(t.thumbnailSprite),t.chapterTitle&&e.hg({title:t.chapterTitle,images:[]}),e}function vK(e,t){var n=new os("segment",e.h,e.g,t);return new Ci(function(){return[n.toString()]},0,null)}function rD(){this.g=null}g=rD.prototype,g.configure=function(){},g.start=function(e,t){var n=this,r,i,o,u,l,h,p;return P(function(m){switch(m.h){case 1:if(r=ST(e),n.g=r,r==null||r.g!="manifest")throw new B(2,1,9004,e);return i=new ai,m.D(2),m.g(i.init(),4);case 4:return m.g(Ry(i,r.Pb(),r.jb()),5);case 5:return o=m.i,m.g(o.getManifests([r.key()]),6);case 6:return u=m.i,l=u[0],h=new tD(r.Pb(),r.jb()),p=nD(h,l),t.makeTextStreamsForClosedCaptions(p),m.return(p);case 2:return m.u(),m.g(i.destroy(),7);case 7:m.B(0)}})},g.stop=function(){return Promise.resolve()},g.update=function(){},g.onExpirationUpdated=function(e,t){var n=this,r,i,o,u,l,h,p;return P(function(m){switch(m.h){case 1:return r=n.g,i=new ai,m.m(2,3),m.g(i.init(),5);case 5:return m.g(Ry(i,r.Pb(),r.jb()),6);case 6:return o=m.i,m.g(o.getManifests([r.key()]),7);case 7:if(u=m.i,l=u[0],h=l.sessionIds.includes(e),p=l.expiration==null||l.expiration>t,!h||!p){m.A(3);break}return m.g(o.updateManifestExpiration(r.key(),t),3);case 3:return m.u(),m.g(i.destroy(),10);case 10:m.B(0);break;case 2:m.l(),m.A(3)}})},g.onInitialVariantChosen=function(){},g.banLocation=function(){},g.setMediaElement=function(){},kl("application/x-offline-manifest",function(){return new rD});function iD(){}function aD(e,t){var n=ST(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Ml(e)):e=n&&n.g=="segment"?yK(n.key(),n,t):bu(new B(2,1,9004,e)),e}function yK(e,t,n){var r=new ai;return Ml(void 0).Ya(function(){return r.init()}).Ya(function(){return Ry(r,t.Pb(),t.jb())}).Ya(function(i){return i.getSegments([t.key()])}).Ya(function(i){return{uri:t,data:i[0].data,headers:{},originalRequest:n}}).finally(function(){return r.destroy()})}Te("shaka.offline.OfflineScheme",iD),iD.plugin=aD,Ds("offline",aD);function oD(e,t,n){var r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:r=[];for(var m=[],b=x(n),w=b.next();!w.done;w=b.next()){w=w.value;for(var T=!1,k=x(m),S=k.next();!S.done;S=k.next())if(S=S.value,wK(S.info,w)){S.sessionIds.push(w.sessionId),T=!0;break}T||m.push({info:w,sessionIds:[w.sessionId]})}i=x(m),o=i.next();case 2:if(o.done){p.A(4);break}return u=o.value,l=bK(e,t,u),p.g(l,5);case 5:h=p.i,r=r.concat(h),o=i.next(),p.A(2);break;case 4:return p.return(r)}})}function bK(e,t,n){var r,i;return P(function(o){switch(o.h){case 1:return r=new qv({xc:t,onError:function(){},Wf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.m(2),r.configure(e),o.g(kF(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:o.o(3);break;case 2:return o.l(),o.g(r.destroy(),5);case 5:return o.return([]);case 3:return i=[],o.g(Promise.all(n.sessionIds.map(function(u){return P(function(l){if(l.h==1)return l.m(2),l.g(CF(r,u),4);if(l.h!=2)return i.push(u),l.o(0);l.l(),l.j()})})),6);case 6:return o.g(r.destroy(),7);case 7:return o.return(i)}})}function wK(e,t){function n(r,i){return r.robustness==i.robustness&&r.contentType==i.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Fe(e.audioCapabilities,t.audioCapabilities,n)&&Fe(e.videoCapabilities,t.videoCapabilities,n)}function xK(e,t,n){var r=t.presentationTimeline.getDuration();return t=sD(t),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function CT(e,t){var n=nD(new tD(e.Pb(),e.jb()),t),r=t.appMetadata||{};return n=sD(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function sD(e){var t=[],n=Wh(e.variants);n=x(n);for(var r=n.next();!r.done;r=n.next())t.push(dd(r.value));for(e=x(e.textStreams),n=e.next();!n.done;n=e.next())t.push(Gh(n.value));return t}function kK(){this.g=new Map}function TK(e,t){var n=t.audio,r=t.video;if(n&&!r&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&r&&e.g.set(r.id,r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,o=r.bandwidth||t.bandwidth-i;o<=0&&(o=t.bandwidth),e.g.set(n.id,i),e.g.set(r.id,o)}}function uD(e,t){e.g.set(t.id,t.bandwidth||2048)}function lD(e,t){return e=e.g.get(t),e==null&&(e=0),e}function fr(e){var t=this;if(e&&e.constructor!=ye)throw new B(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.hb()):(this.h=Ld(),this.g=new ln,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new gd(function(){var r,i,o,u,l;return P(function(h){switch(h.h){case 1:return h.g(Promise.all(t.l.map(function(p){return wT(p)})),2);case 2:for(r=function(){},i=[],o=x(t.i),u=o.next();!u.done;u=o.next())l=u.value,i.push(l.then(r,r));return h.g(Promise.all(i),3);case 3:if(!n){h.A(4);break}return h.g(t.g.destroy(),4);case 4:t.h=null,t.g=null,h.j()}})}),this.m=1e9}function AT(){if(rs(Qe()))e:{for(var e=x(ig.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}g=fr.prototype,g.destroy=function(){return this.j.destroy()},g.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=k0(e,t)),Us(this.h,e)},g.getConfiguration=function(){var e=Ld();return Us(e,this.h,Ld()),e},g.hb=function(){return this.g},g.store=function(e,t,n,r,i){var o=this,u=this.getConfiguration(),l=new bT(this.g);return this.l.push(l),t=SK(this,e,t||{},r||[],i||[],function(){var h;return P(function(p){return p.h==1?n?p.A(2):p.g(Pd(e,o.g,u.manifest.retryParameters),3):(p.h!=2&&(n=p.i),h=u5(e,n||null),p.return(h()))})},u,l),t=new In(t,function(){return wT(l)}),t.finally(function(){ke(o.l,l)}),BK(this,t)};function SK(e,t,n,r,i,o,u,l){var h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce;return P(function(ae){switch(ae.h){case 1:return jy(),p=h=null,m=new ai,T=w=b=null,ae.m(2,3),ae.g(o(),5);case 5:return h=ae.i,ae.g(LK(e,t,h,u),6);case 6:if(k=ae.i,Xi(e),S=!k.presentationTimeline.ya(),!S)throw new B(2,9,9005,t);A=x(r),M=A.next();case 7:if(M.done){ae.A(9);break}return _=M.value,ae.g(RK(e,_,k),10);case 10:R=ae.i,k.imageStreams.push(R),Xi(e),M=A.next(),ae.A(7);break;case 9:U=x(i),N=U.next();case 11:return N.done?(TI(u.drm.clearKeys,k.variants),q=k.variants.some(function(de){if(de.audio){for(var re=x(de.audio.drmInfos),pe=re.next();!pe.done;pe=re.next())if(pe.value.licenseServerUri.startsWith("data:"))return!0}if(de.video){for(de=x(de.video.drmInfos),re=de.next();!re.done;re=de.next())if(re.value.licenseServerUri.startsWith("data:"))return!0}return!1}),G=u.offline.usePersistentLicense,q&&(G=!1),ae.g(e.td(k,function(de){T=T||de},u,G),15)):(j=N.value,ae.g(NK(e,k,j.uri,j.language,j.kind,j.mime,j.codecs),14));case 14:V=ae.i,k.textStreams.push(V),Xi(e),N=U.next(),ae.A(11);break;case 15:if(p=ae.i,Xi(e),T)throw T;return ae.g(AK(k,p,u,G),16);case 16:return ae.g(m.init(),17);case 17:return Xi(e),ae.g(J_(m),18);case 18:return b=ae.i,Xi(e),z=EK(p,k,t,n,u,l,G),J=z.Sl,ie=z.xi,ae.g(b.jb.addManifests([J]),19);case 19:if(le=ae.i,Xi(e),w=le[0],Xi(e),T)throw T;return ae.g(CK(e,ie,w,J,l,u,b.jb,k,p,G),20);case 20:return Xi(e),hD(k,J,p,G),ae.g(b.jb.updateManifest(w,J),21);case 21:return Xi(e),be=new os("manifest",b.path.Pb,b.path.jb,w),ae.return(CT(be,J));case 3:return ae.u(),ae.g(m.destroy(),22);case 22:if(!h){ae.A(23);break}return ae.g(h.stop(),23);case 23:if(!p){ae.A(25);break}return ae.g(p.destroy(),25);case 25:ae.B(0);break;case 2:if(ce=ae.l(),w==null){ae.A(27);break}return ae.g(cD(w),27);case 27:throw T||ce}})}function CK(e,t,n,r,i,o,u,l,h,p){var m,b,w,T,k,S,A,M,_,R,U;return P(function(N){switch(N.h){case 1:if(m={},b=0,w=function(){if(e.j.g||i.l)throw new B(2,9,7001)},T=function(j,V){var q,G,z,J,ie,le,be,ce,ae;return P(function(de){if(de.h==1){for(q=x(j),G=q.next(),z={};!G.done;z={qc:void 0},G=q.next())z.qc=G.value,w(),J=eK(z.qc,o),ie=z.qc.i,le=z.qc.h,be=(function(re){return function(pe){var Re,W,Se,Ee;return P(function(Xe){switch(Xe.h){case 1:if(Re=re.qc.g,W=Re.$b(!1),!Re.aesKey||W){Xe.A(2);break}return Xe.g(sx(pe,Re.aesKey,re.qc.j),3);case 3:pe=Xe.i;case 2:return Se=yT(Re),Xe.g(u.addSegments([{data:pe}]),4);case 4:Ee=Xe.i,w(),m[Se]=Ee[0],b+=pe.byteLength,Xe.j()}})}})(z),ce=z.qc.g,(ae=ce.$b(!1))?nK(i,z.qc.groupId,ae,ie,le,be):i.queue(z.qc.groupId,J,ie,le,be);return de.g(rK(i),2)}return w(),!V||i.l?de.A(0):(hD(l,r,h,p),de.g(u.updateManifest(n,r),0))})},k=!1,N.m(2),!ET(l)||!k||fD(l)){N.A(4);break}return N.g(T(t.filter(function(j){return j.h}),!0),5);case 5:return w(),t=t.filter(function(j){return!j.h}),S=m,A=b,m={},b=0,N.g(dD(u,n,r,S,A,function(){return Xi(e)}),6);case 6:w();case 4:if(k){N.A(7);break}return N.g(T(t,!1),8);case 8:return w(),M=m,_=b,m={},b=0,N.g(dD(u,n,r,M,_,function(){return w()}),9);case 9:w();case 7:N.o(0);break;case 2:return R=N.l(),U=Object.values(m),N.g(u.removeSegments(U,function(){}),10);case 10:throw R}})}function cD(e){var t,n,r,i;return P(function(o){switch(o.h){case 1:return t=new ai,o.g(t.init(),2);case 2:return o.g(J_(t),3);case 3:return n=o.i,r=new os("manifest",n.path.Pb,n.path.jb,e),o.g(t.destroy(),4);case 4:return i=new fr,o.g(i.remove(r.toString()),0)}})}function dD(e,t,n,r,i,o){var u,l,h,p,m,b,w,T,k,S,A;return P(function(M){switch(M.h){case 1:for(u=!1,M.m(2),l=!0,h=x(n.streams),p=h.next();!p.done;p=h.next())if(m=p.value,m.type!="chapter")for(b=x(m.segments),w=b.next();!w.done;w=b.next())T=w.value,k=T.pendingSegmentRefId?r[T.pendingSegmentRefId]:null,k!=null&&(T.dataKey=k,T.pendingSegmentRefId=void 0),k=T.pendingInitSegmentRefId?r[T.pendingInitSegmentRefId]:null,k!=null&&(T.initSegmentKey=k,T.pendingInitSegmentRefId=void 0),T.pendingSegmentRefId&&(l=!1),T.pendingInitSegmentRefId&&(l=!1);return n.size+=i,l&&(n.isIncomplete=!1),M.g(e.updateManifest(t,n),4);case 4:u=!0,o(),M.o(0);break;case 2:return S=M.l(),M.g(cD(t),5);case 5:if(u){M.A(6);break}return A=Object.values(r),M.g(e.removeSegments(A,function(){}),6);case 6:throw S}})}function AK(e,t,n,r){var i,o,u,l,h,p,m,b,w,T,k,S,A,M,_,R,U,N,j,V,q,G,z,J,ie,le,be,ce,ae,de,re,pe,Re,W;return P(function(Se){switch(Se.h){case 1:return i={width:1/0,height:1/0},YU(e,n.restrictions,i),Se.g(F5(t,e,r,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],u=n.preferredDecodingAttributes,l=n.preferredVideo.map(function(Ee){return Ee.codec}).filter(Boolean),h=n.preferredAudio.map(function(Ee){return Ee.codec}).filter(Boolean),p=n.preferredText.map(function(Ee){return Ee.format}).filter(Boolean),U5(e,l,h,u,p),m=x(e.variants),b=m.next();!b.done;b=m.next())w=b.value,o.push(dd(w));for(T=x(e.textStreams),k=T.next();!k.done;k=T.next())S=k.value,o.push(Gh(S));for(A=x(e.imageStreams),M=A.next();!M.done;M=A.next())_=M.value,o.push(gw(_));for(R=x(e.chapterStreams),U=R.next();!U.done;U=R.next())N=U.value,o.push(mw(N));return Se.g(n.offline.trackSelectionCallback(o),3);case 3:for(j=Se.i,V=e.presentationTimeline.getDuration(),q=0,G=x(j),z=G.next();!z.done;z=G.next())J=z.value,ie=J.bandwidth*V/8,q+=ie;return Se.m(4),Se.g(n.offline.downloadSizeCallback(q),6);case 6:if(le=Se.i,!le)throw new B(2,9,9014);Se.o(5);break;case 4:throw be=Se.l(),be instanceof B?be:new B(2,9,9015);case 5:for(ce=new Set,ae=new Set,de=new Set,re=new Set,pe=x(j),Re=pe.next();!Re.done;Re=pe.next())W=Re.value,W.type=="variant"&&ce.add(W.id),W.type=="text"&&ae.add(W.id),W.type=="image"&&de.add(W.id),W.type=="chapter"&&re.add(W.id);e.variants=e.variants.filter(function(Ee){return ce.has(Ee.id)}),e.textStreams=e.textStreams.filter(function(Ee){return ae.has(Ee.id)}),e.imageStreams=e.imageStreams.filter(function(Ee){return de.has(Ee.id)}),e.chapterStreams=e.chapterStreams.filter(function(Ee){return re.has(Ee.id)}),zK(e),Se.j()}})}function EK(e,t,n,r,i,o,u){var l=xK(n,t,r),h=i.offline.progressCallback;tK(o,function(k,S){l.size=S,h(l,k)},function(k,S){p&&u&&m==S&&Jh(e,"cenc",k)});var p=ET(t)&&!fD(t),m=null;if(p){var b=e.Xb();m=HK.get(b.keySystem)}b=new kK;for(var w=x(t.textStreams),T=w.next();!T.done;T=w.next())b.g.set(T.value.id,52);for(w=x(t.imageStreams),T=w.next();!T.done;T=w.next())uD(b,T.value);for(w=x(t.chapterStreams),T=w.next();!T.done;T=w.next())uD(b,T.value);for(w=x(t.variants),T=w.next();!T.done;T=w.next())TK(b,T.value);return o=jK(o,b,t,i),i=o.streams,o=o.xi,(b=e.Xb())&&u&&(b.initData=[]),{Sl:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.re(),streams:i,sessionIds:u?pI(e):[],drmInfo:b,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},xi:o}}function ET(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function fD(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function hD(e,t,n,r){if(t.expiration=n.re(),n=pI(n),t.sessionIds=r?n:[],ET(e)&&r&&!n.length)throw new B(2,9,9007)}g.remove=function(e){return IT(this,IK(this,e))};function IK(e,t){var n,r,i,o,u,l;return P(function(h){switch(h.h){case 1:if(jy(),n=ST(t),n==null||n.g!="manifest")throw new B(2,9,9004,t);return r=n,i=new ai,h.D(2),h.g(i.init(),4);case 4:return h.g(Ry(i,r.Pb(),r.jb()),5);case 5:return o=h.i,h.g(o.getManifests([r.key()]),6);case 6:return u=h.i,l=u[0],h.g(Promise.all([MK(e,l,i),PK(o,r,l)]),2);case 2:return h.u(),h.g(i.destroy(),8);case 8:h.B(0)}})}function pD(e,t){for(var n=[],r=x(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&i.type=="video"?n.push({contentType:tr(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||i.type!="audio"||n.push({contentType:tr(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function MK(e,t,n){return P(function(r){return r.g($K(e.g,e.h.drm,n,t),0)})}function PK(e,t,n){function r(){}var i=VK(n);return CT(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}g.sm=function(){return IT(this,_K(this))};function _K(e){var t,n,r,i,o,u,l,h,p,m;return P(function(b){switch(b.h){case 1:return jy(),t=e.g,n=e.h.drm,r=new ai,i=!1,b.D(2),b.g(r.init(),4);case 4:o=[],sK(r,function(w){return o.push(w)}),u=x(o),l=u.next();case 5:if(l.done){b.A(2);break}return h=l.value,b.g(h.getAll(),8);case 8:return p=b.i,b.g(oD(n,t,p),9);case 9:return m=b.i,b.g(h.remove(m),10);case 10:m.length!=p.length&&(i=!0),l=u.next(),b.A(5);break;case 2:return b.u(),b.g(r.destroy(),11);case 11:b.B(3);break;case 3:return b.return(!i)}})}g.list=function(){return IT(this,DK())};function DK(){var e,t,n;return P(function(r){switch(r.h){case 1:return jy(),e=[],t=new ai,r.D(2),r.g(t.init(),4);case 4:return n=Promise.resolve(),oK(t,function(i,o){n=n.then(function(){var u;return P(function(l){if(l.h==1)return l.g(o.getAllManifests(),2);u=l.i,u.forEach(function(h,p){h=CT(new os("manifest",i.Pb,i.jb,p),h),e.push(h)}),l.j()})})}),r.g(n,2);case 2:return r.u(),r.g(t.destroy(),6);case 6:r.B(3);break;case 3:return r.return(e)}})}function LK(e,t,n,r){var i,o,u,l,h;return P(function(p){if(p.h==1)return i=null,o=e.g,u={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){i=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){return Promise.resolve()},disableStream:function(){},addFont:function(){},getStreamingRetryParameters:function(){return r.streaming.retryParameters},onSegmentReceived:function(){}},n.configure(r.manifest),Xi(e),p.g(n.start(t,u),2);if(p.h!=3)return l=p.i,Xi(e),h=mD(l),p.g(Promise.all(Tw(h,function(m){return m.createSegmentIndex()})),3);if(Xi(e),i)throw i;return p.return(l)})}function RK(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k,S,A,M;return P(function(_){switch(_.h){case 1:return _.g(gD(e,t),2);case 2:if(r=_.i,r!="text/vtt")throw new B(1,2,2017,t);return _.g(OK(t,e.g,e.h.streaming.retryParameters),3);case 3:if(i=_.i,o=zh(r),!o)throw new B(2,2,2014,r);for(u=o(),l={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0,isMpegTs:!1},h=H(i),p=u.parseMedia(h,l,t,[]),m=[],b=x(p),w=b.next(),T={};!w.done;T={sg:void 0,vd:void 0},w=b.next())T.vd=w.value,T.sg=null,k=(function(R){return function(){return R.sg==null&&(R.sg=zn([t],[R.vd.payload])),R.sg||[]}})(T),S=new nt(T.vd.startTime,T.vd.endTime,k,0,null,null,0,0,1/0),T.vd.payload.includes("#xywh")&&(A=T.vd.payload.split("#xywh=")[1].split(","),A.length===4&&S.ig({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),m.push(S);if(M=r,!m.length){_.A(4);break}return _.g(Pd(m[0].U()[0],e.g,e.h.manifest.retryParameters),5);case 5:M=_.i;case 4:return _.return(_s({id:e.m++,segmentIndex:new Et(m),mimeType:M||"",kind:"",language:"und",type:"image",tilesLayout:"1x1",external:!0}))}})}function NK(e,t,n,r,i,o,u){var l,h,p;return P(function(m){if(m.h==1)return o?m.A(2):m.g(gD(e,n),3);if(m.h!=2&&(o=m.i),l=_s({id:e.m++,segmentIndex:l0(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:u||"",kind:i,language:r,originalLanguage:r,type:mt,external:!0}),h=tr(l.mimeType,l.codecs),p=Hh(h),!p)throw new B(2,2,2014,o);return m.return(l)})}function gD(e,t){var n;return P(function(r){switch(r.h){case 1:return r.m(2),r.g(Pd(t,e.g,e.h.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new B(1,2,2011,t)}})}function OK(e,t,n){var r,i,o;return P(function(u){return u.h==1?(r=ua,i=yn([e],n),i.method="GET",u.g(t.request(r,i).promise,2)):(o=u.i,u.return(o.data))})}g.td=function(e,t,n,r){var i=this,o;return P(function(u){return u.h==1?(o=new qv({xc:i.g,onError:t,Wf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),u.g(xF(o,e.variants,r),2)):u.h!=3?r?u.g(hI(o),3):u.A(3):u.return(o)})};function jK(e,t,n,r){var i=new Map,o=mD(n),u=new Map;o=x(o);for(var l=o.next();!l.done;l=o.next()){l=l.value;var h=UK(e,t,n,l,r,i);u.set(l.id,h)}for(e=x(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&u.get(t.audio.id).variantIds.push(t.id),t.video&&u.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(u.values()),xi:Array.from(i.values())}}function UK(e,t,n,r,i,o){var u={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,supplementalCodecs:"",frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,external:r.external,fastSwitching:r.fastSwitching,isAudioMuxedInVideo:r.isAudioMuxedInVideo,isIframe:r.isIframe};n=n.presentationTimeline.Fb();var l=i.offline.numberOfParallelDownloads,h=l===0?r.id:0;return FK(r,n,function(p,m){var b=yT(p),w=void 0,T=null;if(r.type=="chapter"){var k=p.getMetadata();k&&(T=k.title)}T||o.has(b)||(k=p.endTime-p.startTime,k=lD(t,r.id)*k,k=G_(e.g,k),o.set(b,new H_(p,k,h,!1,m))),p.ia&&(w=yT(p.ia),o.has(w)||(k=lD(t,r.id)*.5,k=G_(e.g,k),o.set(w,new H_(p.ia,k,h,!0,m)))),u.segments.push({pendingInitSegmentRefId:w,initSegmentKey:w?0:null,startTime:p.startTime,endTime:p.endTime,appendWindowStart:p.appendWindowStart,appendWindowEnd:p.appendWindowEnd,timestampOffset:p.timestampOffset,tilesLayout:p.tilesLayout,pendingSegmentRefId:b,dataKey:0,mimeType:p.mimeType,codecs:p.codecs,thumbnailSprite:p.thumbnailSprite,chapterTitle:T}),l!==0&&(h=(h+1)%l)}),u}function FK(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var r=e.segmentIndex.get(t);r;)n(r,t),r=e.segmentIndex.get(++t)}function Xi(e){if(e.j.g)throw new B(2,9,7001)}function jy(){if(!AT())throw new B(2,9,9e3)}function IT(e,t){return P(function(n){return n.h==1?(e.i.push(t),n.D(2),n.g(t,4)):n.h!=2?n.return(n.i):(n.u(),ke(e.i,t),n.B(0))})}function BK(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){ke(e.i,n)})}function VK(e){var t=new Set;e=x(e.streams);for(var n=e.next();!n.done;n=e.next()){n=x(n.value.segments);for(var r=n.next();!r.done;r=n.next())r=r.value,r.initSegmentKey!=null&&t.add(r.initSegmentKey),t.add(r.dataKey)}return Array.from(t)}function $K(e,t,n,r){var i,o,u;return P(function(l){return l.h==1?r.drmInfo?(i=uK(n),o=r.sessionIds.map(function(h){return{sessionId:h,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:pD(r,!1),videoCapabilities:pD(r,!0)}}),l.g(oD(t,e,o),2)):l.return():l.h!=3?(u=l.i,l.g(i.remove(u),3)):l.g(i.add(o.filter(function(h){return!u.includes(h.sessionId)})),0)})}function mD(e){for(var t=new Set,n=x(e.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video);for(n=x(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(n=x(e.imageStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=x(e.chapterStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function zK(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=x(t),r=n.next();!r.done;r=n.next()){r=x(t);for(var i=r.next();!i.done;i=r.next());}for(t=x(e),n=t.next();!n.done;n=t.next())for(n=x(e),r=n.next();!r.done;r=n.next());}Te("shaka.offline.Storage",fr),fr.deleteAll=function(){var e;return P(function(t){return t.h==1?(e=new ai,t.D(2),t.g(lK(e),2)):t.h!=5?(t.u(),t.g(e.destroy(),5)):t.B(0)})},fr.prototype.list=fr.prototype.list,fr.prototype.removeEmeSessions=fr.prototype.sm,fr.prototype.remove=fr.prototype.remove,fr.prototype.store=fr.prototype.store,fr.prototype.getNetworkingEngine=fr.prototype.hb,fr.prototype.getConfiguration=fr.prototype.getConfiguration,fr.prototype.configure=fr.prototype.configure,fr.prototype.destroy=fr.prototype.destroy,fr.support=AT;var HK=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");c8("offline",AT);function Er(){}function Hr(e,t){for(e={priority:t||0,callback:e},t=0;t<sg.length;t++)if(sg[t].priority<e.priority){sg.splice(t,0,e);return}sg.push(e)}Te("shaka.polyfill",Er),Er.register=Hr,Er.installAll=function(){for(var e=x(sg),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){ut("Error installing polyfill!",n)}}};var sg=[];function Uy(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}Uy.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=x(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=x(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},Uy.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function vD(e){return wl(e)?"cbcs":e5(e)||qo(e)||zi(e)||e==="com.huawei.wiseplay"?"cenc":(ut("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function yD(e){if(!e)return!1;e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function MT(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&Qe().ld())}function bD(){}var ug;function wD(){Qe().lg()&&!ug&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(ug=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=qK,navigator.emeEncryptionSchemePolyfilled=!0)}function qK(e,t){var n=this,r;return P(function(i){return i.h==1?i.g(ug.call(n,e,t),2):(r=i.i,yD(r)?(navigator.requestMediaKeySystemAccess=ug,i.return(r)):(navigator.requestMediaKeySystemAccess=xD,i.return(xD.call(n,e,t))))})}function xD(e,t){var n=this,r,i,o,u,l,h,p,m,b,w,T,k;return P(function(S){if(S.h==1){for(r=vD(e),i=[],o=x(t),u=o.next();!u.done;u=o.next())l=u.value,h=kD(l.videoCapabilities,r),p=kD(l.audioCapabilities,r),l.videoCapabilities&&l.videoCapabilities.length&&!h.length||l.audioCapabilities&&l.audioCapabilities.length&&!p.length||(m=Object.assign({},l),m.videoCapabilities=h,m.audioCapabilities=p,i.push(m));if(!i.length)throw b=Error("Unsupported keySystem or supportedConfigurations."),b.name="NotSupportedError",b.code=DOMException.NOT_SUPPORTED_ERR,b;return S.g(ug.call(n,e,i),2)}return w=S.i,k=T=null,i[0]&&(i[0].videoCapabilities&&(T=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(k=i[0].audioCapabilities[0].encryptionScheme)),S.return(new Uy(w,T,k))})}function kD(e,t){return e&&e.filter(function(n){return MT(n.encryptionScheme,t)})}Er.EmeEncryptionScheme=bD,bD.install=wD,Hr(wD);function TD(){}function SD(){"getOrInsert"in Map.prototype||(Map.prototype.getOrInsert=CD),"getOrInsertComputed"in Map.prototype||(Map.prototype.getOrInsertComputed=AD),"getOrInsert"in WeakMap.prototype||(WeakMap.prototype.getOrInsert=CD),"getOrInsertComputed"in WeakMap.prototype||(WeakMap.prototype.getOrInsertComputed=AD)}function CD(e,t){return this.has(e)||this.set(e,t),this.get(e)}function AD(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}Er.Map=TD,TD.install=SD,Hr(SD);function ED(){}var lg;function ID(){Qe().lg()&&!lg&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(lg=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=GK,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function GK(e){var t=this,n,r;return P(function(i){switch(i.h){case 1:return i.g(lg.call(t,e),2);case 2:if(n=i.i,!n.supported||!e.keySystemConfiguration)return i.return(n);if(r=n.keySystemAccess,yD(r))return navigator.mediaCapabilities.decodingInfo=lg,i.return(n);if(navigator.mediaCapabilities.decodingInfo=MD,r){i.A(3);break}return i.g(PD(e),4);case 4:return n.keySystemAccess=i.i,i.return(n);case 3:return i.return(MD.call(t,e))}})}function MD(e){var t=this,n,r,i,o,u,l,h;return P(function(p){switch(p.h){case 1:return r=n=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,o=i.keySystem,r=i.audio&&i.audio.encryptionScheme,n=i.video&&i.video.encryptionScheme,u=vD(o),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},MT(r,u)&&MT(n,u))?p.g(lg.call(t,e),2):p.return(l);case 2:if(h=p.i,h.keySystemAccess){h.keySystemAccess=new Uy(h.keySystemAccess,n,r),p.A(3);break}if(!e.keySystemConfiguration){p.A(3);break}return p.g(PD(e),5);case 5:h.keySystemAccess=p.i;case 3:return p.return(h)}})}function PD(e){var t,n;return P(function(r){if(r.h==1){var i=e.keySystemConfiguration,o=[],u=[];return i.audio&&o.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:i.audio.encryptionScheme}),i.video&&u.push({robustness:i.video.robustness||"",contentType:e.video.contentType,encryptionScheme:i.video.encryptionScheme}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},o.length&&(i.audioCapabilities=o),u.length&&(i.videoCapabilities=u),t=i,r.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.i,r.return(n)})}Er.MCapEncryptionScheme=ED,ED.install=ID,Hr(ID,-2);function Fy(){}function _D(){Qe().hc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Fy.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=KK)}function KK(e){var t,n,r,i,o,u,l,h,p,m,b;return P(function(w){switch(w.h){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},Qe(),n=e.video,r=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(i=n.contentType,o=$l().canPlayType(i)!="",!o)||r&&(u=r.contentType,l=$l().canPlayType(u)!="",!l))return w.return(t)}else return w.return(t);w.A(2);break}if(!rs())return w.return(t);if(!n){w.A(3);break}return w.g(WK(n),4);case 4:if(h=w.i,!h)return w.return(t);case 3:if(!r){w.A(2);break}return w.g(XK(r),6);case 6:if(p=w.i,!p)return w.return(t);case 2:return e.keySystemConfiguration?(m=e.keySystemConfiguration,w.g(YK(n,r,m),8)):(t.supported=!0,w.return(t));case 8:(b=w.i)&&(t.supported=!0,t.keySystemAccess=b);case 7:return w.return(t)}})}function WK(e){var t,n,r;return P(function(i){return i.h==1?(t=Qe(),n=t.Ra(),n!=="CAST"?i.A(2):i.g(JK(e),3)):i.h!=2?(r=i.i,i.return(r)):i.return(Si(e.contentType))})}function XK(e){var t,n,r,i,o;return P(function(u){switch(u.h){case 1:if(t=Qe(),n=t.Ra(),r=e.contentType,n!=="CAST"||!e.spatialRendering){u.A(2);break}if(r+="; spatialRendering=true",!(d.cast&&cast.__platform__&&cast.__platform__.canDisplayType)){u.A(2);break}if(i=!1,o=DD,o.has(r)){i=o.get(r),u.A(4);break}return u.g(cast.__platform__.canDisplayType(r),5);case 5:i=u.i,o.set(r,i);case 4:return u.return(i);case 2:return u.return(Si(r))}})}function YK(e,t,n){var r,i,o,u,l,h,p,m,b,w,T,k;return P(function(S){switch(S.h){case 1:r=[],i=[],o=[],n.audio&&(u={robustness:n.audio.robustness||"",contentType:t.contentType},Qe().Aj()&&t.contentType.includes('codecs="ac-3"')&&(u.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(u.encryptionScheme=n.audio.encryptionScheme,o.push(n.audio.encryptionScheme)),r.push(u)),n.video&&(l={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(l.encryptionScheme=n.video.encryptionScheme,o.push(n.video.encryptionScheme)),i.push(l)),h={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(h.audioCapabilities=r),i.length&&(h.videoCapabilities=i),p=e?e.contentType:"",m=t?t.contentType:"",b=ki(p)+";"+yu(p),w=ki(m)+";"+yu(m),T=n.keySystem,k=null,S.m(2);var A=H2(b,w,T,o);if(nd.has(A)){A=H2(b,w,T,o),k=nd.get(A)||null,S.A(4);break}return S.g(navigator.requestMediaKeySystemAccess(n.keySystem,[h]),5);case 5:A=k=S.i;var M=H2(b,w,T,o);nd.set(M,A);case 4:S.o(3);break;case 2:S.l();case 3:return S.return(k)}})}function JK(e){var t,n,r,i,o;return P(function(u){if(u.h==1){if(!(d.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return u.return(Si(e.contentType));switch(t=e.contentType,e.width&&e.height&&e.width>1280&&e.height>720&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),n<24||n>30)&&(t+="; framerate="+e.framerate),r=e.transferFunction||"",r){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return u.return(!1)}return i=!1,o=DD,o.has(t)?(i=o.get(t),u.A(2)):u.g(cast.__platform__.canDisplayType(t),3)}return u.h!=2&&(i=u.i,o.set(t,i)),u.return(i)})}Er.MediaCapabilities=Fy,Fy.install=_D,Fy.originalMcap=null;var DD=new Map;Hr(_D,-1);function PT(){this.size=0,this.g=void 0}g=PT.prototype,g.tc=function(){return this.g},g.forEach=function(e){this.g&&e(this.g,n5.value())},g.get=function(e){if(this.has(e))return this.g},g.has=function(e){var t=n5.value();return!!(this.g&&$i(e,t))},g.entries=function(){},g.keys=function(){},g.values=function(){};function LD(){}function RD(){var e=Qe(),t=e.Qa()==="WEBKIT"?e.Ca():null;for((d.MediaSource||d.ManagedMediaSource)&&t&&d.MediaSource&&(t<=12?(ND(),QK()):t<=15&&ND()),e=x(e.Mj()),t=e.next();!t.done;t=e.next())eW(t.value);(d.MediaSource||d.ManagedMediaSource)&&ZK(),d.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&tW()}function ND(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,oe.apply(0,arguments));return t.abort=function(){},t}}function QK(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function ZK(){if(d.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return cd(n)!="mp2t"&&e(n)}}if(d.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);d.ManagedMediaSource.isTypeSupported=function(n){return cd(n)!="mp2t"&&t(n)}}}function eW(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(r){return yu(r)!=e&&t(r)},d.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);d.ManagedMediaSource.isTypeSupported=function(r){return yu(r)!=e&&n(r)}}}function tW(){var e=MediaSource.isTypeSupported;Qe().ik()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex(function(u){return u.startsWith("codecs=")});if(r<0)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=i.findIndex(function(u){return u.startsWith("vp09")});return o>=0&&(i[o]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}Er.MediaSource=LD,LD.install=RD,Hr(RD);function _T(){}var DT,LT,RT,NT,OT,jT;function OD(e){d.HTMLVideoElement&&d.WebKitMediaKeys&&d.shakaMediaKeysPolyfill!=UT&&(e!==void 0&&e&&(DT=!0,LT=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),RT=HTMLMediaElement.prototype.setMediaKeys,NT=d.MediaKeys,OT=d.MediaKeySystemAccess,jT=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rW,d.MediaKeys=cg,d.MediaKeySystemAccess=By,navigator.requestMediaKeySystemAccess=nW,d.shakaMediaKeysPolyfill=UT,Bv.clear(),nd.clear())}function nW(e,t){try{var n=new By(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function rW(e){var t=this.mediaKeys;return t&&t!=e&&jD(t,null),delete this.mediaKeys,(this.mediaKeys=e)?jD(e,this):Promise.resolve()}function iW(e){if(e=H(e.initData),_e(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=$n(e.subarray(4),!0),e=Sr(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=Vn(e),this.dispatchEvent(t)}Er.PatchedMediaKeysApple=_T,_T.uninstall=function(){d.shakaMediaKeysPolyfill==UT&&DT&&(DT=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",LT),HTMLMediaElement.prototype.setMediaKeys=RT,d.MediaKeys=NT,d.MediaKeySystemAccess=OT,navigator.requestMediaKeySystemAccess=jT,LT=jT=RT=OT=NT=null,d.shakaMediaKeysPolyfill="",Bv.clear(),nd.clear())},_T.install=OD;function By(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=x(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var o=x(n.audioCapabilities),u=o.next();!u.done;u=o.next())u=u.value,u.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(t.audioCapabilities.push(u),i=!0));if(n.videoCapabilities)for(n=x(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}By.prototype.createMediaKeys=function(){var e=new cg(this.keySystem);return Promise.resolve(e)},By.prototype.getConfiguration=function(){return this.g};function cg(e){this.h=new WebKitMediaKeys(e),this.g=new he}cg.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Vy(this.h)},cg.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function jD(e,t){if(e.g.Ea(),!t)return Promise.resolve();e.g.G(t,"webkitneedkey",iW);try{return Md(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}cg.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Vy(e){Bt.call(this),this.i=null,this.m=e,this.g=this.h=null,this.j=new he,this.l=Promise.withResolvers(),this.sessionId="",this.expiration=NaN,this.keyStatuses=new PT,this.onkeystatuseschange=null}K(Vy,Bt),g=Vy.prototype,g.generateRequest=function(e,t){var n=this;this.h=Promise.withResolvers();try{var r=this.m.createSession("video/mp4",H(t));this.i=r,this.sessionId=r.sessionId||"",this.j.G(this.i,"webkitkeymessage",function(i){n.h&&(n.h.resolve(),n.h=null),i=new Map().set("messageType",n.keyStatuses.tc()==null?"license-request":"license-renewal").set("message",Vn(i.message)),i=new Ge("message",i),n.dispatchEvent(i)}),this.j.G(r,"webkitkeyadded",function(){n.g&&($y(n,"usable"),n.g.resolve(),n.g=null)}),this.j.G(r,"webkitkeyerror",function(){var i=Error("EME PatchedMediaKeysApple key error");if(i.errorCode=n.i.error,n.h!=null)n.h.reject(i),n.h=null;else if(n.g!=null)n.g.reject(i),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:$y(n,"output-not-allowed");break;default:$y(n,"internal-error")}}),$y(this,"status-pending")}catch(i){this.h.reject(i)}return this.h.promise},g.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},g.update=function(e){this.g=Promise.withResolvers();try{this.i.update(H(e))}catch(t){this.g.reject(t)}return this.g.promise},g.close=function(){try{this.i.close(),this.l.resolve(),this.j.Ea()}catch(e){this.l.reject(e)}return this.closed},g.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function $y(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ge("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}D.Object.defineProperties(Vy.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.l.promise}}});var UT="apple";Hr(function(){d.HTMLVideoElement&&d.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||OD())});function UD(){}function FD(){if(d.MediaKeys){var e=Qe();MediaKeys.prototype.setServerCertificate&&e.Le()||(MediaKeys.prototype.setServerCertificate=aW)}}function aW(){return Promise.resolve(!1)}Er.PatchedMediaKeysCert=UD,UD.install=FD,Hr(FD);function BD(){}function VD(){if(!(!d.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)$T="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=oW,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=sW,d.MediaKeys=dg,d.MediaKeySystemAccess=zy,d.shakaMediaKeysPolyfill=uW}}function FT(e){var t=$T;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function oW(e,t){try{var n=new zy(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function sW(e){var t=this.mediaKeys;return t&&t!=e&&$D(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&$D(e,this),Promise.resolve()}Er.PatchedMediaKeysWebkit=BD,BD.install=VD;function zy(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video"),t=x(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var u={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},l=!1;if(o.audioCapabilities)for(var h=x(o.audioCapabilities),p=h.next();!p.done;p=h.next())p=p.value,p.contentType&&(l=!0,i.canPlayType(p.contentType.split(";")[0],this.g)&&(u.audioCapabilities.push(p),r=!0));if(o.videoCapabilities)for(h=x(o.videoCapabilities),p=h.next();!p.done;p=h.next())p=p.value,p.contentType&&(l=!0,i.canPlayType(p.contentType,this.g)&&(u.videoCapabilities.push(p),r=!0));if(l||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(u.persistentState="required",u.sessionTypes=["persistent-license"]):r=!1),r){this.h=u;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}zy.prototype.createMediaKeys=function(){var e=new dg(this.g);return Promise.resolve(e)},zy.prototype.getConfiguration=function(){return this.h};function dg(e){this.l=e,this.h=null,this.g=new he,this.i=[],this.j=new Map}function $D(e,t){e.h=t,e.g.Ea();var n=$T;t&&(e.g.G(t,n+"needkey",function(r){var i=new CustomEvent("encrypted");i.initDataType="cenc",i.initData=Vn(r.initData),e.h.dispatchEvent(i)}),e.g.G(t,n+"keymessage",function(r){var i=BT(e,r.sessionId);i&&(r=new Map().set("messageType",i.keyStatuses.tc()==null?"licenserequest":"licenserenewal").set("message",r.message),r=new Ge("message",r),i.h&&(i.h.resolve(),i.h=null),i.dispatchEvent(r))}),e.g.G(t,n+"keyadded",function(r){(r=BT(e,r.sessionId))&&r.ready()}),e.g.G(t,n+"keyerror",function(r){var i=BT(e,r.sessionId);if(i){var o=Error("EME v0.1b key error"),u=r.errorCode;u.systemCode=r.systemCode,o.errorCode=u,!r.sessionId&&i.h?(r.systemCode==45&&(o.message="Unsupported session type."),i.h.reject(o),i.h=null):r.sessionId&&i.g?(i.g.reject(o),i.g=null):(o=r.systemCode,r.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?qy(i,"output-restricted"):o==1?qy(i,"expired"):qy(i,"internal-error"))}}))}dg.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Hy(t,this.l,e),this.i.push(e),e},dg.prototype.setServerCertificate=function(){return Promise.resolve(!1)},dg.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function BT(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Hy(e,t,n){Bt.call(this),this.l=e,this.o=!1,this.g=this.h=null,this.j=t,this.m=n,this.i=Promise.withResolvers(),this.sessionId="",this.expiration=NaN,this.keyStatuses=new PT,this.onkeystatuseschange=null}K(Hy,Bt),g=Hy.prototype,g.ready=function(){qy(this,"usable"),this.g&&this.g.resolve(),this.g=null};function zD(e,t,n){if(e.o)return Promise.reject(Error("The session is already initialized."));e.o=!0;try{if(e.m=="persistent-license")if(n)var r=H(Sr("LOAD_SESSION|"+n));else{var i=Sr("PERSISTENT|");r=Dn(i,t)}else r=H(t)}catch(u){return Promise.reject(u)}e.h=Promise.withResolvers();var o=FT("generateKeyRequest");try{e.l[o](e.j,r)}catch(u){if(u.name!="InvalidStateError")return e.h=null,Promise.reject(u);new ft(function(){try{e.l[o](e.j,r)}catch(l){e.h.reject(l),e.h=null}}).$(.01)}return e.h.promise}function VT(e,t,n){if(e.g)e.g.promise.then(function(){return VT(e,t,n)}).catch(function(){return VT(e,t,n)});else{if(e.g=t,e.j=="webkit-org.w3.clearkey"){var r=dt(n),i=JSON.parse(r);i.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=wi(i.keys[0].k),i=wi(i.keys[0].kid)}else r=H(n),i=null;var o=FT("addKey");try{e.l[o](e.j,r,i,e.sessionId)}catch(u){e.g.reject(u),e.g=null}}}function qy(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ge("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}g.generateRequest=function(e,t){return zD(this,t,null)},g.load=function(e){return this.m=="persistent-license"?zD(this,null,e):Promise.reject(Error("Not a persistent session."))},g.update=function(e){var t=Promise.withResolvers();return VT(this,t,e),t.promise},g.close=function(){if(this.m!="persistent-license"){if(!this.sessionId)return this.i.reject(Error("The session is not callable.")),this.i.promise;var e=FT("cancelKeyRequest");try{this.l[e](this.j,this.sessionId)}catch{}}return this.i.resolve(),this.i.promise},g.remove=function(){return this.m!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()},D.Object.defineProperties(Hy.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.i.promise}}});var $T="",uW="webkit";Hr(VD);function HD(){}function qD(){d.crypto&&("randomUUID"in d.crypto||(d.crypto.randomUUID=lW))}function lW(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}Er.RandomUUID=HD,HD.install=qD,Hr(qD);function GD(){}function KD(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:cW})}function cW(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}Er.Symbol=GD,GD.install=KD,Hr(KD);function WD(){}function XD(){for(var e=x([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next()){t=t.value;var n=void 0;(n=t.prototype).indexOf!=null||(n.indexOf=Array.prototype.indexOf),n=void 0,(n=t.prototype).lastIndexOf!=null||(n.lastIndexOf=Array.prototype.lastIndexOf),n=void 0,(n=t.prototype).includes!=null||(n.includes=Array.prototype.includes)}}Er.TypedArray=WD,WD.install=XD,Hr(XD);function YD(){}function JD(){d.URLSearchParams||(d.URLSearchParams=zT),!d.URL||!d.URL.prototype||"searchParams"in d.URL.prototype||Object.defineProperty(d.URL.prototype,"searchParams",{get:dW,enumerable:!0,configurable:!0})}function dW(){var e=this,t=QD.get(e);if(!t){t=new d.URLSearchParams(e.search);var n=function(){var u=t.toString();e.search=u?"?"+u:""},r=t.append;t.append=function(u,l){r.call(this,u,l),n()};var i=t.delete;t.delete=function(u){i.call(this,u),n()};var o=t.set;t.set=function(u,l){o.call(this,u,l),n()},QD.set(e,t)}return t}Er.URLSearchParams=YD,YD.install=JD;var QD=new WeakMap;function zT(e){if(this.g=[],typeof e=="string"){if(e.startsWith("?")&&(e=e.substring(1)),e){e=x(e.split("&"));for(var t=e.next();!t.done;t=e.next()){var n=t.value.split("=");t=decodeURIComponent(n[0].replace(/\+/g," ")),n=n.length>1?decodeURIComponent(n[1].replace(/\+/g," ")):"",this.append(t,n)}}}else if(Array.isArray(e))for(e=x(e),t=e.next();!t.done;t=e.next())t=t.value,this.append(t[0],t[1]);else if(e)for(t in e)this.append(t,e[t])}g=zT.prototype,g.append=function(e,t){this.g.push([String(e),String(t)])},g.get=function(e){e=String(e);for(var t=x(this.g),n=t.next();!n.done;n=t.next())if(n=n.value,n[0]===e)return n[1];return null},g.has=function(e){var t=String(e);return this.g.some(function(n){return n[0]===t})},g.set=function(e,t){e=String(e),t=String(t);for(var n=!1,r=0;r<this.g.length;r++)this.g[r][0]===e&&(n?(this.g.splice(r,1),r--):(this.g[r][1]=t,n=!0));n||this.append(e,t)},g.toString=function(){return this.g.map(function(e){return encodeURIComponent(e[0]).replace(/%20/g,"+")+"="+encodeURIComponent(e[1]).replace(/%20/g,"+")}).join("&")},g.entries=function(){var e=0,t=this.g.map(function(r){return[r[0],r[1]]}),n={next:function(){return e<t.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}};return n[Symbol.iterator]=function(){return n},n},g.keys=function(){var e=0,t=this.g,n={next:function(){return e<t.length?{value:t[e++][0],done:!1}:{value:void 0,done:!0}}};return n[Symbol.iterator]=function(){return n},n},g.values=function(){var e=0,t=this.g,n={next:function(){return e<t.length?{value:t[e++][1],done:!1}:{value:void 0,done:!0}}};return n[Symbol.iterator]=function(){return n},n},g.forEach=function(e){for(var t=x(this.g),n=t.next();!n.done;n=t.next())n=n.value,e(n[1],n[0],this)},zT.prototype[Symbol.iterator]=function(){return this.entries()},Hr(JD);function ZD(){}function eL(){if(d.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}Er.VideoPlayPromise=ZD,ZD.install=eL,Hr(eL);function tL(){}function nL(){if(d.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.requestVideoFrameCallback&&d.requestAnimationFrame&&e.getVideoPlaybackQuality&&(e.requestVideoFrameCallback=hW,e.cancelVideoFrameCallback=pW)}}function fW(e){var t=HT.get(e);return t||(t={$l:1,qd:new Map,presentedFrames:0},HT.set(e,t)),t}function hW(e){function t(u){if(r.qd.has(i)){var l=n.getVideoPlaybackQuality().totalVideoFrames||0;l!==r.presentedFrames?(r.presentedFrames=l,l={presentationTime:u,expectedDisplayTime:u,mediaTime:n.currentTime,presentedFrames:l,width:n.videoWidth,height:n.videoHeight,processingDuration:0},r.qd.delete(i),e(u,l)):(u=d.requestAnimationFrame(t),r.qd.set(i,u))}}var n=this,r=fW(n),i=r.$l++,o=d.requestAnimationFrame(t);return r.qd.set(i,o),i}function pW(e){var t=HT.get(this);if(t){var n=t.qd.get(e);n!=null&&(d.cancelAnimationFrame(n),t.qd.delete(e))}}Er.VideoFrameCallback=tL,tL.install=nL;var HT=new WeakMap;Hr(nL,-2);function rL(){}function iL(){if(d.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||typeof $l().webkitDroppedFrameCount=="number")&&(e.getVideoPlaybackQuality=gW)}}function gW(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Er.VideoPlaybackQuality=rL,rL.install=iL,Hr(iL);function aL(){}function oL(){if(!d.VTTCue&&d.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=qT;else if(t==6)e=mW;else{try{var n=!!qT(1,2,"")}catch{n=!1}n&&(e=qT)}e&&(d.VTTCue=function(r,i,o){return e(r,i,o)})}}function qT(e,t,n){return new d.TextTrackCue(e,t,n)}function mW(e,t,n){return new d.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}Er.VTTCue=aL,aL.install=oL,Hr(oL);function Nn(e){Bt.call(this),this.g=e,this.u=null,this.h=[],this.j=-1,this.i=this.l=null,this.m=new he,this.o=null}K(Nn,Bt),g=Nn.prototype,g.destroy=function(){var e=this;return P(function(t){if(t.h==1)return t.g(e.removeAllItems(),2);e.g=null,e.m&&(e.m.release(),e.m=null),e.o&&(e.o.stop(),e.o=null),Bt.prototype.release.call(e),t.j()})},g.configure=function(e){this.u=e},g.getConfiguration=function(){return this.u},g.setCustomPlayer=function(e){this.g=e},g.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null},g.getCurrentItemIndex=function(){return this.j},g.getItems=function(){return this.h.slice()},g.insertItems=function(e){this.h.push.apply(this.h,se(e)),this.dispatchEvent(new Ge("itemsinserted"))},g.removeAllItems=function(){var e=this,t,n,r,i,o,u;return P(function(l){switch(l.h){case 1:if(e.m.Ea(),!(e.g&&e.h.length&&e.j>=0)){l.A(2);break}return l.m(3),l.g(e.g.Fc(),5);case 5:l.o(2);break;case 3:l.l();case 2:for(t=[],(n=e.i)!=null&&n.preloadManager&&!e.i.preloadManager.l&&t.push(e.i.preloadManager.destroy()),e.i=null,(r=e.l)!=null&&r.preloadManager&&!e.l.preloadManager.l&&t.push(e.l.preloadManager.destroy()),e.l=null,i=x(e.h),o=i.next();!o.done;o=i.next())u=o.value,u.preloadManager&&!u.preloadManager.l&&t.push(u.preloadManager.destroy());if(!t.length){l.A(6);break}return l.g(Promise.all(t),6);case 6:e.h=[],e.j=-1,e.dispatchEvent(new Ge("itemsremoved")),l.j()}})},g.playItem=function(e){var t=this,n,r,i,o,u,l,h;return P(function(p){if(p.h==1){if(t.m.Ea(),t.o&&(t.o.stop(),t.o=null),!t.h.length||e<0||e>=t.h.length)throw new B(2,7,7007);return n=t.getCurrentItem(),r=t.h[e],t.j!==e&&(t.j=e,t.dispatchEvent(new Ge("currentitemchanged"))),i=t.g.Db(),vW(t,i),yW(t,i),o=bW(t,r),p.g(wW(t,r,n),2)}if(p.h!=3)return r.config&&(t.g.Pj(),t.g.configure(r.config)),((u=r.extraText)!=null&&u.length||(l=r.extraThumbnail)!=null&&l.length||(h=r.extraChapter)!=null&&h.length)&&t.m.oa(t.g,"streaming",function(){return P(function(m){return m.g(xW(t,r),0)})}),p.g(t.g.load(o,r.startTime,r.mimeType),3);t.l=null,p.j()})};function vW(e,t){if(e.u&&!(e.u.preloadNextUrlWindow<=0)){var n=!1,r=function(){var i,o,u,l,h;return P(function(p){switch(p.h){case 1:if(e.l||e.h.length<=1||n||e.g.ya()||!t.duration||(i=e.g.Na().end-t.currentTime,isNaN(i)||i>e.u.preloadNextUrlWindow))return p.return();if(n=!0,o=null,u=e.u.repeatMode,l=e.j+1,l<e.h.length?o=e.h[l]:u===1&&(o=e.h[0]),!o||o.preloadManager&&!o.preloadManager.l){p.A(2);break}return p.m(3),p.g(e.g.preload(o.manifestUri,o.startTime,o.mimeType,o.config,!0),5);case 5:h=p.i,e.l={item:o,preloadManager:h},p.o(4);break;case 3:p.l(),e.l={item:o,preloadManager:null};case 4:e.m.Ua(t,"timeupdate",r);case 2:n=!1,p.j()}})};e.m.G(t,"timeupdate",r)}}function sL(e,t){t.paused?(t.currentTime=e.g.Na().start,t.play()):e.m.oa(t,"paused",function(){t.currentTime=e.g.Na().start,t.play()})}function yW(e,t){e.m.G(e.g,"complete",function(){var n,r=(n=e.u)==null?void 0:n.repeatMode;if(r===2)sL(e,t);else{n=e.j+1;var i=null;n<e.h.length?i=n:r===1&&(i=e.h.length>1?0:e.j),i!==null&&(i===e.j?sL(e,t):(e.o&&(e.o.stop(),e.o=null),e.o=new ft(function(){e.playItem(i).catch(function(){})}).$(0)))}})}function bW(e,t){var n=t.manifestUri;if(t.preloadManager&&!t.preloadManager.l)n=t.preloadManager;else{var r;if(((r=e.l)==null?void 0:r.item)===t&&e.l.preloadManager)n=e.l.preloadManager;else{var i;((i=e.i)==null?void 0:i.item)===t&&e.i.preloadManager&&(n=e.i.preloadManager)}}return n}function wW(e,t,n){var r,i,o,u;return P(function(l){switch(l.h){case 1:if(i=((r=e.i)==null?void 0:r.item)===t,!e.i||i||!e.i.preloadManager||e.i.preloadManager.l){l.A(2);break}return l.g(e.i.preloadManager.destroy(),2);case 2:if(e.i=null,!((o=e.u)!=null&&o.preloadPrevItem&&n&&e.g.Bd()===nr)){l.A(0);break}return l.m(5),l.g(e.g.rk(!1,!1,!1,!0),7);case 7:u=l.i,e.i={item:n,preloadManager:u},l.o(0);break;case 5:l.l(),e.i={item:n,preloadManager:null},l.j()}})}function xW(e,t){var n,r,i,o,u,l;return P(function(h){return r=((n=t.extraText)==null?void 0:n.map(function(p){return P(function(m){return p.mime?m.g(e.g.Tb(p.uri,p.language,p.kind,p.mime,p.codecs),0):m.g(e.g.Tb(p.uri,p.language,p.kind),0)})}))||[],o=((i=t.extraThumbnail)==null?void 0:i.map(function(p){return P(function(m){return m.g(e.g.lc(p),0)})}))||[],l=((u=t.extraChapter)==null?void 0:u.map(function(p){return P(function(m){return m.g(e.g.kc(p.uri,p.language,p.mime),0)})}))||[],h.g(Promise.all([].concat(se(r),se(o),se(l))),0)})}g.loadFromM3uPlaylist=function(e,t){t=t===void 0?!1:t;var n=this,r,i,o,u,l,h;return P(function(p){if(p.h==1)return r=n.g.hb(),i=n.g.getConfiguration().manifest.retryParameters,o=yn([e],i),p.g(r.request(12,o).promise,2);u=p.i,l=dt(u.data);for(var m=[],b=new Set,w=null,T=x(l.split(/\r?\n/)),k=T.next();!k.done;k=T.next())if((k=k.value.trim())&&k!=="#EXTM3U")if(k.startsWith("#EXTINF:")){var S=k.lastIndexOf(",");w=S>=0?k.substring(0,S):k,k=S>=0?k.substring(S+1).trim():"";for(var A=/([\w-]+)="([^"]*)"/g,M={};(S=A.exec(w))!==null;)M[S[1]]=S[2];w=Object.assign({},M,{title:M["tvg-name"]||k||void 0,poster:M["tvg-logo"]||void 0}),k&&(w.displayTitle=k)}else k.startsWith("#")||(k=hd(e,k),S=void 0,A=(S=w)==null?void 0:S["tvg-id"],A&&b.has(A)||(m.push({manifestUri:k,preloadManager:null,startTime:null,mimeType:null,config:null,extraText:null,extraThumbnail:null,extraChapter:null,metadata:w}),A&&b.add(A),w=null));return h=m,h.length===0?p.return():(n.insertItems(h),t?p.g(n.playItem(0),0):p.A(0))})},Te("shaka.queue.QueueManager",Nn),Nn.prototype.loadFromM3uPlaylist=Nn.prototype.loadFromM3uPlaylist,Nn.prototype.playItem=Nn.prototype.playItem,Nn.prototype.removeAllItems=Nn.prototype.removeAllItems,Nn.prototype.insertItems=Nn.prototype.insertItems,Nn.prototype.getItems=Nn.prototype.getItems,Nn.prototype.getCurrentItemIndex=Nn.prototype.getCurrentItemIndex,Nn.prototype.getCurrentItem=Nn.prototype.getCurrentItem,Nn.prototype.setCustomPlayer=Nn.prototype.setCustomPlayer,Nn.prototype.getConfiguration=Nn.prototype.getConfiguration,Nn.prototype.configure=Nn.prototype.configure,Nn.prototype.destroy=Nn.prototype.destroy,H0=function(e){return new Nn(e)};function Ha(){this.g="UNKNOWN"}Ha.prototype.parseInit=function(){},Ha.prototype.setManifestType=function(e){this.g=e},Ha.prototype.parseMedia=function(e,t,n,r){var i=dt(e);if(e=[],i=="")return e;var o=sd(i,"tt",!0);if(!o)throw new B(2,2,2005,"Failed to parse TTML.");if(i=Ko(o,"body")[0],!i)return[];var u=Wo(o,fg,"frameRate"),l=Wo(o,fg,"subFrameRate"),h=Wo(o,fg,"frameRateMultiplier"),p=Wo(o,fg,"tickRate"),m=Wo(o,fg,"cellResolution"),b=o.attributes["xml:space"]||"default",w=Wo(o,Wy,"extent");if(b!="default"&&b!="preserve")throw new B(2,2,2005,"Invalid xml:space value: "+b);b=b=="default",u=new AW(u,l,h,p),m=CW(m),l=Ko(o,"metadata")[0],l=(l?l.children:[]).filter(function(S){return S!=`
`}),h=Ko(o,"style"),o=Ko(o,"region"),p=[];for(var T=x(o),k=T.next();!k.done;k=T.next())(k=kW(this,k.value,h,w))&&p.push(k);if(Rt(i,"p").length)throw new B(2,2,2001,"<p> can only be inside <div> in TTML");for(w=x(Rt(i,"div")),T=w.next();!T.done;T=w.next())if(Rt(T.value,"span").length)throw new B(2,2,2001,"<span> can only be inside <p> in TTML");return(t=uL(this,i,t,u,l,h,o,p,b,m,null,!1,n,r))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function uL(e,t,n,r,i,o,u,l,h,p,m,b,w,T){var k=m;if(Pv(t)){if(!b)return null;var S={tagName:"span",children:[mn(t)],attributes:{},parent:null}}else S=t;for(var A=null,M=x(yL),_=M.next();!_.done&&!(A=Ky(S,"backgroundImage",i,"#",_.value)[0]);_=M.next());M=null,_=Wo(S,yL,"backgroundImage");var R=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(_&&R.test(_)){if(M=parseInt(_.split(":").pop(),10)-1,M>=T.length)return null;M=T[M]}else w&&_&&!_.startsWith("#")&&(_=hd(w,_))&&(M=_);if((t.tagName=="p"||A||M)&&(b=!0),t=b,_=(S.attributes["xml:space"]||(h?"default":"preserve"))=="default",R=S.children.every(Pv),h=[],!R)for(var U=x(S.children),N=U.next();!N.done;N=U.next())(N=uL(e,N.value,n,r,i,o,u,l,_,p,S,b,w,T))&&h.push(N);if(i=m!=null,w=mn(S),w=S.children.length&&w&&/\S/.test(w),U=S.attributes.begin||S.attributes.end||S.attributes.dur,!(U||w||S.tagName=="br"||h.length!=0||i&&!_))return null;for(T=dL(S,r),w=T.start,T=T.end;k&&k.tagName&&k.tagName!="tt";)T=SW(k,r,w,T),w=T.start,T=T.end,k=k.parent;if(w==null&&(w=0),w+=n.periodStart,T=T==null?1/0:T+n.periodStart,e.g!=="HLS"&&(w=Math.max(w,n.segmentStart),T=Math.min(T,n.segmentEnd)),!U&&h.length>0)for(w=1/0,T=0,n=x(h),r=n.next();!r.done;r=n.next())r=r.value,w=Math.min(w,r.startTime),T=Math.max(T,r.endTime);if(S.tagName=="br")return e=new rn(w,T,""),e.lineBreak=!0,e;if(n="",R&&(n=Fn(mn(S)||""),_&&(n=n.replace(/\s+/g," "))),n=new rn(w,T,n),n.nestedCues=h,b||(n.isContainer=!0),p&&(n.cellResolution=p),p=Ky(S,"region",u,"")[0],S.attributes.region&&p&&p.attributes["xml:id"]){var j=p.attributes["xml:id"];n.region=l.filter(function(V){return V.id==j})[0]}return l=p,m&&i&&!S.attributes.region&&!S.attributes.style&&(l=Ky(m,"region",u,"")[0]),TW(e,n,S,l,A,M,o,t,h.length==0),n}function kW(e,t,n,r){var i=new oa,o=t.attributes["xml:id"];if(!o)return null;i.id=o,o=null,r&&(o=YT.exec(r)||JT.exec(r)),r=o?Number(o[1]):null,o=o?Number(o[2]):null;var u,l=Gy(e,t,n,"extent");if(l){var h=(u=YT.exec(l))||JT.exec(l);h!=null&&(i.width=Number(h[1]),i.height=Number(h[2]),u||(r!=null&&(i.width=i.width*100/r),o!=null&&(i.height=i.height*100/o)),i.widthUnits=u||r!=null?xi:0,i.heightUnits=u||o!=null?xi:0)}return(e=Gy(e,t,n,"origin"))&&(h=(u=YT.exec(e))||JT.exec(e),h!=null&&(i.viewportAnchorX=Number(h[1]),i.viewportAnchorY=Number(h[2]),u?l||(i.width=100-i.viewportAnchorX,i.widthUnits=xi,i.height=100-i.viewportAnchorY,i.heightUnits=xi):(o!=null&&(i.viewportAnchorY=i.viewportAnchorY*100/o),r!=null&&(i.viewportAnchorX=i.viewportAnchorX*100/r)),i.viewportAnchorUnits=u||r!=null?xi:0)),i}function GT(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function TW(e,t,n,r,i,o,u,l,h){if(l=l||h,Ir(e,n,r,u,"direction",l)=="rtl"&&(t.direction="rtl"),h=Ir(e,n,r,u,"writingMode",l),h=="tb"||h=="tblr"?t.writingMode="vertical-lr":h=="tbrl"?t.writingMode="vertical-rl":h=="rltb"||h=="rl"?t.direction="rtl":h&&(t.direction=jh),(h=Ir(e,n,r,u,"textAlign",!0))?(t.positionAlign=MW.get(h),t.lineAlign=IW.get(h),t.textAlign=uw[h.toUpperCase()]):t.textAlign=Yo,(h=Ir(e,n,r,u,"displayAlign",!0))&&(t.displayAlign=x5[h.toUpperCase()]),(h=Ir(e,n,r,u,"color",l))&&(t.color=GT(h)),(h=Ir(e,n,r,u,"backgroundColor",l))&&(t.backgroundColor=GT(h)),(h=Ir(e,n,r,u,"border",l))&&(t.border=h),h=Ir(e,n,r,u,"fontFamily",l))switch(h){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=h.split(",").filter(function(p){return p!="default"}).join(",")}switch((h=Ir(e,n,r,u,"fontWeight",l))&&h=="bold"&&(t.fontWeight=Fh),h=Ir(e,n,r,u,"wrapOption",l),t.wrapLine=!(h&&h=="noWrap"),(h=Ir(e,n,r,u,"lineHeight",l))&&h.match(rf)&&(t.lineHeight=h),(h=Ir(e,n,r,u,"fontSize",l))&&(h.match(rf)||h.match(EW))&&(t.fontSize=h),(h=Ir(e,n,r,u,"fontStyle",l))&&(t.fontStyle=A5[h.toUpperCase()]),i?(o=i.attributes.imageType||i.attributes.imagetype,h=i.attributes.encoding,i=mn(i).trim(),o=="PNG"&&h=="Base64"&&i&&(t.backgroundImage="data:image/png;base64,"+i)):o&&(t.backgroundImage=o),(i=Ir(e,n,r,u,"textOutline",l))&&(i=i.split(" "),i[0].match(rf)?t.textStrokeColor=t.color:(t.textStrokeColor=GT(i[0]),i.shift()),i[0]&&i[0].match(rf)?t.textStrokeWidth=i[0]:t.textStrokeColor=""),(i=Ir(e,n,r,u,"letterSpacing",l))&&i.match(rf)&&(t.letterSpacing=i),(i=Ir(e,n,r,u,"linePadding",l))&&i.match(rf)&&(t.linePadding=i),(i=Ir(e,n,r,u,"opacity",l))&&(t.opacity=parseFloat(i)),(i=Gy(e,r,u,"textDecoration"))&&lL(t,i),(i=KT(e,n,u,"textDecoration"))&&lL(t,i),(i=Ir(e,n,r,u,"textCombine",l))&&(t.textCombineUpright=i),Ir(e,n,r,u,"ruby",l)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}function lL(e,t){function n(i,o){var u=e.textDecoration.includes(i);o&&!u?e.textDecoration.push(i):!o&&u&&ke(e.textDecoration,i)}t=x(t.split(" "));for(var r=t.next();!r.done;r=t.next())switch(r.value){case"underline":n(ud,!0);break;case"noUnderline":n(ud,!1);break;case"lineThrough":n("line-through",!0);break;case"noLineThrough":n("line-through",!1);break;case"overline":n("overline",!0);break;case"noOverline":n("overline",!1)}}function Ir(e,t,n,r,i,o){return o=o===void 0?!0:o,(t=KT(e,t,r,i))?t:o?Gy(e,n,r,i):null}function Gy(e,t,n,r){if(!t)return null;var i=Wo(t,Wy,r);return i||cL(e,t,n,r)}function KT(e,t,n,r){var i=Wo(t,Wy,r);return i||cL(e,t,n,r)}function cL(e,t,n,r){t=Ky(t,"style",n,"");for(var i=null,o=0;o<t.length;o++){var u=ko(t[o],"urn:ebu:tt:style",r);u||(u=Wo(t[o],Wy,r)),u||(u=KT(e,t[o],n,r)),u&&(i=u)}return i}function Ky(e,t,n,r,i){var o=[];if(!e||n.length<1)return o;var u=e;for(e=null;!e&&!(e=i?ko(u,i,t):u.attributes[t])&&(u=u.parent,u););if(t=e){for(t=x(t.split(" ")),i=t.next();!i.done;i=t.next())for(i=i.value,e=x(n),u=e.next();!u.done;u=e.next())if(u=u.value,r+u.attributes["xml:id"]==i){o.push(u);break}}return o}function SW(e,t,n,r){return e=dL(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),r==null?r=e.end:e.start!=null&&(r+=e.start),{start:n,end:r}}function dL(e,t){var n=WT(e.attributes.begin,t),r=WT(e.attributes.end,t);return e=WT(e.attributes.dur,t),r==null&&e!=null&&(r=n+e),{start:n,end:r}}function WT(e,t){var n=null;if(fL.test(e)){e=fL.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,i+=o/t.frameRate,n=i+r*60+n*3600}else if(hL.test(e))n=XT(hL,e);else if(pL.test(e))n=XT(pL,e);else if(gL.test(e))e=gL.exec(e),n=Number(e[1])/t.frameRate;else if(mL.test(e))e=mL.exec(e),n=Number(e[1])/t.g;else if(vL.test(e))n=XT(vL,e);else if(e)throw new B(2,2,2001,"Could not parse cue time range in TTML");return n}function XT(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+(Number(e[2])||0)*60+(Number(e[1])||0)*3600}function CW(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Te("shaka.text.TtmlTextParser",Ha),Ha.prototype.parseMedia=Ha.prototype.parseMedia,Ha.prototype.setManifestType=Ha.prototype.setManifestType,Ha.prototype.parseInit=Ha.prototype.parseInit;function AW(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var YT=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,EW=/^(\d{1,4}(?:\.\d+)?|100)%$/,rf=/^(\d+px|\d+em|\d*\.?\d+c)$/,JT=/^(\d+)px (\d+)px$/,fL=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,hL=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,pL=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,gL=/^(\d*(?:\.\d*)?)f$/,mL=/^(\d*(?:\.\d*)?)t$/,vL=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),IW=new Map().set("left",Al).set("center","center").set("right","end").set("start",Al).set("end","end"),MW=new Map().set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),fg=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Wy=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],yL=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];$r("application/ttml+xml",function(){return new Ha});function wr(){this.g=new Ha}wr.prototype.parseInit=function(e){var t=!1;if(new Tt().ua(Qo,qt).T("stsd",Ua).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new B(2,2,2007)},wr.prototype.setManifestType=function(e){this.g.setManifestType(e)},wr.prototype.parseMedia=function(e,t,n){var r=[],i=null,o=[],u=new Map,l=[];if(new Tt().ua(Dl,qt).T("tfhd",function(M){i=Nl(M.reader,M.flags).Kc}).T("trun",function(M){M=Ol(M.reader,M.version,M.flags),M=x(M.Vc);for(var _=M.next();!_.done;_=M.next())l.push(_.value.sampleSize||i||0)}).T("subs",function(M){for(var _=M.reader,R=_.S(),U=-1,N=0;N<R;N++){var j=_.S();U+=j,j=_.Da();for(var V=[],q=0;q<j;q++)M.version==1?V.push(_.S()):V.push(_.Da()),_.Z(),_.Z(),_.S();u.set(U,V)}}).box("mdat",vd(function(M){o.push(M)},!1)).parse(e,!1),o.length==0)throw new B(2,2,2007);e=Dn.apply(bi,se(o));for(var h=0,p=0;p<l.length;p++){var m=H(e,h,l[p]);h+=l[p];var b=u.get(p),w=[];if(b&&b.length){for(var T=H(m,0,b[0]),k=b[0],S=1;S<b.length;S++){var A=H(m,k,b[S]);A=Ho(A),w.push("data:image/png;base64,"+A),k+=b[S]}m=T}r=r.concat(this.g.parseMedia(m,t,n,w))}return r},Te("shaka.text.Mp4TtmlParser",wr),wr.prototype.parseMedia=wr.prototype.parseMedia,wr.prototype.setManifestType=wr.prototype.setManifestType,wr.prototype.parseInit=wr.prototype.parseInit,$r('application/mp4; codecs="stpp"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.im1i"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.im1t"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.im2i"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.im2t"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.etd1"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new wr}),$r('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new wr}),$r('application/mp4; codecs="stpp.TTML.im1t"',function(){return new wr});function oi(){this.g="UNKNOWN"}oi.prototype.parseInit=function(){},oi.prototype.setManifestType=function(e){this.g=e},oi.prototype.parseMedia=function(e,t){e=dt(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new B(2,2,2e3);if(e=t.vttOffset,this.g=="HLS"&&n[0].includes("X-TIMESTAMP-MAP")){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new B(2,2,2e3);if(e=od(e[1]),e==null)throw new B(2,2,2e3);if(r=Number(r[1]),t.isMpegTs)for(var i=t.segmentStart-t.periodStart;i>=95443.7176888889;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}for(t=[],r=x(n[0].split(`
`)),i=r.next();!i.done;i=r.next())i=i.value,/^Region:/.test(i)&&(i=PW(i),t.push(i));r=new Map,b5(r),i=[],n=x(n.slice(1));for(var o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
`),(o.length!=1||o[0])&&!wL.test(o[0])&&o[0]=="STYLE"){for(var u=[],l=-1,h=1;h<o.length;h++)o[h].includes("::cue")&&(u.push([]),l=u.length-1),l!=-1&&(u[l].push(o[h]),o[h].includes("}")&&(l=-1));for(u=x(u),l=u.next();!l.done;l=u.next()){var p=l.value;l="global",(h=p[0].match(/\((.*)\)/))&&(l=h.pop()),h=p.slice(1,-1),p[0].includes("}")&&(p=/\{(.*?)\}/.exec(p[0]))&&(h=p[1].split(";")),(p=r.get(l))||(p=new rn(0,0,""));for(var m=!1,b=0;b<h.length;b++){var w=/^\s*([^:]+):\s*(.*)/.exec(h[b]);if(w){var T=w[2].trim().replace(";","");switch(w[1].trim()){case"background-color":case"background":m=!0,p.backgroundColor=T;break;case"color":m=!0,p.color=T;break;case"font-family":m=!0,p.fontFamily=T;break;case"font-size":m=!0,p.fontSize=T;break;case"font-weight":(parseInt(T,10)>=700||T=="bold")&&(m=!0,p.fontWeight=Fh);break;case"font-style":switch(T){case"normal":m=!0,p.fontStyle=lw;break;case"italic":m=!0,p.fontStyle=Bh;break;case"oblique":m=!0,p.fontStyle="oblique"}break;case"opacity":m=!0,p.opacity=parseFloat(T);break;case"text-combine-upright":m=!0,p.textCombineUpright=T;break;case"text-shadow":m=!0,p.textShadow=T;break;case"white-space":m=!0,p.wrapLine=T!="noWrap"}}}m&&r.set(l,p)}}(o=_W(o,e,t,r))&&i.push(o)}return i};function PW(e){e=new Iv(e);var t=new oa;return rw(e),ad(e,/[ \t]+/gm),nw(e,function(n){var r;(r=/^id=(.*)$/.exec(n))?t.id=r[1]:(r=/^width=(\d{1,2}|100)%$/.exec(n))?t.width=Number(r[1]):(r=/^lines=(\d+)$/.exec(n))?(t.height=Number(r[1]),t.heightUnits=2):(r=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(n))?(t.regionAnchorX=Number(r[1]),t.regionAnchorY=Number(r[2])):(r=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(n))?(t.viewportAnchorX=Number(r[1]),t.viewportAnchorY=Number(r[2])):/^scroll=up$/.exec(n)&&(t.scroll="up")}),t}function _W(e,t,n,r){if(e.length==1&&!e[0]||wL.test(e[0])||e[0]=="STYLE"||e[0]=="REGION")return null;var i=null,o=0;e[0].includes("-->")||(i=e[0],o=1);var u=new Iv(e[o]),l=iw(u),h=ad(u,/[ \t]+--\x3e[ \t]+/g),p=iw(u);if(l==null||h==null||p==null)return ut("Failed to parse VTT time code. Cue skipped:",i,e),null;for(l+=t,p+=t,l<0&&(l=0),t="",h=o+1;h<e.length;h++)h>o+1&&(t+=`
`),t+=e[h];if(t=t.trim(),r.has("global")){var m=r.get("global").clone();m.startTime=l,m.endTime=p,m.payload=t}else m=new rn(l,p,t);return ad(u,/[ \t]+/gm),nw(u,function(b){bL(m,b,n)}),Lv(m,r),i!=null&&(m.id=i),m}function bL(e,t,n){var r;if(r=LW.exec(t))t=r[1],t=="middle"?e.textAlign=Yo:e.textAlign=uw[t.toUpperCase()];else if(r=RW.exec(t))e.writingMode=r[1]=="lr"?"vertical-lr":"vertical-rl";else if(r=NW.exec(t))e.size=Number(r[1]);else if(r=OW.exec(t))e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":Rv);else if(r=jW.exec(t))(t=DW(n,r[1]))&&(e.region=t);else e:{if(n=UW.exec(t))e.lineInterpretation=1;else if(n=FW.exec(t))e.lineInterpretation=Uh;else break e;e.line=Number(n[1]),n[2]&&(e.lineAlign=k5[n[2].toUpperCase()])}}function DW(e,t){return(e=e.find(function(n){return n.id==t}))?e:null}Te("shaka.text.VttTextParser",oi),oi.prototype.parseMedia=oi.prototype.parseMedia,oi.prototype.setManifestType=oi.prototype.setManifestType,oi.prototype.parseInit=oi.prototype.parseInit;var wL=/^NOTE($|[ \t])/,LW=/^align:(start|middle|center|end|left|right)$/,RW=/^vertical:(lr|rl)$/,NW=/^size:([\d.]+)%$/,OW=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,jW=/^region:(.*)$/,UW=/^line:([\d.]+)%(?:,(start|end|center))?$/,FW=/^line:(-?\d+)(?:,(start|end|center))?$/;$r("text/vtt",function(){return new oi}),$r('text/vtt; codecs="vtt"',function(){return new oi}),$r('text/vtt; codecs="wvtt"',function(){return new oi});function Mo(){this.g=null}Mo.prototype.parseInit=function(e){var t=this,n=!1;if(new Tt().ua(Qo,qt).T("mdhd",function(r){r=Xv(r.reader,r.version),t.g=r.timescale}).T("stsd",Ua).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new B(2,2,2008);if(!n)throw new B(2,2,2008)},Mo.prototype.setManifestType=function(){},Mo.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new B(2,2,2008);var n=0,r=[],i,o=[],u=!1,l=!1,h=!1,p=null;if(new Tt().ua(Dl,qt).T("tfdt",function(R){u=!0,n=Wv(R.reader,R.version).Oa}).T("tfhd",function(R){p=Nl(R.reader,R.flags).nc}).T("trun",function(R){l=!0,r=Ol(R.reader,R.version,R.flags).Vc}).box("mdat",vd(function(R){h=!0,i=R},!1)).parse(e,!1),!h&&!u&&!l)throw new B(2,2,2008);e=n;for(var m=new nn(i,0),b=x(r),w=b.next();!w.done;w=b.next()){w=w.value;var T=w.Ud||p,k=w.dg?n+w.dg:e;e=k+(T||0);var S=0;do{var A=m.S();S+=A;var M=m.S(),_=null;_l(M)=="vttc"?A>8&&(_=m.Ja(A-8,!1)):m.skip(A-8),T&&_&&(A=BW(_,t.periodStart+k/this.g,t.periodStart+e/this.g),o.push(A))}while(w.sampleSize&&S<w.sampleSize)}return o.filter(Il)};function BW(e,t,n){var r,i,o;return new Tt().box("payl",vd(function(u){r=dt(u)},!1)).box("iden",vd(function(u){i=dt(u)},!1)).box("sttg",vd(function(u){o=dt(u)},!1)).parse(e),r?VW(r,i,o,t,n):null}function VW(e,t,n,r,i){var o=new rn(r,i,e);return Lv(o),t&&(o.id=t),n&&nw(new Iv(n),function(u){bL(o,u,[])}),o}Te("shaka.text.Mp4VttParser",Mo),Mo.prototype.parseMedia=Mo.prototype.parseMedia,Mo.prototype.setManifestType=Mo.prototype.setManifestType,Mo.prototype.parseInit=Mo.prototype.parseInit,$r('application/mp4; codecs="wvtt"',function(){return new Mo});function af(){oi.apply(this,arguments)}K(af,oi),af.prototype.parseMedia=function(e,t,n,r){var i=dt(e);if(e=`WEBVTT

`,i!=""){i=i.replace(/\r+/g,""),i=i.trim(),i=x(i.split(`

`));for(var o=i.next();!o.done;o=i.next())e+=$W(o.value)}return e=H(Sr(e)),oi.prototype.parseMedia.call(this,e,t,n,r)};function $W(e){var t=e.split(`
`).map(function(u){return u.trim()}).filter(Boolean);if(t.length<2||(/^\d+$/.test(t[0])&&t.shift(),t.length<2))return"";var n=t[0].match(/^([\d:,]+)\s*--\x3e\s*([\d:,]+)(.*)?$/);if(!n)return"";e=xL(n[1]),n=xL(n[2]);var r="";t=t.slice(1).join(`
`);var i=t.match(/{\\an(\d)}/);if(i){var o={1:"line:-1 align:left",2:"line:-1 align:center",3:"line:-1 align:right",7:"line:0 align:left",8:"line:0 align:center",9:"line:0 align:right"};r+=o[i[1]]?" "+o[i[1]]:""}return(i=t.match(/{\\pos\((\d+),(\d+)\)}/))&&(r+=" position:"+Math.min(100,Math.round(parseFloat(i[1])/19.2))+"% line:"+Math.min(100,Math.round(parseFloat(i[2])/10.8))+"%"),t=t.replace(/{\\.*?}/g,""),t=t.replace(/{b}/gi,"<b>").replace(/{\/b}/gi,"</b>").replace(/{i}/gi,"<i>").replace(/{\/i}/gi,"</i>").replace(/{u}/gi,"<u>").replace(/{\/u}/gi,"</u>"),t=zW(t),e+" --> "+n+r+`
`+t+`

`}function xL(e){return/^\d{2}:\d{2},\d{3}$/.test(e)?"00:"+e.replace(",","."):e.replace(",",".")}function zW(e){var t=[];return e=e.replace(/<font color=["']?([^"'>]+)["']?>/gi,function(n,r){return(n=kx(r.toLowerCase()))?(t.push(n),"<c."+n+">"):""}),e=e.replace(/<\/font>/gi,function(){return t.length?(t.pop(),"</c>"):""})}Te("shaka.text.SrtTextParser",af),af.prototype.parseMedia=af.prototype.parseMedia,$r("text/srt",function(){return new af});function kL(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,e>0)?{we:n,na:e}:null}function TL(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(e[t+2]&60)>>>2;if(r>n.length-1)return null;var i=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[r],channelCount:o,codec:"mp4a.40."+i}}function SL(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var r=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return r<=n?!1:(t+=r,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function HW(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}function Lr(e){this.l=e,this.frameIndex=0,this.i=new Map,this.j=null}Lr.prototype.destroy=function(){this.i.clear()},Lr.prototype.getOriginalMimeType=function(){return this.l};function QT(e,t){return e=kd(e),e.length&&(e=e.find(function(n){return n.description==="com.apple.streaming.transportStreamTimestamp"}))?e.data:t}function hg(e,t,n,r){n=e.i.getOrInsertComputed(n.id+"_"+r.i,function(){if(t.g.length===0)throw Error("StreamInfos must have elements");for(var o=[],u=x(t.g),l=u.next();!l.done;l=u.next()){var h=o,p=h.push,m=l.value;l=en;var b=m.id+1,w=m.stream.width||0,T=m.stream.height||0;m.type=="audio"&&(T=w=0);var k=m.duration*m.timescale,S=Math.floor(k/(xu+1));k=Math.floor(k%(xu+1));var A=aB.value();switch(Hn(A,b,20),Hn(A,S,28),Hn(A,k,32),Ul(A,w,88),Ul(A,T,92),b=en("tkhd",A),w=m,m=en,S=w.duration*w.timescale,T=Math.floor(S/(xu+1)),S=Math.floor(S%(xu+1)),k=w.stream.language,k=k.charCodeAt(0)-96<<10|k.charCodeAt(1)-96<<5|k.charCodeAt(2)-96,A=oB.value(),Hn(A,w.timescale,20),Hn(A,T,24),Hn(A,S,28),Ul(A,k,32),T=en("mdhd",A),S=new Uint8Array([]),w.type){case"video":S=pB.value();break;case"audio":S=gB.value()}S=en("hdlr",S);e:{switch(w.type){case"video":w=en("minf",en("vmhd",mB.value()),BI.value(),NI(w));break e;case"audio":w=en("minf",en("smhd",vB.value()),BI.value(),NI(w));break e}w=new Uint8Array([])}m=m("mdia",T,S,w),l=l("trak",b,m),p.call(h,l)}for(u=t.g[0],h=en,p=h.apply,b=u.duration*u.timescale,l=Math.floor(b/(xu+1)),b=Math.floor(b%(xu+1)),m=iB.value(),Hn(m,u.timescale,20),Hn(m,l,24),Hn(m,b,28),l=["moov",en("mvhd",m)],b=l.concat,o=se(o),m=[],w=x(t.g),k=w.next();!k.done;k=w.next())T=m,S=T.push,k=k.value.id+1,A=sB.value(),Hn(A,k,4),k=en("trex",A),S.call(T,k);return m=en.apply(jl,["mvex"].concat(se(m))),o=p.call(h,jl,b.call(l,o,[m,jI(u.stream)])),u=bB.value(),h=new Uint8Array(u.byteLength+o.byteLength),h.set(u),h.set(o,u.byteLength),h}),r=e.j!==n;var i=nB(t);return e.j=n,e.frameIndex++,{data:i,init:r?n:null}}Te("shaka.transmuxer.BaseTransmuxer",Lr),Lr.prototype.getOriginalMimeType=Lr.prototype.getOriginalMimeType,Lr.prototype.destroy=Lr.prototype.destroy;var Po=Object.freeze({yh:0,If:0,Ef:0,vf:0,wf:2,Ah:0}),CL=Object.freeze({yh:0,If:0,Ef:0,vf:0,wf:2,Ah:0}),AL=Object.freeze({yh:0,If:0,Ef:0,vf:0,wf:1,Ah:1});function ma(){Lr.apply(this,arguments)}K(ma,Lr),ma.prototype.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Si(this.convertCodecs("audio",e)):!1},ma.prototype.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Qr(t)||"mp4a.40.2")+'"':t},ma.prototype.transmux=function(e,t,n,r){var i=H(e);e=Td(i);for(var o=e.length;o<i.length&&!SL(i,o);o++);var u=QT(e,n.endTime*1e3);if(e=TL(i,o),!e)return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));t.audioSamplingRate=e.sampleRate,t.channelsCount=e.channelCount;for(var l=[];o<i.length;){var h=kL(i,o);if(!h)return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));var p=h.we+h.na;o+p<=i.length&&l.push({data:i.subarray(o+h.we,o+p),size:h.na,duration:1024,zb:0,flags:Po}),o+=p}return i=e.sampleRate,o=Math.floor(u*i/1e3),r={id:t.id,type:"audio",codecs:e.codec,timescale:i,duration:r,fb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Oa:o,bb:l},stream:t},Promise.resolve(hg(this,new jl([r]),t,n))},Te("shaka.transmuxer.AacTransmuxer",ma),ma.prototype.transmux=ma.prototype.transmux,ma.prototype.convertCodecs=ma.prototype.convertCodecs,ma.prototype.isSupported=ma.prototype.isSupported,El("audio/aac",function(){return new ma("audio/aac")},1);function EL(e,t,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return!1;var r=e[t+4]>>6;if(r>=3)return!1;var i=e[t+4]&63,o=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][i*3+r]*2;if(t+o>e.length)return!1;var u=e[t+6]>>5,l=0;u===2?l+=2:(u&1&&u!==1&&(l+=2),u&4&&(l+=2)),l=(e[t+6]<<8|e[t+7])>>12-l&1;var h=e[t+5]&7;return e=new Uint8Array([r<<6|e[t+5]>>3<<1|h>>2,(h&3)<<6|u<<3|l<<2|i>>4,i<<4&224]),n.sampleRate=[48e3,44100,32e3][r],n.channelCount=[2,1,2,3,3,4,4,5][u]+l,n.mc=e,n.na=o,!0}function qa(){Lr.apply(this,arguments)}K(qa,Lr),qa.prototype.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Si(this.convertCodecs("audio",e)):!1},qa.prototype.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?Qe().Ie()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},qa.prototype.transmux=function(e,t,n,r){e=H(e);for(var i=Td(e),o=i.length;o<e.length;o++){e:{var u=e,l=o;if(u[l]===11&&u[l+1]===119){var h=0,p=5;l+=p;for(var m,b;p>0;){b=u[l];var w=Math.min(p,8),T=8-w;m=4278190080>>>24+T<<T,m=(b&m)>>T,h=h?h<<w|m:m,l+=1,p-=w}if(h<16){u=!0;break e}}u=!1}if(u)break}for(i=QT(i,n.endTime*1e3),u=0,l=new Uint8Array([]),h=[],p={sampleRate:0,channelCount:0,mc:new Uint8Array(0),na:0};o<e.length;){if(!EL(e,o,p))return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));t.audioSamplingRate=p.sampleRate,t.channelsCount=p.channelCount,u=p.sampleRate,l=p.mc,h.push({data:e.subarray(o,o+p.na),size:p.na,duration:1536,zb:0,flags:Po}),o+=p.na}return Promise.resolve(hg(this,new jl([{id:t.id,type:"audio",codecs:"ac-3",timescale:u,duration:r,fb:l,data:{sequenceNumber:this.frameIndex,Oa:Math.floor(i*u/1e3),bb:h},stream:t}]),t,n))},Te("shaka.transmuxer.Ac3Transmuxer",qa),qa.prototype.transmux=qa.prototype.transmux,qa.prototype.convertCodecs=qa.prototype.convertCodecs,qa.prototype.isSupported=qa.prototype.isSupported,El("audio/ac3",function(){return new qa("audio/ac3")},1);function IL(e,t,n){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return!1;var r=new Os(e.subarray(t+2));Ai(r,2),Ai(r,3);var i=Ct(r,11)+1<<1,o=Ct(r,2);if(o==3){o=Ct(r,2),o=[24e3,22060,16e3][o];var u=3}else o=[48e3,44100,32e3][o],u=Ct(r,2);var l=Ct(r,3),h=Ct(r,1);return r=Ct(r,5),t+i>e.byteLength?!1:(e=Math.floor(i*o/([1,2,3,6][u]*16)),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,o<<6|r<<1|0,0|l<<1|h<<0,0]),n.sampleRate=o,n.channelCount=[2,1,2,3,3,4,4,5][l]+h,n.mc=e,n.na=i,!0)}function Ga(){Lr.apply(this,arguments)}K(Ga,Lr),Ga.prototype.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Si(this.convertCodecs("audio",e)):!1},Ga.prototype.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},Ga.prototype.transmux=function(e,t,n,r){e=H(e);for(var i=Td(e),o=i.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);i=QT(i,n.endTime*1e3);for(var u=0,l=new Uint8Array([]),h=[],p={sampleRate:0,channelCount:0,mc:new Uint8Array(0),na:0};o<e.length;){if(!IL(e,o,p))return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));t.audioSamplingRate=p.sampleRate,t.channelsCount=p.channelCount,u=p.sampleRate,l=p.mc,h.push({data:e.subarray(o,o+p.na),size:p.na,duration:1536,zb:0,flags:Po}),o+=p.na}return Promise.resolve(hg(this,new jl([{id:t.id,type:"audio",codecs:"ec-3",timescale:u,duration:r,fb:l,data:{sequenceNumber:this.frameIndex,Oa:Math.floor(i*u/1e3),bb:h},stream:t}]),t,n))},Te("shaka.transmuxer.Ec3Transmuxer",Ga),Ga.prototype.transmux=Ga.prototype.transmux,Ga.prototype.convertCodecs=Ga.prototype.convertCodecs,Ga.prototype.isSupported=Ga.prototype.isSupported,El("audio/ec3",function(){return new Ga("audio/ec3")},1);function qW(e){if(!e.length)return null;var t=e.find(function(S){return S.type==7});if(e=e.find(function(S){return S.type==8}),!t||!e)return null;var n=new Os(t.data),r=$t(n);if($t(n),$t(n),vr(n),KW.includes(r)&&(r=We(n),r===3&&Ai(n,1),vr(n),vr(n),Ai(n,1),it(n))){r=r!==3?8:12;for(var i=0;i<r;i++)it(n)&&(i<6?r0(n,16):r0(n,64))}if(vr(n),r=We(n),r===0)We(n);else if(r===1)for(Ai(n,1),vr(n),vr(n),r=We(n),i=0;i<r;i++)vr(n);vr(n),Ai(n,1);var o=We(n),u=We(n),l=Ct(n,1);l===0&&Ai(n,1),Ai(n,1);var h=0,p=0,m=0,b=0;if(it(n)&&(h=We(n),p=We(n),m=We(n),b=We(n)),i=r=1,it(n)&&it(n)){var w=$t(n),T=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];w>0&&w<=16?(r=T[w-1],i=k[w-1]):w===255&&(r=Ct(n,16),i=Ct(n,16))}return n=(2-l)*(u+1)*16-m*2-b*2,o=(o+1)*16-h*2-p*2,t=t.fullData,h=t.byteLength,e=e.fullData,p=e.byteLength,u=0,l=new Uint8Array(11+h+p),l[u++]=1,l[u++]=t[1],l[u++]=t[2],l[u++]=t[3],l[u++]=255,l[u++]=225,l[u++]=h>>>8&255,l[u++]=h&255,l.set(t,u),u+=h,l[u++]=1,l[u++]=p>>>8&255,l[u++]=p&255,l.set(e,u),{height:n,width:o,Di:l,bd:r,nd:i}}function GW(e){function t(S){i={data:u,frame:!1,isKeyframe:!1,pts:S.pts,dts:S.dts,nalus:[]}}function n(){if(i&&i.nalus.length&&i.frame){for(var S=i.nalus.length*4,A=x(i.nalus),M=A.next();!M.done;M=A.next())S+=M.value.fullData.byteLength;S=new Uint8Array(S),A=0,M=x(i.nalus);for(var _=M.next();!_.done;_=M.next()){_=_.value;var R=_.fullData.byteLength;S[A]=R>>24&255,S[A+1]=R>>16&255,S[A+2]=R>>8&255,S[A+3]=R&255,S.set(_.fullData,A+4),A+=4+R}i.data=S,r.push(i)}}for(var r=[],i=null,o=!1,u=new Uint8Array(0),l=0;l<e.length;l++){var h=e[l],p=h.nalus,m=!1;i&&p.length&&!o&&(n(),t(h)),p=x(h.nalus);for(var b=p.next();!b.done;b=p.next()){b=b.value;var w=!1;switch(b.type){case 1:var T=!1;w=!0;var k=b.data;m&&k.length>4&&(k=UB(new Os(k)),k===2||k===4||k===7||k===9)&&(T=!0),T&&i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(h),i.frame=!0,i.isKeyframe=T;break;case 5:w=!0,i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(h),i.frame=!0,i.isKeyframe=!0;break;case 6:w=!0;break;case 7:m=w=!0;break;case 8:w=!0;break;case 9:o=w=!0,i&&i.frame&&(n(),i=null),i||t(h);break;case 12:w=!0;break;default:w=!1}i&&w&&i.nalus.push(b)}}return n(),r}var KW=[100,110,122,244,44,83,86,118,128,138,139,134];function WW(e){if(!e.length)return null;var t=e.find(function(u){return u.type==32}),n=e.find(function(u){return u.type==33}),r=e.find(function(u){return u.type==34});if(!t||!n||!r)return null;var i=XW(t.fullData);e=YW(n.fullData);var o=JW(r.fullData);return t=QW(t.fullData,n.fullData,r.fullData,{Jh:i.Jh,ti:i.ti,jh:e.jh,kh:e.kh,dh:e.dh,ih:e.ih,eh:e.eh,fh:e.fh,gh:e.gh,hh:e.hh,Xg:e.Xg,Yg:e.Yg,Zg:e.Zg,$g:e.$g,ah:e.ah,bh:e.bh,Qf:e.Qf,Lg:e.Lg,Ig:e.Ig,Hg:e.Hg,Lh:o.Lh,Wg:e.Wg,Vg:e.Vg}),{height:e.height,width:e.width,Di:t,bd:e.wm,nd:e.vm}}function XW(e){var t=new Os(e,!0);return $t(t),$t(t),Ct(t,4),Ct(t,2),Ct(t,6),e=Ct(t,3),t=it(t),{Jh:e+1,ti:t}}function YW(e){e=new Os(e,!0),$t(e),$t(e);var t=0,n=0,r=0,i=0;Ct(e,4);var o=Ct(e,3);it(e);for(var u=Ct(e,2),l=Ct(e,1),h=Ct(e,5),p=$t(e),m=$t(e),b=$t(e),w=$t(e),T=$t(e),k=$t(e),S=$t(e),A=$t(e),M=$t(e),_=$t(e),R=$t(e),U=[],N=[],j=0;j<o;j++)U.push(it(e)),N.push(it(e));if(o>0)for(j=o;j<8;j++)Ct(e,2);for(j=0;j<o;j++)U[j]&&Ct(e,88),N[j]&&$t(e);We(e),U=We(e),U==3&&Ct(e,1),N=We(e),j=We(e),it(e)&&(t+=We(e),n+=We(e),r+=We(e),i+=We(e));var V=We(e),q=We(e),G=We(e);if(it(e))for(var z=0;z<=o;z++)We(e),We(e),We(e);else We(e),We(e),We(e);if(We(e),We(e),We(e),We(e),We(e),We(e),it(e)&&it(e))for(z=0;z<4;z++)for(var J=0;J<(z===3?2:6);J++)if(it(e)){var ie=Math.min(64,1<<4+(z<<1));z>1&&Cd(e);for(var le=0;le<ie;le++)Cd(e)}else We(e);for(it(e),it(e),it(e)&&($t(e),We(e),We(e),it(e)),z=We(e),ie=J=0;ie<z;ie++)if(le=!1,ie!==0&&(le=it(e)),le){ie===z&&We(e),it(e),We(e);for(var be=le=0;be<=J;be++){var ce=it(e),ae=!1;ce||(ae=it(e)),(ce||ae)&&le++}J=le}else{for(be=We(e),le=We(e),J=be+le,ce=0;ce<be;ce++)We(e),it(e);for(be=0;be<le;be++)We(e),it(e)}if(it(e))for(z=We(e),J=0;J<z;J++){for(ie=0;ie<G+4;ie++)Ct(e,1);Ct(e,1)}if(z=G=1,J=!0,ie=1,be=le=0,it(e),it(e),it(e)){if(it(e)){ce=$t(e),ae=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var de=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ce>0&&ce<=16?(G=ae[ce-1],z=de[ce-1]):ce===255&&(G=Ct(e,16),z=Ct(e,16))}if(it(e)&&it(e),it(e)&&(Ct(e,3),it(e),it(e)&&($t(e),$t(e),$t(e))),it(e)&&(We(e),We(e)),it(e),it(e),it(e),(ce=it(e))&&(vr(e),vr(e),vr(e),vr(e)),it(e)&&(ie=Ct(e,32),le=Ct(e,32),it(e)&&We(e),it(e))){de=!1,ce=it(e),ae=it(e),(ce||ae)&&((de=it(e))&&($t(e),Ct(e,5),it(e),Ct(e,5)),Ct(e,4),Ct(e,4),de&&Ct(e,4),Ct(e,5),Ct(e,5),Ct(e,5));for(var re=0;re<=o;re++){J=it(e);var pe=!0,Re=1;J||(pe=it(e));var W=!1;if(pe?We(e):W=it(e),W||(Re=We(e)+1),ce){for(pe=0;pe<Re;pe++)We(e),We(e),de&&(We(e),We(e));it(e)}if(ae){for(pe=0;pe<Re;pe++)We(e),We(e),de&&(We(e),We(e));it(e)}}}it(e)&&(it(e),it(e),it(e),be=We(e),We(e),We(e),We(e),We(e))}return{dh:R,jh:u,kh:l,ih:h,eh:p,fh:m,gh:b,hh:w,Xg:T,Yg:k,Zg:S,$g:A,ah:M,bh:_,Qf:be,Lg:U,Ig:V,Hg:q,width:N-(t+n)*(U===1||U===2?2:1),height:j-(r+i)*(U===1?2:1),wm:G,vm:z,Wg:le/ie,Vg:J}}function JW(e){var t=new Os(e,!0);$t(t),$t(t),We(t),We(t),it(t),it(t),Ct(t,3),it(t),it(t),We(t),We(t),Cd(t),it(t),it(t),it(t)&&We(t),Cd(t),Cd(t),it(t),it(t),it(t),it(t),e=it(t),t=it(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Lh:n}}function QW(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));for(i[0]=1,i[1]=(r.jh&3)<<6|(r.kh?1:0)<<5|r.ih&31,i[2]=r.eh,i[3]=r.fh,i[4]=r.gh,i[5]=r.hh,i[6]=r.Xg,i[7]=r.Yg,i[8]=r.Zg,i[9]=r.$g,i[10]=r.ah,i[11]=r.bh,i[12]=r.dh,i[13]=240|(r.Qf&3840)>>8,i[14]=r.Qf&255,i[15]=252|r.Lh&3,i[16]=252|r.Lg&3,i[17]=248|r.Ig&7,i[18]=248|r.Hg&7,i[19]=0,i[20]=parseInt(r.Wg,10),i[21]=((r.Vg?1:0)&3)<<6|(r.Jh&7)<<3|(r.ti?1:0)<<2|3,i[22]=3,e=[e,t,n],t=23,n=e.length-1,r=0;r<e.length;r+=1)i.set(new Uint8Array([32+r|(r===n?128:0),0,1,e[r].byteLength>>8,e[r].byteLength&255]),t),t+=5,i.set(e[r],t),t+=e[r].byteLength;return i}function Xy(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&i!==0&&i!==15&&o!==3){var u=e[t+3]>>6;i=ZW[(n===3?3-r:r===3?3:4)*14+i-1]*1e3,o=eX[(n===3?0:n===2?1:2)*3+o],n=tX[n][r];var l=nX[r],h=Math.floor(n*i/o+(e[t+2]>>1&1))*l,p=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(p=p?parseInt(p[1],10):0)&&p<=87&&r===2&&i>=224e3&&u===0&&(e[t+3]|=128),{sampleRate:o,channelCount:u===3?1:2,na:h,um:n*8*l}}return null}function ML(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function PL(e,t){if(t+1<e.length&&ML(e,t)){var n=Xy(e,t),r=4;return n&&n.na&&(r=n.na),t+=r,t===e.length||t+1<e.length&&ML(e,t)}return!1}var ZW=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],eX=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],tX=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],nX=[0,1,1,4];function Ka(){Lr.apply(this,arguments)}K(Ka,Lr),Ka.prototype.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Si(this.convertCodecs("audio",e)):!1},Ka.prototype.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},Ka.prototype.transmux=function(e,t,n,r){for(var i=H(e),o=Td(i).length;o<i.length&&!PL(i,o);o++);var u;for(e=[];o<i.length;){var l=Xy(i,o);if(!l)return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));u||(u=l),o+l.na<=i.length&&e.push({data:i.subarray(o,o+l.na),size:l.na,duration:1152,zb:0,flags:Po}),o+=l.na}return u?(i=u.um*9e4/u.sampleRate*this.frameIndex,r={id:t.id,type:"audio",codecs:"mp3",timescale:u.sampleRate,duration:r,fb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Oa:i,bb:e},stream:t},Promise.resolve(hg(this,new jl([r]),t,n))):Promise.reject(new B(2,3,3018,n?n.U()[0]:null))},Te("shaka.transmuxer.Mp3Transmuxer",Ka),Ka.prototype.transmux=Ka.prototype.transmux,Ka.prototype.convertCodecs=Ka.prototype.convertCodecs,Ka.prototype.isSupported=Ka.prototype.isSupported,El("audio/mpeg",function(){return new Ka("audio/mpeg")},1);function va(e){this.h=e,this.g=null}g=va.prototype,g.destroy=function(){},g.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=Qr(e).split(","),n=Vr("audio",t);return t=Vr("video",t),!n||t||Ar(n)!="mp3"?!1:Si(this.convertCodecs("audio",e))},g.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},g.getOriginalMimeType=function(){return this.h},g.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new hn,this.g.gg(n.i),e=H(e),e=this.g.parse(e),e.qe().audio!="mp3"||i!="audio")return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));for(n=new Uint8Array([]),i=x(e.Bb()),e=i.next();!e.done;e=i.next())if(e=e.value.data)for(t=0;t<e.length;)(r=Xy(e,t))?(t+r.na<=e.length&&(n=Dn(n,e.subarray(t,t+r.na))),t+=r.na):t++;return Promise.resolve(n)},Te("shaka.transmuxer.MpegTsTransmuxer",va),va.prototype.transmux=va.prototype.transmux,va.prototype.getOriginalMimeType=va.prototype.getOriginalMimeType,va.prototype.convertCodecs=va.prototype.convertCodecs,va.prototype.isSupported=va.prototype.isSupported,va.prototype.destroy=va.prototype.destroy,El("video/mp2t",function(){return new va("video/mp2t")},2);function rX(e){if(e.length<1)return 960;var t=e[0],n=t&3;if(t=iX[t>>3&31],n===0)e=1;else if(n===1||n===2)e=2;else if(e.length<2||(e=e[1]&63,e===0))return t;return t*e}var iX=[480,960,1920,2880,480,960,1920,2880,480,960,1920,2880,480,960,480,960,120,240,480,960,120,240,480,960,120,240,480,960,120,240,480,960];function Mi(e){Lr.call(this,e),this.h=this.g=null}K(Mi,Lr),Mi.prototype.destroy=function(){Lr.prototype.destroy.call(this),this.h&&this.h.destroy()},Mi.prototype.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=Qr(n).split(",");return n=Vr("audio",r),r=Vr("video",r),n&&(n=Ar(n),!aX.includes(n))||r&&(n=Ar(r),!oX.includes(n))?!1:t?Si(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Si(t)||Si(e))},Mi.prototype.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=Qr(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return $h(n,"audio/mp4")}).map(hw).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},Mi.prototype.transmux=function(e,t,n,r,i){var o=H(e);if(i=="audio"&&!Ad(o)){for(var u=Td(o),l=u.length;l<o.length;l++)if(PL(o,l))return Promise.reject(new B(2,3,3018,n?n.U()[0]:null));for(l=u.length;l<o.length;l++)if(SL(o,l))return this.h||(this.h=new ma("audio/aac")),this.h.transmux(e,t,n,r,i);return Promise.reject(new B(2,3,3018,n?n.U()[0]:null))}this.g?this.g.clearData():this.g=new hn,this.g.gg(n.i);var h=this.g.parse(o),p=[],m=h.qe();try{var b=null;if(i=="video"){switch(m.video){case"avc":var w=[],T=null,k=h.Dd(),S=GW(k);if(!S.length)throw new B(2,3,3023,n?n.U()[0]:null);for(var A=0;A<S.length;A++){var M=S[A];T==null&&(T=M.dts);var _=void 0;_=A+1<S.length?(S[A+1].dts||0)-(M.dts||0):S.length>1?(M.dts||0)-(S[A-1].dts||0):(n.endTime-n.startTime)*9e4,w.push({data:M.data,size:M.data.byteLength,duration:_,zb:Math.round((M.pts||0)-(M.dts||0)),flags:M.isKeyframe?CL:AL})}for(var R=[],U=x(k),N=U.next();!N.done;N=U.next())R.push.apply(R,se(N.value.nalus));var j=qW(R);if(!j||T==null)throw new B(2,3,3018,n?n.U()[0]:null);t.height=t.height||j.height,t.width=t.width||j.width,b={id:t.id,type:"video",codecs:"avc1",timescale:9e4,duration:r,fb:j.Di,bd:j.bd,nd:j.nd,data:{sequenceNumber:this.frameIndex,Oa:T,bb:w},stream:t};break;case"hvc":var V=[],q=null,G=[],z=h.Dd(),J=new Uint8Array(0),ie=!1;if(!z.length)throw new B(2,3,3023,n?n.U()[0]:null);for(var le=0;le<z.length;le++){var be=z[le],ce=be.nalus;G.push.apply(G,se(ce));for(var ae=!1,de=[],re=0,pe=!1,Re=x(ce),W=Re.next();!W.done;W=Re.next()){var Se=W.value;switch(Se.type){case 1:case 0:var Ee=pe=!0;break;case 19:case 20:case 21:ae=Ee=pe=!0;break;case 32:case 33:case 34:Ee=!0;break;case 35:pe=Ee=!0;break;case 39:case 40:Ee=!0;break;default:Ee=!1}pe&&Ee&&(de.push(Se.fullData),re+=Se.fullData.byteLength)}if(de.length){re+=4*de.length;for(var Xe=new Uint8Array(re),vt=0,wn=x(de),bt=wn.next();!bt.done;bt=wn.next()){var cn=bt.value,Nt=cn.byteLength;Xe[vt]=Nt>>24&255,Xe[vt+1]=Nt>>16&255,Xe[vt+2]=Nt>>8&255,Xe[vt+3]=Nt&255,Xe.set(cn,vt+4),vt+=Nt+4}J=Xe,ie=ae;var ya=!0}else ya=!1;if(ya){q==null&&be.dts!=null&&(q=be.dts);var si=void 0;si=le+1<z.length?(z[le+1].dts||0)-(be.dts||0):z.length>1?(be.dts||0)-(z[le-1].dts||0):(n.endTime-n.startTime)*9e4,V.push({data:J,size:J.byteLength,duration:si,zb:Math.round((be.pts||0)-(be.dts||0)),flags:ie?CL:AL})}}var Wa=WW(G);if(!Wa||q==null)throw new B(2,3,3018,n?n.U()[0]:null);t.height=t.height||Wa.height,t.width=t.width||Wa.width,b={id:t.id,type:"video",codecs:"hvc1",timescale:9e4,duration:r,fb:Wa.Di,bd:Wa.bd,nd:Wa.nd,data:{sequenceNumber:this.frameIndex,Oa:q,bb:V},stream:t}}b&&(p.push(b),b=null)}if(i=="audio"){switch(m.audio){case"aac":for(var Xa=[],ui,Yi=null,Sn=null,Ya=null,pg=x(h.Bb()),ec=pg.next();!ec.done;ec=pg.next()){var tc=ec.value,Pi=tc.data;if(Pi){var li=0;if(Sn==-1&&Ya)Pi=Dn(Ya,tc.data),Sn=null;else if(Sn!=null&&Ya){li=Math.max(0,Sn);var nc=Dn(Ya,Pi.subarray(0,li));Xa.push({data:nc,size:nc.byteLength,duration:1024,zb:0,flags:Po}),Sn=Ya=null}if(ui=TL(Pi,li),!ui)throw new B(2,3,3018,n?n.U()[0]:null);for(t.audioSamplingRate=ui.sampleRate,t.channelsCount=ui.channelCount,Yi==null&&tc.pts!==null&&(Yi=tc.pts);li<Pi.length;){var Gs=kL(Pi,li);if(!Gs){Ya=Pi.subarray(li,Pi.length),Sn=-1;break}var Ja=Gs.we+Gs.na;Sn=Math.max(0,li+Ja-Pi.length),Sn!=0?Ya=Pi.subarray(li+Gs.we,li+Ja):li+Ja<=Pi.length&&Xa.push({data:Pi.subarray(li+Gs.we,li+Ja),size:Gs.na,duration:1024,zb:0,flags:Po}),li+=Ja}}}if(!ui||Yi==null){Yi=n.startTime*9e4;var sf=Vr("audio",t.codecs.split(","));if(!sf||!t.channelsCount||!t.audioSamplingRate)throw new B(2,3,3018,n?n.U()[0]:null);ui={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:sf};var uf=HW(sf,t.channelsCount);if(!uf)throw new B(2,3,3018,n?n.U()[0]:null);for(var Yy=Yi+(n.endTime-n.startTime)*9e4,gg=Yi;gg<Yy;)Xa.push({data:uf,size:uf.byteLength,duration:1024,zb:0,flags:Po}),gg+=1024/ui.sampleRate*9e4}var mg=ui.sampleRate,Jy=Yi/9e4*mg;b={id:t.id,type:"audio",codecs:ui.codec,timescale:mg,duration:r,fb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Oa:Jy,bb:Xa},stream:t};break;case"ac3":for(var Qa=[],lf=0,ZT=new Uint8Array([]),Qy=null,Du={sampleRate:0,channelCount:0,mc:new Uint8Array(0),na:0},_L=x(h.Bb()),eS=_L.next();!eS.done;eS=_L.next()){var tS=eS.value,nS=tS.data;Qy==null&&tS.pts!==null&&(Qy=tS.pts);for(var cf=0;cf<nS.length;)EL(nS,cf,Du)?(t.audioSamplingRate=Du.sampleRate,t.channelsCount=Du.channelCount,lf=Du.sampleRate,ZT=Du.mc,Qa.push({data:nS.subarray(cf,cf+Du.na),size:Du.na,duration:1536,zb:0,flags:Po}),cf+=Du.na):cf++}if(lf==0||ZT.byteLength==0||Qy==null)throw new B(2,3,3018,n?n.U()[0]:null);b={id:t.id,type:"audio",codecs:"ac-3",timescale:lf,duration:r,fb:ZT,data:{sequenceNumber:this.frameIndex,Oa:Qy/9e4*lf,bb:Qa},stream:t};break;case"ec3":for(var DL=[],Zy=0,rS=new Uint8Array([]),e1=null,Lu={sampleRate:0,channelCount:0,mc:new Uint8Array(0),na:0},LL=x(h.Bb()),iS=LL.next();!iS.done;iS=LL.next()){var aS=iS.value,oS=aS.data;e1==null&&aS.pts!==null&&(e1=aS.pts);for(var df=0;df<oS.length;)IL(oS,df,Lu)?(t.audioSamplingRate=Lu.sampleRate,t.channelsCount=Lu.channelCount,Zy=Lu.sampleRate,rS=Lu.mc,DL.push({data:oS.subarray(df,df+Lu.na),size:Lu.na,duration:1536,zb:0,flags:Po}),df+=Lu.na):df++}if(Zy==0||rS.byteLength==0||e1==null)throw new B(2,3,3018,n?n.U()[0]:null);b={id:t.id,type:"audio",codecs:"ec-3",timescale:Zy,duration:r,fb:rS,data:{sequenceNumber:this.frameIndex,Oa:e1/9e4*Zy,bb:DL},stream:t};break;case"mp3":for(var RL=[],t1,n1=null,NL=x(h.Bb()),sS=NL.next();!sS.done;sS=NL.next()){var uS=sS.value,vg=uS.data;if(vg){n1==null&&uS.pts!==null&&(n1=uS.pts);for(var rc=0;rc<vg.length;){var ff=Xy(vg,rc);ff?(t1||(t1=ff),rc+ff.na<=vg.length&&RL.push({data:vg.subarray(rc,rc+ff.na),size:ff.na,duration:1152,zb:0,flags:Po}),rc+=ff.na):rc++}}}if(!t1||n1==null)throw new B(2,3,3018,n?n.U()[0]:null);var OL=t1.sampleRate,sX=n1/9e4*OL;b={id:t.id,type:"audio",codecs:"mp3",timescale:OL,duration:r,fb:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Oa:sX,bb:RL},stream:t};break;case"opus":var jL=[],r1=null,ss=h.J;if(!ss)throw new B(2,3,3018,n?n.U()[0]:null);var qr=[];switch(ss.Hk){case 1:case 2:qr=[0];break;case 0:qr=[255,1,1,0,1];break;case 128:qr=[255,2,0,0,1];break;case 3:qr=[1,2,1,0,2,1];break;case 4:qr=[1,2,2,0,1,2,3];break;case 5:qr=[1,3,2,0,4,1,2,3];break;case 6:qr=[1,4,2,0,4,1,2,3,5];break;case 7:qr=[1,4,2,0,4,1,2,3,5,6];break;case 8:qr=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:qr=[1,1,2,0,1];break;case 131:qr=[1,1,3,0,1,2];break;case 132:qr=[1,1,4,0,1,2,3];break;case 133:qr=[1,1,5,0,1,2,3,4];break;case 134:qr=[1,1,6,0,1,2,3,4,5];break;case 135:qr=[1,1,7,0,1,2,3,4,5,6];break;case 136:qr=[1,1,8,0,1,2,3,4,5,6,7]}for(var UL=new Uint8Array([0,ss.channelCount,0,0,ss.sampleRate>>>24&255,ss.sampleRate>>>17&255,ss.sampleRate>>>8&255,ss.sampleRate>>>0&255,0,0].concat(se(qr))),FL=ss.sampleRate,BL=x(h.Bb()),lS=BL.next();!lS.done;lS=BL.next()){var cS=lS.value,hf=cS.data;r1==null&&cS.pts!==null&&(r1=cS.pts);for(var yg=0;yg<hf.length;){for(var uX=(hf[yg+1]&16)!==0,lX=(hf[yg+1]&8)!==0,Ks=yg+2,i1=0;hf[Ks]===255;)i1+=255,Ks+=1;i1+=hf[Ks],Ks+=1,Ks+=uX?2:0,Ks+=lX?2:0;var dS=hf.slice(Ks,Ks+i1);jL.push({data:dS,size:dS.byteLength,duration:rX(dS),zb:0,flags:Po}),yg=Ks+i1}}if(UL.byteLength==0||r1==null)throw new B(2,3,3018,n?n.U()[0]:null);t.audioSamplingRate=ss.sampleRate,t.channelsCount=ss.channelCount,b={id:t.id,type:"audio",codecs:"opus",timescale:FL,duration:r,fb:UL,data:{sequenceNumber:this.frameIndex,Oa:r1/9e4*FL,bb:jL},stream:t}}b&&p.push(b)}}catch(fS){return fS&&fS.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(fS)}return p.length?Promise.resolve(hg(this,new jl(p),t,n)):Promise.reject(new B(2,3,3018,n?n.U()[0]:null))},Te("shaka.transmuxer.TsTransmuxer",Mi),Mi.prototype.transmux=Mi.prototype.transmux,Mi.prototype.convertCodecs=Mi.prototype.convertCodecs,Mi.prototype.isSupported=Mi.prototype.isSupported,Mi.prototype.destroy=Mi.prototype.destroy;var aX=["aac","ac-3","ec-3","mp3","opus"],oX=["avc","hevc"];El("video/mp2t",function(){return new Mi("video/mp2t")},3);function of(e){this.g=new Uint8Array(e),_e(this.g),this.h=0}of.prototype.Ia=function(){return this.h},of.prototype.$a=function(){return this.h},of.prototype.seek=function(e){if(e>this.g.length)throw new B(2,3,3025);this.h=e},of.prototype.skip=function(e){var t=this.h+e;t<=this.g.length||(t=new Uint8Array(Math.max(this.g.length*2,t)),t.set(this.g),this.g=t,_e(this.g)),this.h+=e},Te("shaka.util.DataViewWriter",of),of.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},[].concat(Px,Ix,Mx,Ex).filter(function(e,t,n){return n.indexOf(e)===t})}).call(c,s,s,void 0);for(var f in c.shaka)a[f]=c.shaka[f]})()})(wR)),wR}var tY=eY();const on=JL(tY);var nY=Object.defineProperty,rY=Object.getOwnPropertyDescriptor,kR=(a,s,c,f)=>{for(var d=f>1?void 0:f?rY(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&nY(s,c,d),d};let h1=class extends xn{constructor(){super(...arguments),this.announcement="",this.announceCount=0}announce(a,s=!1){clearTimeout(this.clearTimer),s?(this.announceCount++,this.announcement=a+"\u200B".repeat(this.announceCount)):this.announcement=a,this.clearTimer=setTimeout(()=>{this.announcement=""},1e3)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.clearTimer)}render(){return xt`<div
      class="ump-visually-hidden"
      aria-live="assertive"
      aria-atomic="true"
      data-testid="aria-announcer"
    >
      ${this.announcement}
    </div>`}};h1.styles=kn`
.ump-visually-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;z-index:-100}
`,kR([Sg()],h1.prototype,"announcement",2),h1=kR([Yn("ump-aria-announcer")],h1);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const TR={ATTRIBUTE:1,CHILD:2},SR=a=>(...s)=>({_$litDirective$:a,values:s});class CR{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,c,f){this._$Ct=s,this._$AM=c,this._$Ci=f}_$AS(s,c){return this.update(s,c)}update(s,c){return this.render(...c)}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const st=SR(class extends CR{constructor(a){var s;if(super(a),a.type!==TR.ATTRIBUTE||a.name!=="class"||((s=a.strings)==null?void 0:s.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter(s=>a[s]).join(" ")+" "}update(a,[s]){var c,f;if(this.st===void 0){this.st=new Set,a.strings!==void 0&&(this.nt=new Set(a.strings.join(" ").split(/\s/).filter(v=>v!=="")));for(const v in s)s[v]&&!((c=this.nt)!=null&&c.has(v))&&this.st.add(v);return this.render(s)}const d=a.element.classList;for(const v of this.st)v in s||(d.remove(v),this.st.delete(v));for(const v in s){const y=!!s[v];y===this.st.has(v)||(f=this.nt)!=null&&f.has(v)||(y?(d.add(v),this.st.add(v)):(d.remove(v),this.st.delete(v)))}return Nu}}),Nr=Symbol("playerState");function CS(a,s,c){return a<s?s:a>c?c:a}function AR(a){const s=Math.round(CS(a,0,1)*255).toString(16).toUpperCase();return s.length===1?"0"+s:s}var iY=Object.defineProperty,aY=Object.getOwnPropertyDescriptor,AS=(a,s,c,f)=>{for(var d=f>1?void 0:f?aY(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&iY(s,c,d),d};const oY=2.5;let Cg=class extends xn{render(){return xt`
      <div
        class=${st({"ump-caption-display-container":!0,"ump-caption-display-container-hidden":!this.playerState.captionSettings.enabled})}
      ></div>
    `}updated(){const{fontScale:a,textColor:s,textOpacity:c,backgroundColor:f,backgroundOpacity:d,fontFamily:v,textShadow:y}=this.playerState.captionSettings;this.style.setProperty("--ump-caption-display-font-size",`${a*oY}cqw`),this.style.setProperty("--ump-caption-display-color",`${s}${AR(c)}`),this.style.setProperty("--ump-caption-display-background",`${f}${AR(d)}`),this.style.setProperty("--ump-caption-display-font-family",v),this.style.setProperty("--ump-caption-display-text-shadow",y),this.dispatchEvent(new Event("captionsettingupdated"))}};Cg.styles=kn`
.ump-caption-display-container{display:inline-block;position:absolute;width:95%;bottom:90px;left:50%;transform:translateX(-50%)}.ump-caption-display-container span:not(:has(span)){font-size:var(--ump-caption-display-font-size);color:var(--ump-caption-display-color);background-color:var(--ump-caption-display-background) !important;font-family:var(--ump-caption-display-font-family),sans-serif;text-shadow:var(--ump-caption-display-text-shadow);max-width:100%}.ump-caption-display-container-hidden{display:none}*{opacity:1 !important}.ump-caption-display-container *{position:relative !important}
`,AS([Rr({context:Nr,subscribe:!0})],Cg.prototype,"playerState",2),AS([Tn(".ump-caption-display-container")],Cg.prototype,"captionContainer",2),Cg=AS([Yn("ump-caption-display")],Cg);const ER=["facebook","x","linkedin","mail","copy"],ES={sources:[],ccFiles:[],downloadableFiles:[],adobeCms:null,ageGate:!1,aspectRatio:"16:9",autoplay:!1,checkpoints:[],debug:!1,dir:null,disableKeyboardEvents:!1,hideControls:null,hidePosterImage:!1,language:"en",layout:"fluid",loop:!1,maskLevel:0,muted:!1,partnerName:"",percentage:50,playButtonSize:"medium",playButtonTheme:"dark",playbackRates:[.5,.75,1,1.25,1.5,2],playFullScreen:!1,plugins:{},poster:"",qualityBehavior:"auto",reporting:!0,share:!0,shareOptions:[...ER],showDownloadMenu:!0,showFocusIndicator:"default",showImageOnError:!1,showQualityMenu:!0,startTime:0,title:"",unlocalizedTitle:""},vf={videoId:-1,label:"Auto"},lc={captionId:-1,language:"option for turning off caption",label:"Off"},ar={enabled:!1,fontScale:1,textColor:"#FFFFFF",textOpacity:1,backgroundColor:"#000000",backgroundOpacity:1,fontFamily:"sans-serif",textShadow:"rgb(255, 255, 255) 0px 0px 0px"},IR={audioTracks:[],bigPlayButtonClicked:!1,buffered:[],captionSettings:ar,captionTracks:[],controlsState:"controlbar",currentTime:0,dir:"ltr",disableKeyboardEvents:!1,downloadableTranscriptFiles:[],downloadableVideoFiles:[],duration:0,ended:!1,fullscreen:!1,loading:!1,maskLevel:0,muted:!1,paused:!0,playbackRate:1,playbackRates:[],playButtonSize:"medium",playButtonTheme:"dark",qualityBehavior:"auto",selectedVideoQualityId:vf.videoId,shareDialogOpened:!1,shareOptions:[],showDownloadMenu:!0,showFocusIndicator:"default",showQualityMenu:!0,showVolumeSlider:!0,videoQualities:[],visible:!0,volume:1},p1=["HQ","HD","SD","LO"],MR=["application/dash+xml","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml","video/mp4"],PR={DASH:"application/dash+xml",MP4:"video/mp4",HLS:"application/vnd.apple.mpegurl",MSS:"application/vnd.ms-sstr+xml"},sY={VTT:"text/vtt",TTML:"application/ttml+xml"},_i="@back",uY=3e3,lY=25,cY=ue("We're sorry, but something went wrong."),dY="universal-media-player",_R="ump",g1={dashIdentifier:"description",hlsIdentifier:"public.accessibility.describes-video"};class Mt extends CustomEvent{constructor(s,c){super(s,{bubbles:!0,composed:!0,cancelable:!0,detail:c})}}function DR(a,s){let c=null;return(...f)=>{c!==null&&window.clearTimeout(c),c=window.setTimeout(()=>{a(...f)},s)}}const fY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M3 10a7 7 0 0 1 14 0v1h-3.5a.5.5 0 0 0-.5.5v6c0 .28.22.5.5.5H16a2 2 0 0 0 2-2v-6a8 8 0 1 0-16 0v6c0 1.1.9 2 2 2h2.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H3z"/></svg>',hY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M3 10a7 7 0 0 1 14 0v1h-3.5a.5.5 0 0 0-.5.5v6c0 .28.22.5.5.5H16a2 2 0 0 0 2-2v-6a8 8 0 1 0-16 0v6c0 1.1.9 2 2 2h2.5a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H3zm0 2h3v5H4a1 1 0 0 1-1-1zm14 0v4a1 1 0 0 1-1 1h-2v-5z"/></svg>';/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class IS extends CR{constructor(s){if(super(s),this.it=rr,s.type!==TR.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(s){if(s===rr||s==null)return this._t=void 0,this.it=s;if(s===Nu)return s;if(typeof s!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(s===this.it)return this._t;this.it=s;const c=[s];return c.raw=c,this._t={_$litType$:this.constructor.resultType,strings:c,values:[]}}}IS.directiveName="unsafeHTML",IS.resultType=1;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class MS extends IS{}MS.directiveName="unsafeSVG",MS.resultType=2;const sn=SR(MS),pY='<svg fill="currentColor" viewBox="0 0 1316 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M288 567.990857h97.718857l-0.585143-151.442286z m586.276571-56.576c0-63.414857-36.571429-110.299429-112.566857-110.299428h-30.866285v221.696h29.696c71.424 0 113.700571-52.004571 113.700571-111.433143z m-327.972571-215.405714l0.585143 432.018286a19.126857 19.126857 0 0 1-18.870857 19.419428h-123.428572a19.163429 19.163429 0 0 1-18.870857-19.419428v-35.437715H219.428571l-31.414857 46.299429a19.748571 19.748571 0 0 1-16.018285 8.557714H19.419429c-16.018286 0-25.161143-17.700571-15.433143-30.281143L321.682286 284.598857a18.212571 18.212571 0 0 1 15.433143-8.009143h189.696c10.861714 0 19.419429 8.557714 19.419428 19.419429z m472.539429 215.405714c0 150.272-109.714286 235.995429-257.133715 235.995429h-154.294857a19.236571 19.236571 0 0 1-19.419428-19.419429V295.972571c0-10.861714 8.557714-19.419429 19.419428-19.419428h153.161143c148.553143 0 258.304 84.553143 258.304 234.861714z m89.161142 0.585143s2.304 148.553143-84.553142 235.995429h-29.147429c77.714286-92.562286 79.433143-236.580571 79.433143-236.580572s1.133714-113.152-77.129143-234.276571h24.576C1105.737143 373.723429 1108.041143 512 1108.041143 512z m105.142858 0s2.304 148.553143-85.138286 235.995429h-29.147429c77.714286-92.562286 79.433143-236.580571 79.433143-236.580572s1.133714-113.152-76.580571-234.276571h24.576C1210.843429 373.723429 1213.147429 512 1213.147429 512zM1316.571429 512s2.304 148.553143-84.553143 235.995429h-29.147429c77.129143-92.562286 78.848-236.580571 78.848-236.580572s1.133714-113.152-76.580571-234.276571h24.576C1314.267429 373.723429 1316.571429 512 1316.571429 512z" fill="" /></svg>';function ht(a){return{"focus-always":a.showFocusIndicator==="always","focus-default":a.showFocusIndicator==="default"}}function gY(a){return s=>(a.setValue({...a.value,showFocusIndicator:s.options.showFocusIndicator}),()=>{})}const us=kn`
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-s-nudge);margin:0;padding:var(--spacing-s-nudge) var(--spacing-m);border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-semibold);font-family:var(--font-family-default);letter-spacing:inherit;line-height:var(--line-height-base-300);transition-duration:var(--duration-faster);transition-property:background,color;transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;border:solid var(--stroke-width-thick) var(--color-transparent-stroke);background-color:var(--color-neutral-background-1)}.btn:hover{background-color:var(--color-neutral-background-1-hover);color:var(--color-neutral-foreground-1-hover)}.btn.focus-always:focus,.btn.focus-default:focus-visible{outline:var(--stroke-width-focus) solid var(--color-stroke-focus-2)}.btn svg{fill:currentcolor}.btn-xs{padding:var(--spacing-xs)}.btn-s{padding:var(--spacing-s)}.btn-xl{padding:var(--spacing-xl)}.btn-xxl{padding:var(--spacing-xxl)}.btn-xxl svg{width:var(--size-10);height:var(--size-10)}.btn-outline{background-color:transparent;border-color:var(--color-neutral-stroke-1)}.btn-outline:hover{background-color:transparent}.btn-outline.focus-always:focus,.btn-outline.focus-default:focus-visible{border-color:transparent}.btn-subtle{background-color:var(--color-subtle-background);color:var(--color-neutral-foreground-2);border-color:transparent}.btn-subtle:hover{background-color:var(--color-subtle-background-hover);color:var(--color-neutral-foreground-2-hover);border-color:transparent}.btn-subtle:active{background-color:var(--color-subtle-background-pressed);color:var(--color-neutral-foreground-2-pressed)}.btn-icon-only{padding:var(--spacing-s-nudge)}.btn-brand{background-color:var(--color-brand-background);color:var(--color-brand-foreground)}.btn-brand:hover{background-color:var(--color-brand-background-hover);color:var(--color-brand-foreground)}.btn-brand:active{background-color:var(--color-brand-background-pressed);color:var(--color-brand-foreground)}.btn-circle{border-radius:var(--border-radius-circular)}@media (forced-colors:active){.btn{color:ButtonText;background-color:ButtonFace;border-color:ButtonText}.btn:hover{background-color:Highlight;border-color:Highlight;color:HighlightText}.btn-brand{forced-color-adjust:none}.btn.focus-always:focus,.btn.focus-default:focus-visible{outline-color:Highlight}.btn-outline{background-color:ButtonFace;border-color:ButtonText}.btn-subtle{background-color:ButtonFace;color:ButtonText}}
`,m1=kn`
hr{width:var(--size-full);height:var(--size-px);padding:0;margin:var(--spacing-s) 0;border:none;background-color:var(--color-neutral-stroke-alpha)}@media (forced-colors:active){hr{background-color:ButtonBorder}}
`,cc=kn`
.tooltip[data-tooltip]{position:relative;--tooltip-gap:var(--spacing-s);--tooltip-top:auto;--tooltip-left:50%;--tooltip-right:auto;--tooltip-bottom:100%;--tooltip-translate-x:-50%;--tooltip-translate-y:calc(0px - var(--tooltip-gap));--tooltip-width:auto}.tooltip[data-tooltip]::before{pointer-events:none;display:none;width:var(--tooltip-width);z-index:100;background-color:var(--color-grey-10-alpha-90);color:var(--color-neutral-foreground-1);content:attr(data-tooltip);padding:var(--spacing-xs) var(--spacing-s);border-radius:var(--border-radius-medium);font-weight:var(--font-weight-regular);font-size:var(--font-size-base-200);line-height:var(--line-height-base-200);font-family:var(--font-family-default);position:absolute;inset:var(--tooltip-top) var(--tooltip-right) var(--tooltip-bottom) var(--tooltip-left);transform:translate(var(--tooltip-translate-x),var(--tooltip-translate-y))}.tooltip[data-tooltip].tooltip-top::before{--tooltip-top:auto;--tooltip-bottom:100%;transform:translate(0,calc(0px - var(--tooltip-gap)))}.tooltip[data-tooltip].tooltip-top.tooltip-right::before{--tooltip-left:auto;--tooltip-right:0}.tooltip[data-tooltip].tooltip-top.tooltip-left::before{--tooltip-left:0;--tooltip-right:auto}.tooltip[data-tooltip].tooltip-disable-when-aria-expanded[aria-expanded='true']::before{display:none}.tooltip[data-tooltip]:hover::before,.tooltip[data-tooltip]:focus-visible::before,.tooltip[data-tooltip].tooltip-visible::before{display:block}@media (forced-colors:active){.tooltip[data-tooltip]::before{background-color:var(--color-grey-10)}.tooltip[data-tooltip]:hover::before,.tooltip[data-tooltip]:focus-visible::before,.tooltip[data-tooltip].tooltip-visible::before{color:ButtonText}}
`;var mY=Object.defineProperty,vY=Object.getOwnPropertyDescriptor,PS=(a,s,c,f)=>{for(var d=f>1?void 0:f?vY(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&mY(s,c,d),d};let Ag=class extends xn{render(){var a;const s=this.playerState.audioTracks;return s.length<2?null:xt`
      <ump-popup
        popupAriaLabel="${ue("Audio")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${ue("Audio")}"
          aria-label="${ue("Audio Menu")}"
          data-testid="audio-menu-button"
        >
          ${(a=this.popup)!=null&&a.opened?sn(fY):sn(hY)}
        </button>

        <ump-menu data-focusgroup>
          <ump-menu-label>${ue("Audio Track")}</ump-menu-label>

          <hr aria-hidden="true" />

          <ump-submenu>
            ${s.map(c=>xt`
                <ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  type="radio"
                  .checked=${c.shakaAudioTrack.active===!0}
                  @click=${this.onAudioTrackSelected(c)}
                >
                  <div
                    class="audio-track-menu-item-content"
                    aria-label=${LR(c)?`${c.displayName} ${ue("Audio Description")}`:c.displayName}
                  >
                    ${c.displayName}
                    ${LR(c)?sn(pY):null}
                  </div>
                </ump-menu-item>
              `)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onAudioTrackSelected(a){return()=>{this.dispatchEvent(new Mt("audio-track-clicked",a))}}get opened(){var a;return(a=this.popup)==null?void 0:a.opened}};Ag.styles=[us,m1,cc,kn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}.audio-track-menu-item-content{display:flex;align-items:flex-end;width:100%;gap:var(--spacing-xs)}.audio-track-menu-item-content svg{width:var(--size-6);height:var(--size-6);margin-bottom:calc(0px - var(--spacing-xs))}
`],PS([Tn("ump-popup")],Ag.prototype,"popup",2),PS([Rr({context:Nr,subscribe:!0})],Ag.prototype,"playerState",2),Ag=PS([Yn("ump-audio-menu")],Ag);function LR(a){return[g1.dashIdentifier,g1.hlsIdentifier].some(s=>a.shakaAudioTrack.roles.includes(s))}const yY='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path d="M23.5 14A9.5 9.5 0 0 0 7.07 7.5h2.68a.75.75 0 0 1 0 1.5h-4A.75.75 0 0 1 5 8.25v-4a.75.75 0 0 1 1.5 0v1.7a11 11 0 1 1-3.42 6.7.75.75 0 1 1 1.49.2A9.5 9.5 0 1 0 23.5 14"/></svg>',bY='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path d="M6.75 3A2.75 2.75 0 0 0 4 5.75v16.5A2.75 2.75 0 0 0 6.75 25h3a2.75 2.75 0 0 0 2.75-2.75V5.75A2.75 2.75 0 0 0 9.75 3zm11.5 0a2.75 2.75 0 0 0-2.75 2.75v16.5A2.75 2.75 0 0 0 18.25 25h3A2.75 2.75 0 0 0 24 22.25V5.75A2.75 2.75 0 0 0 21.25 3z"/></svg>',wY='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path d="M10.14 3.38A2.75 2.75 0 0 0 6 5.76v16.48c0 2.13 2.3 3.45 4.14 2.38l14.7-8.6a2.35 2.35 0 0 0 0-4.05z"/></svg>';var xY=Object.defineProperty,kY=Object.getOwnPropertyDescriptor,RR=(a,s,c,f)=>{for(var d=f>1?void 0:f?kY(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&xY(s,c,d),d};let Eg=class extends xn{render(){return xt`<button
      type="button"
      class=${st({btn:!0,"btn-xl":this.playerState.playButtonSize==="medium","btn-xxl":this.playerState.playButtonSize==="large","btn-circle":!0,"big-play-button":!0,"big-play-button-light":this.playerState.playButtonTheme==="light","big-play-button-dark":this.playerState.playButtonTheme==="dark",...ht(this.playerState),tooltip:!0})}
      aria-label="${this.playerState.ended?ue("Replay"):this.playerState.paused?ue("Play"):ue("Pause")}"
      data-tooltip="${this.playerState.ended?ue("Replay"):this.playerState.paused?ue("Play"):ue("Pause")}"
      data-testid="big-play-button"
      @click=${this.onBigPlayButtonClick}
      @keydown=${this.onBigPlayButtonKeyDown}
    >
      ${this.playerState.ended?sn(yY):this.playerState.paused?sn(wY):sn(bY)}
    </button>`}onBigPlayButtonClick(){this.dispatchEvent(new Mt("big-play-button-triggered"))}onBigPlayButtonKeyDown(a){this.playerState.disableKeyboardEvents||(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),a.stopPropagation(),this.dispatchEvent(new Mt("big-play-button-triggered")))}};Eg.shadowRootOptions={...xn.shadowRootOptions,delegatesFocus:!0},Eg.styles=[us,cc,kn`
.big-play-button{transition-property:background,color,outline}.big-play-button.tooltip{--tooltip-gap:var(--spacing-m)}.big-play-button-light{background-color:var(--color-white-alpha-90);outline:var(--stroke-width-thickest) solid var(--color-white-alpha-20)}.big-play-button-light:hover,.big-play-button-light:focus-visible{background-color:var(--color-white-alpha-20);outline:var(--stroke-width-thick) solid var(--color-white-alpha-90);outline-offset:-4px}.big-play-button-light svg{fill:var(--color-brand-40)}.big-play-button-dark{background-color:var(--color-black-alpha-60);outline:var(--stroke-width-thickest) solid var(--color-black-alpha-20)}.big-play-button-dark:hover,.big-play-button-dark:focus-visible{background-color:var(--color-black-alpha-80);outline:var(--stroke-width-thick) solid var(--color-white-alpha-90);outline-offset:-4px}.big-play-button-dark svg{fill:var(--color-neutral-foreground-1)}@media (forced-colors:active){.big-play-button-dark{background-color:ButtonText;outline:var(--stroke-width-thickest) solid Highlight}.big-play-button-dark:hover,.big-play-button-dark:focus-visible{background-color:Highlight;outline:var(--stroke-width-thick) solid ButtonText;outline-offset:-4px}.big-play-button-dark svg{fill:ButtonFace}.big-play-button-light{background-color:Highlight;outline:var(--stroke-width-thickest) solid ButtonText}.big-play-button-light:hover,.big-play-button-light:focus-visible{background-color:ButtonText;outline:var(--stroke-width-thick) solid Highlight;outline-offset:-4px}.big-play-button-light svg{fill:ButtonFace}}
`],RR([Rr({context:Nr,subscribe:!0})],Eg.prototype,"playerState",2),Eg=RR([gS(),Yn("ump-big-play-button")],Eg);const _S='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M12.35 15.85a.5.5 0 0 1-.7 0L6.16 10.4a.55.55 0 0 1 0-.78l5.49-5.46a.5.5 0 1 1 .7.7L7.2 10l5.16 5.15c.2.2.2.5 0 .7"/></svg>',DS='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.47a.5.5 0 0 1-.7-.71L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7"/></svg>',TY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M5 4a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zm1.4 3.24c.82-.41 1.8-.24 2.45.4a.5.5 0 0 1-.7.71 1.1 1.1 0 0 0-1.3-.22C6.44 8.34 6 8.9 6 10s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 1 1 .7.7c-.65.65-1.63.82-2.45.41C5.56 12.34 5 11.39 5 10s.56-2.34 1.4-2.76m7.95.4a.5.5 0 0 1-.7.71 1.1 1.1 0 0 0-1.3-.22c-.41.21-.85.76-.85 1.87s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 0 1 .7.7c-.65.65-1.63.82-2.45.41-.84-.42-1.4-1.37-1.4-2.76s.56-2.34 1.4-2.76c.82-.41 1.8-.24 2.45.4"/></svg>',SY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M6.4 7.24c.82-.41 1.8-.24 2.45.4a.5.5 0 0 1-.7.71 1.1 1.1 0 0 0-1.3-.22C6.44 8.34 6 8.9 6 10s.44 1.66.85 1.87c.43.21.95.13 1.3-.22a.5.5 0 0 1 .7.7c-.65.65-1.63.82-2.45.41C5.56 12.34 5 11.39 5 10s.56-2.34 1.4-2.76m7.95.4a2.1 2.1 0 0 0-2.45-.4c-.84.42-1.4 1.37-1.4 2.76s.56 2.34 1.4 2.76c.82.41 1.8.24 2.45-.4a.5.5 0 0 0-.7-.71c-.35.35-.87.43-1.3.22-.41-.21-.85-.76-.85-1.87s.44-1.66.85-1.87c.43-.21.95-.13 1.3.22a.5.5 0 0 0 .7-.7M2 7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3zm3-2a2 2 0 0 0-2 2v6c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z"/></svg>';/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const LS=a=>a??rr,CY=[.5,.75,1,1.25,1.5,1.75,2,3,4],Ou=[{label:ue("White"),hexCode:"#FFFFFF"},{label:ue("Yellow"),hexCode:"#FFFF00"},{label:ue("Black"),hexCode:"#000000"},{label:ue("Green"),hexCode:"#008000"},{label:ue("Blue"),hexCode:"#0000FF"},{label:ue("Magenta"),hexCode:"#FF00FF"},{label:ue("Cyan"),hexCode:"#00FFFF"}],v1=[{label:ue("Proportional Sans Serif"),family:"sans-serif"},{label:ue("Monospace Sans Serif"),family:'"Andale Mono", "Lucida Console", monospace'},{label:ue("Proportional Serif"),family:"serif"},{label:ue("Monospace Serif"),family:'"Courier New", monospace'},{label:ue("Casual"),family:'"Comic Sans MS", Impact, fantasy'},{label:ue("Cursive"),family:'"Monotype Corsiva", cursive'},{label:ue("Small Capitals"),family:'"Andale Mono", "Lucida Console", monospace, sans-serif'}],NR=[0,.25,.5,.75,1],Za="rgb(34, 34, 34)",OR="rgb(204, 204, 204)",y1=[{label:ue("None"),textShadow:"rgb(255, 255, 255) 0px 0px 0px"},{label:ue("Drop Shadow"),textShadow:`${Za} 2px 2px 3px, ${Za} 2px 2px 4px, ${Za} 2px 2px 5px`},{label:ue("Depressed"),textShadow:`${OR} 1px 1px 0px, ${OR} 0px 1px 0px, ${Za} -1px -1px 0px, ${Za} 0px -1px 0px`},{label:ue("Uniform"),textShadow:`${Za} 0px 0px 4px, ${Za} 0px 0px 4px, ${Za} 0px 0px 4px, ${Za} 0px 0px 4px`},{label:ue("Raised"),textShadow:`${Za} 1px 1px 0px, ${Za} 2px 2px 0px, ${Za} 3px 3px 0px`}];var AY=Object.defineProperty,EY=Object.getOwnPropertyDescriptor,Ig=(a,s,c,f)=>{for(var d=f>1?void 0:f?EY(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&AY(s,c,d),d};let dc=class extends xn{render(){var a;const{captionTracks:s,selectedCaptionTrackId:c,captionSettings:f}=this.playerState;if(s.length<=1)return null;const d=this.playerState.disableKeyboardEvents?0:-1,v=f.fontScale===ar.fontScale,y=f.textColor===ar.textColor,g=f.textOpacity===ar.textOpacity,C=f.backgroundColor===ar.backgroundColor,E=f.backgroundOpacity===ar.backgroundOpacity,I=f.fontFamily===ar.fontFamily,D=f.textShadow===ar.textShadow;return xt`
      <ump-aria-announcer
        data-testid="caption-reset-announcement"
      ></ump-aria-announcer>
      <ump-popup
        popupAriaLabel="${ue("Captions")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${ue("Captions")}"
          aria-label="${ue("Captions Menu")}"
          data-testid="captions-menu-button"
        >
          ${(a=this.popup)!=null&&a.opened?sn(TY):sn(SY)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-label> ${ue("Captions")} </ump-menu-label>

              <hr aria-hidden="true" />

              ${s.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    lang=${LS(L.captionId!==lc.captionId?L.language:void 0)}
                    type="radio"
                    .checked="${L.captionId===c}"
                    @click=${this.onCaptionClicked(L)}
                  >
                    ${L.captionId!==lc.captionId?L.label:ue(lc.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  role="menuitem"
                  submenu="captions-settings"
                  slot="suffix"
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  aria-roledescription="button"
                  aria-label="${ue("Caption Settings")}, ${ue("collapsed")}"
                  data-testid="captions-settings-button"
                >
                  ${ue("Caption Settings")}
                  ${this.playerState.dir==="ltr"?sn(DS):sn(_S)}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- SETTINGS MENU -->
          <ump-submenu id="captions-settings">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              aria-label="${ue("Caption Settings")}, ${ue("Back")}"
            >
              ${ue("Caption Settings")}
            </ump-menu-item>

            <hr aria-hidden="true" />
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-font-size"
              aria-label="${ue("Font Size")}, ${f.fontScale*100}%, ${ue("collapsed")}"
            >
              ${ue("Font Size")}
              <div slot="suffix">${`${f.fontScale*100}%`}</div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-font-color"
              aria-label="${ue("Font Color")}, ${ue(Ou.find(L=>L.hexCode===f.textColor).label)}, ${ue("collapsed")}"
            >
              ${ue("Font Color")}
              <div slot="suffix">
                ${ue(Ou.find(L=>L.hexCode===f.textColor).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-font-opacity"
              aria-label="${ue("Font Opacity")}, ${f.textOpacity===1?ue("Opaque"):`${f.textOpacity*100}%`}, ${ue("collapsed")}"
            >
              ${ue("Font Opacity")}
              <div slot="suffix">
                ${f.textOpacity===1?ue("Opaque"):`${f.textOpacity*100}%`}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-background-color"
              aria-label="${ue("Background Color")}, ${ue(Ou.find(L=>L.hexCode===f.backgroundColor).label)}, ${ue("collapsed")}"
            >
              ${ue("Background Color")}
              <div slot="suffix">
                ${ue(Ou.find(L=>L.hexCode===f.backgroundColor).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-background-opacity"
              aria-label="${ue("Background Opacity")}, ${f.backgroundOpacity===1?ue("Opaque"):`${f.backgroundOpacity*100}%`}, ${ue("collapsed")}"
            >
              ${ue("Background Opacity")}
              <div slot="suffix">
                ${f.backgroundOpacity===1?ue("Opaque"):`${f.backgroundOpacity*100}%`}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-font-family"
              aria-label="${ue("Font Family")}, ${ue(v1.find(L=>L.family===f.fontFamily).label)}, ${ue("collapsed")}"
            >
              ${ue("Font Family")}
              <div slot="suffix">
                ${ue(v1.find(L=>L.family===f.fontFamily).label)}
              </div>
            </ump-menu-item>

            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="captions-text-edge-style"
              aria-label="${ue("Text Edge Style")}, ${ue(y1.find(L=>L.textShadow===f.textShadow).label)}, ${ue("collapsed")}"
            >
              ${ue("Text Edge Style")}
              <div slot="suffix">
                ${ue(y1.find(L=>L.textShadow===f.textShadow).label)}
              </div>
            </ump-menu-item>
          </ump-submenu>

          <!-- FONT SIZE MENU -->
          <ump-submenu id="captions-font-size">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Font Size")}, ${ue("Back")}"
              >
                ${ue("Font Size")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${CY.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${f.fontScale===L}
                    @click=${this.onFontSizeClicked(L)}
                  >
                    ${`${L*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${v}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-size"
                  @click=${this.onResetClicked(this.onFontSizeClicked(ar.fontScale),ue(ic`Font Size reset to ${ar.fontScale*100}%`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT COLOR MENU -->
          <ump-submenu id="captions-font-color">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Font Color")}, ${ue("Back")}}"
              >
                ${ue("Font Color")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${Ou.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${L.hexCode===f.textColor}
                    @click=${this.onTextColorClicked(L.hexCode)}
                  >
                    <span
                      class="color-dot"
                      style="background-color: ${L.hexCode}"
                      aria-hidden="true"
                    ></span>
                    ${ue(L.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${y}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-color"
                  @click=${this.onResetClicked(this.onTextColorClicked(ar.textColor),ue(ic`Font Color reset to ${ue(Ou.find(L=>L.hexCode===ar.textColor).label)}`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT OPACITY MENU -->
          <ump-submenu id="captions-font-opacity">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Font Opacity")}, ${ue("Back")})}"
              >
                ${ue("Font Opacity")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${NR.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${L===f.textOpacity}
                    @click=${this.onTextOpacityClicked(L)}
                  >
                    ${`${L*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${g}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-opacity"
                  @click=${this.onResetClicked(this.onTextOpacityClicked(ar.textOpacity),ue(ic`Font Opacity reset to ${ar.textOpacity*100}%`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- BACKGROUND COLOR MENU -->
          <ump-submenu id="captions-background-color">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Background Color")}, ${ue("Back")}}"
              >
                ${ue("Background Color")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${Ou.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${L.hexCode===f.backgroundColor}
                    @click=${this.onBackgroundColorClicked(L.hexCode)}
                  >
                    <span
                      class="color-dot"
                      style="background-color: ${L.hexCode}"
                      aria-hidden="true"
                    ></span>
                    ${ue(L.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${C}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-background-color"
                  @click=${this.onResetClicked(this.onBackgroundColorClicked(ar.backgroundColor),ue(ic`Background Color reset to ${ue(Ou.find(L=>L.hexCode===ar.backgroundColor).label)}`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- BACKGROUND OPACITY MENU -->
          <ump-submenu id="captions-background-opacity">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Background Opacity")}, ${ue("Back")}}"
              >
                ${ue("Background Opacity")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${NR.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${L===f.backgroundOpacity}
                    @click=${this.onBackgroundOpacityClicked(L)}
                  >
                    ${`${L*100}%`}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${E}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-background-opacity"
                  @click=${this.onResetClicked(this.onBackgroundOpacityClicked(ar.backgroundOpacity),ue(ic`Background Opacity reset to ${ar.backgroundOpacity*100}%`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- FONT FAMILY MENU -->
          <ump-submenu id="captions-font-family">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Font Family")}, ${ue("Back")}}"
              >
                ${ue("Font Family")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${v1.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${L.family===f.fontFamily}
                    @click=${this.onFontFamilyClicked(L.family)}
                  >
                    ${ue(L.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${I}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-font-family"
                  @click=${this.onResetClicked(this.onFontFamilyClicked(ar.fontFamily),ue(ic`Font Family reset to ${ue(v1.find(L=>L.family===ar.fontFamily).label)}`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>

          <!-- TEXT EDGE STYLE MENU -->
          <ump-submenu id="captions-text-edge-style">
            <div
              class="menu-scrollable"
              data-scrollable
              tabindex="0"
              role="group"
            >
              <ump-menu-item
                class=${st({...ht(this.playerState)})}
                submenu="${_i}"
                aria-label="${ue("Text Edge Style")}, ${ue("Back")}}"
              >
                ${ue("Text Edge Style")}
              </ump-menu-item>

              <hr aria-hidden="true" />

              ${y1.map(L=>xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    type="radio"
                    .checked=${f.textShadow===L.textShadow}
                    @click=${this.onTextEdgeStyleClicked(L.textShadow)}
                  >
                    ${ue(L.label)}
                  </ump-menu-item>
                `)}
            </div>
            <div class="menu-footer">
              <ump-menu-footer>
                <button
                  type="button"
                  class=${st({btn:!0,"btn-outline":!0,...ht(this.playerState)})}
                  slot="suffix"
                  role="menuitem"
                  aria-roledescription="button"
                  aria-label="${ue("Reset")}"
                  ?disabled=${D}
                  tabindex="${d}"
                  @focusin=${this.onFooterButtonFocusIn}
                  @focusout=${this.onFooterButtonFocusOut}
                  data-testid="reset-text-edge-style"
                  @click=${this.onResetClicked(this.onTextEdgeStyleClicked(ar.textShadow),ue(ic`Text Edge Style reset to ${ue(y1.find(L=>L.textShadow===ar.textShadow).label)}`))}
                >
                  ${ue("Reset")}
                </button>
              </ump-menu-footer>
            </div>
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onFooterButtonFocusIn(a){this.playerState.disableKeyboardEvents||(a.target.tabIndex=0)}onFooterButtonFocusOut(a){this.playerState.disableKeyboardEvents||(a.target.tabIndex=-1)}onCaptionClicked(a){return()=>{this.dispatchEvent(new Mt("caption-track-clicked",a)),this.dispatchEvent(new Mt("closedcaptionschanged"))}}onResetClicked(a,s){return async c=>{var f,d;a(c),await((f=this.announcer)==null?void 0:f.announce(s,!0)),await this.updateComplete,(d=this.menu)==null||d.focusSelectedItem()}}captionSettingChanged(a){this.dispatchEvent(a),this.dispatchEvent(new Mt("closedcaptionsettingschanged"))}onFontSizeClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-font-size-clicked",a))}}onTextColorClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-text-color-clicked",a))}}onTextOpacityClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-text-opacity-clicked",a))}}onBackgroundColorClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-background-color-clicked",a))}}onBackgroundOpacityClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-background-opacity-clicked",a))}}onFontFamilyClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-font-family-clicked",a))}}onTextEdgeStyleClicked(a){return s=>{s.stopPropagation(),this.captionSettingChanged(new Mt("caption-text-edge-style-clicked",a))}}get opened(){var a;return(a=this.popup)==null?void 0:a.opened}};dc.styles=[us,m1,cc,kn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}.color-dot{width:var(--spacing-m);height:var(--spacing-m);border-radius:50%}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-80);display:block}@container universalmediaplayer (max-width:450px){ump-menu{width:calc(var(--size-80) - 3cqw)}}.menu-title-spacer{width:var(--size-6);height:var(--size-6)}@container universalmediaplayer (min-width:0){.menu-scrollable{scrollbar-base-color:green;overflow:hidden auto;max-height:calc(100cqh - var(--ump-lower-controls-height) - 4rem);flex-direction:column;padding:var(--spacing-xs)}}.menu-footer{width:100%;border-top:1px solid var(--color-neutral-stroke-alpha)}.menu-footer div:focus,.menu-footer div:focus-visible{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2)}.menu-footer div svg{fill:currentcolor}.menu-footer:hover:has(.btn:disabled){--footer-button-hover-bg:transparent}.btn:disabled,.btn:disabled:hover{opacity:0.45;cursor:not-allowed}.color-suffix{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-m);padding:var(--spacing-s) var(--spacing-m)}.opacity-suffix{display:flex;gap:var(--spacing-xs)}.opacity-suffix .btn{font-weight:var(--font-weight-normal)}.cc-style-menu-item{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-s) 0}.text-color-list{display:flex;gap:var(--spacing-s)}@media (forced-colors:active){.menu-footer{border-top-color:ButtonBorder}.btn:disabled,.btn:disabled:hover{color:GrayText;border-color:GrayText;background-color:ButtonFace;opacity:1}}
`],Ig([Tn("ump-popup")],dc.prototype,"popup",2),Ig([Tn("ump-menu")],dc.prototype,"menu",2),Ig([Tn("ump-aria-announcer")],dc.prototype,"announcer",2),Ig([Rr({context:Nr,subscribe:!0})],dc.prototype,"playerState",2),dc=Ig([Yn("ump-caption-menu")],dc);const IY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M16 10A6 6 0 0 0 5.53 6H7.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 1 0v1.6a7 7 0 1 1-1.98 4.36.5.5 0 0 1 1 .08L4 10a6 6 0 0 0 12 0"/></svg>',MY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M3 5.25C3 4.01 4 3 5.25 3h1.87a.75.75 0 1 1 0 1.5H5.25a.75.75 0 0 0-.75.75v1.87a.75.75 0 1 1-1.5 0zm9.13-1.5c0-.41.34-.75.75-.75h1.87C15.99 3 17 4 17 5.25v1.87a.75.75 0 0 1-1.5 0V5.25a.75.75 0 0 0-.75-.75h-1.87a.75.75 0 0 1-.75-.75m-8.38 8.38c.41 0 .75.34.75.75v1.87c0 .41.34.75.75.75h1.87a.75.75 0 0 1 0 1.5H5.25C4.01 17 3 16 3 14.75v-1.87c0-.41.34-.75.75-.75m12.5 0c.41 0 .75.34.75.75v1.87c0 1.24-1 2.25-2.25 2.25h-1.87a.75.75 0 0 1 0-1.5h1.87c.41 0 .75-.34.75-.75v-1.87c0-.41.34-.75.75-.75"/></svg>',PY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M15 5.5a.5.5 0 0 1-.5-.5V2.75a.75.75 0 0 0-1.5 0V5c0 1.1.9 2 2 2h2.25a.75.75 0 0 0 0-1.5zM5.5 15a.5.5 0 0 0-.5-.5H2.75a.75.75 0 0 1 0-1.5H5a2 2 0 0 1 2 2v2.25a.75.75 0 0 1-1.5 0zm9 0c0-.28.22-.5.5-.5h2.25a.75.75 0 0 0 0-1.5H15a2 2 0 0 0-2 2v2.25a.75.75 0 0 0 1.5 0zm-9-10a.5.5 0 0 1-.5.5H2.75a.75.75 0 0 0 0 1.5H5a2 2 0 0 0 2-2V2.75a.75.75 0 0 0-1.5 0z"/></svg>',_Y='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M5 2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM4 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm9-2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm-1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z"/></svg>',DY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M17.22 8.69a1.5 1.5 0 0 1 0 2.62l-10 5.5A1.5 1.5 0 0 1 5 15.5v-11A1.5 1.5 0 0 1 7.22 3.2zm-.48 1.75a.5.5 0 0 0 0-.88l-10-5.5A.5.5 0 0 0 6 4.5v11c0 .38.4.62.74.44z"/></svg>',LY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M12 3a1 1 0 0 0-1.68-.73l-3.88 3.6A.5.5 0 0 1 6.1 6H3.5C2.67 6 2 6.67 2 7.5v5c0 .83.67 1.5 1.5 1.5h2.6a.5.5 0 0 1 .34.13l3.88 3.6a1 1 0 0 0 1.68-.74zM7.12 6.6 11 3v14l-3.88-3.6A1.5 1.5 0 0 0 6.1 13H3.5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5h2.6c.38 0 .75-.14 1.02-.4m8.14-1.97a.5.5 0 0 1 .7.04 8 8 0 0 1 0 10.66.5.5 0 0 1-.74-.66 7 7 0 0 0 0-9.34.5.5 0 0 1 .04-.7m-1.18 8.3a.5.5 0 0 1-.18-.68 4.5 4.5 0 0 0 0-4.5.5.5 0 1 1 .86-.5 5.5 5.5 0 0 1 0 5.5.5.5 0 0 1-.68.18"/></svg>',RY='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M2.85 2.15a.5.5 0 1 0-.7.7L5.29 6H3.5C2.68 6 2 6.67 2 7.5v5c0 .83.68 1.5 1.5 1.5H6.1a.5.5 0 0 1 .34.13l3.88 3.6a1 1 0 0 0 1.68-.74V12.7l5.15 5.15a.5.5 0 0 0 .7-.7l-2.56-2.57zM11 11.7V17l-3.88-3.6A1.5 1.5 0 0 0 6.1 13H3.5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5h2.6l.18-.01zM11 3v5.88l1 1V3a1 1 0 0 0-1.68-.74L7.24 5.12l.71.71zm3.06 8.94.74.74a5.5 5.5 0 0 0-.04-5.43.5.5 0 1 0-.86.5 4.5 4.5 0 0 1 .16 4.19m1.84 1.84.72.72a8 8 0 0 0-.66-9.83.5.5 0 1 0-.74.66 7 7 0 0 1 .68 8.45"/></svg>',NY=(a,s,c)=>{const f=a[s];return f?typeof f=="function"?f():Promise.resolve(f):new Promise((d,v)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(v.bind(null,new Error("Unknown variable dynamic import: "+s+(s.split("/").length!==c?". Note that variables only represent file names one level deep.":""))))})},OY="en-us",jY=["af-za","am-et","ar-sa","as-in","be-by","bg-bg","bn-in","ca-es","cs-cz","cy-gb","da-dk","de-at","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-hk","en-ie","en-in","en-my","en-nz","en-ph","en-sg","en-za","es-ar","es-cl","es-co","es-es","es-mx","et-ee","eu-es","fa-ir","fi-fi","fr-be","fr-ca","fr-ch","fr-fr","fr-ma","ga-ie","gd-gb","gl-es","gu-in","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","kn-in","ko-kr","ky-kg","lb-lu","lo-la","lt-lt","lv-lv","mi-nz","mk-mk","ml-in","mr-in","ms-bn","ms-my","mt-mt","nb-no","ne-np","nl-be","nl-nl","nn-no","or-in","pa-in","pl-pl","ps-af","pt-br","pt-pt","ro-ro","ru-ru","si-lk","sk-sk","sl-si","sq-al","sv-se","sw-ke","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tr-tr","tt-ru","ug-cn","uk-ua","ur-in","ur-pk","uz-uz","vi-vn","wo-sn","xh-za","yo-ng","zh-cn","zh-hk","zh-tw","zu-za"],UY=["af-za","am-et","ar-sa","as-in","be-by","bg-bg","bn-in","ca-es","cs-cz","cy-gb","da-dk","de-at","de-ch","de-de","el-gr","en-au","en-ca","en-gb","en-hk","en-ie","en-in","en-my","en-nz","en-ph","en-sg","en-us","en-za","es-ar","es-cl","es-co","es-es","es-mx","et-ee","eu-es","fa-ir","fi-fi","fr-be","fr-ca","fr-ch","fr-fr","fr-ma","ga-ie","gd-gb","gl-es","gu-in","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","kn-in","ko-kr","ky-kg","lb-lu","lo-la","lt-lt","lv-lv","mi-nz","mk-mk","ml-in","mr-in","ms-bn","ms-my","mt-mt","nb-no","ne-np","nl-be","nl-nl","nn-no","or-in","pa-in","pl-pl","ps-af","pt-br","pt-pt","ro-ro","ru-ru","si-lk","sk-sk","sl-si","sq-al","sv-se","sw-ke","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tr-tr","tt-ru","ug-cn","uk-ua","ur-in","ur-pk","uz-uz","vi-vn","wo-sn","xh-za","yo-ng","zh-cn","zh-hk","zh-tw","zu-za"],jR={s0289cd9e4bcf84c5:"Volume Level",s061cc20e3432dead:"Pause",s0622a6e6cb77254b:"Transcript",s080d032fc1b87b3f:"Audio Description",s08b06007b5567108:"of",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Font Family",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Captions",s24221a89168e9d21:"Font Size",s255857544a9d5ec0:"Reset",s25a858f0257e2879:"Captions Menu",s2df075aface0dab8:"Share",s2f5d5d2d1f92de26:"Download Video",s302cbb19bf9a174a:"Off",s308604b3ae13fbb5:"Playing",s344ea8f4939cdc98:"Colour",s3687049d1af562c4:"Copy",s36b979e4de5152b3:"Link Copied",s37a9e8aec5713460:"More",s3ca1bdfa8785f808:"Proportional Sans Serif",s49f06dca0feeb2f3:"Uniform",s4b023aafbd8d5ac8:"Share this video on",s4b10acae683d2978:"Fullscreen",s500caa88d20458d3:"You may not access this content",s5267658ceae3230f:"Share this video",s5c5db15dfc3a5376:"Playback rate",s5e3cb80d43a34044:"Black",s5e8250fb85d64c23:"Close",s669b18c6d2d9c95b:"None",s66d852e3c020e79e:"Opaque",s6a3bf589eaf72169:"Monospace Serif",s6baf78886c99db89:"Yellow",s6f59e9b81c5a47e0:"Drop Shadow",s711d047dea682c1a:"Audio Track",s7d148a08796094d2:"Playback Error",s81a19821f3e4a3d2:"Replay",s827bc70ebcb7bbc6:"Monospace Sans Serif",s85186a61e0d55bac:"Video",s889413eb7198ea01:"option for turning off caption",s8e408592fd4ae43a:"Text Edge Style",s8e985aeeca6a8166:"White",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Small Capitals",s95bc8722b2708f8b:"Paused",s973b83fb67a5865d:"Download Transcript",s9b3c2f9cc32d565a:"Cyan",s9c356016f81585f6:"Background Colour",s9d8b8aa2b404c2c8:"Settings",s9fbd543f2179c1ec:"Audio Menu",sa000eaf7092088c3:"Progress Bar",sa6f2645578b2d2bc:"Year",sa9011e79e3ca2d18:"Depressed",saf9b398ab363c174:"Please enter your date of birth",sb3d4f79d9d8b71e5:"Submit",sb47daaf9e1c4a905:"Month",sb9f16a5f9c29f41e:"We're sorry, but something went wrong.",sba64d8954d027206:"Opacity",sc07837c309cc699b:"Unmute",scd105819b5a10243:"Play",sce836928a17d96ed:"Text Colour",scf00d78fd5953f1c:"Green",sd3386a2ef42e80b9:"Download",sd8d4b1b613d28990:"Cursive",sdb02f53e62c1da05:"Raised",sdb73788b3c975f16:"Auto",se0955919920ee87d:"Day",se0f67eae944f8f94:"Mute",se73c59cc10f48c12:"Social",secf3d3a7c1693e2d:"Blue",sed31876562d94652:"Caption Settings",sf113fa256db9617b:"Ended",sf675f879b1c892c6:"Quality",sfc24a457269b13d4:"Volume Slider",sfcb817633bf70e1b:"Proportional Serif"},FY=Object.freeze(Object.defineProperty({__proto__:null,templates:jR},Symbol.toStringTag,{value:"Module"})),UR={s0289cd9e4bcf84c5:"Nivel de volumen",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcripci\xF3n",s080d032fc1b87b3f:"Descripci\xF3n de audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Familia de fuentes",s1fa5be5a4f5d0f04:"Informal",s23537b5c9e7af982:"Subt\xEDtulos",s24221a89168e9d21:"Tama\xF1o de fuente",s255857544a9d5ec0:"Restablecer",s25a858f0257e2879:"Men\xFA Subt\xEDtulos",s2df075aface0dab8:"Compartir",s2f5d5d2d1f92de26:"Descargar v\xEDdeo",s302cbb19bf9a174a:"Desactivado",s308604b3ae13fbb5:"Reproduciendo",s344ea8f4939cdc98:"Color",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"V\xEDnculo copiado",s37a9e8aec5713460:"M\xE1s",s3ca1bdfa8785f808:"Sans Serif proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Comparte este v\xEDdeo por",s4b10acae683d2978:"Pantalla completa",s500caa88d20458d3:"No puedes acceder a este contenido",s5267658ceae3230f:"Compartir este v\xEDdeo",s5c5db15dfc3a5376:"Velocidad de reproducci\xF3n",s5e3cb80d43a34044:"Negro",s5e8250fb85d64c23:"Cerrar",s669b18c6d2d9c95b:"Ninguna",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serif monoespaciada",s6baf78886c99db89:"Amarillo",s6f59e9b81c5a47e0:"Sombra paralela",s711d047dea682c1a:"Pista de audio",s7d148a08796094d2:"Error de reproducci\xF3n",s81a19821f3e4a3d2:"Reproducir",s827bc70ebcb7bbc6:"Sans Serif monoespaciada",s85186a61e0d55bac:"V\xEDdeo",s889413eb7198ea01:"opci\xF3n para desactivar los subt\xEDtulos",s8e408592fd4ae43a:"Estilo de borde del texto",s8e985aeeca6a8166:"Blanco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Versalitas",s95bc8722b2708f8b:"En pausa",s973b83fb67a5865d:"Descargar transcripci\xF3n",s9b3c2f9cc32d565a:"Cian",s9c356016f81585f6:"Color de fondo",s9d8b8aa2b404c2c8:"Configuraci\xF3n",s9fbd543f2179c1ec:"Men\xFA Audio",sa000eaf7092088c3:"Barra de progreso",sa6f2645578b2d2bc:"A\xF1o",sa9011e79e3ca2d18:"Presionado",saf9b398ab363c174:"Escribe tu fecha de nacimiento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"Mes",sb9f16a5f9c29f41e:"Lo sentimos, se ha producido un error.",sba64d8954d027206:"Opacidad",sc07837c309cc699b:"Reactivar audio",scd105819b5a10243:"Reproducir",sce836928a17d96ed:"Color del texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Descargar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Elevado",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"D\xEDa",se0f67eae944f8f94:"Silenciar",se73c59cc10f48c12:"Redes sociales",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configuraci\xF3n de las leyendas",sf113fa256db9617b:"Finalizado",sf675f879b1c892c6:"Calidad",sfc24a457269b13d4:"Control deslizante de volumen",sfcb817633bf70e1b:"Serif proporcional"},BY=Object.freeze(Object.defineProperty({__proto__:null,templates:UR},Symbol.toStringTag,{value:"Module"})),FR={s0289cd9e4bcf84c5:"Nivel de volumen",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcripci\xF3n",s080d032fc1b87b3f:"Descripci\xF3n de audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Familia de fuentes",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Subt\xEDtulos",s24221a89168e9d21:"Tama\xF1o de la fuente",s255857544a9d5ec0:"Restablecer",s25a858f0257e2879:"Men\xFA de subt\xEDtulos",s2df075aface0dab8:"Compartir",s2f5d5d2d1f92de26:"Descargar video",s302cbb19bf9a174a:"Desactivado",s308604b3ae13fbb5:"Reproduciendo",s344ea8f4939cdc98:"Color",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"V\xEDnculo copiado",s37a9e8aec5713460:"M\xE1s",s3ca1bdfa8785f808:"Sin serifa, proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Comparte este video en",s4b10acae683d2978:"Pantalla completa",s500caa88d20458d3:"No puedes acceder a este contenido",s5267658ceae3230f:"Compartir este video",s5c5db15dfc3a5376:"Velocidad de reproducci\xF3n",s5e3cb80d43a34044:"Negro",s5e8250fb85d64c23:"Cerrar",s669b18c6d2d9c95b:"Ninguno",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serif monoespaciada",s6baf78886c99db89:"Amarillo",s6f59e9b81c5a47e0:"Sombra paralela",s711d047dea682c1a:"Pista de audio",s7d148a08796094d2:"Error de reproducci\xF3n",s81a19821f3e4a3d2:"Repetir",s827bc70ebcb7bbc6:"Sin serifa, monoespaciada",s85186a61e0d55bac:"Video",s889413eb7198ea01:"opci\xF3n para desactivar subt\xEDtulos",s8e408592fd4ae43a:"Estilo del borde del texto",s8e985aeeca6a8166:"Blanco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Versalitas",s95bc8722b2708f8b:"En pausa",s973b83fb67a5865d:"Descargar transcripci\xF3n",s9b3c2f9cc32d565a:"Cian",s9c356016f81585f6:"Color de fondo",s9d8b8aa2b404c2c8:"Configuraci\xF3n",s9fbd543f2179c1ec:"Men\xFA de audio",sa000eaf7092088c3:"Barra de progreso",sa6f2645578b2d2bc:"A\xF1o",sa9011e79e3ca2d18:"En relieve negativo",saf9b398ab363c174:"Introduce tu fecha de nacimiento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"Mes",sb9f16a5f9c29f41e:"Lo sentimos, pero algo sali\xF3 mal.",sba64d8954d027206:"Opacidad",sc07837c309cc699b:"Reactivar audio",scd105819b5a10243:"Reproducir",sce836928a17d96ed:"Color del texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Descargar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Elevado",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"D\xEDa",se0f67eae944f8f94:"Silenciar",se73c59cc10f48c12:"Redes sociales",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configuraci\xF3n de subt\xEDtulos",sf113fa256db9617b:"Termin\xF3",sf675f879b1c892c6:"Calidad",sfc24a457269b13d4:"Control deslizante de volumen",sfcb817633bf70e1b:"Con serifa, proporcional"},VY=Object.freeze(Object.defineProperty({__proto__:null,templates:FR},Symbol.toStringTag,{value:"Module"})),BR={s0289cd9e4bcf84c5:"Volume sonore",s061cc20e3432dead:"Pause",s0622a6e6cb77254b:"Transcription",s080d032fc1b87b3f:"Descriptions audio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Famille de police",s1fa5be5a4f5d0f04:"Informel",s23537b5c9e7af982:"Sous-titres",s24221a89168e9d21:"Taille de police",s255857544a9d5ec0:"R\xE9initialiser",s25a858f0257e2879:"Menu des sous-titres",s2df075aface0dab8:"Partager",s2f5d5d2d1f92de26:"T\xE9l\xE9charger la vid\xE9o",s302cbb19bf9a174a:"D\xE9sactiv\xE9",s308604b3ae13fbb5:"Lecture",s344ea8f4939cdc98:"Couleur",s3687049d1af562c4:"Copier",s36b979e4de5152b3:"Lien copi\xE9",s37a9e8aec5713460:"Plus",s3ca1bdfa8785f808:"Sans Serif proportionnelle",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Partager cette vid\xE9o sur",s4b10acae683d2978:"Plein \xE9cran",s500caa88d20458d3:"Vous n\u2019\xEAtes pas autoris\xE9 \xE0 acc\xE9der \xE0 ce contenu",s5267658ceae3230f:"Partager cette vid\xE9o",s5c5db15dfc3a5376:"Vitesse de lecture",s5e3cb80d43a34044:"Noir",s5e8250fb85d64c23:"Fermer",s669b18c6d2d9c95b:"Aucune",s66d852e3c020e79e:"Opaque",s6a3bf589eaf72169:"Serif non proportionnelle",s6baf78886c99db89:"Jaune",s6f59e9b81c5a47e0:"Ombre port\xE9e",s711d047dea682c1a:"Piste audio",s7d148a08796094d2:"Erreur de lecture",s81a19821f3e4a3d2:"Relecture",s827bc70ebcb7bbc6:"Sans Serif non proportionnelle",s85186a61e0d55bac:"Vid\xE9o",s889413eb7198ea01:"option pour d\xE9sactiver les sous-titres",s8e408592fd4ae43a:"Style du bord du texte",s8e985aeeca6a8166:"Blanc",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Petites capitales",s95bc8722b2708f8b:"En pause",s973b83fb67a5865d:"T\xE9l\xE9charger la transcription",s9b3c2f9cc32d565a:"Cyan",s9c356016f81585f6:"Couleur de l\u2019arri\xE8re-plan",s9d8b8aa2b404c2c8:"Param\xE8tres",s9fbd543f2179c1ec:"Menu Audio",sa000eaf7092088c3:"Barre de progression",sa6f2645578b2d2bc:"Ann\xE9e",sa9011e79e3ca2d18:"Enfonc\xE9",saf9b398ab363c174:"Saisissez votre date de naissance",sb3d4f79d9d8b71e5:"Envoyer",sb47daaf9e1c4a905:"Mois",sb9f16a5f9c29f41e:"Nous sommes d\xE9sol\xE9s, mais une erreur s\u2019est produite.",sba64d8954d027206:"Opacit\xE9",sc07837c309cc699b:"Activer le son",scd105819b5a10243:"Lecture",sce836928a17d96ed:"Couleur du texte",scf00d78fd5953f1c:"Vert",sd3386a2ef42e80b9:"T\xE9l\xE9charger",sd8d4b1b613d28990:"Cursive",sdb02f53e62c1da05:"D\xE9clench\xE9",sdb73788b3c975f16:"Automatique",se0955919920ee87d:"Jour",se0f67eae944f8f94:"Couper le son",se73c59cc10f48c12:"R\xE9seaux sociaux",secf3d3a7c1693e2d:"Bleu",sed31876562d94652:"Param\xE8tres des sous-titres",sf113fa256db9617b:"Termin\xE9(e)s",sf675f879b1c892c6:"Qualit\xE9",sfc24a457269b13d4:"Curseur de volume",sfcb817633bf70e1b:"Serif proportionnelle"},$Y=Object.freeze(Object.defineProperty({__proto__:null,templates:BR},Symbol.toStringTag,{value:"Module"})),VR={s0289cd9e4bcf84c5:"Livello volume",s061cc20e3432dead:"Sospendi",s0622a6e6cb77254b:"Trascrizione",s080d032fc1b87b3f:"Descrizione audio",s08b06007b5567108:"di",s08e6bd98452e6bb9:"Audio",s1b4a36fce2456660:"Famiglia di caratteri",s1fa5be5a4f5d0f04:"Informale",s23537b5c9e7af982:"Sottotitoli",s24221a89168e9d21:"Dimensioni carattere",s255857544a9d5ec0:"Reimposta",s25a858f0257e2879:"Menu Sottotitoli",s2df075aface0dab8:"Condividi",s2f5d5d2d1f92de26:"Scarica video",s302cbb19bf9a174a:"Disattiva",s308604b3ae13fbb5:"In riproduzione",s344ea8f4939cdc98:"Colore",s3687049d1af562c4:"Copia",s36b979e4de5152b3:"Collegamento copiato",s37a9e8aec5713460:"Altro",s3ca1bdfa8785f808:"Proportional Sans Serif",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Condividi questo video",s4b10acae683d2978:"Schermo intero",s500caa88d20458d3:"Non puoi accedere a questo contenuto",s5267658ceae3230f:"Condividi questo video",s5c5db15dfc3a5376:"Frequenza di riproduzione",s5e3cb80d43a34044:"Nero",s5e8250fb85d64c23:"Chiudi",s669b18c6d2d9c95b:"Nessuno",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Monospace Serif",s6baf78886c99db89:"Giallo",s6f59e9b81c5a47e0:"Ombreggiatura",s711d047dea682c1a:"Traccia audio",s7d148a08796094d2:"Errore di riproduzione",s81a19821f3e4a3d2:"Riproduci",s827bc70ebcb7bbc6:"Monospace Sans Serif",s85186a61e0d55bac:"Video",s889413eb7198ea01:"opzione per disattivare i sottotitoli",s8e408592fd4ae43a:"Stile bordo testo",s8e985aeeca6a8166:"Bianco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Maiuscoletto",s95bc8722b2708f8b:"In pausa",s973b83fb67a5865d:"Scarica trascrizione",s9b3c2f9cc32d565a:"Ciano",s9c356016f81585f6:"Colore di sfondo",s9d8b8aa2b404c2c8:"Impostazioni",s9fbd543f2179c1ec:"Menu Audio",sa000eaf7092088c3:"Indicatore di stato",sa6f2645578b2d2bc:"Anno",sa9011e79e3ca2d18:"Incassato",saf9b398ab363c174:"Immetti la tua data di nascita",sb3d4f79d9d8b71e5:"Invia",sb47daaf9e1c4a905:"Mese",sb9f16a5f9c29f41e:"Siamo spiacenti. Si \xE8 verificato un problema.",sba64d8954d027206:"Opacit\xE0",sc07837c309cc699b:"Attiva audio",scd105819b5a10243:"Riproduci",sce836928a17d96ed:"Colore testo",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Scarica",sd8d4b1b613d28990:"Corsivo",sdb02f53e62c1da05:"In rilievo",sdb73788b3c975f16:"Auto",se0955919920ee87d:"Giorno",se0f67eae944f8f94:"Disattiva audio",se73c59cc10f48c12:"Social",secf3d3a7c1693e2d:"Blu",sed31876562d94652:"Impostazioni sottotitolo",sf113fa256db9617b:"Completato",sf675f879b1c892c6:"Qualit\xE0",sfc24a457269b13d4:"Dispositivo di scorrimento volume",sfcb817633bf70e1b:"Proportional Serif"},zY=Object.freeze(Object.defineProperty({__proto__:null,templates:VR},Symbol.toStringTag,{value:"Module"})),$R={s0289cd9e4bcf84c5:"N\xEDvel de volume",s061cc20e3432dead:"Pausar",s0622a6e6cb77254b:"Transcri\xE7\xE3o",s080d032fc1b87b3f:"Descri\xE7\xE3o de \xE1udio",s08b06007b5567108:"de",s08e6bd98452e6bb9:"\xC1udio",s1b4a36fce2456660:"Fam\xEDlia de fontes",s1fa5be5a4f5d0f04:"Casual",s23537b5c9e7af982:"Legendas",s24221a89168e9d21:"Tamanho da fonte",s255857544a9d5ec0:"Redefinir",s25a858f0257e2879:"Menu Legendas",s2df075aface0dab8:"Compartilhar",s2f5d5d2d1f92de26:"Baixar o v\xEDdeo",s302cbb19bf9a174a:"Desligado",s308604b3ae13fbb5:"Reproduzindo",s344ea8f4939cdc98:"Cor",s3687049d1af562c4:"Copiar",s36b979e4de5152b3:"Link copiado",s37a9e8aec5713460:"Mais",s3ca1bdfa8785f808:"Sans Serif Proporcional",s49f06dca0feeb2f3:"Uniforme",s4b023aafbd8d5ac8:"Compartilhar este v\xEDdeo no",s4b10acae683d2978:"Tela inteira",s500caa88d20458d3:"Voc\xEA n\xE3o pode acessar este conte\xFAdo",s5267658ceae3230f:"Compartilhar este v\xEDdeo",s5c5db15dfc3a5376:"Taxa de reprodu\xE7\xE3o",s5e3cb80d43a34044:"Preto",s5e8250fb85d64c23:"Fechar",s669b18c6d2d9c95b:"Nenhum",s66d852e3c020e79e:"Opaco",s6a3bf589eaf72169:"Serifa monoespa\xE7ada",s6baf78886c99db89:"Amarelo",s6f59e9b81c5a47e0:"Sombra",s711d047dea682c1a:"Faixa de \xE1udio",s7d148a08796094d2:"Erro de reprodu\xE7\xE3o",s81a19821f3e4a3d2:"Repetir",s827bc70ebcb7bbc6:"Sans Serif Monoespa\xE7ado",s85186a61e0d55bac:"V\xEDdeo",s889413eb7198ea01:"op\xE7\xE3o para desativar a legenda",s8e408592fd4ae43a:"Estilo de borda de texto",s8e985aeeca6a8166:"Branco",s8eafb22ebdc7e668:"Magenta",s9559a51a63cbb5fd:"Letras min\xFAsculas",s95bc8722b2708f8b:"Pausado",s973b83fb67a5865d:"Baixar a transcri\xE7\xE3o",s9b3c2f9cc32d565a:"Ciano",s9c356016f81585f6:"Cor de fundo",s9d8b8aa2b404c2c8:"Configura\xE7\xF5es",s9fbd543f2179c1ec:"Menu \xC1udio",sa000eaf7092088c3:"Barra de progresso",sa6f2645578b2d2bc:"Ano",sa9011e79e3ca2d18:"Para baixo",saf9b398ab363c174:"Digite sua data de nascimento",sb3d4f79d9d8b71e5:"Enviar",sb47daaf9e1c4a905:"M\xEAs",sb9f16a5f9c29f41e:"Lamentamos, mas algo deu errado.",sba64d8954d027206:"Opacidade",sc07837c309cc699b:"Desativar mudo",scd105819b5a10243:"Jogar",sce836928a17d96ed:"Cor do texto",scf00d78fd5953f1c:"Verde",sd3386a2ef42e80b9:"Baixar",sd8d4b1b613d28990:"Cursiva",sdb02f53e62c1da05:"Para cima",sdb73788b3c975f16:"Autom\xE1tico",se0955919920ee87d:"Dia",se0f67eae944f8f94:"Ativar mudo",se73c59cc10f48c12:"Redes sociais",secf3d3a7c1693e2d:"Azul",sed31876562d94652:"Configura\xE7\xF5es de legenda",sf113fa256db9617b:"Finalizado",sf675f879b1c892c6:"Qualidade",sfc24a457269b13d4:"Controle deslizante de volume",sfcb817633bf70e1b:"Serifa proporcional"},HY=Object.freeze(Object.defineProperty({__proto__:null,templates:$R},Symbol.toStringTag,{value:"Module"})),zR={en:"en-us",es:"es-es",de:"de-de",fi:"fi-fi",fr:"fr-fr",hi:"hi-in",hu:"hu-hu",is:"is-is",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lt:"lt-lt",lv:"lv-lv",mk:"mk-mk",mt:"mt-mt",nb:"nb-no",nn:"nn-no",pl:"pl-pl",pt:"pt-pt",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sq:"sq-al",sv:"sv-se",ta:"ta-in",te:"te-in",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",uz:"uz-uz",vi:"vi-vn",zh:"zh-cn"};function RS(a){try{return new Intl.DisplayNames([a],{type:"language",fallback:"none"}).of(a)}catch{return}}const b1=a=>{const s=new Map,c=a.map(f=>{const[d,v]=f.split("-");let y=RS(d),g=null;if(!y)y=f;else if(v){const I=RS(f);I&&I!==y&&(g=I)}else{const I=zR[d.toLowerCase()];if(I){const D=RS(I);D&&D!==y&&(g=D)}}let C=s.get(y);C||(C=[],s.set(y,C));const E={code:f,fallbackName:g,selectedName:y};return C.push(E),E});for(const[f,d]of s)if(d.length>1&&new Set(d.map(v=>v.fallbackName)).size>1)for(const v of d)v.selectedName=v.fallbackName||f;return Object.fromEntries(c.map(f=>[f.code,f.selectedName]))},w1=a=>{if(a)return a=a.toLowerCase(),UY.includes(a)?a:zR[a.split("-")[0]]},qY=new Set(["??-??-????????","???-????-??","??-????-??","???-????","??-????","???-??","??-??","???","??"]),GY=Array.from(qY).map(a=>`(?:${a.replace(/\?/g,"[a-zA-Z]")})`).join("|");function KY(){const a=new RegExp(`^https?://[^/]+/(${GY})/[^/]+.*`),s=window.location.href.match(a);return s&&w1(s[1])||null}const NS=new Map,HR={"es-es":{templates:UR},"pt-br":{templates:$R},"en-gb":{templates:jR},"fr-fr":{templates:BR},"es-mx":{templates:FR},"it-it":{templates:VR}};let qR=a=>NY(Object.assign({"../generated/locales/af-za.ts":()=>import("./chunks/af-za-ixl2wg25.mjs"),"../generated/locales/am-et.ts":()=>import("./chunks/am-et-f18276sz.mjs"),"../generated/locales/ar-sa.ts":()=>import("./chunks/ar-sa-ea6j9pts.mjs"),"../generated/locales/as-in.ts":()=>import("./chunks/as-in-e6x2exf8.mjs"),"../generated/locales/be-by.ts":()=>import("./chunks/be-by-bu06xfze.mjs"),"../generated/locales/bg-bg.ts":()=>import("./chunks/bg-bg-hnn2i45x.mjs"),"../generated/locales/bn-in.ts":()=>import("./chunks/bn-in-jfpzw5mj.mjs"),"../generated/locales/ca-es.ts":()=>import("./chunks/ca-es-ood0szkj.mjs"),"../generated/locales/cs-cz.ts":()=>import("./chunks/cs-cz-f6ra6ozr.mjs"),"../generated/locales/cy-gb.ts":()=>import("./chunks/cy-gb-gcfc3toi.mjs"),"../generated/locales/da-dk.ts":()=>import("./chunks/da-dk-ouft1qb5.mjs"),"../generated/locales/de-at.ts":()=>import("./chunks/de-at-ceegp3ro.mjs"),"../generated/locales/de-ch.ts":()=>import("./chunks/de-ch-nrq4g66c.mjs"),"../generated/locales/de-de.ts":()=>import("./chunks/de-de-i4mdhbb4.mjs"),"../generated/locales/el-gr.ts":()=>import("./chunks/el-gr-ghpky4be.mjs"),"../generated/locales/en-au.ts":()=>import("./chunks/en-au-b8j0ipdh.mjs"),"../generated/locales/en-ca.ts":()=>import("./chunks/en-ca-mhsqk44y.mjs"),"../generated/locales/en-gb.ts":()=>Promise.resolve().then(()=>FY),"../generated/locales/en-hk.ts":()=>import("./chunks/en-hk-l2g6wy0a.mjs"),"../generated/locales/en-ie.ts":()=>import("./chunks/en-ie-b8j0ipdh.mjs"),"../generated/locales/en-in.ts":()=>import("./chunks/en-in-l2g6wy0a.mjs"),"../generated/locales/en-my.ts":()=>import("./chunks/en-my-l2g6wy0a.mjs"),"../generated/locales/en-nz.ts":()=>import("./chunks/en-nz-l2g6wy0a.mjs"),"../generated/locales/en-ph.ts":()=>import("./chunks/en-ph-l2g6wy0a.mjs"),"../generated/locales/en-sg.ts":()=>import("./chunks/en-sg-l2g6wy0a.mjs"),"../generated/locales/en-za.ts":()=>import("./chunks/en-za-b8j0ipdh.mjs"),"../generated/locales/es-ar.ts":()=>import("./chunks/es-ar-m7ioz3my.mjs"),"../generated/locales/es-cl.ts":()=>import("./chunks/es-cl-m7ioz3my.mjs"),"../generated/locales/es-co.ts":()=>import("./chunks/es-co-m7ioz3my.mjs"),"../generated/locales/es-es.ts":()=>Promise.resolve().then(()=>BY),"../generated/locales/es-mx.ts":()=>Promise.resolve().then(()=>VY),"../generated/locales/et-ee.ts":()=>import("./chunks/et-ee-gbwem6dj.mjs"),"../generated/locales/eu-es.ts":()=>import("./chunks/eu-es-5rvohe1h.mjs"),"../generated/locales/fa-ir.ts":()=>import("./chunks/fa-ir-ggbh58b2.mjs"),"../generated/locales/fi-fi.ts":()=>import("./chunks/fi-fi-o9mahiu2.mjs"),"../generated/locales/fr-be.ts":()=>import("./chunks/fr-be-ntfxengq.mjs"),"../generated/locales/fr-ca.ts":()=>import("./chunks/fr-ca-kepykyyb.mjs"),"../generated/locales/fr-ch.ts":()=>import("./chunks/fr-ch-ibidugur.mjs"),"../generated/locales/fr-fr.ts":()=>Promise.resolve().then(()=>$Y),"../generated/locales/fr-ma.ts":()=>import("./chunks/fr-ma-o4bbmbrv.mjs"),"../generated/locales/ga-ie.ts":()=>import("./chunks/ga-ie-dsbk1hdh.mjs"),"../generated/locales/gd-gb.ts":()=>import("./chunks/gd-gb-p5176ptt.mjs"),"../generated/locales/gl-es.ts":()=>import("./chunks/gl-es-g0vb8grd.mjs"),"../generated/locales/gu-in.ts":()=>import("./chunks/gu-in-eebpahey.mjs"),"../generated/locales/he-il.ts":()=>import("./chunks/he-il-myz8r1by.mjs"),"../generated/locales/hi-in.ts":()=>import("./chunks/hi-in-ix8pc849.mjs"),"../generated/locales/hr-hr.ts":()=>import("./chunks/hr-hr-gidaiu8p.mjs"),"../generated/locales/hu-hu.ts":()=>import("./chunks/hu-hu-eco9d76j.mjs"),"../generated/locales/hy-am.ts":()=>import("./chunks/hy-am-nim17b8l.mjs"),"../generated/locales/id-id.ts":()=>import("./chunks/id-id-ig5r2k54.mjs"),"../generated/locales/is-is.ts":()=>import("./chunks/is-is-lefctcbo.mjs"),"../generated/locales/it-it.ts":()=>Promise.resolve().then(()=>zY),"../generated/locales/ja-jp.ts":()=>import("./chunks/ja-jp-l0v2ypsl.mjs"),"../generated/locales/ka-ge.ts":()=>import("./chunks/ka-ge-d3prdyok.mjs"),"../generated/locales/kk-kz.ts":()=>import("./chunks/kk-kz-le5gf5kf.mjs"),"../generated/locales/kn-in.ts":()=>import("./chunks/kn-in-d0h6out0.mjs"),"../generated/locales/ko-kr.ts":()=>import("./chunks/ko-kr-oopl3hze.mjs"),"../generated/locales/ky-kg.ts":()=>import("./chunks/ky-kg-etlfkge4.mjs"),"../generated/locales/lb-lu.ts":()=>import("./chunks/lb-lu-bgq1kl88.mjs"),"../generated/locales/lo-la.ts":()=>import("./chunks/lo-la-hj4k99zi.mjs"),"../generated/locales/lt-lt.ts":()=>import("./chunks/lt-lt-luc325lx.mjs"),"../generated/locales/lv-lv.ts":()=>import("./chunks/lv-lv-lrio1ftx.mjs"),"../generated/locales/mi-nz.ts":()=>import("./chunks/mi-nz-ga73uumg.mjs"),"../generated/locales/mk-mk.ts":()=>import("./chunks/mk-mk-nem4p3mz.mjs"),"../generated/locales/ml-in.ts":()=>import("./chunks/ml-in-p8ny4f2j.mjs"),"../generated/locales/mr-in.ts":()=>import("./chunks/mr-in-lwtpac3u.mjs"),"../generated/locales/ms-bn.ts":()=>import("./chunks/ms-bn-k6nsdxk0.mjs"),"../generated/locales/ms-my.ts":()=>import("./chunks/ms-my-garoesp4.mjs"),"../generated/locales/mt-mt.ts":()=>import("./chunks/mt-mt-e4uv9ros.mjs"),"../generated/locales/nb-no.ts":()=>import("./chunks/nb-no-kxu5p51g.mjs"),"../generated/locales/ne-np.ts":()=>import("./chunks/ne-np-mgjw08gl.mjs"),"../generated/locales/nl-be.ts":()=>import("./chunks/nl-be-o1igpm94.mjs"),"../generated/locales/nl-nl.ts":()=>import("./chunks/nl-nl-g5scdy2t.mjs"),"../generated/locales/nn-no.ts":()=>import("./chunks/nn-no-hn6o1g7h.mjs"),"../generated/locales/or-in.ts":()=>import("./chunks/or-in-n2elk53p.mjs"),"../generated/locales/pa-in.ts":()=>import("./chunks/pa-in-cu6865fk.mjs"),"../generated/locales/pl-pl.ts":()=>import("./chunks/pl-pl-l81ocd5n.mjs"),"../generated/locales/ps-af.ts":()=>import("./chunks/ps-af-lv949dal.mjs"),"../generated/locales/pt-br.ts":()=>Promise.resolve().then(()=>HY),"../generated/locales/pt-pt.ts":()=>import("./chunks/pt-pt-jnt8hawj.mjs"),"../generated/locales/ro-ro.ts":()=>import("./chunks/ro-ro-ccol19en.mjs"),"../generated/locales/ru-ru.ts":()=>import("./chunks/ru-ru-eh7zf8tg.mjs"),"../generated/locales/si-lk.ts":()=>import("./chunks/si-lk-h9ad9058.mjs"),"../generated/locales/sk-sk.ts":()=>import("./chunks/sk-sk-m1jztb16.mjs"),"../generated/locales/sl-si.ts":()=>import("./chunks/sl-si-koqioh37.mjs"),"../generated/locales/sq-al.ts":()=>import("./chunks/sq-al-nzj00g5t.mjs"),"../generated/locales/sv-se.ts":()=>import("./chunks/sv-se-bw5cj65t.mjs"),"../generated/locales/sw-ke.ts":()=>import("./chunks/sw-ke-gtvztbrk.mjs"),"../generated/locales/ta-in.ts":()=>import("./chunks/ta-in-bwuizzqe.mjs"),"../generated/locales/te-in.ts":()=>import("./chunks/te-in-iu20fasc.mjs"),"../generated/locales/tg-tj.ts":()=>import("./chunks/tg-tj-j6uadteo.mjs"),"../generated/locales/th-th.ts":()=>import("./chunks/th-th-bdw4g6t5.mjs"),"../generated/locales/ti-et.ts":()=>import("./chunks/ti-et-l8jw4krw.mjs"),"../generated/locales/tk-tm.ts":()=>import("./chunks/tk-tm-mn7x5jxx.mjs"),"../generated/locales/tr-tr.ts":()=>import("./chunks/tr-tr-mqqp2dfn.mjs"),"../generated/locales/tt-ru.ts":()=>import("./chunks/tt-ru-hdruk2c8.mjs"),"../generated/locales/ug-cn.ts":()=>import("./chunks/ug-cn-jwk6dtwn.mjs"),"../generated/locales/uk-ua.ts":()=>import("./chunks/uk-ua-gbnmne9j.mjs"),"../generated/locales/ur-in.ts":()=>import("./chunks/ur-in-n4074pn5.mjs"),"../generated/locales/ur-pk.ts":()=>import("./chunks/ur-pk-n4074pn5.mjs"),"../generated/locales/uz-uz.ts":()=>import("./chunks/uz-uz-gi9gsaxu.mjs"),"../generated/locales/vi-vn.ts":()=>import("./chunks/vi-vn-molc9qeu.mjs"),"../generated/locales/wo-sn.ts":()=>import("./chunks/wo-sn-lsuzp9jp.mjs"),"../generated/locales/xh-za.ts":()=>import("./chunks/xh-za-kmwuquo5.mjs"),"../generated/locales/yo-ng.ts":()=>import("./chunks/yo-ng-lu15tgfy.mjs"),"../generated/locales/zh-cn.ts":()=>import("./chunks/zh-cn-gvaege75.mjs"),"../generated/locales/zh-hk.ts":()=>import("./chunks/zh-hk-jb0jt0k3.mjs"),"../generated/locales/zh-tw.ts":()=>import("./chunks/zh-tw-m1so7y8j.mjs"),"../generated/locales/zu-za.ts":()=>import("./chunks/zu-za-kwmv9pdq.mjs")}),`../generated/locales/${a}.ts`,4);function WY(a){let s=NS.get(a);return s||(HR[a]?s=Promise.resolve(HR[a]):s=qR(a),NS.set(a,s)),s}const{getLocale:XY,setLocale:YY}=AX({sourceLocale:OY,targetLocales:jY,loadLocale:WY}),JY=a=>{const s=w1(a),c=w1(document.documentElement.lang),f=KY(),d=w1(ES.language)||ES.language;return s||c||f||d};function QY(a,s){NS.set(a,Promise.resolve(s))}function ZY(a){qR=a}function x1(a){const s=Math.floor(a/3600),c=Math.floor(a%3600/60),f=Math.floor(a%60),d=s>0?`${s}:`:"",v=`${c.toString().padStart(s>0?2:1,"0")}:`,y=f.toString().padStart(2,"0");return`${d}${v}${y}`}const GR=new Map;function eJ(a){let s=GR.get(a);return s||(s={hour:new Intl.NumberFormat(a,{style:"unit",unit:"hour",unitDisplay:"long"}),minute:new Intl.NumberFormat(a,{style:"unit",unit:"minute",unitDisplay:"long"}),second:new Intl.NumberFormat(a,{style:"unit",unit:"second",unitDisplay:"long"})},GR.set(a,s)),s}function KR(a,s){const c=eJ(s);if(Math.floor(a)===0)return c.second.format(0);const f=Math.floor(a/3600),d=Math.floor(a%3600/60),v=Math.floor(a%60),y=[];return f>0&&y.push(c.hour.format(f)),d>0&&y.push(c.minute.format(d)),v>0&&y.push(c.second.format(v)),y.join(", ")}const tJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M7.03 13.9 3.56 10a.75.75 0 0 0-1.12 1l4 4.5c.29.32.79.34 1.09.03l10.5-10.5a.75.75 0 0 0-1.06-1.06z"/></svg>',nJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07z"/></svg>',rJ='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path d="M12.25 3a.75.75 0 1 1 0 1.5h-5A2.75 2.75 0 0 0 4.5 7.25v13.5a2.75 2.75 0 0 0 2.75 2.75h13.5a2.75 2.75 0 0 0 2.75-2.75v-5a.75.75 0 0 1 1.5 0v5C25 23.1 23.1 25 20.75 25H7.25A4.25 4.25 0 0 1 3 20.75V7.25C3 4.9 4.9 3 7.25 3zm5.18-.93a.8.8 0 0 1 .8.1l8.24 6.75a.75.75 0 0 1 .04 1.13l-8.25 7.75a.75.75 0 0 1-1.26-.55v-3.74a10 10 0 0 0-3.85.8c-1.59.7-3.35 2.02-5.16 4.58l-.37.53A.75.75 0 0 1 6.25 19c0-4.4 1.34-7.56 3.51-9.6A11.2 11.2 0 0 1 17 6.51V2.75c0-.29.17-.55.43-.68m1.07 5.18c0 .41-.34.75-.75.75-2.66 0-5.15.77-6.96 2.48-1.41 1.34-2.47 3.3-2.87 6.05a13 13 0 0 1 4.62-3.6c2-.87 3.8-.93 5.21-.93a.75.75 0 0 1 .75.75v2.77l6.36-5.98-6.36-5.2z"/></svg>',k1=kn`
.dialog{background-color:var(--color-brand-30);color:var(--color-neutral-foreground-1);border-radius:var(--border-radius-x-large);border:solid var(--stroke-width-thin) var(--color-white-alpha-30);box-shadow:var(--shadow-8)}
`;var iJ=Object.defineProperty,aJ=Object.getOwnPropertyDescriptor,OS=(a,s,c,f)=>{for(var d=f>1?void 0:f?aJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&iJ(s,c,d),d};let Mg=class extends xn{render(){const{shareOptions:a}=this.playerState,s=a.find(f=>f.id==="copy"),c=a.filter(f=>f.id!=="copy");return xt`
      <dialog
        data-focusgroup
        @click=${this.onClick}
        @keydown=${this.onKeyDown}
        @close=${this.onClose}
        @cancel=${this.onCancel}
      >
        <div class="dialog-backdrop"></div>
        <div class="dialog" role="dialog" aria-label="${ue("Share")}">
          <div class="share-icon" aria-hidden="true">
            ${sn(rJ)}
          </div>

          <button
            type="button"
            class=${st({btn:!0,"btn-sm":!0,"btn-subtle":!0,"btn-icon-only":!0,"btn-close":!0,...ht(this.playerState)})}
            @click=${this.requestClose}
            aria-label=${ue("Close")}
            data-id="close-button"
            data-testid="share-dialog-close-button"
          >
            ${sn(nJ)}
          </button>

          <div class="dialog-content">
            <h2>${ue("Share this video")}</h2>

            ${s?xt`
                  <div role="group" aria-labelledby="share-link-section-title">
                    <span id="share-link-section-title" class="section-title"
                      >Link</span
                    >
                    <div class="input">
                      <input
                        type="text"
                        readonly
                        value="${s.url}"
                        title="${s.url}"
                        aria-labelledby="share-link-section-title"
                      />

                      <button
                        type="button"
                        class=${st({btn:!0,"btn-outline":!0,"btn-copy":!0,...ht(this.playerState)})}
                        @click=${this.onCopyButtonClicked(s.url)}
                        data-testid="copy-share-url-button"
                        aria-label="${ue("Copy")}"
                        aria-describedby="share-link-section-title"
                      >
                        ${ue("Copy")}
                      </button>
                    </div>
                  </div>
                `:null}

            <div role="group" aria-labelledby="share-social-section-title">
              <span id="share-social-section-title" class="section-title"
                >${ue("Social")}</span
              >
              <div class="share-dialog-icons">
                ${c.map(f=>xt`
                    <a
                      href=${f.url}
                      class=${st({btn:!0,tooltip:!0,"btn-subtle":!0,"btn-icon-only":!0,"btn-social":!0,...ht(this.playerState)})}
                      target="_blank"
                      aria-label="${ue("Share this video on")} ${f.id}"
                      aria-describedby="share-social-section-title"
                      data-tooltip="${ue("Share this video on")} ${f.id}"
                      data-testid="share-social-${f.id}"
                    >
                      ${sn(f.icon)}
                    </a>
                  `)}
              </div>
            </div>
          </div>
        </div>
      </dialog>
    `}disconnectedCallback(){super.disconnectedCallback(),this.copyTimeoutId&&clearTimeout(this.copyTimeoutId)}firstUpdated(a){super.firstUpdated(a)}show(){this.dialog.open||this.dialog.showModal()}get opened(){return this.dialog.open}onCopyButtonClicked(a){return async s=>{try{const c=s.target;await navigator.clipboard.writeText(a),c.ariaLabel=ue("Link Copied"),c.innerHTML=tJ,this.copyTimeoutId&&clearTimeout(this.copyTimeoutId),this.copyTimeoutId=setTimeout(()=>{c.ariaLabel=ue("Copy"),c.innerText=ue("Copy")},3e3)}catch(c){console.log("error copying text",c)}}}onClick(a){a.target===this.dialog&&this.requestClose()}onKeyDown(a){var s,c;if(this.playerState.disableKeyboardEvents&&a.key==="Escape"&&a.preventDefault(),a.key==="Tab"){const f=this.dialog.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(f.length===0)return;const d=f[0],v=f[f.length-1];a.shiftKey?((s=this.shadowRoot)==null?void 0:s.activeElement)===d&&(a.preventDefault(),v.focus()):((c=this.shadowRoot)==null?void 0:c.activeElement)===v&&(a.preventDefault(),d.focus())}}onCancel(a){this.playerState.disableKeyboardEvents&&a.preventDefault()}requestClose(){this.dialog.open&&this.dialog.close()}onClose(){this.dispatchEvent(new Mt("share-dialog-closed"))}};Mg.styles=[k1,us,cc,kn`
dialog{border:none;display:none;position:absolute;inset:0;align-items:center;justify-content:center;width:100%;height:100%;background-color:transparent;max-width:100%;max-height:100%;box-sizing:border-box;text-align:left;overflow:auto}dialog[open]{display:flex}.dialog{padding:var(--spacing-xxl) var(--size-0) var(--spacing-xxl) var(--spacing-xxxl);gap:var(--spacing-xxl);z-index:10;margin:var(--spacing-xxl);position:relative;font-family:var(--controls-font-family);color:var(--color-neutral-foreground-1);max-height:calc(100% - var(--spacing-xxl) * 2);overflow-y:auto}.dialog-backdrop{position:absolute;inset:0;background-color:var(--color-black-alpha-50);pointer-events:none}.share-icon{stroke:currentcolor;fill:currentcolor}.btn-close{position:absolute;right:var(--spacing-xl);top:var(--spacing-xl)}.btn-close:hover{background-color:transparent}.dialog-content{display:flex;flex-direction:column;gap:var(--spacing-xxl);margin-right:var(--spacing-xxxl)}h2{margin-top:0;margin-bottom:var(--spacing-s);flex-grow:1}.section-title{display:block;margin-bottom:var(--spacing-m);font-weight:var(--font-weight-semibold)}.input{display:flex;align-items:center;flex-wrap:wrap;border-radius:var(--border-radius-medium);border:solid var(--stroke-width-thin) var(--color-neutral-stroke-1);padding:var(--spacing-s) var(--spacing-m);border-color:var(--color-grey-86);gap:var(--spacing-m)}.input input{background-color:transparent;border:none;outline:none;margin:0;padding:0;font-family:var(--controls-font-family);font-size:var(--font-size-base-400);flex-grow:1;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;opacity:0.8;color:var(--color-neutral-foreground-1);letter-spacing:inherit;word-spacing:inherit;line-height:inherit}.input .btn-copy{color:var(--color-white-alpha-70);font-weight:var(--font-weight-normal);flex-shrink:0;flex-basis:0;border-color:var(--color-brand-150);border-width:var(--stroke-width-thick);border-radius:var(--border-radius-x-large);padding:var(--spacing-xxs) var(--spacing-s)}.share-dialog-icons{display:flex;align-items:center;flex-wrap:wrap;gap:var(--spacing-m)}.btn-social{background-color:var(--color-brand-140)}.btn-social svg{width:var(--size-6);height:var(--size-6);fill:var(--color-brand-40)}.btn-social:hover{background-color:var(--color-brand-150)}.btn-social:active{background-color:var(--color-brand-130)}@media (forced-colors:active){.btn-close:hover{background-color:Highlight;color:HighlightText}.btn-copy:hover{border-color:Highlight;color:HighlightText;forced-color-adjust:none}.btn-social svg{fill:ButtonText}.btn-social:hover{background-color:Highlight;border-color:Highlight}.btn-social:hover svg{fill:HighlightText}}
`],OS([Tn("dialog")],Mg.prototype,"dialog",2),OS([Rr({context:Nr,subscribe:!0})],Mg.prototype,"playerState",2),Mg=OS([Yn("ump-share-dialog")],Mg);var oJ=Object.defineProperty,sJ=Object.getOwnPropertyDescriptor,ju=(a,s,c,f)=>{for(var d=f>1?void 0:f?sJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&oJ(s,c,d),d};let Or=class extends xn{constructor(){super(...arguments),this.onSeekbarPointerDown=()=>{this.dispatchEvent(new Mt("seekbar-pointer-down"))},this.onSeekbarPointerMove=a=>{const s=a.target,c=CS(a.offsetX/s.clientWidth,0,1);s.dataset.tooltip=x1(this.playerState.duration*c),s.style.setProperty("--tooltip-pointer-x",`${a.offsetX}px`)},this.onSeekbarPointerUp=()=>{this.dispatchEvent(new Mt("seekbar-pointer-up"))}}render(){const a=XY();return xt`<div
        class="lower-controls-area"
        @focusin=${this.onFocusIn}
        ?inert=${this.playerState.shareDialogOpened}
      >
        <ump-slider
          class="seekbar slider tooltip"
          dir="ltr"
          @pointerdown=${this.onSeekbarPointerDown}
          @pointermove=${this.onSeekbarPointerMove}
          @pointerup=${this.onSeekbarPointerUp}
          @input=${this.onSeekbarSliderChanged}
          sliderarialabel="${ue("Progress Bar")}"
          sliderAriaValueText="${KR(this.playerState.currentTime,a)} ${ue("of")} ${KR(this.playerState.duration,a)}"
          value=${this.playerState.currentTime}
          min="0"
          max=${this.playerState.duration}
          focusStep=${1}
          data-testid="seekbar-slider"
          .ranges=${this.playerState.buffered}
        ></ump-slider>

        <div class="buttons">
          <button
            type="button"
            class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-top":!0,"tooltip-left":this.playerState.dir==="ltr","tooltip-right":this.playerState.dir==="rtl"})}
            data-tooltip="${this.playerState.ended?ue("Replay"):this.playerState.paused?ue("Play"):ue("Pause")}"
            aria-label="${this.playerState.ended?ue("Replay"):this.playerState.paused?ue("Play"):ue("Pause")}"
            id="play-button"
            data-testid="play-button"
            @click=${this.onPlayClicked}
          >
            ${this.playerState.ended?sn(IY):this.playerState.paused?sn(DY):sn(_Y)}
          </button>

          <div
            data-identifier="volume-container"
            class="volume-container"
            @focusin=${this.onVolumeContainerFocusIn}
            @focusout=${this.onVolumeContainerFocusOut}
            @pointerleave=${this.onVolumeContainerPointerLeave}
          >
            <button
              type="button"
              class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0})}
              aria-label=${this.playerState.muted?ue("Unmute"):ue("Mute")}
              data-testid="volume-button"
              @click=${this.onVolumeClicked}
            >
              ${this.playerState.muted?sn(RY):sn(LY)}
            </button>

            ${this.playerState.showVolumeSlider?xt`
                  <div class="volume-menu">
                    <div class="volume-menu-slider-container">
                      <ump-slider
                        class="volume-slider"
                        style="--ump-slide-percentage: ${this.playerState.volume*Or.VOLUME_SCALER}%;"
                        orientation="vertical"
                        sliderarialabel="${ue("Volume Level")}"
                        aria-label=${ue("Volume Slider")}
                        min="0"
                        max="100"
                        focusStep=${1}
                        sliderAriaValueText="${(this.playerState.volume*Or.VOLUME_SCALER).toFixed()+"%"}"
                        value=${this.playerState.volume*Or.VOLUME_SCALER}
                        @click=${this.onVolumeSliderClicked}
                        @input=${this.onVolumeSliderChanged}
                        @pointerup=${this.onVolumeSliderPointerUp}
                      ></ump-slider>
                      <div
                        data-tooltip=${(this.playerState.volume*Or.VOLUME_SCALER).toFixed()+"%"}
                        style="--ump-slide-percentage: ${this.playerState.volume*Or.VOLUME_SCALER}%;"
                        class="volume-tooltip tooltip tooltip-visible"
                      ></div>
                    </div>
                    <div class="volume-menu-spacer"></div>
                  </div>
                `:null}
          </div>

          <div
            class=${st({time:!0,"time-right":this.playerState.dir==="rtl"})}
            data-testid="time"
          >
            ${x1(this.playerState.currentTime)} /
            ${x1(this.playerState.duration)}
          </div>

          <ump-more-menu
            @share-clicked=${this.onShareClicked}
            id="more-menu"
          ></ump-more-menu>

          <ump-audio-menu></ump-audio-menu>

          <ump-caption-menu></ump-caption-menu>

          <ump-settings-menu></ump-settings-menu>

          <button
            type="button"
            class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-top":!0,"tooltip-left":this.playerState.dir==="rtl","tooltip-right":this.playerState.dir==="ltr"})}
            data-tooltip=${ue("Fullscreen")}
            aria-label=${ue("Fullscreen")}
            data-testid="fullscreen-button"
            @click=${this.onFullScreenClicked}
          >
            ${this.playerState.fullscreen?sn(PY):sn(MY)}
          </button>
        </div>
      </div>

      <ump-share-dialog></ump-share-dialog>`}get hasOpenControl(){return[this.audioMenu,this.captionMenu,this.settingsMenu,this.moreMenu,this.shareDialog].some(a=>a.opened)}onShareClicked(){this.shareDialog.show(),this.dispatchEvent(new Mt("share-button-clicked"))}onVolumeClicked(){this.dispatchEvent(new Mt("volume-button-clicked"))}onPlayClicked(){this.dispatchEvent(new Mt("play-button-clicked"))}onVolumeSliderChanged(a){const s=a.target;this.dispatchEvent(new Mt("volume-updated",s.value/Or.VOLUME_SCALER))}onVolumeSliderPointerUp(a){const s=a.target;this.dispatchEvent(new Mt("volume-drag-released",s.value/Or.VOLUME_SCALER))}onVolumeContainerFocusIn(){this.volumeContainer.classList.add("focused")}onVolumeContainerFocusOut(){this.volumeContainer.classList.remove("focused")}onVolumeContainerPointerLeave(){this.volumeContainer.classList.remove("focused")}onVolumeSliderClicked(a){a.stopPropagation()}onSeekbarSliderChanged(a){const s=a.target;this.updateSeekbarTooltip(s),this.dispatchEvent(new Mt("seekbar-updated",s.value))}onFullScreenClicked(){this.dispatchEvent(new Mt("fullscreen-button-clicked"))}onFocusIn(){this.dispatchEvent(new Mt("control-bar-focus-change"))}updateSeekbarTooltip(a){const s=this.playerState.duration,c=s>0?CS(a.value/s,0,1):0,f=x1(a.value),d=`${(c*100).toFixed(2)}%`;a.dataset.tooltip!==f&&(a.dataset.tooltip=f),a.style.getPropertyValue("--tooltip-pointer-x")!==d&&a.style.setProperty("--tooltip-pointer-x",d)}};Or.VOLUME_SCALER=100,Or.styles=[us,cc,kn`
:host{--ump-lower-controls-height:var(--size-28)}*{box-sizing:border-box;margin:0;padding:0}.controls{position:absolute;inset:0;opacity:1;visibility:visible}.controls.hidden{opacity:0;transition:opacity 1s ease-out;cursor:none}.lower-controls-area{position:absolute;bottom:0;width:100%;background:var(--color-black-alpha-70);background:linear-gradient(0deg,var(--color-black-alpha-80) 0%,var(--color-black-alpha-80) 40%,transparent 100%);min-height:var(--ump-lower-controls-height);display:flex;flex-direction:column;justify-content:flex-end;padding:var(--spacing-s) var(--spacing-m)}.buttons{display:flex;align-items:center;flex-wrap:wrap;gap:var(--spacing-xs);width:100%;z-index:10}.buttons .btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}.time{color:var(--color-neutral-foreground-2);flex-grow:1;-webkit-user-select:none;user-select:none;text-align:left}.time-right{text-align:right}.volume-menu{box-sizing:border-box;position:absolute;left:50%;bottom:100%;transform:translateX(-50%);z-index:100;opacity:0;transition:opacity var(--duration-faster) var(--curve-easy-ease);pointer-events:none;width:100%}.volume-container{position:relative}.volume-container:hover .volume-menu,.volume-container:focus .volume-menu,.volume-container:focus-visible .volume-menu,.volume-container.focused .volume-menu{display:block;opacity:1;pointer-events:auto}.seekbar{width:100%;height:var(--size-5)}.seekbar.slider.tooltip{--tooltip-gap:var(--spacing-s);--tooltip-width:var(--size-6);--tooltip-pointer-x:0px;--tooltip-left:clamp(calc(var(--tooltip-width) / 2),var(--tooltip-pointer-x),calc(100% - var(--tooltip-width) / 2));text-align:center}.seekbar.slider.tooltip:focus-within::before{display:block}.volume-menu-slider-container{z-index:100;background-color:var(--color-grey-10-alpha-90);border-radius:var(--border-radius-large);height:var(--size-28);display:flex;justify-content:center;padding:var(--spacing-s) 0;position:relative}.volume-slider{width:var(--size-6);outline:border 1px orange}.volume-tooltip{position:absolute !important;width:100%;inset:0;margin-top:var(--size-5);margin-bottom:var(--size-5)}.volume-tooltip::before{--tooltip-top:auto;--tooltip-left:100%;--tooltip-right:auto;--tooltip-translate-x:10%;--tooltip-translate-y:50%;--tooltip-bottom:var(--ump-slide-percentage);--tooltip-width:var(--size-7);margin-left:var(--spacing-xs);text-align:center}.volume-menu-spacer{height:var(--size-8);width:100%}@container universalmediaplayer (max-width:450px){.lower-controls-area{padding:var(--spacing-xs) var(--spacing-s)}.buttons{justify-content:center}.time{flex-grow:0}}@media (forced-colors:active){.time{color:ButtonText}.buttons{--stroke-width-focus:var(--stroke-width-high-contrast)}}
`],ju([Tn("ump-more-menu")],Or.prototype,"moreMenu",2),ju([Tn("ump-audio-menu")],Or.prototype,"audioMenu",2),ju([Tn("ump-caption-menu")],Or.prototype,"captionMenu",2),ju([Tn("ump-settings-menu")],Or.prototype,"settingsMenu",2),ju([Tn("ump-share-dialog")],Or.prototype,"shareDialog",2),ju([Tn(".volume-container")],Or.prototype,"volumeContainer",2),ju([Rr({context:Nr,subscribe:!0})],Or.prototype,"playerState",2),Or=ju([gS(),Yn("ump-control-bar")],Or);const WR="menu",uJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M3.37 10.17a.5.5 0 0 0-.74.66l4 4.5c.19.22.52.23.72.02l10.5-10.5a.5.5 0 0 0-.7-.7L7.02 14.27z"/></svg>';var lJ=Object.defineProperty,cJ=Object.getOwnPropertyDescriptor,Uu=(a,s,c,f)=>{for(var d=f>1?void 0:f?cJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&lJ(s,c,d),d};let ba=class extends xn{constructor(){super(...arguments),this.type="normal",this.checked=!1,this.submenu=null,this.focusable=!0,this.isFocused=!1,this.onFocusIn=()=>{this.isFocused=!0},this.onFocusOut=()=>{this.isFocused=!1},this.onClick=a=>{if(!a.bubbles){const s=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});a.stopPropagation(),a.preventDefault(),this.dispatchEvent(s)}}}get tabindex(){var a;return this.focusable&&((a=this.playerState)!=null&&a.disableKeyboardEvents||this.isFocused)?0:-1}render(){return xt`
      <div
        class=${st({"menu-item":!0,"menu-item-checked":this.checked,"menu-item-radio":this.type==="radio","menu-item-has-submenu":!!this.submenu&&!this.isBackButton(),"menu-item-back-button":this.isBackButton()})}
      >
        <div class="menu-item-check-mark" aria-hidden="true">
          ${sn(uJ)}
        </div>

        <div class="menu-item-chevron-left" aria-hidden="true">
          ${this.playerState.dir==="ltr"?sn(_S):sn(DS)}
        </div>

        <slot name="prefix"></slot>

        <slot></slot>

        <slot name="suffix"></slot>

        <div class="menu-item-chevron" aria-hidden="true">
          ${this.playerState.dir==="ltr"?sn(DS):sn(_S)}
        </div>
      </div>
    `}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.addEventListener("click",this.onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut),this.removeEventListener("click",this.onClick)}isBackButton(){return this.submenu===_i}updated(a){(a.has("type")||a.has("checked"))&&this.updateAriaAttributes(),a.has("isFocused")&&this.requestUpdate("tabindex")}updateAriaAttributes(){this.setAttribute("role",this.type==="radio"?"menuitemradio":"menuitem"),this.type==="radio"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}static isMenuItem(a){return a instanceof HTMLElement&&a.tagName.toLowerCase()==="ump-menu-item"}};ba.styles=[kn`
.menu-item{display:flex;align-items:center;justify-content:flex-start;gap:var(--spacing-s);margin:0;box-sizing:border-box;padding:var(--spacing-s) var(--spacing-xs);border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-regular);line-height:var(--line-height-base-300);transition-duration:var(--duration-faster);transition-property:background,color;transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;background-color:transparent}.menu-item-check-mark{stroke:currentcolor;justify-content:center;align-items:center;display:none;visibility:hidden}.menu-item-radio .menu-item-check-mark{display:flex}.menu-item-checked .menu-item-check-mark{visibility:visible}.menu-item-chevron{stroke:currentcolor;display:none;justify-content:center;align-items:center}.menu-item-has-submenu .menu-item-chevron{display:flex}.menu-item-chevron-left{display:none;justify-content:center;align-items:center;stroke:currentcolor}.menu-item-back-button .menu-item-chevron-left{display:flex}slot:not([name]){display:flex;align-items:center;gap:var(--spacing-s);flex-grow:1}slot[name='prefix']{flex:0 0 auto;display:flex;align-items:center;stroke:currentcolor}slot[name='prefix']::slotted(*){display:contents}slot[name='suffix']{flex:0 1 auto;display:flex;align-items:center;stroke:currentcolor;text-align:right}:host(:hover) .menu-item{background-color:var(--color-white-alpha-10);color:var(--color-neutral-foreground-2-hover)}:host(:active) .menu-item{background-color:var(--color-white-alpha-5);color:var(--color-neutral-foreground-2-pressed)}:host(.focus-always:focus) .menu-item,:host(.focus-default:focus-visible) .menu-item{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2);border:none}:host(.cc-style-menu-item:hover) .menu-item,:host(.cc-style-menu-item:active) .menu-item{background-color:initial}@media (forced-colors:active){.menu-item{forced-color-adjust:none;color:ButtonText}:host(:hover) .menu-item{background-color:Highlight;color:HighlightText}:host(.focus-default:focus-visible) .menu-item,:host(.cc-style-menu-item:active) .menu-item{outline:var(--stroke-width-thick) solid Highlight}:host(.cc-style-menu-item:hover) .menu-item,:host(.cc-style-menu-item:active) .menu-item{color:ButtonText}}
`],Uu([ir({attribute:!0})],ba.prototype,"type",2),Uu([ir({attribute:!0,type:Boolean,reflect:!0})],ba.prototype,"checked",2),Uu([ir({attribute:!0,type:String})],ba.prototype,"submenu",2),Uu([Rr({context:Nr,subscribe:!0})],ba.prototype,"playerState",2),Uu([ir({type:Boolean})],ba.prototype,"focusable",2),Uu([ir({type:Number,reflect:!0})],ba.prototype,"tabindex",1),Uu([ir({type:Boolean})],ba.prototype,"isFocused",2),ba=Uu([Yn("ump-menu-item")],ba);var dJ=Object.defineProperty,fJ=Object.getOwnPropertyDescriptor,XR=(a,s,c,f)=>{for(var d=f>1?void 0:f?fJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&dJ(s,c,d),d};let T1=class extends xn{render(){return this.isActive()?xt`<slot></slot>`:null}getMenuItems(){return Array.from(this.querySelectorAll('[role="menuitemradio"],[role="menuitem"]'))}isActive(){return!this.menuContext.history.length&&!this.id?!0:this.menuContext.history[this.menuContext.history.length-1]===this.id}};XR([Rr({context:WR,subscribe:!0}),Sg()],T1.prototype,"menuContext",2),T1=XR([Yn("ump-submenu")],T1);var hJ=Object.defineProperty,pJ=Object.getOwnPropertyDescriptor,Pg=(a,s,c,f)=>{for(var d=f>1?void 0:f?pJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&hJ(s,c,d),d};let Fu=class extends xn{constructor(){super(...arguments),this.role="menu",this.menuContext={history:[]}}render(){return xt`<slot
      @click=${this.onClick}
      @keydown=${this.onKeyDown}
      data-scrollable
    ></slot>`}async onClick(a){const s=Fu.findSubmenuId(a.composedPath());s&&(a.stopPropagation(),s===_i?this.pop():this.push(s),await this.updateComplete,this.focusFirstItem())}onKeyDown(a){if(!this.playerState.disableKeyboardEvents){if(a.key===" "||a.key==="Enter"){const s=this.getActiveItem();s&&(a.preventDefault(),a.stopPropagation(),s.click())}else if(a.key==="ArrowDown"||a.key==="ArrowUp"||a.key==="Home"||a.key==="End"){a.preventDefault(),a.stopPropagation();const s=this.getMenuItems();let c=s.findIndex(f=>f.tabIndex===0);a.key==="ArrowDown"?c+=1:a.key==="ArrowUp"?c-=1:a.key==="Home"?c=0:a.key==="End"&&(c=s.length-1),c>=s.length&&(c=0),c<0&&(c=s.length-1),this.setActiveIndex(c)}}}focusFirstItem(){this.setActiveIndex(0)}focusSelectedItem(){const a=this.getMenuItems().findIndex(s=>{const c=s instanceof ba?s.checked===!0:!1,f=s.getAttribute("aria-checked")==="true";return c||f});return a<0?!1:(this.setActiveIndex(a),!0)}focusLastItem(){this.setActiveIndex(this.getMenuItems().length-1)}setActiveIndex(a){var s;(s=this.getMenuItems()[a])==null||s.focus()}getMenuItems(){const a=this.defaultSlot.assignedElements({flatten:!0}).filter(c=>ba.isMenuItem(c));if(a.length)return a;const s=this.defaultSlot.assignedElements({flatten:!0}).find(c=>c instanceof T1&&c.isActive());return s?.getMenuItems()??[]}getActiveItem(){return this.getMenuItems().find(a=>a.tabIndex===0)}pop(){this.menuContext={...this.menuContext,history:this.menuContext.history.slice(0,-1)}}push(a){this.menuContext={...this.menuContext,history:[...this.menuContext.history,a]}}clearHistory(){this.menuContext={...this.menuContext,history:[]}}navigateBack(){if(this.menuContext.history.length>0){const a=document.activeElement;return a instanceof HTMLElement&&this.contains(a)&&a.blur(),this.pop(),this.updateComplete.then(()=>this.focusFirstItem()),!0}return!1}static findSubmenuId(a){for(const s of a)if(s instanceof HTMLElement){const c=s.getAttribute("submenu");if(c)return c}}};Fu.styles=[kn`
:host{border-radius:var(--border-radius-x-large);overflow:hidden}slot{display:flex;flex-direction:column;overflow:hidden auto;border:none;padding:var(--spacing-s);background-color:var(--color-grey-10-alpha-90);box-shadow:var(--shadow-4)}@container universalmediaplayer (min-width:0){slot{max-height:calc(100cqh - var(--ump-lower-controls-height))}}@media (forced-colors:active){slot{background-color:var(--color-grey-10)}}
`],Pg([Rr({context:Nr,subscribe:!0})],Fu.prototype,"playerState",2),Pg([ir({reflect:!0})],Fu.prototype,"role",2),Pg([Tn("slot")],Fu.prototype,"defaultSlot",2),Pg([fX({context:WR}),Sg()],Fu.prototype,"menuContext",2),Fu=Pg([Yn("ump-menu")],Fu);var gJ=Object.getOwnPropertyDescriptor,mJ=(a,s,c,f)=>{for(var d=f>1?void 0:f?gJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=y(d)||d);return d};let jS=class extends xn{render(){return xt` <slot class="footer-button" name="suffix"></slot> `}};jS.styles=kn`
:host{display:flex;justify-content:flex-end;padding:var(--spacing-s);gap:var(--spacing-s)}:host(:focus),:host(:focus-visible){outline:none}.footer-button{display:inline-flex;border-radius:var(--border-radius-medium)}.footer-button:hover{background-color:var(--footer-button-hover-bg,var(--color-neutral-background-1-hover));border-color:transparent;color:var(--color-neutral-foreground-1-hover)}:host(:focus) .footer-button,:host(:focus-visible) .footer-button{outline:var(--stroke-width-thick) solid var(--color-stroke-focus-2);outline-offset:calc(var(--stroke-width-thick) * -1);border:none}@media (forced-colors:active){.footer-button{forced-color-adjust:none}}
`,jS=mJ([Yn("ump-menu-footer")],jS);var vJ=Object.getOwnPropertyDescriptor,yJ=(a,s,c,f)=>{for(var d=f>1?void 0:f?vJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=y(d)||d);return d};let US=class extends xn{render(){return xt`
      <slot class="prefix-slot" name="prefix"></slot>
      <slot class="default-slot"></slot>
      <slot class="suffix-slot" name="suffix"></slot>
    `}};US.styles=kn`
:host{display:flex;padding:var(--spacing-s);gap:var(--spacing-s)}.default-slot{flex-grow:1;display:flex;align-items:center;justify-content:flex-start;margin:0;box-sizing:border-box;border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);font-weight:var(--font-weight-semibold);line-height:var(--line-height-base-300);-webkit-user-select:none;user-select:none;background-color:transparent}@media (forced-colors:active){.default-slot{color:ButtonText}}
`,US=yJ([Yn("ump-menu-label")],US);const bJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M15.5 17a.5.5 0 0 1 .09 1H4.5a.5.5 0 0 1-.09-1H15.5M10 2a.5.5 0 0 1 .5.41V14.3l3.64-3.65a.5.5 0 0 1 .64-.06l.07.06c.17.17.2.44.06.63l-.06.07-4.5 4.5a.5.5 0 0 1-.25.14L10 16a.5.5 0 0 1-.4-.2l-4.46-4.45a.5.5 0 0 1 .64-.76l.07.06 3.65 3.64V2.5c0-.27.22-.5.5-.5"/></svg>',wJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M6.25 10a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0m5 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0M15 11.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5"/></svg>',xJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10.35 2.15a.5.5 0 0 0-.7 0l-4.5 4.5a.5.5 0 1 0 .7.7L9.5 3.71v8.79a.5.5 0 0 0 1 0V3.7l3.65 3.65a.5.5 0 0 0 .7-.7zM4 9.5a.5.5 0 0 0-1 0V14a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V9.5a.5.5 0 0 0-1 0V14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z"/></svg>';var kJ=Object.defineProperty,TJ=Object.getOwnPropertyDescriptor,FS=(a,s,c,f)=>{for(var d=f>1?void 0:f?TJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&kJ(s,c,d),d};let _g=class extends xn{render(){const{downloadableVideoFiles:a,downloadableTranscriptFiles:s,shareOptions:c}=this.playerState,f=s.length===0&&a.length===0;return f&&c.length===0?null:xt`
      <ump-popup popupAriaLabel="${ue("More")}">
        <button
          type="button"
          slot="trigger"
          class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${ue("More")}"
          aria-label="${ue("More")}"
          data-id="more-menu-button"
          data-testid="more-menu-button"
        >
          ${sn(wJ)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            ${!f&&this.playerState.showDownloadMenu?xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    submenu="download"
                    data-testid="download-menu-item"
                  >
                    <span slot="prefix">${sn(bJ)}</span>
                    ${ue("Download")}
                  </ump-menu-item>
                `:null}
            ${c.length>0?xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    @click=${this.onShareClicked}
                    data-testid="share-menu-item"
                  >
                    <span slot="prefix">${sn(xJ)}</span>
                    ${ue("Share")}
                  </ump-menu-item>
                `:null}
          </ump-submenu>

          <ump-submenu id="download">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              >${ue("Download")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${a.length>0?xt`<ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  submenu="download-video"
                >
                  ${ue("Video")}
                </ump-menu-item>`:null}
            ${s.length>0?xt`<ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  submenu="download-transcript"
                >
                  ${ue("Transcript")}
                </ump-menu-item>`:null}
          </ump-submenu>

          <ump-submenu id="download-video">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              >${ue("Download Video")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${a.map(d=>xt` <ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  lang=${LS(d.lang)}
                  @click=${this.onDownloadClicked(d)}
                >
                  ${d.locale}
                </ump-menu-item>`)}
          </ump-submenu>

          <ump-submenu id="download-transcript">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              >${ue("Download Transcript")}</ump-menu-item
            >

            <hr aria-hidden="true" />

            ${s.map(d=>xt`<ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  lang=${LS(d.lang)}
                  @click=${this.onDownloadClicked(d)}
                  >${d.locale}</ump-menu-item
                >`)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onShareClicked(){this.dispatchEvent(new Mt("share-clicked"))}onDownloadClicked(a){return()=>{this.dispatchEvent(new Mt("download-file-clicked",a))}}get opened(){var a;return(a=this.popup)==null?void 0:a.opened}};_g.styles=[us,m1,cc,kn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}
`],FS([Tn("ump-popup")],_g.prototype,"popup",2),FS([Rr({context:Nr,subscribe:!0})],_g.prototype,"playerState",2),_g=FS([Yn("ump-more-menu")],_g);var SJ=Object.defineProperty,CJ=Object.getOwnPropertyDescriptor,fc=(a,s,c,f)=>{for(var d=f>1?void 0:f?CJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&SJ(s,c,d),d};let eo=class extends xn{constructor(){super(...arguments),this._opened=!1,this.popupAriaLabel="",this.documentMouseDown=a=>{a.composedPath().includes(this)||this.close()},this.documentKeyDown=a=>{!a.composedPath().includes(this)&&(a.key===" "||a.key==="Enter")&&this.close()}}static detectIOS(){const a=/iPad|iPhone|iPod/.test(navigator.userAgent),s=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,c="ontouchstart"in window;return(a||s)&&c}render(){return xt`
      <div
        class=${st({"popup-container":!0,"ump-ios":eo.isIOS})}
        @click=${this.onClick}
      >
        <slot
          name="trigger"
          @click=${this.onClicked}
          @keydown=${this.onKeyDown}
          @slotchange=${this.onSlotChanged}
        ></slot>

        <dialog
          class=${st({"ump-rtl":this.playerState.dir==="rtl"})}
          .open=${this._opened}
          aria-hidden="${this._opened?"false":"true"}"
          aria-label="${this.popupAriaLabel}"
          @keydown=${this.dialogKeyDown}
          @close=${this.close}
        >
          <slot class="popup-panel"></slot>
        </dialog>
      </div>
    `}show(a=!0){this._opened=!0,this.updateAccessibleTrigger(),document.addEventListener("mousedown",this.documentMouseDown),document.addEventListener("keydown",this.documentKeyDown),this.dispatchEvent(new Mt("ump-popup-changed")),a&&!this.playerState.disableKeyboardEvents&&requestAnimationFrame(()=>{const s=this.getMenu();s&&(s.focusSelectedItem()||s.focusFirstItem())})}close(){var a;this.dialog.close(),this._opened=!1,this.updateAccessibleTrigger(),document.removeEventListener("mousedown",this.documentMouseDown),document.removeEventListener("keydown",this.documentKeyDown),this.dispatchEvent(new Mt("ump-popup-changed")),(a=this.getMenu())==null||a.clearHistory(),this.focusTrigger()}get opened(){return this._opened}updateAccessibleTrigger(){const a=this.getTriggerElement();a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded",this._opened?"true":"false")}focusTrigger(){this.getTriggerElement().focus()}getTriggerElement(){return this.trigger.assignedElements({flatten:!0})[0]}getMenu(){return this.popupPanel.assignedElements({flatten:!0}).find(a=>a.tagName.toLowerCase()==="ump-menu")}onClick(a){a.composedPath().find(s=>ba.isMenuItem(s))&&this.close()}onClicked(){this._opened?this.close():this.show()}onSlotChanged(){this.updateAccessibleTrigger()}async onKeyDown(a){if(!this.playerState.disableKeyboardEvents)if(a.key==="ArrowDown"||a.key==="ArrowUp"||a.key==="Home"||a.key==="End"){a.preventDefault(),this._opened||(this.show(!1),await this.updateComplete);const s=this.getMenu();if(!s)return;a.key==="ArrowUp"||a.key==="End"?s.focusLastItem():s.focusFirstItem()}else(a.key==="Escape"||a.key==="Tab")&&this.close()}dialogKeyDown(a){if(!this.playerState.disableKeyboardEvents&&(a.key==="Escape"||a.key==="Tab")&&this._opened){if(a.preventDefault(),a.key==="Escape"){a.stopPropagation();const s=this.getMenu();if(s!=null&&s.navigateBack())return}this.close()}}};eo.isIOS=eo.detectIOS(),eo.styles=kn`
:host{--ump-popup-spacing:var(--spacing-s)}.popup-container{position:relative}dialog{display:none;padding:0;border:none;outline:none;background-color:transparent;position:absolute;left:100%;bottom:100%;transform:translateX(-100%);margin-bottom:var(--ump-popup-spacing)}dialog.ump-rtl{transform:translateX(calc(100% - var(--spacing-xxxxl)))}dialog[open]{display:block}@media (width <= 450px){.ump-ios.popup-container{position:unset}.ump-ios dialog{bottom:34.29%;left:98%}.ump-ios .popup-panel::slotted(*){max-width:calc(98% - var(--spacing-xs))}}@container universalmediaplayer (max-width:450px){.popup-container{position:unset}dialog{bottom:15cqh;left:98cqw}.popup-panel::slotted(*){max-width:calc(98cqw - var(--spacing-xs))}}
`,fc([Tn("dialog")],eo.prototype,"dialog",2),fc([Rr({context:Nr,subscribe:!0})],eo.prototype,"playerState",2),fc([Sg()],eo.prototype,"_opened",2),fc([ir({type:String})],eo.prototype,"popupAriaLabel",2),fc([Tn('slot[name="trigger"]')],eo.prototype,"trigger",2),fc([Tn(".popup-panel")],eo.prototype,"popupPanel",2),eo=fc([Yn("ump-popup")],eo);const AJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10 2q-.8 0-1.56.15a.5.5 0 0 0 .2.98 7 7 0 0 1 2.73 0 .5.5 0 0 0 .2-.98Q10.8 2 10 2m4.45 1.35a.5.5 0 0 0-.56.83 7 7 0 0 1 1.93 1.93.5.5 0 1 0 .83-.56 8 8 0 0 0-2.2-2.2m-8.34.83a.5.5 0 1 0-.56-.83 8 8 0 0 0-2.2 2.2.5.5 0 1 0 .83.56A7 7 0 0 1 6.1 4.18M3.13 8.63a.5.5 0 0 0-.98-.2 8 8 0 0 0 0 3.13.5.5 0 0 0 .98-.2 7 7 0 0 1 0-2.73m14.72-.2a.5.5 0 1 0-.98.2 7 7 0 0 1 0 2.74.5.5 0 1 0 .98.2 8 8 0 0 0 0-3.13M4.18 13.9a.5.5 0 1 0-.83.56 8 8 0 0 0 2.2 2.2.5.5 0 1 0 .56-.83 7 7 0 0 1-1.93-1.93m12.47.56a.5.5 0 0 0-.83-.56 7 7 0 0 1-1.93 1.93.5.5 0 1 0 .56.83 8 8 0 0 0 2.2-2.2m-8.02 2.42a.5.5 0 1 0-.2.98 8 8 0 0 0 3.13 0 .5.5 0 0 0-.2-.98 7 7 0 0 1-2.73 0M8 7.83c0-.57.63-.94 1.13-.65l4.12 2.39a.5.5 0 0 1 0 .86l-4.12 2.39A.75.75 0 0 1 8 12.17z"/></svg>',EJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M8.5 3H6a3 3 0 0 0-3 3v.5a.5.5 0 0 0 1 0V6c0-1.1.9-2 2-2h2.5a.5.5 0 0 0 0-1M5.8 15.99A2 2 0 0 1 4 14v-3c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H6zM3 14a3 3 0 0 0 3 3h3a3 3 0 0 0 3-3v-3a3 3 0 0 0-3-3H6a3 3 0 0 0-3 3zm10.5 3a.5.5 0 0 1 0-1h.5a2 2 0 0 0 2-2v-2.5a.5.5 0 0 1 1 0V14a3 3 0 0 1-3 3zM17 8.5a.5.5 0 0 1-1 0V6a2 2 0 0 0-2-2h-2.5a.5.5 0 0 1 0-1H14a3 3 0 0 1 3 3z"/></svg>',IJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M1.91 7.38A8.5 8.5 0 0 1 3.7 4.3a.5.5 0 0 1 .54-.13l1.92.68a1 1 0 0 0 1.32-.76l.36-2a.5.5 0 0 1 .4-.4 9 9 0 0 1 3.55 0q.32.08.38.4l.37 2a1 1 0 0 0 1.32.76l1.92-.68a.5.5 0 0 1 .54.13 8.5 8.5 0 0 1 1.78 3.08q.08.31-.15.54l-1.56 1.32a1 1 0 0 0 0 1.52l1.56 1.32a.5.5 0 0 1 .15.54 8.5 8.5 0 0 1-1.78 3.08.5.5 0 0 1-.54.13l-1.92-.68a1 1 0 0 0-1.32.76l-.37 2a.5.5 0 0 1-.38.4 8.5 8.5 0 0 1-3.56 0 .5.5 0 0 1-.39-.4l-.36-2a1 1 0 0 0-1.32-.76l-1.92.68a.5.5 0 0 1-.54-.13 8.5 8.5 0 0 1-1.78-3.08.5.5 0 0 1 .15-.54l1.56-1.32a1 1 0 0 0 0-1.52L2.06 7.92a.5.5 0 0 1-.15-.54M8 10a2 2 0 1 0 4 0 2 2 0 0 0-4 0"/></svg>',MJ='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M1.91 7.38A8.5 8.5 0 0 1 3.7 4.3a.5.5 0 0 1 .54-.13l1.92.68a1 1 0 0 0 1.32-.76l.36-2a.5.5 0 0 1 .4-.4 9 9 0 0 1 3.55 0q.32.08.38.4l.37 2a1 1 0 0 0 1.32.76l1.92-.68a.5.5 0 0 1 .54.13 8.5 8.5 0 0 1 1.78 3.08q.08.31-.15.54l-1.56 1.32a1 1 0 0 0 0 1.52l1.56 1.32a.5.5 0 0 1 .15.54 8.5 8.5 0 0 1-1.78 3.08.5.5 0 0 1-.54.13l-1.92-.68a1 1 0 0 0-1.32.76l-.37 2a.5.5 0 0 1-.38.4 8.5 8.5 0 0 1-3.56 0 .5.5 0 0 1-.39-.4l-.36-2a1 1 0 0 0-1.32-.76l-1.92.68a.5.5 0 0 1-.54-.13 8.5 8.5 0 0 1-1.78-3.08.5.5 0 0 1 .15-.54l1.56-1.32a1 1 0 0 0 0-1.52L2.06 7.92a.5.5 0 0 1-.15-.54m1.06 0 1.3 1.1a2 2 0 0 1 0 3.04l-1.3 1.1q.45 1.19 1.25 2.16l1.6-.58a2 2 0 0 1 2.63 1.53l.3 1.67a8 8 0 0 0 2.5 0l.3-1.67a2 2 0 0 1 2.64-1.53l1.6.58a8 8 0 0 0 1.24-2.16l-1.3-1.1a2 2 0 0 1 0-3.04l1.3-1.1a8 8 0 0 0-1.25-2.16l-1.6.58a2 2 0 0 1-2.63-1.53l-.3-1.67a8 8 0 0 0-2.5 0l-.3 1.67A2 2 0 0 1 5.81 5.8l-1.6-.58a8 8 0 0 0-1.24 2.16M7.5 10a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0m1 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0"/></svg>';var PJ=Object.defineProperty,_J=Object.getOwnPropertyDescriptor,BS=(a,s,c,f)=>{for(var d=f>1?void 0:f?_J(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&PJ(s,c,d),d};let Dg=class extends xn{render(){var a,s;let c,f;for(const v of this.playerState.videoQualities)v.videoId===this.playerState.activeVideoQualityId&&(c=v),v.videoId===this.playerState.selectedVideoQualityId&&(f=v);const d=(a=this.playerState.playbackRates.find(v=>v.value===this.playerState.playbackRate))==null?void 0:a.label;return this.playerState.playbackRates.length<2&&this.playerState.videoQualities.length<2?null:xt`
      <ump-popup
        popupAriaLabel="${ue("Settings")}"
        @ump-popup-changed=${()=>this.requestUpdate()}
      >
        <button
          type="button"
          slot="trigger"
          class=${st({btn:!0,"btn-subtle":!0,"btn-icon-only":!0,...ht(this.playerState),tooltip:!0,"tooltip-disable-when-aria-expanded":!0})}
          data-tooltip="${ue("Settings")}"
          aria-label="${ue("Settings")}"
          data-testid="settings-menu-button"
        >
          ${(s=this.popup)!=null&&s.opened?sn(IJ):sn(MJ)}
        </button>

        <ump-menu data-focusgroup>
          <!-- DEFAULT MENU -->
          <ump-submenu>
            ${this.playerState.playbackRates.length>=2?xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    submenu="playbackRate"
                    aria-label="${ue("Playback rate")}, ${d}, ${ue("Collapsed")}}"
                  >
                    <span slot="prefix">${sn(AJ)}</span>
                    ${ue("Playback rate")}

                    <span slot="suffix">${d}</span>
                  </ump-menu-item>
                `:null}
            ${this.playerState.showQualityMenu&&this.playerState.videoQualities.length>=2?xt`
                  <ump-menu-item
                    class=${st({...ht(this.playerState)})}
                    submenu="quality"
                    aria-label="${ue("Quality")}, ${f?.label}, ${ue("Collapsed")}}"
                  >
                    <span slot="prefix">${sn(EJ)}</span>
                    ${ue("Quality")}
                    <span slot="suffix"
                      ><span class="quality-label"
                        >${f?.label}</span
                      >
                      ${c&&f?.videoId===vf.videoId?xt`<span>${c.label}</span>`:null}
                    </span>
                  </ump-menu-item>
                `:null}
          </ump-submenu>

          <!-- PLAYBACK RATE SUBMENU -->
          <ump-submenu id="playbackRate">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              aria-label="${ue("Playback rate")}, ${ue("Back")}"
              >${ue("Playback rate")}
            </ump-menu-item>

            <hr aria-hidden="true" />

            ${this.playerState.playbackRates.map(v=>xt`
                <ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  type="radio"
                  @click=${this.playbackRateClicked(v.value)}
                  .checked=${v.value===this.playerState.playbackRate}
                >
                  ${v.label}
                </ump-menu-item>
              `)}
          </ump-submenu>

          <!-- QUALITY SUBMENU -->
          <ump-submenu id="quality">
            <ump-menu-item
              class=${st({...ht(this.playerState)})}
              submenu="${_i}"
              aria-label="${ue("Quality")}, ${ue("Back")}"
              >${ue("Quality")}
            </ump-menu-item>

            <hr aria-hidden="true" />

            ${this.playerState.videoQualities.map(v=>xt`
                <ump-menu-item
                  class=${st({...ht(this.playerState)})}
                  type="radio"
                  .checked=${v.videoId===this.playerState.selectedVideoQualityId}
                  @click=${this.onQualitySelected(v)}
                >
                  ${v.label}
                </ump-menu-item>
              `)}
          </ump-submenu>
        </ump-menu>
      </ump-popup>
    `}onQualitySelected(a){return()=>{this.dispatchEvent(new Mt("video-quality-clicked",a)),this.dispatchEvent(new Mt("videoqualitychanged"))}}playbackRateClicked(a){return()=>{this.dispatchEvent(new Mt("playback-rate-clicked",a))}}get opened(){var a;return(a=this.popup)==null?void 0:a.opened}};Dg.styles=[us,m1,cc,kn`
.btn.tooltip{--tooltip-gap:var(--spacing-xxxl)}ump-popup{--ump-popup-spacing:var(--spacing-xxxl)}ump-menu{width:var(--size-64);display:block}.quality-label{font-weight:var(--font-weight-semibold)}
`],BS([Tn("ump-popup")],Dg.prototype,"popup",2),BS([Rr({context:Nr,subscribe:!0})],Dg.prototype,"playerState",2),Dg=BS([Yn("ump-settings-menu")],Dg);function VS(a,s,c){return(c-a)/(s-a)}var DJ=Object.defineProperty,LJ=Object.getOwnPropertyDescriptor,to=(a,s,c,f)=>{for(var d=f>1?void 0:f?LJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&DJ(s,c,d),d};let Ji=class extends xn{constructor(){super(...arguments),this.min=0,this.max=1,this.value=0,this.step=1,this.focusStep=1,this.orientation="horizontal",this.sliderarialabel="",this.sliderAriaValueText="",this.ranges=[],this.onInputChange=a=>{this.value=Number(a.target.value)},this.onInputFocusIn=a=>{const s=a.target;s.matches(":focus-visible")&&(s.step=this.focusStep.toString())},this.onInputFocusOut=a=>{const s=a.target;s.step=this.step.toString()}}render(){return xt`
      <!-- Track -->
      <div aria-hidden="true" aria-busy="false" value="0" class="track"></div>

      <!-- Ranges -->
      ${this.ranges.map(a=>xt`
          <div
            data-testid="ump-slider-range"
            class="range"
            style="width: ${VS(this.min,this.max,a.end-a.start)*100}%; left: ${VS(this.min,this.max,a.start)*100}%"
          ></div>
        `)}

      <!-- Progress -->
      <div aria-hidden="true" aria-busy="false" class="progress"></div>

      <!-- Thumb -->
      <div class="thumb"></div>

      <!-- HTML Input Range -->
      <input
        class=${st({...ht(this.playerState),input:!0})}
        data-testid="ump-slider"
        type="range"
        min="${this.min}"
        max="${this.max}"
        step="${this.step}"
        aria-label="${this.sliderarialabel}"
        aria-live="polite"
        aria-orientation="${this.orientation}"
        aria-valuetext="${this.sliderAriaValueText}"
        @input=${this.onInputChange}
        @focusin=${this.onInputFocusIn}
        @focusout=${this.onInputFocusOut}
      />
    `}updated(a){a.has("value")&&(this.inputElement.value=this.value.toString()),(a.has("value")||a.has("min")||a.has("max"))&&this.updateSliderThumb()}updateSliderThumb(){const a=VS(this.min,this.max,this.value);this.style.setProperty("--ump-slide-percentage",`${a*100}%`)}};Ji.styles=[kn`
:host{--ump-slider-track-thickness:var(--size-1);--ump-slider-track-color:var(--color-white-alpha-40);--ump-slider-thumb-inline-size:var(--size-5);--ump-slider-thumb-block-size:var(--size-3);--ump-half-slider-thumb-inline-size:calc(var(--ump-slider-thumb-inline-size) / 2);--ump-half-slider-thumb-block-size:calc(var(--ump-slider-thumb-block-size) / 2);--ump-slider-thumb-color:var(--color-neutral-foreground-1);--ump-slider-progress-color:var(--color-neutral-foreground-1);--ump-slider-range-color:var(--color-white-alpha-30);--ump-slide-percentage:0%;--ump-slider-padding:var(--spacing-xs);position:relative;display:block;writing-mode:horizontal-tb;z-index:10}:host(:hover){--ump-slider-thumb-transform:scale(1);--ump-slider-track-thickness:var(--size-1-5)}:host([orientation='vertical']){writing-mode:vertical-lr;direction:rtl;-webkit-appearance:none;appearance:none}*{box-sizing:border-box;margin:0;padding:0}.input{-webkit-appearance:none;appearance:none;background:transparent;display:block;cursor:pointer;border-radius:var(--border-radius-medium);color:var(--color-neutral-foreground-1);padding-block:var(--ump-slider-padding);position:absolute;inset:0}.input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--ump-slider-thumb-block-size);inline-size:var(--ump-slider-thumb-inline-size);border-radius:var(--border-radius-circular);background-color:transparent}.input::-moz-range-thumb{appearance:none;background-color:transparent;border:none;block-size:var(--ump-slider-thumb-block-size);inline-size:var(--ump-slider-thumb-inline-size)}.input.focus-always:focus,.input.focus-default:focus-visible{outline:var(--stroke-width-focus) solid var(--color-stroke-focus-2);outline-offset:calc(-1 * var(--stroke-width-focus))}.thumb{pointer-events:none;position:absolute;inset:0;display:grid;align-items:center;margin-inline:var(--ump-half-slider-thumb-inline-size) var(--ump-half-slider-thumb-inline-size)}.thumb::after{position:absolute;z-index:50;inline-size:var(--ump-slider-thumb-inline-size);block-size:var(--ump-slider-thumb-block-size);margin-inline-start:calc(var(--ump-slide-percentage) - var(--ump-half-slider-thumb-inline-size));margin-block-start:self-block;background-color:var(--ump-slider-thumb-color);border-radius:var(--border-radius-circular);transform:var(--ump-slider-thumb-transform);display:block;transition:transform var(--duration-faster) var(--curve-easy-ease);transform-origin:center;content:''}.track{z-index:10;position:absolute;inset:0;overflow:hidden;pointer-events:none;display:flex;align-items:center}.track::before{content:'';background-color:var(--ump-slider-track-color);inline-size:100%;block-size:var(--ump-slider-track-thickness);position:absolute;border-radius:var(--border-radius-circular);transition:block-size var(--duration-faster) var(--curve-easy-ease)}.range{position:absolute;background-color:var(--ump-slider-range-color);height:var(--ump-slider-track-thickness);width:0;pointer-events:none;z-index:20;top:50%;transform:translateY(-50%);border-radius:var(--border-radius-circular);transition:height var(--duration-faster) var(--curve-easy-ease)}.progress{position:absolute;z-index:40;inset:0;display:flex;align-items:center;margin-inline:var(--ump-half-slider-thumb-inline-size);pointer-events:none}.progress::before{content:'';position:absolute;display:block;block-size:var(--ump-slider-track-thickness);inline-size:var(--ump-slide-percentage);background:var(--ump-slider-progress-color);transition:block-size var(--duration-faster) var(--curve-easy-ease)}.progress::after{content:'';position:absolute;display:block;block-size:var(--ump-slider-track-thickness);inline-size:var(--ump-half-slider-thumb-inline-size);margin-inline-start:calc(-1 * var(--ump-half-slider-thumb-inline-size));border-start-start-radius:var(--border-radius-circular);border-end-start-radius:var(--border-radius-circular);background:var(--ump-slider-progress-color);transition:block-size var(--duration-faster) var(--curve-easy-ease)}@media (forced-colors:active){:host{--ump-slider-track-color:ButtonText;--ump-slider-progress-color:Highlight}.thumb::after{background:Highlight}}
`],to([ir({type:Number,attribute:!0})],Ji.prototype,"min",2),to([ir({type:Number,attribute:!0})],Ji.prototype,"max",2),to([ir({type:Number,attribute:!0,reflect:!0})],Ji.prototype,"value",2),to([ir({type:Number,attribute:!0})],Ji.prototype,"step",2),to([ir({type:Number,attribute:!0})],Ji.prototype,"focusStep",2),to([ir({type:String,attribute:!0})],Ji.prototype,"orientation",2),to([ir({type:String,attribute:!0})],Ji.prototype,"sliderarialabel",2),to([ir({type:String,attribute:!0})],Ji.prototype,"sliderAriaValueText",2),to([ir({type:Array})],Ji.prototype,"ranges",2),to([Tn("input")],Ji.prototype,"inputElement",2),to([Rr({context:Nr,subscribe:!0})],Ji.prototype,"playerState",2),Ji=to([Yn("ump-slider")],Ji);var RJ=Object.defineProperty,NJ=Object.getOwnPropertyDescriptor,hc=(a,s,c,f)=>{for(var d=f>1?void 0:f?NJ(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&RJ(s,c,d),d};let ls=class extends xn{constructor(){super(...arguments),this.userActive=!0,this.handleUserInteraction=DR(()=>{this.userActive=!1},uY)}render(){var a;const s=this.playerState.error!=null;return xt`<div
      ?inert=${this.playerState.ageGate&&this.playerState.ageGate!=="verified"}
      class="controls-wrapper"
      data-testid="controls-wrapper"
      tabindex=${!this.playerState.disableKeyboardEvents&&this.playerState.controlsState!=="bigplaybutton"?"0":""}
      @keydown=${this.onControlsWrapperKeyDown}
      aria-hidden="${s}"
    >
      <div
        class=${st({controls:!0,loading:this.playerState.loading,hidden:this.userActive===!1&&this.playerState.paused===!1&&(this.playerState.controlsState==="bigplaybutton"||((a=this.controlBar)==null?void 0:a.hasOpenControl)===!1)})}
        data-testid="controls"
        @pointermove=${this.onUserInteraction}
        @control-bar-focus-change=${this.onUserInteraction}
        @input=${this.onUserInteraction}
        @keydown=${this.onUserInteraction}
        @mousedown=${this.onControlsMouseDown}
        @touchstart=${this.onControlsTouchStart}
      >
        <div
          class=${st({overlay:!0,mask20:this.playerState.maskLevel===20,mask40:this.playerState.maskLevel===40,mask60:this.playerState.maskLevel===60,mask80:this.playerState.maskLevel===80,mask100:this.playerState.maskLevel===100})}
          data-testid="mask-level-overlay"
        ></div>

        ${s?rr:this.renderControls()}
      </div>
    </div>`}get hasOpenControl(){var a;return((a=this.controlBar)==null?void 0:a.hasOpenControl)??!1}focusPlayButton(){var a,s;if(this.bigPlayButton){this.bigPlayButton.focus();return}(s=(a=this.controlBar)==null?void 0:a.renderRoot.querySelector("#play-button"))==null||s.focus()}renderControls(){if(this.playerState.controlsState==="bigplaybutton")return xt`<ump-big-play-button></ump-big-play-button>`;if(this.playerState.controlsState==="controlbar")return xt`<ump-control-bar></ump-control-bar>`}onUserInteraction(){this.userActive=!0,this.handleUserInteraction()}onControlsMouseDown(a){a.target===this.controlsContainer&&a.button===0&&this.dispatchEvent(new Mt("controls-triggered")),this.onUserInteraction()}onControlsTouchStart(a){a.target===this.controlsContainer&&(a.preventDefault(),a.stopPropagation(),this.userActive&&this.dispatchEvent(new Mt("controls-triggered")),this.onUserInteraction())}onControlsWrapperKeyDown(a){this.playerState.disableKeyboardEvents||a.target!==this.controlsWrapper||(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this.dispatchEvent(new Mt("controls-triggered")))}};ls.shadowRootOptions={...xn.shadowRootOptions,delegatesFocus:!0},ls.styles=kn`
.controls-wrapper{position:absolute;inset:0}.controls-wrapper:focus-visible{outline:var(--stroke-width-focus) dashed var(--color-stroke-focus-2);outline-offset:calc(-1 * var(--stroke-width-thicker));box-shadow:inset 0 0 0 var(--border-radius-medium) var(--color-black)}.controls{position:absolute;inset:0;opacity:1;visibility:visible}.controls.hidden{opacity:0;transition:opacity 1s ease-out;cursor:none}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:-1}.overlay.mask20{background:var(--color-black-alpha-20)}.overlay.mask40{background:var(--color-black-alpha-40)}.overlay.mask60{background:var(--color-black-alpha-60)}.overlay.mask80{background:var(--color-black-alpha-80)}.overlay.mask100{background:var(--color-black)}ump-big-play-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.controls.loading ump-big-play-button{opacity:0}
`,hc([Tn(".controls-wrapper")],ls.prototype,"controlsWrapper",2),hc([Tn(".controls")],ls.prototype,"controlsContainer",2),hc([Tn("ump-control-bar")],ls.prototype,"controlBar",2),hc([Tn("ump-big-play-button")],ls.prototype,"bigPlayButton",2),hc([Rr({context:Nr,subscribe:!0})],ls.prototype,"playerState",2),hc([Sg()],ls.prototype,"userActive",2),ls=hc([gS(),Yn("ump-controls")],ls);function OJ(a,s,c,f){return a.addEventListener(s,c,f),()=>a.removeEventListener(s,c)}function Lg(a){const s=[];return{addEventListener(c,f,d){const v=OJ(a,c,f,d);s.push(v)},removeAllListeners(){s.forEach(c=>c())}}}function jJ(a,s){return c=>{const f=Lg(a);f.addEventListener("big-play-button-triggered",I),f.addEventListener("play-button-clicked",D),f.addEventListener("volume-button-clicked",L),f.addEventListener("fullscreen-button-clicked",X),f.addEventListener("seekbar-updated",C),f.addEventListener("volume-updated",F),f.addEventListener("volume-drag-released",O),f.addEventListener("audio-track-clicked",$),f.addEventListener("video-quality-clicked",Y),f.addEventListener("caption-track-clicked",ge),f.addEventListener("playback-rate-clicked",Ie),f.addEventListener("controls-triggered",Z),f.addEventListener("seekbar-pointer-down",y),f.addEventListener("seekbar-pointer-up",E),f.addEventListener("caption-font-size-clicked",K),f.addEventListener("caption-text-color-clicked",we),f.addEventListener("caption-text-opacity-clicked",x),f.addEventListener("caption-background-color-clicked",se),f.addEventListener("caption-background-opacity-clicked",te),f.addEventListener("caption-font-family-clicked",Be),f.addEventListener("caption-text-edge-style-clicked",Me),c.options.hideControls==null&&c.addEventListener("play",()=>{d("controlbar")},{once:!0}),c.options.autoplay||d("bigplaybutton"),c.options.hideControls==="controlbar"&&d("bigplaybutton"),c.options.hideControls==="all"&&d("none"),s.setValue({...s.value,playButtonSize:c.options.playButtonSize,playButtonTheme:c.options.playButtonTheme}),s.setValue({...s.value,maskLevel:c.options.maskLevel}),c.options.maskLevel!==0&&c.addEventListener("play",()=>{s.setValue({...s.value,maskLevel:0})},{once:!0});function d(je){s.setValue({...s.value,controlsState:je})}let v=!1;function y(){v=c.paused,c.pause()}const g=DR(je=>{c.currentTime=je.detail},lY);function C(je){g(je)}function E(){v||c.play()}function I(){var je,ee;if(s.setValue({...s.value,bigPlayButtonClicked:!0}),Q(),c.options.hideControls!=="all"&&c.options.hideControls!=="controlbar"){const me=a.renderRoot.querySelector("video");me&&me.setAttribute("tabindex","-1")}if(!s.value.disableKeyboardEvents&&c.options.hideControls!=="all"&&c.options.hideControls!=="controlbar"){const me=(ee=(je=a.renderRoot.querySelector("ump-controls"))==null?void 0:je.renderRoot)==null?void 0:ee.querySelector(".controls-wrapper");me&&(me.tabIndex=0,me.focus())}}function D(){Q()}function L(){c.muted=!c.muted}function F(je){c.volume=je.detail}function O(je){c.saveLastSelectedVolume(je.detail)}function X(){c.fullscreen?c.exitFullscreen():c.requestFullscreen(a)}function $(je){c.audioTrack=je.detail.shakaAudioTrack}function Y(je){c.selectVideoQuality(je.detail)}function Z(){Q()}function Q(){c.ended?(c.dispatchEvent(new on.util.FakeEvent("replay")),c.play()):c.paused?(c.currentTime===0&&c.dispatchEvent(new on.util.FakeEvent("umpplay")),c.currentTime!==0&&c.dispatchEvent(new on.util.FakeEvent("resume")),c.play()):(c.dispatchEvent(new on.util.FakeEvent("umppause")),c.pause())}function ge(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,enabled:je.detail.captionId!==-1}}),c.captionTrack=je.detail}function K(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,fontScale:je.detail}})}function we(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textColor:je.detail}})}function x(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textOpacity:je.detail}})}function se(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,backgroundColor:je.detail}})}function te(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,backgroundOpacity:je.detail}})}function Be(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,fontFamily:je.detail}})}function Me(je){s.setValue({...s.value,captionSettings:{...s.value.captionSettings,textShadow:je.detail}})}function Ie(je){c.playbackRate=je.detail}return()=>{f.removeAllListeners()}}}const UJ=import.meta.url;/*! https://github.com/nevware21/ts-utils v0.16.0 */function Jn(a,s){return a||s}function dn(a,s){return a?.[s]}var ci=void 0,Qn=null,$S="",S1="function",Rg="object",Gr="prototype",Ng="__proto__",pc="undefined",Og="constructor",zS="Symbol",gc="length",C1="name",Zn="call",jg="toString",HS="getOwnPropertyDescriptor",YR="getOwnPropertySymbols",Mr=Jn(Object),Ug=dn(Mr,Gr),JR=Jn(String),no=dn(JR,Gr),yf=Jn(Math),QR=Jn(Array),bf=dn(QR,Gr),ro=dn(bf,"slice"),FJ=Jn(Number),BJ=dn(FJ,Gr),VJ=Jn(Function),$J=dn(VJ,Gr),zJ=Jn(Date),HJ=dn(zJ,Gr),qJ=Jn(RegExp),GJ=dn(qJ,Gr),KJ=Jn(Boolean),WJ=dn(KJ,Gr),XJ=Jn(Error),YJ=dn(XJ,Gr),ZR="_polyfill",e9="__nw21$polytype__";function St(a,s){try{return{v:a.apply(this,s)}}catch(c){return{e:c}}}function JJ(a,s,c){var f=St(a,c);return f.e?s:f.v}var qS;function A1(a){return function(s){return typeof s===a}}function t9(a){var s="[object "+a+"]";return function(c){return!!(c&&QJ(c)===s)}}function QJ(a){return Ug[jg].call(a)}function Cn(a){return typeof a===pc||a===pc}function ZJ(a){return a===ci}function Oe(a){return a===Qn||Cn(a)}function io(a){return a===Qn||a===ci}function eQ(a){return!!a||a!==ci}function tQ(a){return!qS&&(qS=["string","number","boolean",pc,"symbol","bigint"]),a!==Rg&&qS.indexOf(a)!==-1}var ct=A1("string"),Ke=A1(S1);function Kr(a){return!a&&Oe(a)?!1:!!a&&typeof a===Rg}var Pt=dn(QR,"isArray"),GS=t9("Date"),ao=A1("number"),n9=A1("boolean"),KS=t9("Error");function _o(a){return!!(a&&a.then&&Ke(a.then))}function E1(a){return!(!a||JJ(function(){return!(a&&0+a)},!a))}function WS(){}function r9(){return[]}function nQ(){return!1}var Qt=Jn(JR),rQ="[object Error]";function at(a,s){var c=$S,f=Ug[jg][Zn](a);f===rQ&&(a={stack:Qt(a.stack),message:Qt(a.message),name:Qt(a.name)});try{c=JSON.stringify(a,Qn,s?typeof s=="number"?s:4:ci),c=(c?c.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Qn)||Qt(a)}catch(d){c=" - "+at(d,s)}return f+": "+c}function wa(a){throw new Error(a)}function xa(a){throw new TypeError(a)}function I1(a){io(a)&&xa("Cannot convert undefined or null to object")}function i9(a){ct(a)||xa("'"+at(a)+"' is not a string")}function Qi(a,s){return!!a&&Ug.hasOwnProperty[Zn](a,s)}var iQ=Jn(dn(Mr,HS),WS),Zi=Jn(dn(Mr,"hasOwn"),aQ);function aQ(a,s){return I1(a),Qi(a,s)||!!iQ(a,s)}function mc(a){return a===Ng||a===Og||a===Gr}function Gt(a,s,c){if(a&&(Kr(a)||Ke(a))){for(var f in a)if(Zi(a,f)&&s[Zn](io(c)?a:c,f,a[f])===-1)break}}function Ye(a,s,c){if(a)for(var f=a[gc]>>>0,d=0;d<f&&!(d in a&&s[Zn](io(c)?a:c,a[d],d,a)===-1);d++);}var cs=wf;function wf(a,s,c){var f=s?s[a]:Qn;return function(d){var v=(d?d[a]:Qn)||f;if(v||c){var y=arguments;return(v||c).apply(d,v?ro[Zn](y,1):y)}xa('"'+Qt(a)+'" not defined for '+at(d))}}function oQ(a,s,c){var f=s?s[a]:Qn;return function(d){var v=f;if(v||c){var y=arguments;return(v||c).apply(d,v?ro[Zn](y,1):y)}xa('"'+Qt(a)+'" not defined for '+at(d))}}function sQ(a){return function(s){return s[a]}}function uQ(a,s){var c,f=Mr.getOwnPropertyDescriptor;return!io(a)&&f&&(c=St(f,[a,s]).v||Qn),!c&&!io(a)&&(c=St(function(){for(var d in a)if(d==s)return{enumerable:Qi(a,d)}}).v),c&&c.enumerable||!1}var a9=oQ("propertyIsEnumerable",Ug,uQ),lQ=Jn(dn(Mr,HS),WS),cQ=Jn(dn(Mr,YR),r9),M1={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function XS(a){var s={};if(s[M1.c]=!0,s[M1.e]=!0,a.l){s.get=function(){return a.l.v};var c=lQ(a.l,"v");c&&c.set&&(s.set=function(f){a.l.v=f})}return Gt(a,function(f,d){s[M1[f]]=ZJ(d)?s[M1[f]]:d}),s}var Do=dn(Mr,"defineProperty"),o9=dn(Mr,"defineProperties");function Dt(a,s,c){return Do(a,s,XS(c))}function Xs(a,s){var c={};return Gt(s,function(f,d){c[f]=XS(d)}),Ye(cQ(s),function(f){a9(s,f)&&(c[f]=XS(s[f]))}),o9(a,c)}function s9(a,s,c,f,d){var v={};return Gt(a,function(y,g){P1(v,y,s?g:y),P1(v,g,y)}),f?f(v):v}function P1(a,s,c,f){Do(a,s,{value:c,enumerable:!0,writable:!1})}function dQ(a,s){return a!==a?s!==s:a===0&&s===0?1/a===1/s:a===s}var fQ=Jn(dn(Mr,"isFrozen"),nQ),u9=dn(Mr,"freeze");function hQ(a){return a}function pQ(a){return I1(a),a[Ng]||Qn}var _1=dn(Mr,"assign"),oo=dn(Mr,"keys");function l9(a,s){if((Pt(a)||Kr(a)||Ke(a))&&!fQ(a)){for(var c=0;c<s.length;c++)if(s[c]===a)return a;s.push(a),Gt(a,function(f,d){l9(d,s)}),ka(a)}return a}function xf(a){return u9?l9(a,[]):a}var ka=Jn(u9,hQ),D1=Jn(dn(Mr,"getPrototypeOf"),pQ),c9=Jn(dn(Mr,"is"),dQ);function gQ(a){return s9(a,1,0,ka)}function mQ(a){return s9(a,0,0,ka)}function vQ(a){var s={};return Gt(a,function(c,f){P1(s,c,f[1]),P1(s,f[0],f[1])}),ka(s)}function yQ(a){return vQ(a)}var d9=mQ({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),f9="__tsUtils$gblCfg",YS;function h9(){var a;return typeof globalThis!==pc&&(a=globalThis),!a&&typeof self!==pc&&(a=self),!a&&typeof window!==pc&&(a=window),!a&&typeof global!==pc&&(a=global),a}function L1(){if(!YS){var a=St(h9).v||{};YS=a[f9]=a[f9]||{}}return YS}var p9=dn(yf,"min"),Fg=dn(yf,"max"),g9=cs("slice",no),Di=cs("substring",no),Bu=wf("substr",no,bQ);function bQ(a,s,c){return I1(a),c<0?$S:(s=s||0,s<0&&(s=Fg(s+a[gc],0)),Cn(c)?g9(a,s):g9(a,s,s+c))}function R1(a,s){return Di(a,0,s)}function wQ(a,s){return a&&(St(function(){a[ZR]=!0,a[e9]=s}),St(Dt,[a,ZR,{v:!0,w:!1,e:!1}]),St(Dt,[a,e9,{v:s,w:!1,e:!1}])),a}var xr=Jn(dn(Mr,"create"),xQ);function xQ(a,s){var c=null;function f(){}if(io(a))c={};else{var d=typeof a;d!==Rg&&d!==S1&&xa("Prototype must be an Object or function: "+at(a)),f[Gr]=a,St(function(){f[Ng]=a}),c=new f}return s&&St(o9,[c,s]),c}function so(){return(Date.now||kQ)()}function kQ(){return new Date().getTime()}function uo(a,s,c){return a.apply(s,c)}function JS(a,s){return a.apply(s,ro[Zn](arguments,2))}function m9(a,s){return a.bind.apply(a,ro[Zn](arguments,1))}var kr;function Vu(){kr=L1()}function Bg(a,s){var c={};return!kr&&Vu(),c.b=kr.lzy,Do(c,"v",{configurable:!0,get:function(){var f=uo(a,null,s);return kr.lzy||Do(c,"v",{value:f}),c.b=kr.lzy,f}}),c}var QS=dn(yf,"random"),TQ=Bg(function(){for(var a=so().toString(36).slice(2);a.length<16;)a+=QS().toString(36).slice(2);return a=a.substring(0,16),a}),v9="_urid",SQ="$nw21sym",ZS,CQ=0;function AQ(){if(!ZS){var a=L1();ZS=a.gblSym=a.gblSym||{k:{},s:{}}}return ZS}var N1;function eC(a){var s="_"+CQ+++"_"+TQ.v,c=zS+"("+a+")";function f(v,y){Dt(d,v,{v:y,e:!1,w:!1})}var d=xr(null);return f("description",Qt(a)),f(jg,function(){return c+SQ+s}),f("valueOf",function(){return d}),f("v",c),f("_uid",s),wQ(d,"symbol")}function EQ(a){var s=AQ();if(!Zi(s.k,a)){var c=eC(a),f=oo(s.s).length;c[v9]=function(){return f+"_"+c[jg]()},s.k[a]=c,s.s[c[v9]()]=Qt(a)}return s.k[a]}function IQ(a){!N1&&(N1={});var s,c=d9[a];return c&&(s=N1[c]=N1[c]||eC(zS+"."+c)),s}function On(a){return Do({toJSON:function(){return a}},"v",{value:a})}function lo(a,s){var c={toJSON:function(){return c.v}};return Do(c,"v",{get:function(){var f=uo(a,null,s);return a=Qn,Do(c,"v",{value:f}),f},configurable:!0})}var y9="window",Vg;function kf(a,s){var c;return function(){return!kr&&Vu(),(!c||kr.lzy)&&(c=On(St(a,s).v)),c.v}}function co(a){return!kr&&Vu(),(!Vg||a===!1||kr.lzy)&&(Vg=On(St(h9).v||Qn)),Vg.v}function jt(a,s){var c;if(!Vg||s===!1?c=co(s):c=Vg.v,c&&c[a])return c[a];if(a===y9)try{return window}catch{}return Qn}function b9(){return!!jr()}var jr=kf(jt,["document"]);function O1(){return!!Ta()}var Ta=kf(jt,[y9]);function MQ(){return!!$u()}var $u=kf(jt,["navigator"]);function PQ(){return!!w9()}var w9=kf(jt,["history"]),_Q=kf(function(){return!!St(function(){var a=jt("process");return a&&(a.versions||{}).node}).v}),x9=kf(function(){return!!St(function(){return self&&self instanceof WorkerGlobalScope}).v}),Tf,tC;function j1(){return Tf=On(St(jt,[zS]).v),Tf}function DQ(a){var s=(kr.lzy?0:Tf)||j1();return s.v?s.v[a]:ci}function LQ(){return!!RQ()}function RQ(){return!kr&&Vu(),((kr.lzy?0:Tf)||j1()).v}function U1(a,s){var c=d9[a];!kr&&Vu();var f=(kr.lzy?0:Tf)||j1();return f.v?f.v[c||a]:IQ(a)}function Sf(a,s){!kr&&Vu();var c=(kr.lzy?0:Tf)||j1();return c.v?c.v(a):eC(a)}function F1(a){return!kr&&Vu(),tC=(kr.lzy?0:tC)||On(St(DQ,["for"]).v),(tC.v||EQ)(a)}function nC(a){return!!a&&Ke(a.next)}function k9(a){return!io(a)&&Ke(a[U1(3)])}var B1;function Ys(a,s,c){if(a&&(nC(a)||(!B1&&(B1=On(U1(3))),a=a[B1.v]?a[B1.v]():Qn),nC(a))){var f=ci,d=ci;try{for(var v=0;!(d=a.next()).done&&s[Zn](io(c)?a:c,d.value,v,a)!==-1;)v++}catch(y){f={e:y},a.throw&&(d=Qn,a.throw(f))}finally{try{d&&!d.done&&a.return&&a.return(d)}finally{if(f)throw f.e}}}}function Cf(a,s){return!Cn(s)&&a&&(Pt(s)?uo(a.push,a,s):nC(s)||k9(s)?Ys(s,function(c){a.push(c)}):a.push(s)),a}var An=cs("indexOf",bf),$g=cs("map",bf);function zg(a,s,c){return((a?a.slice:Qn)||ro).apply(a,ro[Zn](arguments,1))}function NQ(a,s,c){return An(a,s,c)!==-1}var OQ=wf("includes",bf,NQ),ds=sQ(gc),di=dn(yf,"floor");function jQ(a){var s=!1;function c(){return a.v}function f(){s||(s=a.n?a.n(arguments):!0);var g={done:s};return s||Dt(g,"value",{g:c}),g}function d(g){return s=!0,{done:!0,value:a.r&&a.r(g)}}function v(g){return s=!0,{done:!0,value:a.t&&a.t(g)}}var y={next:f};return a.r&&(y.return=d),a.t&&(y.throw=v),y}var UQ=cs("reduce",bf),rC,iC=Jn(dn(Mr,"setPrototypeOf"),FQ);function FQ(a,s){var c;return!rC&&(rC=On((c={},c[Ng]=[],c instanceof Array))),rC.v?a[Ng]=s:Gt(s,function(f,d){return a[f]=d}),a}function BQ(a,s,c){St(Dt,[s,C1,{v:a,c:!0,e:!1}]),s=iC(s,c);function f(){this[Og]=s,St(Dt,[this,C1,{v:a,c:!0,e:!1}])}return s[Gr]=c===Qn?xr(c):(f[Gr]=c[Gr],new f),s}function T9(a,s){s&&(a[C1]=s)}function aC(a,s,c,f){var d=Error,v=d[Gr][C1],y=Error.captureStackTrace,g=function(){var C=this,E=arguments,I=C[Og]===g;try{St(T9,[d,a]);var D=uo(d,C,f?f(E):ro[Zn](E))||C;if(D!==C){var L=D1(C);L!==D1(D)&&iC(D,L)}return I&&y&&y(D,g),s&&JS(s,D,D,E,I),D}finally{St(T9,[d,v])}};return BQ(a,g,d)}var oC;function VQ(a){throw oC||(oC=aC("UnsupportedError")),new oC(a)}var S9=cs("replace",no);function $Q(a){return function(s){return I1(s),s=Qt(s),s&&(s=S9(s,a,$S)),s}}var zQ=$Q(/^\s+|(?=\s)\s+$/g),En=wf("trim",no,zQ),HQ=cs("toUpperCase",no),qQ=cs("toLowerCase",no);function C9(a){return S9(Qt(a),/(_|\b)\w/g,HQ)}function GQ(a,s,c){return lo(function(){var f=St(a,c);return f.e?s:f.v})}var KQ=Jn(dn(Mr,HS),WS),WQ=Jn(dn(Mr,YR),r9);function XQ(a,s,c){if(a!==Qn&&a!==ci){for(var f in a)if(Zi(a,f)&&s[Zn](io(c)?a:c,f,a[f])===-1)return;Ye(WQ(a),function(d){if(a9(a,d)&&s[Zn](io(c)?a:c,d,a[d])===-1)return-1})}}function YQ(a,s,c){XQ(a,function(f,d){if(!mc(f))return s[Zn](io(c)?a:c,f,d)},c)}var sC,uC,lC;function Li(a){if(!a||typeof a!==Rg)return!1;lC||(lC=O1()?Ta():!0);var s=!1;if(a!==lC){uC||(sC=Function[Gr][jg],uC=sC[Zn](Mr));try{var c=D1(a);s=!c,s||(Qi(c,Og)&&(c=c[Og]),s=!!(c&&typeof c===S1&&sC[Zn](c)===uC))}catch{}}return s}var cC;function Ale(a,s){s&&a.push(s)}function Ele(a,s){s&&s[Gr]}function JQ(){var a=[Ug,no,bf,BJ,$J,HJ,GJ,WJ,YJ];return St(jt,["Map"]).v,St(jt,["Set"]).v,St(jt,["WeakMap"]).v,St(jt,["WeakSet"]).v,St(jt,["Promise"]).v,St(jt,["Symbol"]).v,St(jt,["ArrayBuffer"]).v,St(jt,["SharedArrayBuffer"]).v,St(jt,["DataView"]).v,St(jt,["Int8Array"]).v,St(jt,["Uint8Array"]).v,St(jt,["Uint8ClampedArray"]).v,St(jt,["Int16Array"]).v,St(jt,["Uint16Array"]).v,St(jt,["Int32Array"]).v,St(jt,["Uint32Array"]).v,St(jt,["Float32Array"]).v,St(jt,["Float64Array"]).v,St(jt,["BigInt64Array"]).v,St(jt,["BigUint64Array"]).v,St(jt,["WeakRef"]).v,St(jt,["FinalizationRegistry"]).v,a}function dC(a){return cC||(cC=On(JQ())),An(cC.v,a)>=0}function QQ(a){return a.value&&I9(a),!0}var A9=[nZ,I9,iZ,rZ];function ZQ(a,s,c,f){var d;return Ye(a,function(v){if(v.k===s)return d=v,-1}),d||(d={k:s,v:s},a.push(d),f(d)),d.v}function fC(a,s,c,f){var d=c.handler,v=c.path?f?c.path.concat(f):c.path:[],y={handler:c.handler,src:c.src,path:v},g=typeof s,C=!1,E=s===Qn;E||(s&&g===Rg?C=Li(s):E=tQ(g));var I={type:g,isPrim:E,isPlain:C,value:s,result:s,path:v,origin:c.src,copy:function(D,L){return fC(a,D,L?y:c,L)},copyTo:function(D,L){return E9(a,D,L,y)}};return I.isPrim?d&&d[Zn](c,I)?I.result:s:ZQ(a,s,v,function(D){Dt(I,"result",{g:function(){return D.v},s:function(O){D.v=O}});for(var L=0,F=d;!(F||(L<A9.length?A9[L++]:QQ))[Zn](c,I);)F=Qn})}function E9(a,s,c,f){return dC(c)||YQ(c,function(d,v){s[d]=fC(a,v,f,d)}),s}function eZ(a,s,c){var f={handler:c,src:s,path:[]};return E9([],a,s,f)}function tZ(a,s){var c={handler:s,src:a};return fC([],a,c)}function nZ(a){var s=a.value;if(Pt(s)){var c=a.result=[];return c.length=s.length,a.copyTo(c,s),!0}return!1}function rZ(a){var s=a.value;return GS(s)?(a.result=new Date(s.getTime()),!0):!1}function iZ(a){return a.type===S1}function I9(a){var s=a.value;if(s&&a.isPlain){var c=a.result={};return a.copyTo(c,s),!0}return!1}function M9(a,s){return Ye(s,function(c){eZ(a,c)}),a}function P9(a,s,c,f,d,v,y){return M9(tZ(a)||{},ro[Zn](arguments))}function aZ(a,s,c,f,d,v,y){return M9(a||{},ro[Zn](arguments))}var V1=cs("split",no);function _9(a,s,c){if(a&&s){var f=V1(s,"."),d=f.pop(),v=!0,y,g;if(Ye(f,function(C){if(dC(a)||mc(C))return v=!1,-1;Oe(a[C])&&(a[C]={},y||(y=a,g=C)),a=a[C]}),v&&!io(d)&&!dC(a)&&!mc(d))a[d]=c;else if(y)try{delete y[g]}catch{}}}var hC;function Sa(){return!kr&&Vu(),(!hC||kr.lzy)&&(hC=On(St(jt,["performance"]).v)),hC.v}function pC(){var a=Sa();return a&&a.now?a.now():so()}var oZ=dn(yf,"abs"),gC=dn(yf,"round"),Bn=cs("indexOf",no),D9=wf("endsWith",no,sZ);function sZ(a,s,c){i9(a);var f=ct(s)?s:Qt(s),d=!Cn(c)&&c<a[gc]?c:a[gc];return Di(a,d-f[gc],d)===f}var uZ=wf("startsWith",no,lZ);function lZ(a,s,c){i9(a);var f=ct(s)?s:Qt(s),d=c>0?c:0;return Di(a,d,d+f[gc])===f}var mC="ref",vC="unref",yC="hasRef",cZ="enabled";function dZ(a,s,c){var f=!0,d=a?s(Qn):Qn,v;function y(){return f=!1,d&&d[vC]&&d[vC](),v}function g(){d&&c(d),d=Qn}function C(){return d=s(d),f||y(),v}function E(I){!I&&d&&g(),I&&!d&&C()}return v={cancel:g,refresh:C},v[yC]=function(){return d&&d[yC]?d[yC]():f},v[mC]=function(){return f=!0,d&&d[mC]&&d[mC](),v},v[vC]=y,v=Do(v,cZ,{get:function(){return!!d},set:E}),{h:v,dn:function(){d=Qn}}}var fZ,hZ;function pZ(a){var s=Ke(a)?a:fZ;if(!s){var c=L1().tmOut||[];Pt(c)&&c.length>0&&Ke(c[0])&&(s=c[0])}return s||setTimeout}function gZ(a){var s=Ke(a)?a:hZ;if(!s){var c=L1().tmOut||[];Pt(c)&&c.length>1&&Ke(c[1])&&(s=c[1])}return s||clearTimeout}function L9(a,s,c){var f=Pt(s),d=f?s.length:0,v=pZ(d>0?s[0]:f?ci:s),y=gZ(d>1?s[1]:ci),g=c[0];c[0]=function(){C.dn(),uo(g,ci,ro[Zn](arguments))};var C=dZ(a,function(E){if(E){if(E.refresh)return E.refresh(),E;uo(y,ci,[E])}return uo(v,ci,c)},function(E){uo(y,ci,[E])});return C.h}function Ca(a,s){return L9(!0,ci,ro[Zn](arguments))}function mZ(a,s){return L9(!1,ci,ro[Zn](arguments))}var $1,z1="constructor",Js="prototype",H1="function",Hg="_dynInstFuncs",bC="_isDynProxy",Af="_dynClass",wC="_dynBaseFuncs",vZ="_dynCls$",xC="_dynInstChk",qg=xC,R9="_dyn_r$",N9="_dfOpts",O9="_unknown_",kC="__proto__",q1="_dyn"+kC,j9="__dynProto$Gbl",TC="_dynInstProto",G1="useBaseInst",SC="setInstFuncs",CC=Object,Gg=CC.getPrototypeOf,U9=CC.getOwnPropertyNames,F9=co(),AC=F9[j9]||(F9[j9]={o:($1={},$1[SC]=!0,$1[G1]=!0,$1),n:1e3});function K1(a){return a&&(a===CC[Js]||a===Array[Js])}function EC(a){return K1(a)||a===Function[Js]}function vc(a){var s;if(a){if(Gg)return Gg(a);var c=a[kC]||a[Js]||(a[z1]?a[z1][Js]:null);s=a[q1]||c,Qi(a,q1)||(delete a[TC],s=a[q1]=a[TC]||a[q1],a[TC]=c)}return s}function W1(a,s){var c=[];if(U9)c=U9(a);else for(var f in a)typeof f=="string"&&Qi(a,f)&&c.push(f);if(c&&c.length>0)for(var d=0;d<c.length;d++)s(c[d])}function IC(a,s,c){return s!==z1&&typeof a[s]===H1&&(c||Qi(a,s))&&s!==kC&&s!==Js}function X1(a){xa("DynamicProto: "+a)}function yZ(a){var s=xr(null);return W1(a,function(c){!s[c]&&IC(a,c,!1)&&(s[c]=a[c])}),s}function MC(a,s){for(var c=a.length-1;c>=0;c--)if(a[c]===s)return!0;return!1}function bZ(a){if(Qi(a,wC))return a[wC];for(var s=xr(null),c=vc(a),f=[];c&&!EC(c)&&!MC(f,c);)W1(c,function(d){!s[d]&&IC(c,d,!Gg)&&(s[d]=c)}),f.push(c),c=vc(c);return a[wC]=s,s}function wZ(a,s,c,f){function d(C,E,I){var D=E[I];if(D[bC]&&f){var L=C[Hg]||{};L[qg]!==!1&&(D=(L[E[Af]]||{})[I]||D)}return function(){return D.apply(C,arguments)}}var v=xr(null);W1(c,function(C){v[C]=d(s,c,C)});var y=bZ(a);for(var g in y)v[g]||(v[g]=d(s,y[g],g));return v}function xZ(a,s,c,f){var d=null;if(a&&Qi(c,Af)){var v=a[Hg]||xr(null);if(d=(v[c[Af]]||xr(null))[s],d||X1("Missing ["+s+"] "+H1),!d[xC]&&v[qg]!==!1){var y=!Qi(a,s);if(y)for(var g=vc(a),C=[];g&&!EC(g)&&!MC(C,g);){var E=g[s];if(E){y=E===f;break}C.push(g),g=vc(g)}try{y&&(a[s]=d),d[xC]=1}catch{v[qg]=!1}}}return d}function kZ(a,s,c){var f=s[a];return f===c&&(f=vc(s)[a]),typeof f!==H1&&X1("["+a+"] is not a "+H1),f}function TZ(a,s,c,f,d){function v(C,E){var I=R9+s+"."+E,D=function(){var L=this[Hg],F=L?L[I]:void 0;return F||(F=xZ(this,E,C,D)||kZ(E,C,D),L&&(L[I]=F)),F.apply(this,arguments)};return D[bC]=1,D}if(!K1(a)){var y=c[Hg]=c[Hg]||xr(null);if(!K1(y)){var g=y[s]=y[s]||xr(null);y[qg]!==!1&&(y[qg]=!!d),K1(g)||W1(c,function(C){IC(c,C,!1)&&c[C]!==f[C]&&(g[C]=c[C],delete c[C],delete y[R9+s+"."+C],(!Qi(a,C)||a[C]&&!a[C][bC])&&(a[C]=v(a,C)))})}}}function SZ(a,s){if(Gg){for(var c=[],f=vc(s);f&&!EC(f)&&!MC(c,f);){if(f===a)return!0;c.push(f),f=vc(f)}return!1}return!0}function PC(a,s){return Qi(a,Js)?a.name||s||O9:((a||{})[z1]||{}).name||s||O9}function or(a,s,c,f){Qi(a,Js)||X1("theClass is an invalid class definition.");var d=a[Js];SZ(d,s)||X1("["+PC(a)+"] not in hierarchy of ["+PC(s)+"]");var v=null;Qi(d,Af)?v=d[Af]:(v=vZ+PC(a,"_")+"$"+AC.n,AC.n++,d[Af]=v);var y=or[N9],g=!!y[G1];g&&f&&f[G1]!==void 0&&(g=!!f[G1]);var C=yZ(s),E=wZ(d,s,C,g);c(s,E);var I=!!Gg&&!!y[SC];I&&f&&(I=!!f[SC]),TZ(d,v,s,C,I!==!1)}or[N9]=AC.o;var B9="function",V9="object",_C="undefined",Qs="prototype",DC=Object,$9=DC[Qs];(co()||{}).Symbol,(co()||{}).Reflect;var z9="hasOwnProperty",CZ=function(a){for(var s,c=1,f=arguments.length;c<f;c++){s=arguments[c];for(var d in s)$9[z9].call(s,d)&&(a[d]=s[d])}return a},Aa=_1||CZ,LC=function(a,s){return LC=DC.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)f[z9](d)&&(c[d]=f[d])},LC(a,s)};function Zs(a,s){typeof s!==B9&&s!==null&&xa("Class extends value "+String(s)+" is not a constructor or null"),LC(a,s);function c(){this.constructor=a}a[Qs]=s===null?xr(s):(c[Qs]=s[Qs],new c)}function H9(a,s){for(var c=0,f=s.length,d=a.length;c<f;c++,d++)a[d]=s[c];return a}var q9=gQ,AZ=yQ,zu=q9({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Ea="toLowerCase",De="length",Kg="warnToConsole",eu="throwInternal",yc="watch",bc="apply",pt="push",Lo="splice",hr="logger",Hu="cancel",Wg="initialize",qu="identifier",Y1="removeNotificationListener",J1="addNotificationListener",Ef="stringify",fi="traceId",Ur="spanId",Ri="traceFlags",fs="isInitialized",RC="traceHdrMode",Q1="getNotifyMgr",Xg="getPlugin",Z1="track",Ni="name",eb="iKey",If="time",Oi="processNext",G9="getProcessTelContext",K9="pollInternalLogs",NC="instrumentationKey",Ro="value",Mf="enabled",W9="stopPollingInternalLogs",wc="unload",tb="onComplete",Pf="reason",Yg="flush",nb="getTraceCtx",OC="setTraceCtx",X9="getActiveSpan",rb="setActiveSpan",jC="spanContext",UC="parentSpanContext",Y9="parentSpanId",J9="loggingLevelConsole",Gu="join",xc="createNew",tu="teardown",ib="messageId",Fr="message",Q9="attributeCountLimit",Z9="suppressTracing",EZ="notImplemented",nu="diagLog",ab="_doTeardown",Jg="update",hs="getNext",Qg="setNextPlugin",ji="split",FC="isChildEvt",Ia="data",_f="getCtx",ps="setCtx",fo="config",eN="call",tN="itemsReceived",ru="replace",ob="headers",Zg="urlString",Df="timeout",iu="status",nN="host",rN="exception",Ku="type",em="match",BC="setTraceFlags",VC="pathname",kc="traceState",Lf="count",$C="preTriggerDate",zC="getUTCDate",au="properties",IZ="userAgent",HC="attributes",qC="startTime",GC="duration",Rf="toString",iN="handler",aN="errorHandlers",MZ="evtName",tm="concat",KC="warn",Tc="ingestionendpoint",sb="createEvent",WC="substring",oN="getAllResponseHeaders",XC="removeItem",YC="getAttribute",sN="correlationHeaderExcludePatterns",nm="entries",PZ="traceCfg",Wu="measurements",ub="sizeInBytes",lb="typeName",rm="exceptions",im="severityLevel",JC="problemGroup",Nf="parsedStack",cb="hasFullStack",db="assembly",ou="fileName",Of="line",fb="aiDataContract",QC;function _Z(a,s){QC||(QC=aC("AggregationError",function(f,d){d[De]>1&&(f.errors=d[1])}));var c=a;throw Ye(s,function(f,d){c+=`
`.concat(d," > ").concat(at(f))}),new QC(c,s||[])}/*!
 * NevWare21 Solutions LLC - ts-async, 0.5.5
 * https://github.com/nevware21/ts-async
 * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
 * Licensed under the MIT license.
 */var hb="Promise",ZC="rejected";function ea(a,s){return pb(a,function(c){return s?s({status:"fulfilled",rejected:!1,value:c}):c},function(c){return s?s({status:ZC,rejected:!0,reason:c}):c})}function pb(a,s,c,f){var d=a;try{if(_o(a))(s||c)&&(d=a.then(s,c));else try{s&&(d=s(a))}catch(v){if(c)d=c(v);else throw v}}finally{f&&uN(d,f)}return d}function uN(a,s){var c=a;return s&&(_o(a)?a.finally?c=a.finally(s):c=a.then(function(f){return s(),f},function(f){throw s(),f}):s()),c}var lN=["pending","resolving","resolved",ZC],cN="dispatchEvent",gb;function DZ(a){var s;return a&&a.createEvent&&(s=a.createEvent("Event")),!!s&&s.initEvent}function LZ(a,s,c,f){var d=jr();!gb&&(gb=On(!!St(DZ,[d]).v));var v=gb.v?d.createEvent("Event"):f?new Event(s):{};if(c&&c(v),gb.v&&v.initEvent(s,!1,!0),v&&a[cN])a[cN](v);else{var y=a["on"+s];if(y)y(v);else{var g=jt("console");g&&(g.error||g.log)(s,at(v))}}}var dN="unhandledRejection",RZ=dN.toLowerCase(),fN=[],NZ=0,OZ=10,e3;function hN(a){return Ke(a)?a.toString():at(a)}function pN(a,s,c){var f=zg(arguments,3),d=0,v=!1,y,g=[],C=NZ++,E=!1,I=null,D;function L(ge,K){try{fN.push(C),E=!0,I&&I.cancel(),I=null;var we=a(function(x,se){g.push(function(){try{var te=d===2?ge:K,Be=Cn(te)?y:Ke(te)?te(y):te;_o(Be)?Be.then(x,se):te?x(Be):d===3?se(Be):x(Be)}catch(Me){se(Me)}}),v&&$()},f);return we}finally{fN.pop()}}function F(ge){return L(void 0,ge)}function O(ge){var K=ge,we=ge;return Ke(ge)&&(K=function(x){return ge&&ge(),x},we=function(x){throw ge&&ge(),x}),L(K,we)}function X(){return lN[d]}function $(){if(g.length>0){var ge=g.slice();g=[],E=!0,I&&I.cancel(),I=null,s(ge)}}function Y(ge,K){return function(we){if(d===K){if(ge===2&&_o(we)){d=1,we.then(Y(2,1),Y(3,1));return}d=ge,v=!0,y=we,$(),!E&&ge===3&&!I&&(I=Ca(Z,OZ))}}}function Z(){if(!E)if(E=!0,_Q())process.emit(dN,y,D);else{var ge=Ta()||co();!e3&&(e3=On(St(jt,[hb+"RejectionEvent"]).v)),LZ(ge,RZ,function(K){return Dt(K,"promise",{g:function(){return D}}),K.reason=y,K},!!e3.v)}}D={then:L,catch:F,finally:O},Do(D,"state",{get:X}),LQ()&&(D[U1(11)]="IPromise");function Q(){return"IPromise "+X()+(v?" - "+hN(y):"")}return D.toString=Q,(function(){Ke(c)||xa(hb+": executor is not a function - "+hN(c));var ge=Y(3,0);try{c.call(D,Y(2,0),ge)}catch(K){ge(K)}})(),D}function jZ(a){return function(s){var c=zg(arguments,1);return a(function(f,d){try{var v=[],y=1;Ys(s,function(g,C){g&&(y++,pb(g,function(E){v[C]=E,--y===0&&f(v)},d))}),y--,y===0&&f(v)}catch(g){d(g)}},c)}}function UZ(a){return On(function(s){var c=zg(arguments,1);return a(function(f,d){var v=[],y=1;function g(C,E){y++,ea(C,function(I){I.rejected?v[E]={status:ZC,reason:I.reason}:v[E]={status:"fulfilled",value:I.value},--y===0&&f(v)})}try{Pt(s)?Ye(s,g):k9(s)?Ys(s,g):xa("Input is not an iterable"),y--,y===0&&f(v)}catch(C){d(C)}},c)})}function gN(a){Ye(a,function(s){try{s()}catch{}})}function FZ(a){var s=ao(a)?a:0;return function(c){Ca(function(){gN(c)},s)}}function mN(a,s){return pN(mN,FZ(s),a,s)}var t3;function BZ(a,s){!t3&&(t3=On(St(jt,[hb]).v||null));var c=t3.v;if(!c)return mN(a);Ke(a)||xa(hb+": executor is not a function - "+at(a));var f=0;function d(){return lN[f]}var v=new c(function(y,g){function C(I){f=2,y(I)}function E(I){f=3,g(I)}a(C,E)});return Do(v,"state",{get:d}),v}var n3;function am(a){return pN(am,gN,a)}function VZ(a,s){return!n3&&(n3=UZ(am)),n3.v(a,s)}var r3;function gs(a,s){return!r3&&(r3=On(BZ)),r3.v.call(this,a,s)}var $Z=jZ(gs),Kn=void 0,Ve="",jf="channels",Br="core",i3="createPerfMgr",Uf="disabled",a3="extensionConfig",Ff="extensions",No="processTelemetry",mb="priority",vb="eventsSent",om="eventsDiscarded",yb="eventsSendRequest",o3="eventsRetry",Sc="perfEvent",s3="offlineEventsStored",u3="offlineBatchSent",l3="offlineBatchDrop",bb="getPerfMgr",c3="domain",d3="path",zZ="Not dynamic - ",HZ="REDACTED",vN=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],f3="version";function qZ(a,s,c){return!a&&Oe(a)?s:n9(a)?a:Qt(a)[Ea]()==="true"}function hi(a){return{mrg:!0,v:a}}function yN(a,s){return{set:a,v:s}}function wb(a,s,c){return{fb:c,isVal:a,v:s}}function Tr(a,s){return{fb:s,set:qZ,v:!!a}}function GZ(a){return{isVal:ct,v:Qt(Ve)}}var KZ="getPrototypeOf",WZ=/-([a-z])/g,XZ=/([^\w\d_$])/g,YZ=/^(\d+[\w\d_$])/,Bf,bN=Object[KZ];function xb(a){return!Oe(a)}function kb(a){var s=a;return s&&ct(s)&&(s=s[ru](WZ,function(c,f){return f.toUpperCase()}),s=s[ru](XZ,"_"),s=s[ru](YZ,function(c,f){return"_"+f})),s}function pi(a,s){return a&&s?Bn(a,s)!==-1:!1}function Vf(a){return a&&a.toISOString()||Ve}function pn(a){return KS(a)?a[Ni]:Ve}function Pn(a,s,c,f,d){var v=c;return a&&(v=a[s],v!==c&&(!d||d(v))&&(!f||f(c))&&(v=c,a[s]=v)),v}function Ui(a,s,c){var f;return a?(f=a[s],!f&&Oe(f)&&(f=Cn(c)?{}:c,a[s]=f)):f=Cn(c)?{}:c,f}function wN(a,s){var c=null,f=null;return Ke(a)?c=a:f=a,function(){var d=arguments;if(c&&(f=c()),f)return f[s][bc](f,d)}}function JZ(a,s,c){if(a&&s&&Kr(a)&&Kr(s)){var f=function(v){if(ct(v)){var y=s[v];Ke(y)?(!c||c(v,!0,s,a))&&(a[v]=wN(s,v)):(!c||c(v,!1,s,a))&&(Zi(a,v)&&delete a[v],Dt(a,v,{g:function(){return s[v]},s:function(g){s[v]=g}}))}};for(var d in s)f(d)}return a}function Tb(a,s,c,f,d){a&&s&&c&&(a[s]=wN(c,f))}function sm(a,s,c,f){return a&&s&&Kr(a)&&Pt(c)&&Ye(c,function(d){ct(d)&&Tb(a,d,s,d)}),a}function QZ(a){return(function(){function s(){var c=this;a&&Gt(a,function(f,d){c[f]=d})}return s})()}function um(a,s){return St(Dt,[a,U1(11),Ke(s)?{g:s,e:!1}:{v:s,w:!1,e:!1}]),a}function lm(a,s){if(a){var c=bN(a),f=!1;c&&St(function(){var d=um(xr(c),s);Bf||(Bf=On(Sf("ai$ProtoName"))),Dt(d,Bf.v,{v:!0,w:!1,e:!1}),iC(a,d),f=!0}),f||St(um,[a,s])}return a}function ZZ(a,s){if(Bf){for(;a&&a!==$9&&!a[Bf.v];){var c=D1(a);if(a===c)break;a=c}a[Bf.v]&&St(um,[a,s])}return a}function xN(a){return a&&_1&&(a=DC(_1({},a))),a}function kN(a,s,c,f,d,v){var y=arguments,g=y[0]||{},C=y[De],E=!1,I=1;for(C>0&&n9(g)&&(E=g,g=y[I]||{},I++),Kr(g)||(g={});I<C;I++){var D=y[I],L=Pt(D),F=Kr(D);for(var O in D)if(!mc(O)){var X=L&&O in D||F&&Zi(D,O);if(X){var $=D[O],Y=void 0;if(E&&$&&((Y=Pt($))||Li($))){var Z=g[O];Y?Pt(Z)||(Z=[]):Li(Z)||(Z={}),$=kN(E,Z,$)}$!==void 0&&(g[O]=$)}}}return g}function cm(a,s,c){var f=s&&s.featureOptIn&&s.featureOptIn[a];if(a&&f){var d=f.mode;if(d===3)return!0;if(d===2)return!1}return c}function Sb(a){try{return a.responseText}catch{}return null}function TN(a,s){return a?"XDomainRequest,Response:"+Sb(a)||Ve:s}function Cb(a,s){return a?"XMLHttpRequest,Status:"+a[iu]+",Response:"+Sb(a)||a.response||Ve:s}function SN(a,s){return s&&(ao(s)?a=[s][tm](a):Pt(s)&&(a=s[tm](a))),a}var eee="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",CN="withCredentials",tee="timeout";function nee(a,s,c,f,d,v){d===void 0&&(d=!1);function y(C,E,I){try{C[E]=I}catch{}}var g=new XMLHttpRequest;return y(g,eee,f),c&&y(g,CN,c),g.open(a,s,!d),c&&y(g,CN,c),!d&&v&&y(g,tee,v),g}function ree(a){var s={};if(ct(a)){var c=En(a)[ji](/[\r\n]+/);Ye(c,function(f){if(f){var d=Bn(f,": ");if(d!==-1){var v=En(f.substring(0,d))[Ea](),y=En(f[WC](d+1));s[v]=y}else s[En(f)]=1}})}return s}function h3(a,s,c){if(!a[c]&&s&&s.getResponseHeader){var f=s.getResponseHeader(c);f&&(a[c]=En(f))}return a}var iee="kill-duration",aee="kill-duration-seconds",oee="time-delta-millis";function p3(a,s){var c={};return a[oN]?c=ree(a[oN]()):s&&(c=h3(c,a,oee),c=h3(c,a,iee),c=h3(c,a,aee)),c}function su(a){(isNaN(a)||a<0)&&(a=0),a=gC(a);var s=Ve+a%1e3,c=Ve+di(a/1e3)%60,f=Ve+di(a/(1e3*60))%60,d=Ve+di(a/(1e3*60*60))%24,v=di(a/(1e3*60*60*24));return s=s[De]===1?"00"+s:s[De]===2?"0"+s:s,c=c[De]<2?"0"+c:c,f=f[De]<2?"0"+f:f,d=d[De]<2?"0"+d:d,(v>0?v+".":Ve)+d+":"+f+":"+c+"."+s}function see(a,s,c,f,d){return!d&&ct(a)&&(a==="Script error."||a==="Script error")}var uee="documentMode",lee="location",cee="console",AN="JSON",dee="crypto",fee="msCrypto",hee="ReactNative",g3="msie",m3="trident/",v3,y3,b3,w3,x3;function pee(a,s){var c=!1;if(a){try{if(c=s in a,!c){var f=a[Qs];f&&(c=s in f)}}catch{}if(!c)try{var d=new a;c=!Cn(d[s])}catch{}}return c}function k3(){return x3||(x3=Bg(function(){var a=$u()||{};return a[IZ]||Ve})),x3.v}function ms(a){return typeof location===V9&&location?location:jt(lee)}function gee(){return typeof console!==_C?console:jt(cee)}function dm(){return!!(typeof JSON===V9&&JSON||jt(AN)!==null)}function Oo(){return dm()?JSON||jt(AN):null}function mee(){return jt(dee)}function vee(){return jt(fee)}function yee(){var a=$u();return a&&a.product?a.product===hee:!1}function T3(){var a=k3();if(!v3||a!==y3){y3=a;var s=y3[Ea]();v3=On(pi(s,g3)||pi(s,m3))}return v3.v}function EN(a){a===void 0&&(a=null),a||(a=k3());var s=(a||Ve)[Ea]();if(pi(s,g3)){var c=jr()||{};return Fg(parseInt(s[ji](g3)[1]),c[uee]||0)}else if(pi(s,m3)){var f=parseInt(s[ji](m3)[1]);if(f)return f+4}return null}function fm(a){return(!w3||a===!1)&&(w3=On(MQ()&&!!$u().sendBeacon)),w3.v}function S3(a){var s=!1;try{s=!!jt("fetch");var c=jt("Request");s&&a&&c&&(s=pee(c,"keepalive"))}catch{}return s}function bee(){return b3||(b3=lo(function(){var a=typeof XDomainRequest!==_C;return!!a})),b3.v}function IN(a,s){var c=[];return a&&Ye(a,function(f){f[Ni]&&f[Ni]===s&&c[pt](f)}),c}function wee(a){var s=MN(a);return s[De]>0?s[0]:null}function MN(a){var s=[],c=jr();return c&&a&&Ye(IN(c.querySelectorAll("meta"),a),function(f){s[pt](f.content)}),s}function xee(a){var s,c=PN(a);return c[De]>0&&(s=c[0]),s}function PN(a){var s=[],c=Sa();return c&&c.getEntriesByType&&Ye(c.getEntriesByType("navigation")||[],function(f){Ye(IN(f.serverTiming,a),function(d){var v=d.description;Oe(v)||s[pt](v)})}),s}function kee(a,s){return a&&a.dispatchEvent&&s?(a.dispatchEvent(s),!0):!1}function Tee(a,s){var c=null,f={detail:s||null};if(Ke(CustomEvent))c=new CustomEvent(a,f);else{var d=jr();d&&d[sb]&&(c=d[sb]("CustomEvent"),c.initCustomEvent(a,!0,!0,f))}return c}function See(a,s,c){var f=co();if(f&&f.CustomEvent)try{var d={cfg:s||null,customDetails:c||null};return kee(f,Tee(a,d))}catch{}return!1}function Cee(a){return a.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function Aee(a,s){var c,f=Bn(a,"?");if(f===-1)return a;var d=s?s.redactUrls:void 0;d===3?c=vN[tm](s.redactQueryParams):d===4?c=s.redactQueryParams:c=vN;var v=Di(a,0,f+1),y=Di(a,f+1),g=Ve,C=Bn(y,"#");C!==-1&&(g=Di(y,C),y=Di(y,0,C));for(var E=!1,I=0;I<c[De];I++){var D=c[I]+"=";if(Bn(y,D)!==-1){E=!0;break}}if(!E)return a;var L=[],F=!1;if(y&&y[De])for(var O=y[ji]("&"),I=0;I<O[De];I++){var X=O[I];if(X){var $=Bn(X,"=");if($===-1)L[pt](X);else{var Y=X[WC](0,$),Z=X[WC]($+1);if(Z===Ve)L[pt](X);else{for(var Q=!1,ge=0;ge<c[De];ge++)if(Y===c[ge]){Q=!0,F=!0;break}Q?L[pt](Y+"="+HZ):L[pt](X)}}}}return F?v+L[Gu]("&")+g:a}function Ma(a,s){if(!a||!ct(a)||Bn(a," ")!==-1)return a;var c=s?s.redactUrls:void 0,f=c===!1||c===2;if(f)return a;var d=Bn(a,"@")!==-1,v=Bn(a,"?")!==-1;if(!d&&!v)return a;c===5&&(v=!1),c===6&&(d=!1);try{var y=a;return d&&(y=Cee(a)),v&&(y=Aee(y,s)),y}catch{return a}}var _N=4294967296,Xu=4294967295,DN=123456789,LN=987654321,RN=!1,hm=DN,pm=LN;function Eee(a){a<0&&(a>>>=0),hm=DN+a&Xu,pm=LN-a&Xu,RN=!0}function Iee(){try{var a=so()&2147483647;Eee((QS()*_N^a)+a)}catch{}}function Mee(a){return di(gm()/Xu*(a+1))>>>0}function gm(a){var s=0,c=mee()||vee();return c&&c.getRandomValues&&(s=c.getRandomValues(new Uint32Array(1))[0]&Xu),s===0&&T3()&&(RN||Iee(),s=Pee()&Xu),s===0&&(s=di(_N*QS()|0)),s>>>=0,s}function Pee(a){pm=36969*(pm&65535)+(pm>>16)&Xu,hm=18e3*(hm&65535)+(hm>>16)&Xu;var s=(pm<<16)+(hm&65535)>>>0&Xu|0;return s>>>=0,s}function C3(a){a===void 0&&(a=22);for(var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=gm()>>>0,f=0,d=Ve;d[De]<a;)f++,d+=s.charAt(c&63),c>>>=6,f===5&&(c=(gm()<<2&4294967295|c&3)>>>0,f=0);return d}var NN="3.4.3",_ee="."+C3(6),Dee=0;function ON(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}function Lee(a,s){var c=s[a.id];if(!c){c={};try{ON(s)&&Dt(s,a.id,{e:!1,v:c})}catch{}}return c}function jo(a,s){return s===void 0&&(s=!1),kb(a+Dee+++(s?"."+NN:Ve)+_ee)}function jN(a){var s={id:jo("_aiData-"+(a||Ve)+"."+NN),accept:function(c){return ON(c)},get:function(c,f,d,v){var y=c[s.id];return y?y[kb(f)]:(v&&(y=Lee(s,c),y[kb(f)]=d),d)},kill:function(c,f){if(c&&c[f])try{delete c[f]}catch{}}};return s}function Ab(a){return a&&Kr(a)&&!Pt(a)&&(a.isVal||a.fb||Zi(a,"v")||Zi(a,"mrg")||Zi(a,"ref")||a.set)}function UN(a,s,c){var f,d=c.dfVal||eQ;if(s&&c.fb){var v=c.fb;Pt(v)||(v=[v]);for(var y=0;y<v[De];y++){var g=v[y],C=s[g];if(d(C)?f=C:a&&(C=a.cfg[g],d(C)&&(f=C),a.set(a.cfg,Qt(g),C)),d(f))break}}return!d(f)&&d(c.v)&&(f=c.v),f}function A3(a,s,c){var f=c;if(c&&Ab(c)&&(f=UN(a,s,c)),f){Ab(f)&&(f=A3(a,s,f));var d;Pt(f)?(d=[],d[De]=f[De]):Li(f)&&(d={}),d&&(Gt(f,function(v,y){y&&Ab(y)&&(y=A3(a,s,y)),d[v]=y}),f=d)}return f}function E3(a,s,c,f){var d,v,y,g=f,C,E,I,D;Ab(g)?(d=g.isVal,v=g.set,I=g.rdOnly,D=g.blkVal,C=g.mrg,E=g.ref,!E&&Cn(E)&&(E=!!C),y=UN(a,s,g)):y=f,D&&a.blkVal(s,c);var L,F=!0,O=s[c];(O||!Oe(O))&&(L=O,F=!1,d&&L!==y&&!d(L)&&(L=y,F=!0),v&&(L=v(L,y,s),F=L===y)),F?y?L=A3(a,s,y):L=y:(Li(L)||Pt(y))&&C&&y&&(Li(y)||Pt(y))&&Gt(y,function(X,$){E3(a,L,X,$)}),a.set(s,c,L),E&&a.ref(s,c),I&&a.rdOnly(s,c)}var Yu=F1("[[ai_dynCfg_1]]"),FN=F1("[[ai_blkDynCfg_1]]"),Ree=F1("[[ai_frcDynCfg_1]]");function BN(a){if(a){var s;if(Pt(a)?(s=[],s[De]=a[De]):Li(a)&&(s={}),s)return Gt(a,function(c,f){s[c]=BN(f)}),s}return a}function Nee(a){if(a){var s=a[Yu]||a;if(s.cfg&&(s.cfg===a||s.cfg[Yu]===s))return s}return null}function Oee(a){if(a&&(Li(a)||Pt(a)))try{a[FN]=!0}catch{}return a}function I3(a,s,c){var f=!1;return c&&!a[s.blkVal]&&(f=c[Ree],!f&&!c[FN]&&(f=Li(c)||Pt(c))),f}function VN(a){xa("InvalidAccess:"+a)}var jee=["push","pop","shift","unshift","splice"],mm=function(a,s,c,f){a&&a[eu](3,108,"".concat(c," [").concat(s,"] failed - ")+at(f))};function Uee(a,s,c){Pt(s)&&Ye(jee,function(f){var d=s[f];s[f]=function(){for(var v=[],y=0;y<arguments.length;y++)v[y]=arguments[y];var g=d[bc](this,v);return Mb(a,s,c,"Patching"),g}})}function Eb(a,s){var c=KQ(a,s);return c&&c.get}function Fee(a,s,c,f){var d={n:c,h:[],trk:function(E){E&&E.fn&&(An(d.h,E)===-1&&d.h[pt](E),a.trk(E,d))},clr:function(E){var I=An(d.h,E);I!==-1&&d.h[Lo](I,1)}},v=!0,y=!1;function g(){v&&(y=y||I3(g,a,f),f&&!f[Yu]&&y&&(f=Mb(a,f,c,"Converting")),v=!1);var E=a.act;return E&&d.trk(E),f}g[a.prop]={chng:function(){a.add(d)}};function C(E){if(f!==E){g[a.ro]&&!a.upd&&VN("["+c+"] is read-only:"+at(s)),v&&(y=y||I3(g,a,f),v=!1);var I=y&&g[a.rf];if(y)if(I){Gt(f,function(L){f[L]=E?E[L]:Kn});try{Gt(E,function(L,F){Ib(a,f,L,F)}),E=f}catch(L){mm((a.hdlr||{})[hr],c,"Assigning",L),y=!1}}else f&&f[Yu]&&Gt(f,function(L){var F=Eb(f,L);if(F){var O=F[a.prop];O&&O.chng()}});if(E!==f){var D=E&&I3(g,a,E);!I&&D&&(E=Mb(a,E,c,"Converting")),f=E,y=D}a.add(d)}}Dt(s,d.n,{g,s:C})}function Ib(a,s,c,f){if(s){var d=Eb(s,c),v=d&&!!d[a.prop];v?s[c]=f:Fee(a,s,c,f)}return s}function M3(a,s,c,f){if(s){var d=Eb(s,c),v=d&&!!d[a.prop],y=f&&f[0],g=f&&f[1],C=f&&f[2];if(!v){if(C)try{Oee(s)}catch(E){mm((a.hdlr||{})[hr],c,"Blocking",E)}try{Ib(a,s,c,s[c]),d=Eb(s,c)}catch(E){mm((a.hdlr||{})[hr],c,"State",E)}}y&&(d[a.rf]=y),g&&(d[a.ro]=g),C&&(d[a.blkVal]=!0)}return s}function Mb(a,s,c,f){try{Gt(s,function(d,v){Ib(a,s,d,v)}),s[Yu]||(Do(s,Yu,{get:function(){return a.hdlr}}),Uee(a,s,c))}catch(d){mm((a.hdlr||{})[hr],c,f,d)}return s}var vm="[[ai_",ym="]]";function Bee(a){var s=Sf(vm+"get"+a.uid+ym),c=Sf(vm+"ro"+a.uid+ym),f=Sf(vm+"rf"+a.uid+ym),d=Sf(vm+"blkVal"+a.uid+ym),v=Sf(vm+"dtl"+a.uid+ym),y=null,g=null,C;function E(F,O){var X=C.act;try{C.act=F,F&&F[v]&&(Ye(F[v],function(Y){Y.clr(F)}),F[v]=[]),O({cfg:a.cfg,set:a.set.bind(a),setDf:a.setDf.bind(a),ref:a.ref.bind(a),rdOnly:a.rdOnly.bind(a)})}catch(Y){var $=a[hr];throw $&&$[eu](1,107,at(Y)),Y}finally{C.act=X||null}}function I(){if(y){var F=y;y=null,g&&g[Hu](),g=null;var O=[];if(Ye(F,function(X){if(X&&(X[v]&&(Ye(X[v],function($){$.clr(X)}),X[v]=null),X.fn))try{E(X,X.fn)}catch($){O[pt]($)}}),y)try{I()}catch(X){O[pt](X)}O[De]>0&&_Z("Watcher error(s): ",O)}}function D(F){if(F&&F.h[De]>0){y||(y=[]),g||(g=Ca(function(){g=null,I()},0));for(var O=0;O<F.h[De];O++){var X=F.h[O];X&&An(y,X)===-1&&y[pt](X)}}}function L(F,O){if(F){var X=F[v]=F[v]||[];An(X,O)===-1&&X[pt](O)}}return C={prop:s,ro:c,rf:f,blkVal:d,hdlr:a,add:D,notify:I,use:E,trk:L},C}function Vee(a,s){var c={fn:s,rm:function(){c.fn=null,a=null,s=null}};return Dt(c,"toJSON",{v:function(){return"WatcherHandler"+(c.fn?Ve:"[X]")}}),a.use(c,s),c}function $ee(a,s,c){var f=Nee(s);if(f)return f;var d=jo("dyncfg",!0),v=s&&c!==!1?s:BN(s),y;function g(){y.notify()}function C($,Y,Z){try{$=Ib(y,$,Y,Z)}catch(Q){mm(a,Y,"Setting value",Q)}return $[Y]}function E($){return Vee(y,$)}function I($,Y){y.use(null,function(Z){var Q=y.upd;try{Cn(Y)||(y.upd=Y),$(Z)}finally{y.upd=Q}})}function D($,Y){var Z;return M3(y,$,Y,(Z={},Z[0]=!0,Z))[Y]}function L($,Y){var Z;return M3(y,$,Y,(Z={},Z[1]=!0,Z))[Y]}function F($,Y){var Z;return M3(y,$,Y,(Z={},Z[2]=!0,Z))[Y]}function O($,Y){return Y&&Gt(Y,function(Z,Q){E3(X,$,Z,Q)}),$}var X={uid:null,cfg:v,logger:a,notify:g,set:C,setDf:O,watch:E,ref:D,rdOnly:L,blkVal:F,_block:I};return Dt(X,"uid",{c:!1,e:!1,w:!1,v:d}),y=Bee(X),Mb(y,v,"config","Creating"),X}function zee(a,s){a?(a[Kg](s),a[eu](2,108,s)):VN(s)}function ho(a,s,c,f){var d=$ee(c,a||{},f);return s&&d.setDf(d.cfg,s),d}function pr(a,s,c){var f=a[Yu]||a;return f.cfg&&(f.cfg===a||f.cfg[Yu]===f)?f[yc](s):(zee(c,zZ+at(a)),ho(a,null,c)[yc](s))}var Ju="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Hee=500,$N="sampleRate",P3="ProcessLegacy",zN="http.method",_3="https://dc.services.visualstudio.com",$f="/v2/track",vs="not_specified",D3="iKey",L3=[vb,om,yb,Sc],Pb=null,_b;function qee(a,s){return function(){var c=arguments,f=HN(s);if(f){var d=f.listener;d&&d[a]&&d[a][bc](d,c)}}}function Gee(){var a=jt("Microsoft");return a&&(Pb=a.ApplicationInsights),Pb}function HN(a){var s=Pb;return!s&&a.disableDbgExt!==!0&&(s=Pb||Gee()),s?s.ChromeDbgExt:null}function Kee(a){if(!_b){_b={};for(var s=0;s<L3[De];s++)_b[L3[s]]=qee(L3[s],a)}return _b}var zf,qN="warnToConsole",Wee="AI (Internal): ",Xee="AI: ",Yee="AITR_",Jee={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},Qee=(zf={},zf[0]=null,zf[1]="errorToConsole",zf[2]=qN,zf[3]="debugToConsole",zf);function GN(a){return a?'"'+a[ru](/\"/g,Ve)+'"':Ve}function R3(a,s){var c=gee();if(c){var f="log";c[a]&&(f=a),Ke(c[f])&&c[f](s)}}var bm=(function(){function a(s,c,f,d){f===void 0&&(f=!1);var v=this;v[ib]=s,v[Fr]=(f?Xee:Wee)+s;var y=Ve;dm()&&(y=Oo()[Ef](d));var g=(c?" message:"+GN(c):Ve)+(d?" props:"+GN(y):Ve);v[Fr]+=g}return a.dataType="MessageData",a})();function Hf(a,s){return(a||{})[hr]||new Db(s||(a||{})[fo])}var Db=(function(){function a(s){this.identifier="DiagnosticLogger",this.queue=[];var c=0,f={},d,v,y,g,C;or(a,this,function(E){C=D(s||{}),E.consoleLoggingLevel=function(){return d},E[eu]=function(O,X,$,Y,Z){Z===void 0&&(Z=!1);var Q=new bm(X,$,Z,Y);if(g)throw at(Q);var ge=Qee[O]||qN;if(Cn(Q[Fr]))F("throw"+(O===1?"Critical":"Warning"),Q);else{if(Z){var K=+Q[ib];!f[K]&&d>=O&&(E[ge](Q[Fr]),f[K]=!0)}else d>=O&&E[ge](Q[Fr]);I(O,Q)}},E.debugToConsole=function(O){R3("debug",O),F("warning",O)},E[Kg]=function(O){R3("warn",O),F("warning",O)},E.errorToConsole=function(O){R3("error",O),F("error",O)},E.resetInternalMessageCount=function(){c=0,f={}},E.logInternalMessage=I,E[wc]=function(O){C&&C.rm(),C=null},Dt(E,"dbgMode",{g:function(){return g}});function I(O,X){if(!L()){var $=!0,Y=Yee+X[ib];if(f[Y]?$=!1:f[Y]=!0,$&&(O<=v&&(E.queue[pt](X),c++,F(O===1?"error":"warn",X)),c===y)){var Z="Internal events throttle limit per PageView reached for this app.",Q=new bm(23,Z,!1);E.queue[pt](Q),O===1?E.errorToConsole(Z):E[Kg](Z)}}}function D(O){return pr(ho(O,Jee,E).cfg,function(X){var $=X.cfg;d=$[J9],v=$.loggingLevelTelemetry,y=$.maxMessageLimit,g=$.enableDebug})}function L(){return c>=y}function F(O,X){var $=HN(s||{});$&&$[nu]&&$[nu](O,X)}})}return a.__ieDyn=1,a})();function N3(a){return a||new Db}function Je(a,s,c,f,d,v){v===void 0&&(v=!1),N3(a)[eu](s,c,f,d,v)}function Cc(a,s){N3(a)[Kg](s)}function Zee(a,s,c){N3(a).logInternalMessage(s,c)}function wm(){}var KN=32,ete=512,WN="[a-z]",tte="[a-z\\d]",O3="[a-z\\d_\\-*\\/]",nte="("+WN+O3+"{0,255})",rte="("+tte+O3+"{0,240})",ite="("+WN+O3+"{0,13})",ate="("+rte+"@"+ite+")",XN="!-+\\--<>-~",ote="[ "+XN+"]{0,255}["+XN+"]",YN=new RegExp("^\\s*((?:"+nte+"|"+ate+")=("+ote+"))\\s*$");function JN(a){if(a){YN.lastIndex=0;var s=YN.exec(a);if(s&&s[De]>=7&&s[1]&&s[6]){var c=s[3]?1:0,f=null;c===1&&(f={tenantId:s[4],systemId:s[5]});var d={type:c,key:s[2],multiTenant:f,value:s[6]};return d}}return null}function ste(a){var s=[];if(a){var c=[];Ye(V1(a,","),function(f){var d=JN(f);if(d&&An(c,d.key)===-1&&(s[pt](d),c[pt](d.key),s[De]>=KN))return-1})}return s}function QN(a,s){for(var c=0;c<a[De];c++)if(a[c].key===s)return c;return-1}function ZN(a,s){var c=[],f=[];return Ye(a,function(d){d[Ro]!=null?c[pt](d.key):f[pt](d.key)}),s&&Ye(s.keys,function(d){An(c,d)===-1&&An(f,d)===-1&&c[pt](d)}),c}function ute(a,s){var c,f=!0;return a&&a[De]>0&&Ye(a,function(d){d[Ro]!=null?f=!1:(c||(c=[]),c[pt](d.key))}),f&&s&&(f=s.isEmpty,!f&&c&&c[De]>0&&(f=!0,Ye(s.keys,function(d){if(An(c,d)===-1)return f=!1,-1}))),f}function lte(a){return!!(a&&Pt(a.keys)&&Ke(a.get)&&Ke(a.set)&&Ke(a.del)&&Ke(a.hdrs))}function Uo(a,s){var c=GQ(ste,[],[a||Ve]);function f(I){var D,L=c.v,F=QN(L,I);if(F!==-1){var O=L[F][Ro];O!=null&&(D=O)}else s&&(D=s.get(I));return D}function d(I){if(I){var D=c.v,L=QN(D,I.key);return L!==-1&&D[Lo](L,1),D.unshift(I),c=On(D),0}return-1}function v(I,D){var L;return I&&ct(I)&&!Oe(D)&&ct(D)&&(L=JN(I+"="+D)),d(L)}function y(I){d({type:2,key:I})}function g(I,D,L){var F=[],O=Ve,X=0,$=0;D=D||KN,L=L||ete;var Y=c.v;return Ye(ZN(Y,s),function(Z){var Q=f(Z);if(!Oe(Q)&&ct(Q)){X++;var ge=Z+"="+Q,K=ge[De];if($+1+K>=L){if(F[pt](O),I&&F[De]<=I)return-1;O=Ve,$=0}if(O[De]>0&&(O+=",",$++),O+=ge,$+=K,X>=D)return-1}}),O&&F[pt](O),F}var C={keys:[],isEmpty:!1,get:f,set:v,del:y,hdrs:g,child:function(){return Uo(null,C)}};function E(){var I=C.hdrs(1);return I[De]>0?I[0]:Ve}return Xs(C,{keys:{g:function(){return ZN(c.v,s)}},isEmpty:{g:function(){return ute(c.v,s)}},toString:{v:E,e:!1},_p:{v:s,e:!1}}),um(C,E),C}function cte(){var a="tracestate",s=null,c=MN(a);if(c[De]>0&&(s=Uo(c[Gu](","))),!s){var f=PN(a);f[De]>0&&(s=Uo(f[Gu](",")))}return s}function Ac(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],s=Ve,c,f=0;f<4;f++)c=gm(),s+=a[c&15]+a[c>>4&15]+a[c>>8&15]+a[c>>12&15]+a[c>>16&15]+a[c>>20&15]+a[c>>24&15]+a[c>>28&15];var d=a[8+(gm()&3)|0];return Bu(s,0,8)+Bu(s,9,4)+"4"+Bu(s,13,3)+d+Bu(s,16,3)+Bu(s,19,12)}var eO=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,j3="00",tO="ff",xm="00000000000000000000000000000000",km="0000000000000000";function Tm(a,s,c){return a&&a[De]===s&&a!==c?!!a.match(/^[\da-f]*$/i):!1}function nO(a,s,c){return Tm(a,s)?a:c}function dte(a){(isNaN(a)||a<0||a>255)&&(a=1);for(var s=a[Rf](16);s[De]<2;)s="0"+s;return s}function rO(a,s,c,f){return{version:Tm(f,2,tO)?f:j3,traceId:qf(a)?a:Ac(),spanId:Gf(s)?s:R1(Ac(),16),traceFlags:!Oe(c)&&c>=0&&c<=255?c:1}}function iO(a,s){if(!a||(Pt(a)&&(a=a[0]||Ve),!a||!ct(a)||a[De]>8192))return null;if(Bn(a,",")!==-1){var c=a[ji](",");a=c[0]}eO.lastIndex=0;var f=eO.exec(En(a));return!f||f[1]===tO||f[2]===xm||f[3]===km?null:{version:(f[1]||Ve)[Ea](),traceId:(f[2]||Ve)[Ea](),spanId:(f[3]||Ve)[Ea](),traceFlags:parseInt(f[4],16)}}function qf(a){return Tm(a,32,xm)}function Gf(a){return Tm(a,16,km)}function aO(a){if(a){var s=dte(a[Ri]);Tm(s,2)||(s="01");var c=a[f3]||j3;return c!=="00"&&c!=="ff"&&(c=j3),"".concat(c.toLowerCase(),"-").concat(nO(a.traceId,32,xm).toLowerCase(),"-").concat(nO(a.spanId,16,km).toLowerCase(),"-").concat(s.toLowerCase())}return Ve}function fte(a){var s="traceparent",c=iO(wee(s));return c||(c=iO(xee(s))),c}function hte(a){var s=a.getElementsByTagName("script"),c=[];return Ye(s,function(f){var d=f[YC]("src");if(d){var v=f[YC]("crossorigin"),y=f.hasAttribute("async")===!0,g=f.hasAttribute("defer")===!0,C=f[YC]("referrerpolicy"),E={url:d};v&&(E.crossOrigin=v),y&&(E.async=y),g&&(E.defer=g),C&&(E.referrerPolicy=C),c[pt](E)}}),c}function Kf(a,s){if(a&&a[wc])return a[wc](s)}function oO(a,s,c){var f;return c||(f=gs(function(d){c=d})),a&&ds(a)>0?ea(Kf(a[0],s),function(){oO(zg(a,1),s,c)}):c(),f}var U3,Qu,sO="toGMTString",uO="toUTCString",F3="cookie",B3="expires",lO="isCookieUseDisabled",Sm="disableCookiesUsage",Wf="_ckMgr",Lb=null,V3=null,cO=null,ys,dO={},Rb={},pte=(U3={cookieCfg:hi((Qu={},Qu[c3]={fb:"cookieDomain",dfVal:xb},Qu.path={fb:"cookiePath",dfVal:xb},Qu.enabled=Kn,Qu.ignoreCookies=Kn,Qu.blockedCookies=Kn,Qu.disableCookieDefer=!1,Qu)),cookieDomain:Kn,cookiePath:Kn},U3[Sm]=Kn,U3);function $3(){!ys&&(ys=Bg(function(){return jr()}))}function gte(a,s){var c=Ob[Wf]||Rb[Wf];return c||(c=Ob[Wf]=Ob(a,s),Rb[Wf]=c),c}function Nb(a){return a?a.isEnabled():!0}function fO(a,s){return s&&a&&Pt(a.ignoreCookies)?An(a.ignoreCookies,s)!==-1:!1}function hO(a,s){return s&&a&&Pt(a.blockedCookies)&&An(a.blockedCookies,s)!==-1?!0:fO(a,s)}function pO(a,s){var c=s[Mf];if(Oe(c)){var f=void 0;Cn(a[lO])||(f=!a[lO]),Cn(a[Sm])||(f=!a[Sm]),c=f}return c}function z3(a,s){var c;return a&&(c=a.getCookieMgr()),c||(c=gte(s,(a||{})[hr])),c}function Ob(a,s){var c,f,d,v,y,g,C,E,I=[];function D($){var Y,Z=(Y={},Y[d3]=$||"/",Y[B3]="Thu, 01 Jan 1970 00:00:01 GMT",Y);return T3()||(Z["max-age"]="0"),vO(Ve,Z)}function L($,Y,Z,Q){var ge={},K=En($||Ve),we=Bn(K,";");if(we!==-1&&(K=En(R1($,we)),ge=gO(Di($,we+1))),Pn(ge,c3,Z||d,E1,Cn),!Oe(Y)){var x=T3();if(Cn(ge[B3])){var se=so(),te=se+Y*1e3;if(te>0){var Be=new Date;Be.setTime(te),Pn(ge,B3,mO(Be,x?sO:uO)||mO(Be,x?sO:uO)||Ve,E1)}}x||Pn(ge,"max-age",Ve+Y,null,Cn)}var Me=ms();return Me&&Me.protocol==="https:"&&(Pn(ge,"secure",null,null,Cn),V3===null&&(V3=!vte(k3())),V3&&Pn(ge,"SameSite","None",null,Cn)),Pn(ge,d3,Q||f,null,Cn),vO(K,ge)}function F($){if(I)for(var Y=I[De]-1;Y>=0;Y--)I[Y].n===$&&I[Lo](Y,1)}function O(){H3(s)&&I&&(Ye(I,function($){hO(c,$.n)||($.o===0?C($.n,$.v):$.o===1&&E($.n,$.v))}),I=[])}a=ho(a||Rb,null,s).cfg,v=pr(a,function($){$.setDf($.cfg,pte),c=$.ref($.cfg,"cookieCfg"),f=c[d3]||"/",d=c[c3],c.disableCookieDefer?I=null:I===null&&(I=[]);var Y=y;y=pO(a,c)!==!1,g=c.getCookie||mte,C=c.setCookie||yO,E=c.delCookie||yO,!Y&&y&&I&&O()},s);var X={isEnabled:function(){var $=pO(a,c)!==!1&&y&&H3(s),Y=Rb[Wf];return $&&Y&&X!==Y&&($=Nb(Y)),$},setEnabled:function($){c[Mf]=$,Cn(a[Sm])||(a[Sm]=!$)},set:function($,Y,Z,Q,ge){var K=!1,we=hO(c,$);if(!we){var x=L(Y,Z,Q,ge);Nb(X)?(C($,x),K=!0):I&&(F($),I[pt]({n:$,o:0,v:x}),K=!0)}return K},get:function($){var Y=Ve,Z=fO(c,$);if(!Z){if(Nb(X))Y=g($);else if(I)for(var Q=I[De]-1;Q>=0;Q--){var ge=I[Q];if(ge.n===$){if(ge.o===0){var K=ge.v,we=Bn(K,";");Y=En(we!==-1?R1(K,we):K)}break}}}return Y},del:function($,Y){var Z=!1;return Nb(X)?Z=X.purge($,Y):I&&(F($),I[pt]({n:$,o:1,v:D(Y)}),Z=!0),Z},purge:function($,Y){var Z=!1;return H3(s)&&(E($,D(Y)),Z=!0),Z},unload:function($){v&&v.rm(),v=null,I=null}};return X[Wf]=X,X}function H3(a){if(Lb===null){Lb=!1,!ys&&$3();try{var s=ys.v||{};Lb=s[F3]!==void 0}catch(c){Je(a,2,68,"Cannot access document.cookie - "+pn(c),{exception:at(c)})}}return Lb}function gO(a){var s={};if(a&&a[De]){var c=En(a)[ji](";");Ye(c,function(f){if(f=En(f||Ve),f){var d=Bn(f,"=");d===-1?s[f]=null:s[En(R1(f,d))]=En(Di(f,d+1))}})}return s}function mO(a,s){return Ke(a[s])?a[s]():null}function vO(a,s){var c=a||Ve;return Gt(s,function(f,d){c+="; "+f+(Oe(d)?Ve:"="+d)}),c}function mte(a){var s=Ve;if(!ys&&$3(),ys.v){var c=ys.v[F3]||Ve;cO!==c&&(dO=gO(c),cO=c),s=En(dO[a]||Ve)}return s}function yO(a,s){!ys&&$3(),ys.v&&(ys.v[F3]=a+"="+s)}function vte(a){return ct(a)?!!(pi(a,"CPU iPhone OS 12")||pi(a,"iPad; CPU OS 12")||pi(a,"Macintosh; Intel Mac OS X 10_14")&&pi(a,"Version/")&&pi(a,"Safari")||pi(a,"Macintosh; Intel Mac OS X 10_14")&&D9(a,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||pi(a,"Chrome/5")||pi(a,"Chrome/6")||pi(a,"UnrealEngine")&&!pi(a,"Chrome")||pi(a,"UCBrowser/12")||pi(a,"UCBrowser/11")):!1}var yte={perfEvtsSendAll:!1};function bte(a){a.h=null;var s=a.cb;a.cb=[],Ye(s,function(c){St(c.fn,[c.arg])})}function uu(a,s,c,f){Ye(a,function(d){d&&d[s]&&(c?(c.cb[pt]({fn:f,arg:d}),c.h=c.h||Ca(bte,0,c)):St(f,[d]))})}var wte=(function(){function a(s){this.listeners=[];var c,f,d=[],v={h:null,cb:[]},y=ho(s,yte);f=y[yc](function(g){c=!!g.cfg.perfEvtsSendAll}),or(a,this,function(g){Dt(g,"listeners",{g:function(){return d}}),g[J1]=function(C){d[pt](C)},g[Y1]=function(C){for(var E=An(d,C);E>-1;)d[Lo](E,1),E=An(d,C)},g[vb]=function(C){uu(d,vb,v,function(E){E[vb](C)})},g[om]=function(C,E,I){uu(d,om,v,function(D){D[om](C,E,I)})},g[yb]=function(C,E){uu(d,yb,E?v:null,function(I){I[yb](C,E)})},g[Sc]=function(C){C&&(c||!C[FC]())&&uu(d,Sc,null,function(E){C.isAsync?Ca(function(){return E[Sc](C)},0):E[Sc](C)})},g[o3]=function(C,E){uu(d,o3,v,function(I){I[o3](C,E)})},g[s3]=function(C){C&&C[De]&&uu(d,s3,v,function(E){E[s3](C)})},g[u3]=function(C){C&&C[Ia]&&uu(d,u3,v,function(E){E[u3](C)})},g[l3]=function(C,E){if(C>0){var I=E||0;uu(d,l3,v,function(D){D[l3](C,I)})}},g[wc]=function(C){var E=function(){f&&f.rm(),f=null,d=[],v.h&&v.h[Hu](),v.h=null,v.cb=[]},I;if(uu(d,"unload",null,function(D){var L=D[wc](C);L&&(I||(I=[]),I[pt](L))}),I)return gs(function(D){return ea($Z(I),function(){E(),D()})});E()}})}return a.__ieDyn=1,a})(),Xf="ctx",q3="ParentContextKey",Cm="ChildrenContextKey",xte=null,jb=(function(){function a(s,c,f){var d=this;if(d.start=so(),d[Ni]=s,d.isAsync=f,d[FC]=function(){return!1},Ke(c)){var v;Dt(d,"payload",{g:function(){return!v&&Ke(c)&&(v=c(),c=null),v}})}d[_f]=function(y){return y?y===a[q3]||y===a[Cm]?d[y]:(d[Xf]||{})[y]:null},d[ps]=function(y,g){if(y)if(y===a[q3])d[y]||(d[FC]=function(){return!0}),d[y]=g;else if(y===a[Cm])d[y]=g;else{var C=d[Xf]=d[Xf]||{};C[y]=g}},d.complete=function(){var y=0,g=d[_f](a[Cm]);if(Pt(g))for(var C=0;C<g[De];C++){var E=g[C];E&&(y+=E[If])}d[If]=so()-d.start,d.exTime=d[If]-y,d.complete=wm}}return a.ParentContextKey="parent",a.ChildrenContextKey="childEvts",a})(),kte=(function(){function a(s){this.ctx={},or(a,this,function(c){c.create=function(f,d,v){return new jb(f,d,v)},c.fire=function(f){f&&(f.complete(),s&&Ke(s[Sc])&&s[Sc](f))},c[ps]=function(f,d){if(f){var v=c[Xf]=c[Xf]||{};v[f]=d}},c[_f]=function(f){return(c[Xf]||{})[f]}})}return a.__ieDyn=1,a})(),G3="CoreUtils.doPerf";function Ub(a,s,c,f,d){if(a){var v=a;if(v[bb]&&(v=v[bb]()),v){var y=void 0,g=v[_f](G3);try{if(y=v.create(s(),f,d),y){if(g&&y[ps]&&(y[ps](jb[q3],g),g[_f]&&g[ps])){var C=g[_f](jb[Cm]);C||(C=[],g[ps](jb[Cm],C)),C[pt](y)}return v[ps](G3,y),c(y)}}catch(E){y&&y[ps]&&y[ps]("exception",E)}finally{y&&v.fire(y),v[ps](G3,g)}}}return c()}function Tte(){return xte}var Fo;function bO(){return Fo||(Fo=On(F1("otTraceState"))),Fo}function K3(a){Fo||(Fo=bO());var s={set:function(c,f){var d=Uo(Ve,a);return d.set(c,f),K3(d)},unset:function(c){var f=Uo(Ve,a);return f.del(c),K3(f)},get:function(c){return a.get(c)},serialize:function(){var c=a.hdrs(1);return c[De]>0?c[0]:Ve}};return Dt(s,Fo.v,{g:function(){return a}}),s}function wO(a){return Fo||(Fo=bO()),a&&a[Fo.v]?!0:a&&Ke(a.serialize)&&Ke(a.unset)&&Ke(a.get)&&Ke(a.set)}function Ste(a){var s=null;if(wO(a)){var c=void 0;Fo&&(c=a[Fo.v]),c?s=Uo(Ve,c):s=Uo(a.serialize())}else lte(a)?s=a:s=Uo(ct(a)?a:Ve);return K3(s)}function Cte(a){var s=qf(a[fi])?a[fi]:xm,c=Gf(a[Ur])?a[Ur]:km,f=a.isRemote,d=Oe(a[Ri])?1:a[Ri],v=null,y={traceId:s,spanId:c,traceFlags:d};return Xs(y,{traceId:{g:function(){return s},s:function(g){return s=qf(g)?g:xm}},spanId:{g:function(){return c},s:function(g){return c=Gf(g)?g:km}},isRemote:{g:function(){return f}},traceFlags:{g:function(){return d},s:function(g){return d=g}},traceState:{g:function(){return v||(v=Ste(a[kc])),v},s:function(g){v=g}}})}var Ate=jN("plugin");function Ec(a){return Ate.get(a,"state",{},!0)}function xO(a,s){for(var c=[],f=null,d=a[hs](),v;d;){var y=d[Xg]();if(y){f&&f[Qg]&&y[No]&&f[Qg](y),v=Ec(y);var g=!!v[fs];y[fs]&&(g=y[fs]()),g||c[pt](y),f=y,d=d[hs]()}}Ye(c,function(C){var E=a[Br]();C[Wg](a.getCfg(),E,s,a[hs]()),v=Ec(C),!C[Br]&&!v[Br]&&(v[Br]=E),v[fs]=!0,delete v[tu]})}function W3(a){return a.sort(function(s,c){var f=0;if(c){var d=c[No];s[No]?f=d?s[mb]-c[mb]:1:d&&(f=-1)}else f=s?1:-1;return f})}function Fb(a){return a&&Ke(a.getName)&&Ke(a.getTraceId)&&Ke(a.getSpanId)&&Ke(a.getTraceFlags)&&Ke(a.setName)&&Ke(a.setTraceId)&&Ke(a.setSpanId)&&Ke(a[BC])}function po(a){var s,c=null,f=null,d=a&&qf(a[fi])?a[fi]:Ac(),v=a&&Gf(a[Ur])?a[Ur]:Ve,y=a?a[Ri]:Kn,g=a?a.isRemote:!1,C=Ve,E=null;if(a&&(Fb(a)?(c=a,C=c.getName()):f=a),!C){C="_unknown_";var I=ms();I&&I[VC]&&(C=I[VC]+(I.hash||""))}function D(){return C}function L(we){return function(x){we&&c&&c.setName(x),C=x}}function F(){return d}function O(we){return function(x){we&&c&&c.setTraceId(x),qf(x)&&(d=x)}}function X(){return v}function $(we){return function(x){we&&c&&c.setSpanId(x),Gf(x)&&(v=x)}}function Y(){return y}function Z(we){return function(x){we&&c&&c[BC](x),y=x}}function Q(){return E||(c||f&&(wO(f[kc])?E=Uo(f[kc].serialize()||Ve,c?c[kc]:void 0):E=Uo(Ve,f[kc]||(c?c[kc]:void 0))),E||(E=Uo(Ve,c?c[kc]:void 0))),E}var ge=null,K=lm((s={getName:D,setName:L(!0),getTraceId:F,setTraceId:O(!0),getSpanId:X,setSpanId:$(!0),getTraceFlags:Y},s[BC]=Z(!0),s.traceId=d,s.spanId=v,s.traceFlags=y,s.traceState=E,s.isRemote=g,s.pageName=C,s.getOTelSpanContext=function(){return ge||(ge=Cte(K)),ge},s),"DistributedTraceContext");return Xs(K,{pageName:{g:D,s:L(!1)},traceId:{g:F,s:O(!1)},spanId:{g:X,s:$(!1)},traceFlags:{g:Y,s:Z(!1)},isRemote:{v:g,w:!1},traceState:{g:Q},parentCtx:{g:function(){return c}},_parent:{g:function(){var we;return c?we={t:"traceCtx",v:c}:f&&(we={t:"initCtx",v:f}),we}}})}var Ete="TelemetryPluginChain",kO="_hasRun",TO="_getTelCtx",SO=0;function Ite(a,s,c){for(;a;){if(a[Xg]()===c)return a;a=a[hs]()}return Ic([c],s[fo]||{},s)}function X3(a,s,c,f){var d=null,v=[];s||(s=ho({},null,c[hr])),f!==null&&(d=f?Ite(a,c,f):a);var y={_next:C,ctx:{core:function(){return c},diagLog:function(){return Hf(c,s.cfg)},getCfg:function(){return s.cfg},getExtCfg:D,getConfig:L,hasNext:function(){return!!d},getNext:function(){return d},setNext:function(O){d=O},iterate:F,onComplete:g}};function g(O,X){for(var $=[],Y=2;Y<arguments.length;Y++)$[Y-2]=arguments[Y];O&&v[pt]({func:O,self:Cn(X)?y.ctx:X,args:$})}function C(){var O=d;if(d=O?O[hs]():null,!O){var X=v;X&&X[De]>0&&(Ye(X,function($){try{$.func[eN]($.self,$.args)}catch(Y){Je(c[hr],2,73,"Unexpected Exception during onComplete - "+at(Y))}}),v=[])}return O}function E(O,X){var $=null,Y=I(s.cfg,"extensionConfig",X);return Y&&($=I(Y,O,X)),$}function I(O,X,$){var Y=null;return O&&X&&(Y=O[X],!Y&&$&&(Y={}),O[X]=Y,Y=s.ref(O,X)),Y}function D(O,X,$){var Y=$?I(s.cfg,O,!0):E(O,!0);return X&&Gt(X,function(Z,Q){if(Oe(Y[Z])){var ge=s.cfg[Z];(ge||!Oe(ge))&&(Y[Z]=ge)}E3(s,Y,Z,Q)}),s.setDf(Y,X)}function L(O,X,$){$===void 0&&($=!1);var Y,Z=E(O,!1),Q=s.cfg;return Z&&(Z[X]||!Oe(Z[X]))?Y=Z[X]:(Q[X]||!Oe(Q[X]))&&(Y=Q[X]),Y||!Oe(Y)?Y:$}function F(O){for(var X;X=y._next();){var $=X[Xg]();$&&O($)}}return y}function Bo(a,s,c,f){var d=ho(s),v=X3(a,d,c,f),y=v.ctx;function g(E){var I=v._next();return I&&I[No](E,y),!I}function C(E,I){return E===void 0&&(E=null),Pt(E)&&(E=Ic(E,d.cfg,c,I)),Bo(E||y[hs](),d.cfg,c,I)}return y[Oi]=g,y[xc]=C,y}function Bb(a,s,c){var f=ho(s[fo]),d=X3(a,f,s,c),v=d.ctx;function y(C){var E=d._next();return E&&E[wc](v,C),!E}function g(C,E){return C===void 0&&(C=null),Pt(C)&&(C=Ic(C,f.cfg,s,E)),Bb(C||v[hs](),s,E)}return v[Oi]=y,v[xc]=g,v}function Y3(a,s,c){var f=ho(s[fo]),d=X3(a,f,s,c),v=d.ctx;function y(C){return v.iterate(function(E){Ke(E[Jg])&&E[Jg](v,C)})}function g(C,E){return C===void 0&&(C=null),Pt(C)&&(C=Ic(C,f.cfg,s,E)),Y3(C||v[hs](),s,E)}return v[Oi]=y,v[xc]=g,v}function Ic(a,s,c,f){var d=null,v=!f;if(Pt(a)&&a[De]>0){var y=null;Ye(a,function(g){if(!v&&f===g&&(v=!0),v&&g&&Ke(g[No])){var C=Mte(g,s,c);d||(d=C),y&&y._setNext(C),y=C}})}return f&&!d?Ic([f],s,c):d}function Mte(a,s,c){var f,d=null,v=Ke(a[No]),y=Ke(a[Qg]),g;a?g=a[qu]+"-"+a[mb]+"-"+SO++:g="Unknown-0-"+SO++;var C=(f={getPlugin:function(){return a},getNext:function(){return d}},f[No]=D,f.unload=L,f.update=F,f._id=g,f._setNext=function(O){d=O},f);function E(){var O;return a&&Ke(a[TO])&&(O=a[TO]()),O||(O=Bo(C,s,c)),O}function I(O,X,$,Y,Z){var Q=!1,ge=a?a[qu]:Ete,K=O[kO];return K||(K=O[kO]={}),O.setNext(d),a&&Ub(O[Br](),function(){return ge+":"+$},function(){K[g]=!0;try{var we=d?d._id:Ve;we&&(K[we]=!1),Q=X(O)}catch(se){var x=d?K[d._id]:!0;x&&(Q=!0),(!d||!x)&&Je(O[nu](),1,73,"Plugin ["+ge+"] failed during "+$+" - "+at(se)+", run flags: "+at(K))}},Y,Z),Q}function D(O,X){X=X||E();function $(Y){if(!a||!v)return!1;var Z=Ec(a);return Z[tu]||Z[Uf]?!1:(y&&a[Qg](d),a[No](O,Y),!0)}I(X,$,"processTelemetry",function(){return{item:O}},!O.sync)||X[Oi](O)}function L(O,X){function $(){var Y=!1;if(a){var Z=Ec(a),Q=a[Br]||Z[Br];a&&(!Q||Q===O.core())&&!Z[tu]&&(Z[Br]=null,Z[tu]=!0,Z[fs]=!1,a[tu]&&a[tu](O,X)===!0&&(Y=!0))}return Y}I(O,$,"unload",wm,X.isAsync)||O[Oi](X)}function F(O,X){function $(){var Y=!1;if(a){var Z=Ec(a),Q=a[Br]||Z[Br];a&&(!Q||Q===O.core())&&!Z[tu]&&a[Jg]&&a[Jg](O,X)===!0&&(Y=!0)}return Y}I(O,$,"update",wm,!1)||O[Oi](X)}return ka(C)}function CO(){var a=[];function s(f){f&&a[pt](f)}function c(f,d){Ye(a,function(v){try{v(f,d)}catch(y){Je(f[nu](),2,73,"Unexpected error calling unload handler - "+at(y))}}),a=[]}return{add:s,run:c}}function AO(){var a=[];function s(f){var d=a;a=[],Ye(d,function(v){try{(v.rm||v.remove)[eN](v)}catch(y){Je(f,2,73,"Unloading:"+at(y))}})}function c(f){f&&Cf(a,f)}return{run:s,add:c}}var J3,Zu="getPlugin",Pte=(J3={},J3[a3]={isVal:xb,v:{}},J3),Yf=(function(){function a(){var s=this,c,f,d,v,y;E(),or(a,s,function(I){I[Wg]=function(D,L,F,O){C(D,L,O),c=!0},I[tu]=function(D,L){var F=I[Br];if(!F||D&&F!==D[Br]())return;var O,X=!1,$=D||Bb(null,F,d&&d[Zu]?d[Zu]():d),Y=L||{reason:0,isAsync:!1};function Z(){X||(X=!0,v.run($,L),y.run($[nu]()),O===!0&&$[Oi](Y),E())}return!I[ab]||I[ab]($,Y,Z)!==!0?Z():O=!0,O},I[Jg]=function(D,L){var F=I[Br];if(!F||D&&F!==D[Br]())return;var O,X=!1,$=D||Y3(null,F,d&&d[Zu]?d[Zu]():d),Y=L||{reason:0};function Z(){X||(X=!0,C($.getCfg(),$.core(),$[hs]()))}return!I._doUpdate||I._doUpdate($,Y,Z)!==!0?Z():O=!0,O},Tb(I,"_addUnloadCb",function(){return v},"add"),Tb(I,"_addHook",function(){return y},"add"),Dt(I,"_unloadHooks",{g:function(){return y}})}),s[nu]=function(I){return g(I)[nu]()},s[fs]=function(){return c},s.setInitialized=function(I){c=I},s[Qg]=function(I){d=I},s[Oi]=function(I,D){D?D[Oi](I):d&&Ke(d[No])&&d[No](I,null)},s._getTelCtx=g;function g(I){I===void 0&&(I=null);var D=I;if(!D){var L=f||Bo(null,{},s[Br]);d&&d[Zu]?D=L[xc](null,d[Zu]):D=L[xc](null,d)}return D}function C(I,D,L){ho(I,Pte,Hf(D)),!L&&D&&(L=D[G9]()[hs]());var F=d;d&&d[Zu]&&(F=d[Zu]()),s[Br]=D,f=Bo(L,I,D,F)}function E(){c=!1,s[Br]=null,f=null,d=null,y=AO(),v=CO()}}return a.__ieDyn=1,a})();function _te(a,s,c){var f={id:s,fn:c};Cf(a,f);var d={remove:function(){Ye(a,function(v,y){if(v.id===f.id)return a[Lo](y,1),-1})}};return d}function Dte(a,s,c){for(var f=!1,d=a[De],v=0;v<d;++v){var y=a[v];if(y)try{if(y.fn[bc](null,[s])===!1){f=!0;break}}catch(g){Je(c,2,64,"Telemetry initializer failed: "+pn(g),{exception:at(g)},!0)}}return!f}var Lte=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.identifier="TelemetryInitializerPlugin",c.priority=199;var f,d;v(),or(s,c,function(y,g){y.addTelemetryInitializer=function(C){return _te(d,f++,C)},y[No]=function(C,E){Dte(d,C,E?E[nu]():y[nu]())&&y[Oi](C,E)},y[ab]=function(){v()}});function v(){f=0,d=[]}return c}return s.__ieDyn=1,s})(Yf),Vo,Q3,Z3,EO="Plugins must provide initialize method",Rte="_notificationManager",IO="SDK is still unloading...",Nte="SDK is not initialized",Ote=100,jte=5e4,Ute=128,eA=xf((Vo={cookieCfg:{}},Vo[Ff]={rdOnly:!0,ref:!0,v:[]},Vo[jf]={rdOnly:!0,ref:!0,v:[]},Vo[a3]={ref:!0,v:{}},Vo[i3]=Kn,Vo.loggingLevelConsole=0,Vo.diagnosticLogInterval=Kn,Vo.traceHdrMode=3,Vo.sdkStats=hi({int:9e5}),Vo.traceCfg=hi((Q3={generalLimits:hi((Z3={attributeValueLengthLimit:void 0},Z3[Q9]=Ute,Z3)),serviceName:null},Q3[Z9]=!1,Q3)),Vo));function Fte(a){var s,c={errorHandlers:hi((s={attribError:function(f,d,v){a.logger[eu](2,115,f,{attribName:d,value:v})},spanError:function(f,d){a.logger[eu](2,116,f,{spanName:d})},debug:function(f){a[hr].debugToConsole(f)},warn:function(f){a.logger[Kg](f)},error:function(f){a.logger[eu](1,117,f)}},s[EZ]=function(f){a.logger[eu](1,118,f)},s))};return xf(_1({},eA,c))}function Bte(a,s){return new kte(s)}function Vte(a,s,c){var f=[],d=[],v={};return Ye(c,function(y){(Oe(y)||Oe(y[Wg]))&&wa(EO);var g=y[mb],C=y[qu];y&&g&&(Oe(v[g])?v[g]=C:Cc(a,"Two extensions have same priority #"+g+" - "+v[g]+", "+C)),!g||g<s?f[pt](y):d[pt](y)}),{core:f,channels:d}}function tA(a,s,c,f){c&&Gt(c,function(d,v){f&&Li(v)&&Li(s[d])&&tA(a,s[d],v,f),f&&Li(v)&&Li(s[d])?tA(a,s[d],v,f):a.set(s,d,v)})}function MO(a,s){var c=null,f=-1;return Ye(a,function(d,v){if(d.w===s)return c=d,f=v,-1}),{i:f,l:c}}function $te(a,s){var c=MO(a,s).l;return c||(c={w:s,rm:function(){var f=MO(a,s);f.i!==-1&&a[Lo](f.i,1)}},a[pt](c)),c}function zte(a,s,c){Ye(s,function(f){var d=pr(a,f.w,c);delete f.w,f.rm=function(){d.rm()}})}function Hte(a,s,c,f){return s.add(a[yc](function(d){var v=d.cfg.disableDbgExt;v===!0&&f&&(c[Y1](f),f=null),c&&!f&&v!==!0&&(f=Kee(d.cfg),c[J1](f))})),f}function qte(a){return Dt({rm:function(){a.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON[Ef](a)+">"}})}function Gte(a){var s=null,c=a&1?fte():null,f=a&2?cte():null;return(c||f)&&(s=po({traceId:c?c[fi]:null,spanId:c?c[Ur]:null,traceFlags:c?c[Ri]:Kn,isRemote:!0,traceState:f})),s}var Kte=(function(){function a(){var s,c,f,d,v,y,g,C,E,I,D,L,F,O,X,$,Y,Z,Q,ge,K,we,x,se,te,Be,Me,Ie,je,ee,me,Le,He,Ce,qe,gt,Ne;or(a,this,function(P){Te(),P._getDbgPlgTargets=function(){return[Me,d]},P[fs]=function(){return c},P.activeStatus=function(){return ee},P._setPendingStatus=function(){ee=3},P[Wg]=function(ke,Fe,fe,ve){F&&wa(IO),P[fs]()&&wa("Core cannot be initialized more than once"),s=ho(ke,Fte(P),fe||P[hr],!1),ke=s.cfg,ra(s[yc](function(he){var $e=he.cfg;Le=$e.initInMemoMaxSize||Ote,oe($e);var lt=he.ref(he.cfg,a3);Gt(lt,function(Ot){he.ref(lt,Ot)}),$e[RC]!==$&&(X=Gte($e[RC]),$=$e[RC])})),v=ve,K=Hte(s,ge,v&&P[Q1](),K),La(),P[hr]=fe;var xe=ke[Ff];if(I=[],I[pt].apply(I,H9(H9([],Fe,!1),xe)),D=ke[jf],tn(null),(!L||L[De]===0)&&wa("No "+jf+" available"),D&&D[De]>1){var Ae=P[Xg]("TeeChannelController");(!Ae||!Ae.plugin)&&Je(f,1,28,"TeeChannel required")}zte(ke,Be,f),Be=null,c=!0,ee===zu.ACTIVE&&ze()},P.getChannels=function(){var ke=[];return L&&Ye(L,function(Fe){ke[pt](Fe)}),ka(ke)},P[Z1]=function(ke){Ub(P[bb](),function(){return"AppInsightsCore:track"},function(){ke===null&&(yi(ke),wa("Invalid telemetry item")),!ke[Ni]&&Oe(ke[Ni])&&(yi(ke),wa("telemetry name required")),ke[eb]=ke[eb]||te,ke[If]=ke[If]||Vf(new Date),ke.ver=ke.ver||"4.0",!F&&P[fs]()&&ee===zu.ACTIVE?At()[Oi](ke):ee!==zu.INACTIVE&&d[De]<=Le&&d[pt](ke)},function(){return{item:ke}},!ke.sync)},P[G9]=At,P[Q1]=function(){return v||(v=new wte(s.cfg),P[Rte]=v),v},P[J1]=function(ke){P.getNotifyMgr()[J1](ke)},P[Y1]=function(ke){v&&v[Y1](ke)},P.getCookieMgr=function(){return C||(C=Ob(s.cfg,P[hr])),C},P.setCookieMgr=function(ke){C!==ke&&(Kf(C,!1),C=ke)},P[bb]=function(){return y||g||Tte()},P.setPerfMgr=function(ke){y=ke},P.eventCnt=function(){return d[De]},P.releaseQueue=function(){if(c&&d[De]>0){var ke=d;d=[],ee===2?Ye(ke,function(Fe){Fe[eb]=Fe[eb]||te,At()[Oi](Fe)}):Je(f,2,20,"core init status is not active")}},P[K9]=function(ke){return Y=ke||null,Ne=!1,qe&&qe[Hu](),ot(!0)};function oe(ke){var Fe=ke[NC],fe=ke.endpointUrl;if(ee!==3){if(Oe(Fe)){te=null,ee=zu.INACTIVE;var ve="Please provide instrumentation key";c?(Je(f,1,100,ve),ze()):wa(ve);return}var xe=[];_o(Fe)?(xe[pt](Fe),te=null):te=Fe,_o(fe)?(xe[pt](fe),me=null):me=fe,xe[De]?ne(ke,xe):Ue()}}function ne(ke,Fe){He=!1,ee=3;var fe=xb(ke.initTimeOut)?ke.initTimeOut:jte,ve=VZ(Fe);Ce&&Ce[Hu](),Ce=Ca(function(){Ce=null,He||Ue()},fe),ea(ve,function(xe){try{if(He)return;if(!xe.rejected){var Ae=xe[Ro];if(Ae&&Ae[De]){var he=Ae[0];if(te=he&&he[Ro],Ae[De]>1){var $e=Ae[1];me=$e&&$e[Ro]}}te&&(ke[NC]=te,ke.endpointUrl=me)}Ue()}catch{He||Ue()}})}function Ue(){He=!0,Oe(te)?(ee=zu.INACTIVE,Je(f,1,112,"ikey can't be resolved from promises")):ee=zu.ACTIVE,ze()}function ze(){c&&(P.releaseQueue(),P[K9]())}function ot(ke){if((!qe||!qe[Mf])&&!Ne){var Fe=ke||f&&f.queue[De]>0;Fe&&(gt||(gt=!0,ra(s[yc](function(fe){var ve=fe.cfg.diagnosticLogInterval;(!ve||!(ve>0))&&(ve=1e4);var xe=!1;qe&&(xe=qe[Mf],qe[Hu]()),qe=mZ(ut,ve),qe.unref(),qe[Mf]=xe}))),qe[Mf]=!0)}return qe}P[W9]=function(){Ne=!0,qe&&qe[Hu](),ut()},sm(P,function(){return O},["addTelemetryInitializer"]),P[wc]=function(ke,Fe,fe){ke===void 0&&(ke=!0),c||wa(Nte),F&&wa(IO);var ve={reason:50,isAsync:ke,flushComplete:!1},xe;ke&&!Fe&&(xe=gs(function($e){Fe=$e}));var Ae=Bb(gn(),P);Ae[tb](function(){ge.run(P[hr]),oO([C,v,f],ke,function(){Te(),Fe&&Fe(ve)})},P);function he($e){ve.flushComplete=$e,F=!0,Q.run(Ae,ve),P[W9](),Ae[Oi](ve)}return ut(),vi(ke,he,6,fe),xe},P[Xg]=er,P.addPlugin=function(ke,Fe,fe,ve){if(!ke){ve&&ve(!1),bl(EO);return}var xe=er(ke[qu]);if(xe&&!Fe){ve&&ve(!1),bl("Plugin ["+ke[qu]+"] is already loaded!");return}var Ae={reason:16};function he(Ot){I[pt](ke),Ae.added=[ke],tn(Ae),ve&&ve(!0)}if(xe){var $e=[xe.plugin],lt={reason:2,isAsync:!!fe};Xt($e,lt,function(Ot){Ot?(Ae.removed=$e,Ae[Pf]|=32,he()):ve&&ve(!1)})}else he()},P.updateCfg=function(ke,Fe){Fe===void 0&&(Fe=!0);var fe;if(P[fs]()){fe={reason:1,cfg:s.cfg,oldCfg:P9({},s.cfg),newConfig:P9({},ke),merge:Fe},ke=fe.newConfig;var ve=s.cfg;ke[Ff]=ve[Ff],ke[jf]=ve[jf]}s._block(function(xe){var Ae=xe.cfg;tA(xe,Ae,ke,Fe),Fe||Gt(Ae,function(he){Zi(ke,he)||xe.set(Ae,he,Kn)}),xe.setDf(Ae,eA)},!0),s.notify(),fe&&pu(fe)},P.evtNamespace=function(){return Z},P[Yg]=vi,P[nb]=function(ke){return(!we&&ke!==!1||ke===!0)&&(we=po(X)),we},P[OC]=function(ke){we=ke||null},P.startSpan=function(ke,Fe,fe){return!x||!x.v||!x.v.isAvailable()?null:x.v.createSpan(ke,Fe,fe||P[nb]())},P[X9]=function(ke){return ke!==!1&&x&&!se&&x.v&&(se=x.v.createSpan(x.v.getProviderId(),{recording:!1,root:!0})),se},P[rb]=function(ke){var Fe=null,fe=P[nb](),ve=se,xe;if(ke){var Ae=null;if(ke[jC]?Ae=ke[jC]():ke.context&&(Ae=ke.context()),Ae)if(Fb(Ae))Fe=Ae;else{Fe=po(fe);var he=ke[UC];he||ke[Y9]&&(he={traceId:Ae[fi],spanId:ke[Y9]}),he&&he[fi]!==Fe[fi]&&he[Ur]!==Fe[Ur]&&he[Ri]!==Fe[Ri]&&(Fe[fi]=he[fi],Fe[Ur]=he[Ur],Fe[Ri]=he[Ri],Fe=po(Fe)),Fe[fi]=Ae[fi],Fe[Ur]=Ae[Ur],Fe[Ri]=Ae[Ri]}}return xe={host:P,span:ke,prvSpan:ve,restore:function(){ve?P[rb](ve):(se=null,P[OC](fe)),xe.restore=wm}},se=ke,Fe&&P[OC](Fe),xe},P.setTraceProvider=function(ke){x=ke},P.getTraceProvider=function(){return x?x.v:null},P.addUnloadHook=ra,Tb(P,"addUnloadCb",function(){return Q},"add"),P.onCfgChange=function(ke){var Fe;return c?Fe=pr(s.cfg,ke,P[hr]):Fe=$te(Be,ke),qte(Fe)},P.getWParam=function(){return b9()||s.cfg.enableWParam?0:-1};function zt(){var ke={};Ie=[];var Fe=function(fe){fe&&Ye(fe,function(ve){if(ve[qu]&&ve[f3]&&!ke[ve.identifier]){var xe=ve[qu]+"="+ve[f3];Ie[pt](xe),ke[ve.identifier]=ve}})};Fe(L),D&&Ye(D,function(fe){Fe(fe)}),Fe(I)}function Te(){c=!1,s=ho({},eA,P[hr]),s.cfg[J9]=1,Dt(P,"config",{g:function(){return s.cfg},s:function(Fe){P.updateCfg(Fe,!1)}}),Dt(P,"pluginVersionStringArr",{g:function(){return Ie||zt(),Ie}}),Dt(P,"pluginVersionString",{g:function(){return je||(Ie||zt(),je=Ie[Gu](";")),je||Ve}}),Dt(P,"logger",{g:function(){return f||(f=new Db(s.cfg),s[hr]=f),f},s:function(Fe){s[hr]=Fe,f!==Fe&&(Kf(f,!1),f=Fe)}}),P[hr]=new Db(s.cfg),Me=[];var ke=P[fo][Ff]||[];ke.splice(0,ke[De]),Cf(ke,Me),O=new Lte,X=null,$=0,d=[],Kf(v,!1),v=null,y=null,g=null,Kf(C,!1),C=null,E=null,I=[],D=null,L=null,F=!1,Y=null,Z=jo("AIBaseCore",!0),Q=CO(),we=null,x=null,te=null,ge=AO(),Be=[],je=null,Ie=null,Ne=!1,qe=null,gt=!1,ee=0,me=null,Le=null,He=!1,Ce=null}function At(){var ke=Bo(gn(),s.cfg,P);return ke[tb](ot),ke}function tn(ke){var Fe=Vte(P[hr],Hee,I);E=null,je=null,Ie=null,L=(D||[])[0]||[],L=W3(Cf(L,Fe[jf]));var fe=Cf(W3(Fe[Br]),L);Me=ka(fe);var ve=P[fo][Ff]||[];ve.splice(0,ve[De]),Cf(ve,Me);var xe=At();L&&L[De]>0&&xO(xe[xc](L),fe),xO(xe,fe),ke&&pu(ke)}function er(ke){var Fe=null,fe=null,ve=[];return Ye(Me,function(xe){if(xe[qu]===ke&&xe!==O)return fe=xe,-1;xe.getChannel&&ve[pt](xe)}),!fe&&ve[De]>0&&Ye(ve,function(xe){if(fe=xe.getChannel(ke),!fe)return-1}),fe&&(Fe={plugin:fe,setEnabled:function(xe){Ec(fe)[Uf]=!xe},isEnabled:function(){var xe=Ec(fe);return!xe[tu]&&!xe[Uf]},remove:function(xe,Ae){xe===void 0&&(xe=!0);var he=[fe],$e={reason:1,isAsync:xe};Xt(he,$e,function(lt){lt&&tn({reason:32,removed:he}),Ae&&Ae(lt)})}}),Fe}function gn(){if(!E){var ke=(Me||[]).slice();An(ke,O)===-1&&ke[pt](O),E=Ic(W3(ke),s.cfg,P)}return E}function Xt(ke,Fe,fe){if(ke&&ke[De]>0){var ve=Ic(ke,s.cfg,P),xe=Bb(ve,P);xe[tb](function(){var Ae=!1,he=[];Ye(I,function(lt,Ot){he[pt](lt)}),I=he,je=null,Ie=null;var $e=[];D&&(Ye(D,function(lt,Ot){var Lt=[];Ye(lt,function(et){Lt[pt](et)}),$e[pt](Lt)}),D=$e),fe&&fe(Ae),ot()}),xe[Oi](Fe)}else fe(!1)}function ut(){if(f&&f.queue){var ke=f.queue.slice(0);f.queue[De]=0,Ye(ke,function(Fe){var fe={name:Y||"InternalMessageId: "+Fe[ib],iKey:te,time:Vf(new Date),baseType:bm.dataType,baseData:{message:Fe[Fr]}};P[Z1](fe)})}}function vi(ke,Fe,fe,ve){var xe=1,Ae=!1,he=null;ve=ve||5e3;function $e(){xe--,Ae&&xe===0&&(he&&he[Hu](),he=null,Fe&&Fe(Ae),Fe=null)}if(L&&L[De]>0){var lt=At()[xc](L);lt.iterate(function(Ot){if(Ot[Yg]){xe++;var Lt=!1;Ot[Yg](ke,function(){Lt=!0,$e()},fe)||Lt||(ke&&he==null?he=Ca(function(){he=null,$e()},ve):$e())}})}return Ae=!0,$e(),!0}function La(){var ke;ra(s[yc](function(Fe){var fe=Fe.cfg.enablePerfMgr;if(fe){var ve=Fe.cfg[i3];(ke!==ve||!ke)&&(ve||(ve=Bte),Ui(Fe.cfg,i3,ve),ke=ve,g=null),!y&&!g&&Ke(ve)&&(g=ve(P,P[Q1]()))}else g=null,ke=null}))}function pu(ke){var Fe=Y3(gn(),P);Fe[tb](ot),(!P._updateHook||P._updateHook(Fe,ke)!==!0)&&Fe[Oi](ke)}function bl(ke){var Fe=P[hr];Fe?(Je(Fe,2,73,ke),ot()):wa(ke)}function yi(ke){var Fe=P[Q1]();Fe&&Fe[om]([ke],2)}function ra(ke){ge.add(ke)}})}return a.__ieDyn=1,a})();function nA(a,s){try{if(a&&a!==Ve){var c=Oo().parse(a);if(c&&c[tN]&&c[tN]>=c.itemsAccepted&&c.itemsReceived-c.itemsAccepted===c.errors[De])return c}}catch(f){Je(s,1,43,"Cannot parse the response. "+(f[Ni]||at(f)),{response:a})}return null}var Wte="NoResponseBody",PO="&"+Wte+"=true",rA="POST",Xte=(function(){function a(){var s=0,c,f,d,v,y,g,C,E,I,D,L,F,O,X;or(a,this,function($,Y){var Z=!0;je(),$[Wg]=function(ee,me){d=me,f&&Je(d,1,28,"Sender is already initialized"),$.SetConfig(ee),f=!0},$._getDbgPlgTargets=function(){return[f,v,g,c]},$.SetConfig=function(ee){try{if(y=ee.senderOnCompleteCallBack||{},g=!!ee.disableCredentials,C=ee.fetchCredentials,v=!!ee.isOneDs,c=!!ee.enableSendPromise,I=!!ee.disableXhr,D=!!ee.disableBeacon,L=!!ee.disableBeaconSync,X=ee.timeWrapper,O=!!ee.addNoResponse,F=!!ee.disableFetchKeepAlive,E={sendPOST:Be},v||(Z=!1),g){var me=ms();me&&me.protocol&&me.protocol[Ea]()==="file:"&&(Z=!1)}return!0}catch{}return!1},$.getSyncFetchPayload=function(){return s},$.getSenderInst=function(ee,me){return ee&&ee[De]?we(ee,me):null},$.getFallbackInst=function(){return E},$[ab]=function(ee,me){je()},$.preparePayload=function(ee,me,Le,He){if(!me||He||!Le[Ia]){ee(Le);return}try{var Ce=jt("CompressionStream");if(!Ke(Ce)){ee(Le);return}var qe=new ReadableStream({start:function(Ue){Ue.enqueue(ct(Le[Ia])?new TextEncoder().encode(Le[Ia]):Le[Ia]),Ue.close()}}),gt=qe.pipeThrough(new Ce("gzip")),Ne=gt.getReader(),P=[],oe=0,ne=!1;return ea(Ne.read(),function Ue(ze){if(!ne&&!ze.rejected){var ot=ze[Ro];if(!ot.done)return P[pt](ot[Ro]),oe+=ot.value[De],ea(Ne.read(),Ue);for(var zt=new Uint8Array(oe),Te=0,At=0,tn=P;At<tn.length;At++){var er=tn[At];zt.set(er,Te),Te+=er[De]}Le[Ia]=zt,Le[ob]["Content-Encoding"]="gzip",Le._chunkCount=P[De]}ne||(ne=!0,ee(Le))}),Ne}catch{ee(Le);return}};function Q(ee,me){x(me,200,{},ee)}function ge(ee,me){Je(d,2,26,"Failed to send telemetry.",{message:ee}),x(me,400,{})}function K(ee){ge("No endpoint url is provided for the batch",ee)}function we(ee,me){for(var Le=0,He=null,Ce=0;He==null&&Ce<ee[De];)Le=ee[Ce],!I&&Le===1?bee()&&(He=Ie):Le===2&&S3(me)&&(!me||!F)?He=Me:Le===3&&fm()&&(me?!L:!D)&&(He=te),Ce++;return He?{_transport:Le,_isSync:me,sendPOST:He}:null}function x(ee,me,Le,He){try{ee&&ee(me,Le,He)}catch{}}function se(ee,me){var Le=$u(),He=ee[Zg];if(!He)return K(me),!0;He=ee[Zg]+(O?PO:Ve);var Ce=ee[Ia],qe=v?Ce:new Blob([Ce],{type:"text/plain;charset=UTF-8"}),gt=Le.sendBeacon(He,qe);return gt}function te(ee,me,Le){var He=ee[Ia];try{if(He)if(se(ee,me))Q(Ve,me);else{var Ce=y&&y.beaconOnRetry;Ce&&Ke(Ce)?Ce(ee,me,se):(E&&E.sendPOST(ee,me,!0),Je(d,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(qe){v&&Cc(d,"Failed to send telemetry using sendBeacon API. Ex:"+at(qe)),x(me,v?0:400,{},Ve)}}function Be(ee,me,Le){var He,Ce,qe,gt=ee[ob]||{};!Le&&c&&(He=gs(function(ne,Ue){Ce=ne,qe=Ue})),v&&Le&&ee.disableXhrSync&&(Le=!1);var Ne=ee[Zg];if(!Ne){K(me),Ce&&Ce(!1);return}var P=nee(rA,Ne,Z,!0,Le,ee[Df]);v||P.setRequestHeader("Content-type","application/json"),Ye(oo(gt),function(ne){P.setRequestHeader(ne,gt[ne])}),P.onreadystatechange=function(){v||(oe(P),P.readyState===4&&Ce&&Ce(!0))},P.onload=function(){v&&oe(P)};function oe(ne){var Ue=y&&y.xhrOnComplete,ze=Ue&&Ke(Ue);if(ze)Ue(ne,me,ee);else{var ot=Sb(ne);x(me,ne[iu],p3(ne,v),ot)}}return P.onerror=function(ne){x(me,v?P[iu]:400,p3(P,v),v?Ve:Cb(P)),qe&&qe(ne)},P.ontimeout=function(){x(me,v?P[iu]:500,p3(P,v),v?Ve:Cb(P)),Ce&&Ce(!1)},P.send(ee[Ia]),He}function Me(ee,me,Le){var He,Ce=ee[Zg],qe=ee[Ia],gt=v?qe:new Blob([qe],{type:"application/json"}),Ne,P,oe,ne=new Headers,Ue=qe[De],ze=!1,ot=!1,zt=ee[ob]||{},Te=(He={method:rA,body:gt},He[Ju]=!0,He);ee.headers&&oo(ee.headers)[De]>0&&(Ye(oo(zt),function(gn){ne.append(gn,zt[gn])}),Te[ob]=ne),C?Te.credentials=C:Z&&v&&(Te.credentials="include"),Le&&(Te.keepalive=!0,s+=Ue,v?ee._sendReason===2&&(ze=!0,O&&(Ce+=PO)):ze=!0);var At=new Request(Ce,Te);try{At[Ju]=!0}catch{}if(!Le&&c&&(Ne=gs(function(gn,Xt){P=gn,oe=Xt})),!Ce){K(me),P&&P(!1);return}function tn(gn,Xt){Xt?x(me,v?0:Xt,{},v?Ve:gn):x(me,v?0:400,{},v?Ve:gn)}function er(gn,Xt,ut){var vi=gn[iu],La=y.fetchOnComplete;La&&Ke(La)?La(gn,me,ut||Ve,Xt):x(me,vi,{},ut||Ve)}try{ea(fetch(v?Ce:At,v?Te:null),function(gn){if(Le&&(s-=Ue,Ue=0),!ot)if(ot=!0,gn.rejected)tn(gn[Pf]&&gn[Pf][Fr],499),oe&&oe(gn[Pf]);else{var Xt=gn[Ro];try{!v&&!Xt.ok?(Xt[iu]?tn(Xt.statusText,Xt[iu]):tn(Xt.statusText,499),P&&P(!1)):v&&!Xt.body?(er(Xt,null,Ve),P&&P(!0)):ea(Xt.text(),function(ut){er(Xt,ee,ut[Ro]),P&&P(!0)})}catch(ut){Xt&&Xt[iu]?tn(at(ut),Xt[iu]):tn(at(ut),499),oe&&oe(ut)}}})}catch(gn){ot||(tn(at(gn),499),oe&&oe(gn))}return ze&&!ot&&(ot=!0,x(me,200,{}),P&&P(!0)),v&&!ot&&ee[Df]>0&&X&&X.set(function(){ot||(ot=!0,x(me,500,{}),P&&P(!0))},ee[Df]),Ne}function Ie(ee,me,Le){var He=Ta(),Ce=new XDomainRequest,qe=ee[Ia];Ce.onload=function(){var ne=Sb(Ce),Ue=y&&y.xdrOnComplete;Ue&&Ke(Ue)?Ue(Ce,me,ee):x(me,200,{},ne)},Ce.onerror=function(){x(me,400,{},v?Ve:TN(Ce))},Ce.ontimeout=function(){x(me,500,{})},Ce.onprogress=wm;var gt=He&&He.location&&He.location.protocol||Ve,Ne=ee[Zg];if(!Ne){K(me);return}if(!v&&Ne.lastIndexOf(gt,0)!==0){var P="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Je(d,2,40,". "+P),ge(P,me);return}var oe=v?Ne:Ne[ru](/^(https?:)/,Ve);Ce.open(rA,oe),ee[Df]&&(Ce[Df]=ee[Df]),Ce.send(qe),v&&Le?X&&X.set(function(){Ce.send(qe)},0):Ce.send(qe)}function je(){s=0,f=!1,c=!1,d=null,v=null,y=null,g=null,C=null,E=null,I=!1,D=!1,L=!1,F=!1,O=!1,X=null}})}return a.__ieDyn=1,a})(),Jf="EventData",Am="ExceptionData",Qf="MetricData",Em="PageviewData",Vb="PageviewPerformanceData",Im="RemoteDependencyData",iA="RequestData",$b="MessageData",_O=9e5,Yte="Item_Success_Count",Jte="Item_Dropped_Count",Qte="Item_Retry_Count",Zte="CLIENT_EXCEPTION",ene="Microsoft.ApplicationInsights.",tne="SdkStats";function aA(a){for(var s in a)Zi(a,s)&&delete a[s]}var DO={EventData:"CUSTOM_EVENT",MetricData:"CUSTOM_METRIC",RemoteDependencyData:"DEPENDENCY",ExceptionData:"EXCEPTION",PageviewData:"PAGE_VIEW",PageviewPerformanceData:"PAGE_VIEW",MessageData:"TRACE",RequestData:"REQUEST",AvailabilityData:"AVAILABILITY",PageActionData:"CUSTOM_EVENT",ContentUpdateData:"CUSTOM_EVENT",PageUnloadData:"CUSTOM_EVENT"};function nne(a,s,c){var f=xr(null),d=xr(null),v=xr(null),y,g=a[fo].sdkStats&&a[fo].sdkStats.int||_O,C=s,E=D(),I=!1;function D(){var K=a.config&&a.config[NC],we=typeof K=="string"&&K?K[ru](/-/g,"")+".":"";return ene+we+tne}function L(){!y&&!I&&(y=Ca(ge,g))}function F(K){var we=K.baseType;return we&&Zi(DO,we)&&DO[we]||"CUSTOM_EVENT"}function O(K){return K[Ni]===E}function X(K){if(!(I||!K||!K[De])){for(var we=!1,x=0;x<K[De];x++)if(!O(K[x])){var se=F(K[x]);mc(se)||(f[se]=(f[se]||0)+1,we=!0)}we&&L()}}function $(K,we,x){if(!(I||!(we&&we[De]&&!mc(x)))){var se=K[x];se||(se=K[x]=xr(null));for(var te=!1,Be=0;Be<we[De];Be++)if(!O(we[Be])){var Me=F(we[Be]);mc(Me)||(se[Me]=(se[Me]||0)+1,te=!0)}te&&L()}}function Y(K,we,x,se,te){var Be={telemetryType:x,computeType:"unknown",language:"JavaScript",version:C,metricName:K};return se&&te&&(Be[te]=se),{name:E,baseType:Qf,baseData:{name:K,average:we,sampleCount:1,properties:Be}}}function Z(K,we){return K===1&&we?""+we:Zte}function Q(K,we,x){for(var se in K)if(Zi(K,se)){var te=K[se];for(var Be in te)if(Zi(te,Be)){var Me=te[Be];Me>0&&a[Z1](Y(we,Me,Be,se,x))}}}function ge(){y&&(y[Hu](),y=null);var K=a[fo]&&a[fo].sdkStats||{};g=K.int||_O;for(var we in f)if(Zi(f,we)){var x=f[we];x>0&&a[Z1](Y(Yte,x,we))}Q(d,Jte,"dropCode"),Q(v,Qte,"retryCode"),aA(f),aA(d),aA(v)}return{eventsSent:X,eventsDiscarded:function(K,we,x){var se=Z(we,x);$(d,K,se)},eventsRetry:function(K,we){var x=""+we;$(v,K,x)},flush:ge,unload:function(){I=!0,ge()}}}var LO="on",RO="attachEvent",NO="addEventListener",OO="detachEvent",jO="removeEventListener",oA="events",sA="visibilitychange",zb="pagehide",UO="unload",FO="beforeunload",uA;function BO(){return!uA&&(uA=On(jo("aiEvtPageHide"))),uA.v}var rne=/\.[\.]+/g,ine=/[\.]+$/,ane=1,lA;function Hb(){return!lA&&(lA=On(jN("events"))),lA.v}var one=/^([^.]*)(?:\.(.+)|)/;function VO(a){return a&&a[ru]?a[ru](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Ve):a}function cA(a,s){if(s){var c=Ve;Pt(s)?(c=Ve,Ye(s,function(d){d=VO(d),d&&(d[0]!=="."&&(d="."+d),c+=d)})):c=VO(s),c&&(c[0]!=="."&&(c="."+c),a=(a||Ve)+c)}var f=one.exec(a||Ve)||[];return{type:f[1],ns:(f[2]||Ve).replace(rne,".").replace(ine,Ve).split(".").sort()[Gu](".")}}function $O(a,s,c){c===void 0&&(c=!0);var f=Hb().get(a,oA,{},c),d=f[s];return d||(d=f[s]=[]),d}function zO(a,s,c,f){a&&s&&s[Ku]&&(a[jO]?a[jO](s[Ku],c,f):a[OO]&&a[OO](LO+s[Ku],c))}function sne(a,s,c,f){var d=!1;return a&&s&&s[Ku]&&c&&(a[NO]?(a[NO](s[Ku],c,f),d=!0):a[RO]&&(a[RO](LO+s[Ku],c),d=!0)),d}function HO(a,s,c,f){for(var d=s[De];d--;){var v=s[d];v&&(!c.ns||c.ns===v[MZ].ns)&&(!f||f(v))&&(zO(a,v.evtName,v[iN],v.capture),s[Lo](d,1))}}function une(a,s,c){if(s[Ku])HO(a,$O(a,s[Ku]),s,c);else{var f=Hb().get(a,oA,{});Gt(f,function(d,v){HO(a,v,s,c)}),oo(f)[De]===0&&Hb().kill(a,oA)}}function el(a,s){var c;return s?(Pt(s)?c=[a][tm](s):c=[a,s],c=cA("xx",c).ns[ji](".")):c=a,c}function lu(a,s,c,f,d){d===void 0&&(d=!1);var v=!1;if(a)try{var y=cA(s,f);if(v=sne(a,y,c,d),v&&Hb().accept(a)){var g={guid:ane++,evtName:y,handler:c,capture:d};$O(a,y.type)[pt](g)}}catch{}return v}function Zf(a,s,c,f,d){if(d===void 0&&(d=!1),a)try{var v=cA(s,f),y=!1;une(a,v,function(g){return v.ns&&!c||g[iN]===c?(y=!0,!0):!1}),y||zO(a,v,c,d)}catch{}}function lne(a,s,c){var f=!1,d=Ta();d&&(f=lu(d,a,s,c),f=lu(d.body,a,s,c)||f);var v=jr();return v&&(f=lu(v,a,s,c)||f),f}function cne(a,s,c){var f=Ta();f&&(Zf(f,a,s,c),Zf(f.body,a,s,c));var d=jr();d&&Zf(d,a,s,c)}function qb(a,s,c,f){var d=!1;return s&&a&&a[De]>0&&Ye(a,function(v){v&&(!c||An(c,v)===-1)&&(d=lne(v,s,f)||d)}),d}function dne(a,s,c,f){var d=!1;return s&&a&&Pt(a)&&(d=qb(a,s,c,f),!d&&c&&c[De]>0&&(d=qb(a,s,null,f))),d}function dA(a,s,c){a&&Pt(a)&&Ye(a,function(f){f&&cne(f,s,c)})}function fne(a,s,c){return dne([FO,UO,zb],a,s,c)}function hne(a,s){dA([FO,UO,zb],a,s)}function fA(a,s,c){function f(y){var g=jr();a&&g&&g.visibilityState==="hidden"&&a(y)}var d=el(BO(),c),v=qb([zb],a,s,d);return(!s||An(s,sA)===-1)&&(v=qb([sA],f,s,d)||v),!v&&s&&(v=fA(a,null,c)),v}function pne(a,s){var c=el(BO(),s);dA([zb],a,c),dA([sA],null,c)}var qO="_aiHooks",GO=["req","rsp","hkErr","fnErr"];function hA(a,s){if(a)for(var c=0;c<a[De]&&!s(a[c],c);c++);}function pA(a,s,c,f,d){d>=0&&d<=2&&hA(a,function(v,y){var g=v.cbks,C=g[GO[d]];if(C){s.ctx=function(){var D=f[y]=f[y]||{};return D};try{C[bc](s.inst,c)}catch(D){var E=s.err;try{var I=g[GO[2]];I&&(s.err=D,I[bc](s.inst,c))}catch{}finally{s.err=E}}}})}function gne(a){return function(){var s=this,c=arguments,f=a.h,d={name:a.n,inst:s,ctx:null,set:C},v=[],y=g([d],c);d.evt=jt("event");function g(I,D){return hA(D,function(L){I[pt](L)}),I}function C(I,D){c=g([],c),c[I]=D,y=g([d],c)}pA(f,d,y,v,0);var E=a.f;if(E)try{d.rslt=E[bc](s,c)}catch(I){throw d.err=I,pA(f,d,y,v,3),I}return pA(f,d,y,v,1),d.rslt}}function gA(a,s,c,f){var d=null;return a&&(Qi(a,s)?d=a:c&&(d=gA(bN(a),s,f,!1))),d}function mne(a,s,c){return a?mA(a[Qs],s,c,!1):null}function KO(a,s,c,f){var d=c&&c[qO];if(!d){d={i:0,n:s,f:c,h:[]};var v=gne(d);v[qO]=d,a[s]=v}var y={id:d.i,cbks:f,rm:function(){var g=this.id;hA(d.h,function(C,E){if(C.id===g)return d.h[Lo](E,1),1})}};return d.i++,d.h[pt](y),y}function mA(a,s,c,f,d){if(f===void 0&&(f=!0),a&&s&&c){var v=gA(a,s,f,d);if(v){var y=v[s];if(typeof y===B9)return KO(v,s,y,c)}}return null}function Gb(a,s,c,f,d){if(a&&s&&c){var v=gA(a,s,f,d)||a;if(v)return KO(v,s,v[s],c)}return null}function Ile(a,s,c,f){a.attribError&&a.attribError(s,c,f)}function Mle(a,s,c){a.spanError&&a.spanError(s,c)}function Ple(a,s){if(a[KC])a[KC](s);else if(console){var c=console[KC]||console.log;uo(c,console,[s])}}var vne="~[[inherited]]",yne="~[[deleted]]",bne=0;function WO(){}function wne(a,s,c,f,d,v){var y=v[aN]||{};if(c&&ds(c)>0)for(var g=c[ji]("."),C=[],E=0,I=ds(g);E<I;){var D=g[E];if(C[pt](D),E===I-1){if(s[D]&&s[D].n)return""+C[Gu]("."),{r:2};if(!s[D]||s[D].d)return a.size>=d&&!a.has(c)?{r:1}:(s[D]={v:f},{r:0,a:!0});var L=s[D].v;return s[D].v=f,s[D].d=!1,{r:0,a:!1,p:L}}if(s[D]||(s[D]={n:{}}),!s[D].n)return""+C[Gu]("."),{r:3};s=s[D].n,E++}return{r:4}}function xne(a,s){if(s&&ds(s)>0){for(var c=0,f=ds(s);c<f-1;){var d=s[c++];if(a[d]||(a[d]={n:{}}),!a[d].n)return{d:!1};a=a[d].n}var v=s[f-1];if(a[v]&&!a[v].d&&!a[v].n){var y=a[v].v;return a[v].d=!0,a[v].v=Kn,{d:!0,p:y}}else if(!a[v]||!a[v].d)return a[v]={d:!0},{d:!0}}return{d:!1}}function Kb(a,s,c,f,d,v,y,g){var C;if(s&&ds(s)>0){var E=void 0,I=d,D=V1(s,"."),L=ds(D),F=0;if(c==0||c===2||Cn(c)){for(;I&&F<L;){var O=D[F++],X=I[O];if(X&&F>=L){E=X;break}if(!X||!X.n)break;I=X.n}E&&(C={c:a,k:s,n:E,v:E.d?Kn:E.v,s:0,e:!E.d})}if(!C&&(c===1||Cn(c))){var $=JO(s,v,y);$&&(C={c:a,k:s,n:null,v:$.v,s:1,e:!0})}}return f(C)}function kne(a,s,c){var f=0,d=[],v=eh(a,function(y,g,C){return y+g},void 0,c||s);return Ys(v,function(y){An(d,y)===-1&&(d[pt](y),f++)}),f}function XO(a,s){var c;if(a){var f=oo(a);ds(f)>0&&(c={p:s,n:a,k:f,i:-1})}return c}function eh(a,s,c,f,d){var v=[],y=f?[]:Kn,g,C,E=XO(a,Ve),I,D,L={v:void 0,n:F};f&&(Wb(f)?I=f:Kr(f)&&(D=f));function F(){for(var O=Ve,X,$,Y=0;E;)if(E.i++,E.i<ds(E.k)){var Z=E.k[E.i],Q=E.n[Z];if(Q)if(Q.n)v[pt](E),E=XO(Q.n,E.p+Z+"."),E||(E=v.pop());else{var ge=E.p+Z;if(y&&An(y,ge)===-1&&y[pt](ge),!Q.d||d){O=E.p,X=Z,$=Q,Y=Q.d?2:0;break}}}else E=v.pop();if(!$&&D)for(g||(g={p:Ve,n:Kn,k:oo(D),i:-1});g.i<ds(g.k)-1;){g.i++;var Z=g.k[g.i];if(An(y,Z)===-1){y[pt](Z),X=Z,$={v:D[Z]},Y=1;break}}return!$&&I&&(C||(C=I[nm]()),Ys(C,function(K){var we=K[0];if(An(y,we)===-1)return y[pt](we),X=we,$={v:K[1]},Y=1,-1})),$&&(L.v=s(O,X,$,Y)),!$}return jQ(L)}function YO(a,s,c,f,d){var v=xr(null),y;d&&Dt(v,"#id",{v:a.id,w:!1});var g=eh(s,function(E,I,D,L){var F=E+I;return{n:F,v:D.v,d:D.d,s:L}},c,d?null:f,d?2:Kn);if(Ys(g,function(E){var I=v,D=E.n;E.d&&(y||(y=xr(null),Dt(v,yne,{v:y,w:!1})),I=y),I&&!(D in I)&&(I[D]=E.v)}),f&&d){var C;Wb(f)?C=f._attributes:(C=xr(null),Gt(f,function(E,I){C[E]=I})),Dt(v,vne,{v:C,w:!1})}return v}function Mm(a,s){a&&Ye(a,function(c){St(c.cb,[s])})}function JO(a,s,c){if(s&&s.has(a))return{v:s.get(a)};if(c&&a in c)return{v:c[a]}}function Tne(a,s){var c={cb:s};a[pt](c);var f={rm:function(){if(a&&c){var d=An(a,c);d>=0&&a[Lo](d,1),c.cb=null,c=null,f.rm=WO}}};return f}function cu(a,s,c,f){var d=a[PZ]||{},v=null,y=null,g=null,C=d.generalLimits||{},E=C[Q9]||128,I,D,L=0,F=null,O=null,X=null,$=null,Y=s||Ve;Wb(c)?F=c:Kr(c)&&(O=c),c=null;var Z=O||F,Q={id:(Y||Ve)+"."+bne++,size:0,droppedAttributes:0,attributes:Kn,clear:function(){$&&($.rm(),$=null),(v||F||O)&&Mm(X,{frm:Q.id,op:0}),v=null,y=null,g=null,I=null,D=null,L=0,Z=null,F=null,O=null},get:function(K,we){return Kb(Q,K,we,function(x){return x?x.v:Kn},v,F,O)},has:function(K,we){return Kb(Q,K,we,function(x){return x?x.e||we===2:!1},v,F,O)},set:function(K,we){v||(v=xr(null));var x=wne(Q,v,K,we,E,a);if(x.r===0){y=null,I=null,D=null;var se=x.a?2:1,te=x.p;if(se===2){var Be=JO(K,F,O);Be&&(se=1,te=Be.v)}c9(we,te)||Mm(X,{frm:Q.id,op:se,k:K,prev:te,val:we})}else x.r===1&&(g=null,L++,Mm(X,{frm:Q.id,op:4,k:K,val:we}));return x.r===0},del:function(K){return Kb(Q,K,Kn,function(we){if(we){v||(v=xr(null));var x=xne(v,K[ji]("."));return x.d&&(y=null,I=null,D=null),Mm(X,{frm:Q.id,op:3,k:K,prev:we.v}),x.d}return!1},v,F,O)},keys:function(){return eh(v,function(K,we,x,se){return K+we},a,Z)},entries:function(){return eh(v,function(K,we,x,se){return[K+we,x.v,se]},a,Z)},values:function(){return eh(v,function(K,we,x,se){return x.v},a,Z)},forEach:function(K){var we=eh(v,function(x,se,te,Be){return K(x+se,te.v,Be),!0},a,Z);Ys(we,WO)},child:function(K,we){var x=(K||"child")+(we?"<-@[":"<=[")+Q.id+"]";return we?Cne(a,x,Q):cu(a,x,Q)},listen:function(K){return X||(X=[]),Tne(X,K)}};function ge(K){var we=!0;K.op===2||K.op===1||K.op===3?(y=null,I=null,D=null,Kb(Q,K.k,2,function(x){we=!x||!x.n},v)):K.op===0?(y=null,I=null,D=null,we=!0):K.op===4&&(we=!0,g=null),we&&Mm(X,K)}return F&&Ke(F.listen)&&($=F.listen(ge)),Xs(Q,{size:{g:function(){return y||(y=On(kne(v,O,F))),y.v}},droppedAttributes:{g:function(){return g||(g=On((F?F.droppedAttributes:0)+L)),g.v}},attributes:{g:function(){return I||(I=On(YO(Q,v,a,Z))),I.v}},_attributes:{g:function(){return D||(D=On(YO(Q,v,a,Z,!0))),D.v}}})}function Sne(a,s){Wb(s)?s.forEach(function(c,f,d){a.set(c,f)}):s&&(Ke(s[nm])?Ys(s[nm](),function(c){a.set(c[0],c[1])}):Gt(s,function(c,f){a.set(c,f)}))}function Cne(a,s,c,f){var d=cu(a,s,c);return c.listen(function(v){if(v.op===0)Ys(c[nm](),function(g){var C=g[0];!d.has(C,2)&&c.has(C)&&d.set(C,g[1])});else if(v.op===2){var y=v.k;d.has(y,0)||d.del(y)}else if(v.op===1||v.op===3){var y=v.k;d.has(y,2)||d.set(y,v.prev)}}),d}function Wb(a){return a&&Ke(a.clear)&&Ke(a.get)&&Ke(a.has)&&Ke(a.set)&&Ke(a.del)&&Ke(a.keys)&&Ke(a[nm])&&Ke(a.forEach)&&Ke(a.values)&&Ke(a.child)&&Ke(a.listen)&&(Kr(a)||Ke(a))&&"id"in a&&"size"in a&&"droppedAttributes"in a&&"attributes"in a}function QO(a){return a==="number"||a==="boolean"||a==="string"}function Ane(a){var s,c=!0;return Ye(a,function(f){if(f!==null){var d=typeof f;s?c=s===d:(c=QO(d),s=d)}if(!c)return-1}),c}function Ene(a){var s=a===null||QO(typeof a);return a&&Pt(a)&&(s=Ane(a)),s}var vA=1e6,Pm=1e9,yA=1e3,_m,Dm;function Ine(){xa("HrTime is not mutable")}function ZO(){return _m||(_m=On(Pm)),_m}function e7(){if(!Dm){var a=0,s=Sa();s&&(a=s.timeOrigin,ao(a)||(a=s.timing&&s.timing.fetchStart),!ao(a)&&s.now&&(a=s.now())),Dm=On({to:a,hr:Lm(a)})}return Dm}function t7(a){function s(){return"["+a[0]+", "+a[1]+"]"}return um(a,s),ka(a)}function Mne(a){var s=[0,0],c={v:Ine,w:!1,e:!1};return Xs(s,{0:{l:lo(function(){return di(a/Pm)})},1:{l:lo(function(){return a%Pm})},push:c,pop:c,shift:c,unshift:c,splice:c,sort:c,reverse:c,fill:c,copyWithin:c}),t7(s)}function th(a,s){var c=[a,s];return t7(c)}function bA(){return Mne(0)}function Lm(a){var s;if(a>0){var c=di(a),f=a-c,d=di(c/yA),v=c%yA,y=v*vA,g=gC(f*vA),C=y+g,E=d;C>=Pm&&(E++,C-=Pm),s=th(E,C)}return s||bA()}function wA(a){var s=Lm(ao(a)?a:pC()),c=Sa();if(c){var f=Dm||e7();s=Dne(f.v.hr,s)}return s}function n7(a){var s;if(_ne(a))s=th(a[0],a[1]);else if(ao(a)){var c=Dm||e7();s=a<c.v.to?wA(a):Lm(a)}else GS(a)?s=Lm(a.getTime()):xa("Invalid input type");return s}function Pne(a,s){var c=s[0]-a[0],f=s[1]-a[1];if(f<0){var d=c-1,v=_m||ZO();return f+=v.v,th(d,f)}return th(c,f)}function Rm(a){var s=a[0]*yA,c=Math.round(a[1]/vA);return s+c}function _ne(a){return Pt(a)&&a[De]===2&&ao(a[0])&&ao(a[1])}function Dne(a,s){var c=a[0]+s[0],f=a[1]+s[1],d=_m||ZO();return f>=d.v?(f-=d.v,th(c+1,f)):th(c,f)}function r7(a,s,c){var f=a.api.cfg,d=pC(),v=a[jC],y,g=!1,C=f[aN]||{},E=lo(function(){return Oe(a[qC])?wA(d):n7(a[qC])}),I,D,L,F=0,O=null,X=a.isRecording!==!1;f.traceCfg&&f.traceCfg[Z9]&&(X=!1);var $=s||Ve;X&&(y=lo(function(){return cu(f,$,a[HC])}));function Y(ge,K){return g&&""+v[fi]+v[Ur]+ge+(K?" - "+K:Ve),g}function Z(){return'ReadableSpan ("'+$+'")'}var Q=lm({spanContext:function(){return v},setAttribute:function(ge,K){var we;return K!==null&&!Y("setAttribute")&&X?(!ge||ge[De]===0?we="Invalid attribute key: "+at(ge):Ene(K)||(we="Invalid attribute value: "+at(K)),we?F++:y?y.v.set(ge,K):F++):F++,Q},setAttributes:function(ge){return!Y("setAttributes")&&X&&y?Sne(y.v,ge):F+=oo(ge)[De]||0,Q},setStatus:function(ge){return Y("setStatus")||(L=ge,!Oe(L)&&!Oe(L[Fr])&&!ct(L[Fr])&&(L[Fr]=at(L[Fr]))),Q},updateName:function(ge){return!Y("updateName")&&!c9($,ge)&&($=ge,ZZ(Q,Z())),Q},end:function(ge){var K;if(!Y("end","You can only call end once"))try{if(!Oe(ge))I=n7(ge),D=Pne(E.v,I),K=Rm(D);else{var we=pC();K=we-d,D=Lm(K),I=wA(we)}K<0&&(D=bA(),I=E.v),a.onEnd&&a.onEnd(Q)}finally{g=!0}},isRecording:function(){return X&&!g},recordException:function(ge,K){Y("recordException")||a.onException&&a.onException(Q,ge,K)}},Z());return Xs(Q,{name:{g:function(){return $}},kind:{v:c||0},startTime:{g:function(){return E.v}},endTime:{g:function(){return I}},status:{g:function(){return L||{code:0}}},attributes:{g:function(){return y?y.v[HC]:ka({})}},attribContainer:{g:function(){return!y&&!O&&(O=cu(f,$)),y?y.v:O}},links:{g:function(){return[]}},events:{g:function(){return[]}},duration:{g:function(){return D||bA()}},ended:{g:function(){return g}},droppedAttributesCount:{g:function(){return y?y.v.droppedAttributes:F}},parentSpanContext:{l:lo(function(){return a?a[UC]:Kn})},parentSpanId:{l:lo(function(){var ge=Kn;if(a){var K=a[UC];ge=K?K[Ur]:Kn}return ge})}}),Q}function Lne(a,s,c,f,d){var v={api:null,createSpan:function(y,g,C){var E,I;g&&g.root?E=po():(E=po(C||a[nb]()),E.parentCtx&&(I=E.parentCtx)),E[Ur]=Bu(Ac(),0,16);var D={api:c,spanContext:E,attributes:g?g[HC]:void 0,startTime:g?g[qC]:void 0,isRecording:g?g.recording!==!1:!0,onEnd:f,onException:d};return I&&Dt(D,"parentSpanContext",{v:I,w:!1}),r7(D,y,g?.kind||0)},getProviderId:function(){return s},isAvailable:function(){return!!f}};return Dt(v,"api",{v:c,w:!1}),v}function Rne(a,s,c,f){var d=!1;try{var v=uo(s,c||a,f);return _o(v)?(d=!0,uN(v,function(){a&&a.restore()})):v}finally{a&&!d&&a.restore()}}function xA(a,s,c,f){var d=a[rb](s);return Rne(d,c,f,[d][tm](zg(arguments,4)))}function Nne(a,s,c,f,d){var v=null,y,g=d;Ke(c)?y=c:(v=c,y=f,g=f);var C=a.startSpan(s,v),E=!1;try{var I=xA(a,C,function(D){return uo(y,g,[D])});return _o(I)?(E=!0,pb(I,function(D){return D},function(D){C&&C.setStatus({code:D?2:1,message:D?D[Fr]||D:void 0})},function(){C&&C.end()})):I}catch(D){throw C&&C.setStatus({code:D?2:1,message:D?D[Fr]:void 0}),D}finally{!E&&C&&C.end()}}function One(a){return a?qf(a[fi])&&Gf(a[Ur]):!1}function jne(a,s){return Fb(s)||(s=po(s)),Une(a,'wrapped("'+s[Ur]+'")',s)}function Une(a,s,c){var f={api:a,spanContext:Fb(c)?c:po(c),isRecording:!1};return r7(f,s,0)}var Fne="microsoft.",kA="client.",Pa="http.",Mc="net.",nh="peer.",rh="exception.",Nm="enduser.",Xb="url.",Yb="db.",Pc="network.",Bne=Fne+kA+"ip",Vne=Nm+"id",$ne=Nm+"pseudo_id",zne=Pa+"route",Hne=Mc+nh+"ip",i7=Mc+nh+"name",qne=Mc+"host.ip",Gne=nh+"service",Kne=Pa+"user_agent",Wne=Pa+"method",Xne=Pa+"url",Yne=Pa+"status_code",Jne=Pa+"route",Qne=Pa+"host",a7=Yb+"system",o7=Yb+"statement",s7=Yb+"operation",u7=Yb+"name",l7="rpc.system",TA="rpc.grpc.status_code",Zne=rh+"type",ere=rh+"message",tre=rh+"stacktrace",nre=Pa+"scheme",rre=Pa+"target",ire=Pa+"flavor",are=Mc+"transport",ore=Mc+"host.name",sre=Mc+"host.port",ure=Mc+nh+"port",lre=Pa+"client_ip",cre=Nm+"id",dre=kA+"address",fre=kA+"port",hre="server.address",pre="server.port",gre=Xb+"full",mre=Xb+"path",vre=Xb+"query",yre=Xb+"scheme",bre="error.type",wre=Pc+"local.address",xre=Pc+"local.port",kre=Pc+"protocol.name",Tre=Pc+nh+"address",Sre=Pc+nh+"port",Cre=Pc+"protocol.version",Are=Pc+"transport",Ere="user_agent.original",Ire=Pa+"request.method",Mre=Pa+"response.status_code",Pre=rh+"type",_re=rh+"message",Dre=rh+"stacktrace",Lre=Nm+"id",Rre=Nm+"pseudo_id",Nre="synthetic.type",Ore="mongodb",jre="mysql",Ure="postgresql",Fre="redis",Bre="db2",Vre="derby",$re="mariadb",zre="mssql",Hre="oracle",qre="sqlite",Gre="other_sql",Kre="hsqldb",Wre="h2",SA;function Xre(){return SA||(SA=aC("OpenTelemetryError",function(a,s){})),SA}function Yre(a){throw new(Xre())(a)}function Jre(a){var s=a;return s||Yre("Must provide an otelApi instance"),lo(function(){return lm({getTracer:m9(s.getTracer,s),wrapSpanContext:m9(jne,Kn,[a]),isSpanContextValid:One,getActiveSpan:function(){return a.host?a.host[X9]():null},setActiveSpan:function(c){return a.host?a.host[rb](c):null}},"TraceApi")})}function Qre(a,s){var c=lm({startSpan:function(f,d){return a?a.startSpan(f,d):null},startActiveSpan:function(f,d,v){var y=null,g=null;if(Ke(d)?y=d:(g=d,y=v),y)return Nne(a,f,g,function(C){return uo(y,C,[C.span,C])})}},"OTelTracer"+Ve);return c}function Zre(a){var s={};return{getTracer:function(c,f){var d=(c||"ai-web")+"@"+(f||"unknown");return s[d]||(s[d]=Qre(a)),s[d]},forceFlush:function(){},shutdown:function(){s={},a=null}}}function eie(a){var s,c=lm(Xs(Zre(a[nN]),{cfg:{g:function(){return a.host[fo]}},trace:{g:function(){return s.v}},host:{g:function(){return a[nN]}}}),"OTelApi");return s=Jre(c),c}var tie="user_agent.synthetic.type",c7="client.",bs="http.",CA="net.",Jb="peer.",nie="network.peer.address",rie=CA+Jb+"ip",d7=c7+"address",iie=bs+"client_ip",aie="user_agent.original",oie=bs+"user_agent",sie="url.full",uie=bs+"url",lie=bs+"request.method",cie=bs+"method",die=bs+"response.status_code",fie=bs+"status_code",hie="url.scheme",pie=bs+"scheme",gie="url.path",mie="url.query",vie=bs+"target",yie="server.address",bie=bs+"host",wie=CA+Jb+"name",xie=c7+"port",kie="server.port",Tie=CA+Jb+"port",Sie=Jb+"service";function f7(a){var s="";if(a){var c=Zb(a);if(c){var f=Qb(a);if(f)s=Qt(f);else{var d=Pie(a),v=_ie(a);if(d&&v){var y=h7(a);if(y)s=d+"://"+y+v;else{var g=Die(a);if(g){var C=p7(a);if(C)s=d+"://"+C+":"+g+v;else{var E=AA(a);E&&(s=d+"://"+E+":"+g+v)}}}}}}}return s}function Cie(a){return a.get(tie)}function Aie(a){return!!Cie(a)}function AA(a){if(a)return a.get(nie)||a.get(rie)}function Eie(a){var s;if(a){var c=Iie(a);if(c&&(s=Qt(c)),!s){var f=AA(a);f&&(s=Qt(f))}}return s}function Iie(a){if(a)return a.get(d7)||a.get(iie)}function Mie(a){if(a)return a.get(aie)||a.get(oie)}function Qb(a){if(a)return a.get(sie)||a.get(uie)}function Zb(a){if(a)return a.get(lie)||a.get(cie)}function EA(a){if(a)return a.get(die)||a.get(fie)}function Pie(a){if(a)return a.get(hie)||a.get(pie)}function _ie(a){if(a)return a.get(gie)||a.get(mie)||a.get(vie)}function h7(a){if(a)return a.get(yie)||a.get(bie)}function p7(a){if(a)return a.get(d7)||a.get(wie)}function Die(a){if(a)return a.get(xie)||a.get(kie)||a.get(Tie)}function IA(a){var s;if(a){var c=a.get(Sie);if(c&&(s=Qt(c)),!s){var f=h7(a);f&&(s=Qt(f))}if(!s){var d=Qb(a);d&&(s=Qt(d))}if(!s){var v=p7(a);v&&(s=Qt(v))}if(!s){var y=AA(a);y&&(s=Qt(y))}}return s||Ve}function Lie(a){return a===Bre||a===Vre||a===$re||a===zre||a===Hre||a===qre||a===Gre||a===Kre||a===Wre}var fn=AZ({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]});function g7(a,s,c){var f=s[De],d=Rie(a,s);if(d[De]!==f){for(var v=0,y=d;c[y]!==void 0;)v++,y=Di(d,0,147)+jie(v);d=y}return d}function Rie(a,s){var c;return s&&(s=En(Qt(s)),s[De]>150&&(c=Di(s,0,150),Je(a,2,57,"name is too long.  It has been truncated to 150 characters.",{name:s},!0))),c||s}function sr(a,s,c){c===void 0&&(c=1024);var f;return s&&(c=c||1024,s=En(Qt(s)),s[De]>c&&(f=Di(s,0,c),Je(a,2,61,"string value is too long. It has been truncated to "+c+" characters.",{value:s},!0))),f||s}function Om(a,s,c){return ct(s)&&(s=Ma(s,c)),v7(a,s,2048,66)}function m7(a,s){var c;return s&&s[De]>32768&&(c=Di(s,0,32768),Je(a,2,56,"message is too long, it has been truncated to 32768 characters.",{message:s},!0)),c||s}function Nie(a,s){var c;if(s){var f=""+s;f[De]>32768&&(c=Di(f,0,32768),Je(a,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:s},!0))}return c||s}function tl(a,s){if(s){var c={};Gt(s,function(f,d){if(Kr(d)&&dm())try{d=Oo()[Ef](d)}catch(v){Je(a,2,49,"custom property is not valid",{exception:v},!0)}d=sr(a,d,8192),f=g7(a,f,c),c[f]=d}),s=c}return s}function nl(a,s){if(s){var c={};Gt(s,function(f,d){f=g7(a,f,c),c[f]=d}),s=c}return s}function Oie(a,s){return s&&v7(a,s,128,69)[Rf]()}function v7(a,s,c,f){var d;return s&&(s=En(Qt(s)),s[De]>c&&(d=Di(s,0,c),Je(a,2,f,"input is too long, it has been truncated to "+c+" characters.",{data:s},!0))),d||s}function jie(a){var s="00"+a;return Bu(s,s[De]-3)}var y7=jr()||{},b7=0,Uie=[null,null,null,null,null];function e2(a){var s=b7,c=Uie,f=c[s];return y7.createElement?c[s]||(f=c[s]=y7.createElement("a")):f={host:Vie(a)},f.href=a,s++,s>=c[De]&&(s=0),b7=s,f}function Fie(a){var s,c=e2(a);return c&&(s=c.href),s}function w7(a){var s,c=e2(a);return c&&(s=c[VC]),s}function Bie(a,s){return a?a.toUpperCase()+" "+s:s}function Vie(a,s){var c=x7(a)||Ve;if(c){var f=c[em](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(f!=null&&f[De]>3&&ct(f[2])&&f[2][De]>0)return f[2]+(f[3]||Ve)}return c}function x7(a,s){var c=null;if(a){var f=a[em](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(f!=null&&f[De]>2&&ct(f[2])&&f[2][De]>0&&(c=f[2]||Ve,f[De]>2)){var d=(f[1]||Ve)[Ea](),v=f[3]||Ve;(d==="http"&&v===":80"||d==="https"&&v===":443")&&(v=Ve),c+=v}}return c}var $ie=[_3+$f,"https://breeze.aimon.applicationinsights.io"+$f,"https://dc-int.services.visualstudio.com"+$f],zie="cid-v1:";function MA(a){return An($ie,a[Ea]())!==-1}function k7(a,s,c){if(!s||a&&a.disableCorrelationHeaders)return!1;if(a&&a[sN]){for(var f=0;f<a.correlationHeaderExcludePatterns[De];f++)if(a[sN][f].test(s))return!1}var d=e2(s).host[Ea]();if(d&&(Bn(d,":443")!==-1||Bn(d,":80")!==-1)&&(d=(x7(s)||"")[Ea]()),(!a||!a.enableCorsCorrelation)&&d&&d!==c)return!1;var v=a&&a.correlationHeaderDomains;if(v){var y;if(Ye(v,function(E){var I=new RegExp(E.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));y=y||I.test(d)}),!y)return!1}var g=a&&a.correlationHeaderExcludedDomains;if(!g||g[De]===0)return!0;for(var f=0;f<g[De];f++){var C=new RegExp(g[f].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(C.test(d))return!1}return d&&d[De]>0}function T7(a){if(a){var s=Hie(a,fn[1]);if(s&&s!==zie)return s}}function Hie(a,s){if(a)for(var c=a[ji](","),f=0;f<c[De];++f){var d=c[f][ji]("=");if(d[De]===2&&d[0]===s)return d[1]}}function t2(){var a=Sa();if(a&&a.now&&a.timing){var s=a.now()+a.timing.navigationStart;if(s>0)return s}return so()}function ta(a,s){var c=null;return a!==0&&s!==0&&!Oe(a)&&!Oe(s)&&(c=s-a),c}function qie(a,s){var c=po(s);return a&&(c.pageName=a[Ni]||c.pageName||Ve,c[fi]=a.traceID||c[fi]||Ve,c[Ur]=a.parentID||c[Ur]||Ve,c[Ri]=(Oe(a[Ri])?c[Ri]:a[Ri])||0),c}var jm=q9({LocalStorage:0,SessionStorage:1}),rl=void 0,il=void 0,S7=Ve;function PA(){return r2()?n2(jm.LocalStorage):null}function n2(a){try{if(Oe(co()))return null;var s=new Date()[Rf](),c=jt(a===jm.LocalStorage?"localStorage":"sessionStorage"),f=S7+s;c.setItem(f,s);var d=c.getItem(f)!==s;if(c[XC](f),!d)return c}catch{}return null}function _A(){return Um()?n2(jm.SessionStorage):null}function Gie(){rl=!1,il=!1}function DA(a){S7=a||Ve}function Kie(){rl=r2(!0),il=Um(!0)}function r2(a){return(a||rl===void 0)&&(rl=!!n2(jm.LocalStorage)),rl}function C7(a,s){var c=PA();if(c!==null)try{return c.getItem(s)}catch(f){rl=!1,Je(a,2,1,"Browser failed read of local storage. "+pn(f),{exception:at(f)})}return null}function A7(a,s,c){var f=PA();if(f!==null)try{return f.setItem(s,c),!0}catch(d){rl=!1,Je(a,2,3,"Browser failed write to local storage. "+pn(d),{exception:at(d)})}return!1}function Wie(a,s){var c=PA();if(c!==null)try{return c[XC](s),!0}catch(f){rl=!1,Je(a,2,5,"Browser failed removal of local storage item. "+pn(f),{exception:at(f)})}return!1}function Um(a){return(a||il===void 0)&&(il=!!n2(jm.SessionStorage)),il}function LA(a,s){var c=_A();if(c!==null)try{return c.getItem(s)}catch(f){il=!1,Je(a,2,2,"Browser failed read of session storage. "+pn(f),{exception:at(f)})}return null}function E7(a,s,c){var f=_A();if(f!==null)try{return f.setItem(s,c),!0}catch(d){il=!1,Je(a,2,4,"Browser failed write to session storage. "+pn(d),{exception:at(d)})}return!1}function I7(a,s){var c=_A();if(c!==null)try{return c[XC](s),!0}catch(f){il=!1,Je(a,2,6,"Browser failed removal of session storage item. "+pn(f),{exception:at(f)})}return!1}var Xie="appInsightsThrottle",Yie=(function(){function a(s,c){var f=this,d,v,y,g,C,E,I,D=!1,L=!1;O(),f._getDbgPlgTargets=function(){return[I]},f.getConfig=function(){return y},f.canThrottle=function(ee){var me=Me(ee),Le=X(ee);return Z(Le,d,me)},f.isTriggered=function(ee){return Ie(ee)},f.isReady=function(){return D},f[Yg]=function(ee){try{var me=je(ee);if(me&&me[De]>0){var Le=me.slice(0);return I[ee]=[],Ye(Le,function(He){F(He.msgID,He[Fr],He.severity,!1)}),!0}}catch{}return!1},f.flushAll=function(){try{if(I){var ee=!0;return Gt(I,function(me){var Le=f[Yg](parseInt(me));ee=ee&&Le}),ee}}catch{}return!1},f.onReadyState=function(ee,me){return me===void 0&&(me=!0),D=Oe(ee)?!0:ee,D&&me?f.flushAll():null},f.sendMessage=function(ee,me,Le){return F(ee,me,Le,!0)};function F(ee,me,Le,He){if(D){var Ce=Be(ee);if(!Ce)return;var qe=X(ee),gt=Me(ee),Ne=Z(qe,d,gt),P=!1,oe=0,ne=Ie(ee);try{Ne&&!ne?(oe=p9(qe.limit.maxSendNumber,gt[Lf]+1),gt[Lf]=0,P=!0,C[ee]=!0,gt[$C]=new Date):(C[ee]=Ne,gt[Lf]+=1);var Ue=Q(ee);x(v,Ue,gt);for(var ze=0;ze<oe;ze++)te(ee,v,me,Le)}catch{}return{isThrottled:P,throttleNum:oe}}else if(He){var ot=je(ee);ot[pt]({msgID:ee,message:me,severity:Le})}return null}function O(){v=Hf(s),C={},g={},I={},y={},$(109),E=Oe(c)?"":c,s.addUnloadHook(pr(s[fo],function(ee){var me=ee.cfg;d=r2();var Le=me.throttleMgrCfg||{};Gt(Le,function(He,Ce){$(parseInt(He),Ce)})}))}function X(ee){return y[ee]||y[109]}function $(ee,me){var Le,He;try{var Ce=me||{},qe={};qe[Uf]=!!Ce[Uf];var gt=Ce.interval||{};L=gt?.daysOfMonth&&gt?.daysOfMonth[De]>0,qe.interval=Y(gt);var Ne={samplingRate:((Le=Ce.limit)===null||Le===void 0?void 0:Le.samplingRate)||100,maxSendNumber:((He=Ce.limit)===null||He===void 0?void 0:He.maxSendNumber)||1};qe.limit=Ne,y[ee]=qe}catch{}}function Y(ee){ee=ee||{};var me=ee?.monthInterval,Le=ee?.dayInterval;return Oe(me)&&Oe(Le)&&(ee.monthInterval=3,L||(ee.daysOfMonth=[28],L=!0)),ee={monthInterval:ee?.monthInterval,dayInterval:ee?.dayInterval,daysOfMonth:ee?.daysOfMonth},ee}function Z(ee,me,Le){if(ee&&!ee[Uf]&&me&&!Oe(Le)){var He=we(),Ce=Le.date,qe=ee.interval,gt=1;if(qe!=null&&qe.monthInterval){var Ne=(He.getUTCFullYear()-Ce.getUTCFullYear())*12+He.getUTCMonth()-Ce.getUTCMonth();gt=se(qe.monthInterval,0,Ne)}var P=1;if(L)P=An(qe.daysOfMonth,He[zC]());else if(qe!=null&&qe.dayInterval){var oe=di((He.getTime()-Ce.getTime())/864e5);P=se(qe.dayInterval,0,oe)}return gt>=0&&P>=0}return!1}function Q(ee,me){var Le=Oe(me)?"":me;return ee?Xie+Le+"-"+ee:null}function ge(ee){try{if(ee){var me=new Date;return ee.getUTCFullYear()===me.getUTCFullYear()&&ee.getUTCMonth()===me.getUTCMonth()&&ee[zC]()===me[zC]()}}catch{}return!1}function K(ee,me,Le){try{var He={date:we(),count:0};if(ee){var Ce=JSON.parse(ee),qe={date:we(Ce.date)||He.date,count:Ce[Lf]||He[Lf],preTriggerDate:Ce.preTriggerDate?we(Ce[$C]):void 0};return qe}else return x(me,Le,He),He}catch{}return null}function we(ee){try{if(ee){var me=new Date(ee);if(!isNaN(me.getDate()))return me}else return new Date}catch{}return null}function x(ee,me,Le){try{return A7(ee,me,En(JSON[Ef](Le)))}catch{}return!1}function se(ee,me,Le){return ee<=0?1:Le>=me&&(Le-me)%ee==0?di((Le-me)/ee)+1:-1}function te(ee,me,Le,He){Je(me,He||1,ee,Le)}function Be(ee){try{var me=X(ee);return Mee(1e6)<=me.limit.samplingRate}catch{}return!1}function Me(ee){try{var me=g[ee];if(!me){var Le=Q(ee,E);me=K(C7(v,Le),v,Le),g[ee]=me}return g[ee]}catch{}return null}function Ie(ee){var me=C[ee];if(Oe(me)){me=!1;var Le=Me(ee);Le&&(me=ge(Le[$C])),C[ee]=me}return C[ee]}function je(ee){return I=I||{},Oe(I[ee])&&(I[ee]=[]),I[ee]}}return a})(),Jie=";",Qie="=";function M7(a){if(!a)return{};var s=a[ji](Jie),c=UQ(s,function(d,v){var y=v[ji](Qie);if(y[De]===2){var g=y[0][Ea](),C=y[1];d[g]=C}return d},{});if(oo(c)[De]>0){if(c.endpointsuffix){var f=c.location?c.location+".":"";c[Tc]=c[Tc]||"https://"+f+"dc."+c.endpointsuffix}c[Tc]=c[Tc]||_3,D9(c[Tc],"/")&&(c[Tc]=c[Tc].slice(0,-1))}return c}var Zie=(function(){function a(s,c,f){var d=this,v=this;v.ver=1,v.sampleRate=100,v.tags={},v[Ni]=sr(s,f)||vs,v[Ia]=c,v[If]=Vf(new Date),v[fb]={time:1,iKey:1,name:1,sampleRate:function(){return d.sampleRate===100?4:1},tags:1,data:1}}return a})();function al(a){return"Microsoft.ApplicationInsights.{0}."+a}var RA=al("Event"),i2=al("Exception"),NA=al("Metric"),a2=al("Pageview"),OA=al("PageviewPerformance"),P7=al("RemoteDependency"),eae=al("Request"),jA=al("Message"),tae=(function(){function a(s,c,f,d){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var v=this;v.ver=2,v[Ni]=sr(s,c)||vs,v[au]=tl(s,f),v[Wu]=nl(s,d)}return a.envelopeType=RA,a.dataType=Jf,a})(),nae=58,rae=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,iae=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,aae=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,oae=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,sae=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,uae=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,lae=/([^\(\s\n]+):([0-9]+)$/,_7="<no_method>",ih="error",go="stack",UA="stackDetails",D7="errorSrc",FA="message",L7="description",R7=[{re:iae,len:5,m:1,fn:2,ln:3,col:4},{chk:dae,pre:cae,re:aae,len:4,m:1,fn:2,ln:3},{re:oae,len:3,m:1,fn:2,hdl:B7},{re:sae,len:2,fn:1,hdl:B7}];function cae(a){return a[ru](/(\(anonymous\))/,"<anonymous>")}function dae(a){return Bn(a,"[native")<0}function BA(a,s){var c=a;return c&&!ct(c)&&(JSON&&JSON[Ef]?(c=JSON[Ef](a),s&&(!c||c==="{}")&&(Ke(a[Rf])?c=a[Rf]():c=""+a)):c=""+a+" - (Missing JSON.stringify)"),c||""}function N7(a,s){var c=a;return a&&(c&&!ct(c)&&(c=a[FA]||a[L7]||c),c&&!ct(c)&&(c=BA(c,!0)),a.filename&&(c=c+" @"+(a.filename||"")+":"+(a.lineno||"?")+":"+(a.colno||"?"))),s&&s!=="String"&&s!=="Object"&&s!=="Error"&&Bn(c||"",s)===-1&&(c=s+": "+c),c||""}function fae(a){try{if(Kr(a))return"hasFullStack"in a&&"typeName"in a}catch{}return!1}function hae(a){try{if(Kr(a))return"ver"in a&&"exceptions"in a&&"properties"in a}catch{}return!1}function O7(a){return a&&a.src&&ct(a.src)&&a.obj&&Pt(a.obj)}function _c(a){var s=a||"";ct(s)||(ct(s[go])?s=s[go]:s=""+s);var c=s[ji](`
`);return{src:s,obj:c}}function pae(a){for(var s=[],c=a[ji](`
`),f=0;f<c[De];f++){var d=c[f];c[f+1]&&(d+="@"+c[f+1],f++),s[pt](d)}return{src:a,obj:s}}function j7(a){var s=null;if(a)try{if(a[go])s=_c(a[go]);else if(a[ih]&&a[ih][go])s=_c(a[ih][go]);else if(a.exception&&a[rN][go])s=_c(a[rN][go]);else if(O7(a))s=a;else if(O7(a[UA]))s=a[UA];else if(Ta()&&Ta().opera&&a[FA])s=pae(a[Fr]);else if(a.reason&&a[Pf][go])s=_c(a[Pf][go]);else if(ct(a))s=_c(a);else{var c=a[FA]||a[L7]||"";ct(a[D7])&&(c&&(c+=`
`),c+=" from "+a[D7]),c&&(s=_c(c))}}catch(f){s=_c(f)}return s||{src:"",obj:null}}function gae(a){var s="";return a&&(a.obj?s=a.obj[Gu](`
`):s=a.src||""),s}function mae(a){var s,c=a.obj;if(c&&c[De]>0){s=[];var f=0,d=!1,v=0;Ye(c,function(X){if(d||wae(X)){var $=Qt(X);d=!0;var Y=xae($,f);Y&&(v+=Y[ub],s[pt](Y),f++)}});var y=32*1024;if(v>y)for(var g=0,C=s[De]-1,E=0,I=g,D=C;g<C;){var L=s[g][ub],F=s[C][ub];if(E+=L+F,E>y){var O=D-I+1;s[Lo](I,O);break}I=g,D=C,g++,C--}}return s}function o2(a){var s="";if(a&&(s=a.typeName||a[Ni]||"",!s))try{var c=/function (.{1,200})\(/,f=c.exec(a.constructor[Rf]());s=f&&f[De]>1?f[1]:""}catch{}return s}function VA(a){if(a)try{if(!ct(a)){var s=o2(a),c=BA(a,!1);return(!c||c==="{}")&&(a[ih]&&(a=a[ih],s=o2(a)),c=BA(a,!0)),Bn(c,s)!==0&&s!=="String"?s+":"+c:c}}catch{}return""+(a||"")}var Fm=(function(){function a(s,c,f,d,v,y){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var g=this;g.ver=2,hae(c)?(g[rm]=c[rm]||[],g[au]=c[au],g[Wu]=c[Wu],c[im]&&(g[im]=c[im]),c.id&&(g.id=c.id,c[au].id=c.id),c[JC]&&(g[JC]=c[JC]),Oe(c.isManual)||(g.isManual=c.isManual)):(f||(f={}),y&&(f.id=y),g[rm]=[U7(s,c,f)],g[au]=tl(s,f),g[Wu]=nl(s,d),v&&(g[im]=v),y&&(g.id=y))}return a.CreateAutoException=function(s,c,f,d,v,y,g,C){var E=o2(v||y||s);return{message:N7(s,E),url:c,lineNumber:f,columnNumber:d,error:VA(v||y||s),evt:VA(y||s),typeName:E,stackDetails:j7(g||v||y),errorSrc:C}},a.CreateFromInterface=function(s,c,f,d){var v=c[rm]&&$g(c[rm],function(g){return bae(s,g)}),y=new a(s,Aa(Aa({},c),{exceptions:v}),f,d);return y},a.prototype.toInterface=function(){var s=this,c=s.exceptions,f=s.properties,d=s.measurements,v=s.severityLevel,y=s.problemGroup,g=s.id,C=s.isManual,E=c instanceof Array&&$g(c,function(I){return I.toInterface()})||void 0;return{ver:"4.0",exceptions:E,severityLevel:v,properties:f,measurements:d,problemGroup:y,id:g,isManual:C}},a.CreateSimpleException=function(s,c,f,d,v,y){var g;return{exceptions:[(g={},g[cb]=!0,g.message=s,g.stack=v,g.typeName=c,g)]}},a.envelopeType=i2,a.dataType=Am,a.formatError=VA,a})(),vae=ka({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function yae(){var a=this,s=Pt(a[Nf])&&$g(a[Nf],function(f){return Tae(f)}),c={id:a.id,outerId:a.outerId,typeName:a[lb],message:a[Fr],hasFullStack:a[cb],stack:a[go],parsedStack:s||void 0};return c}function U7(a,s,c){var f,d,v,y,g,C,E,I;if(fae(s))y=s[lb],g=s[Fr],E=s[go],I=s[Nf]||[],C=s[cb];else{var D=s,L=D&&D.evt;KS(D)||(D=D[ih]||L||D),y=sr(a,o2(D))||vs,g=m7(a,N7(s||D,y))||vs;var F=s[UA]||j7(s);I=mae(F),Pt(I)&&$g(I,function(O){O[db]=sr(a,O[db]),O[ou]=sr(a,O[ou])}),E=Nie(a,gae(F)),C=Pt(I)&&I[De]>0,c&&(c[lb]=c[lb]||y)}return f={},f[fb]=vae,f.id=d,f.outerId=v,f.typeName=y,f.message=g,f[cb]=C,f.stack=E,f.parsedStack=I,f.toInterface=yae,f}function bae(a,s){var c=Pt(s[Nf])&&$g(s[Nf],function(d){return kae(d)})||s[Nf],f=U7(a,Aa(Aa({},s),{parsedStack:c}));return f}function F7(a,s){var c=s[em](uae);if(c&&c[De]>=4)a[ou]=c[1],a[Of]=parseInt(c[2]);else{var f=s[em](lae);f&&f[De]>=3?(a[ou]=f[1],a[Of]=parseInt(f[2])):a[ou]=s}}function B7(a,s,c){var f=a[ou];s.fn&&c&&c[De]>s.fn&&(s.ln&&c[De]>s.ln?(f=En(c[s.fn]||""),a[Of]=parseInt(En(c[s.ln]||""))||0):f=En(c[s.fn]||"")),f&&F7(a,f)}function wae(a){var s=!1;if(a&&ct(a)){var c=En(a);c&&(s=rae.test(c))}return s}var V7=ka({level:1,method:1,assembly:0,fileName:0,line:0});function xae(a,s){var c,f;if(a&&ct(a)&&En(a)){f=(c={},c[fb]=V7,c.level=s,c.assembly=En(a),c.method=_7,c.fileName="",c.line=0,c.sizeInBytes=0,c);for(var d=0;d<R7[De];){var v=R7[d];if(v.chk&&!v.chk(a))break;v.pre&&(a=v.pre(a));var y=a[em](v.re);if(y&&y[De]>=v.len){v.m&&(f.method=En(y[v.m]||_7)),v.hdl?v.hdl(f,v,y):v.fn&&(v.ln?(f[ou]=En(y[v.fn]||""),f[Of]=parseInt(En(y[v.ln]||""))||0):F7(f,y[v.fn]||""));break}d++}}return $7(f)}function kae(a){var s,c=(s={},s[fb]=V7,s.level=a.level,s.method=a.method,s.assembly=a[db],s.fileName=a[ou],s.line=a[Of],s.sizeInBytes=0,s);return $7(c)}function $7(a){var s=nae;return a&&(s+=a.method[De],s+=a.assembly[De],s+=a.fileName[De],s+=a.level.toString()[De],s+=a.line.toString()[De],a[ub]=s),a}function Tae(a){return{level:a.level,method:a.method,assembly:a[db],fileName:a[ou],line:a[Of]}}var Sae=(function(){function a(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return a})(),Cae=(function(){function a(s,c,f,d,v,y,g,C,E){this.aiDataContract={ver:1,metrics:1,properties:0};var I=this;I.ver=2;var D=new Sae;D[Lf]=d>0?d:void 0,D.max=isNaN(y)||y===null?void 0:y,D.min=isNaN(v)||v===null?void 0:v,D[Ni]=sr(s,c)||vs,D[Ro]=f,D.stdDev=isNaN(g)||g===null?void 0:g,I.metrics=[D],I[au]=tl(s,C),I[Wu]=nl(s,E)}return a.envelopeType=NA,a.dataType=Qf,a})(),Aae=(function(){function a(s,c,f,d,v,y,g){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var C=this;C.ver=2,C.id=Oie(s,g),C.url=Om(s,f),C[Ni]=sr(s,c)||vs,isNaN(d)||(C[GC]=su(d)),C[au]=tl(s,v),C[Wu]=nl(s,y)}return a.envelopeType=a2,a.dataType=Em,a})(),Eae=(function(){function a(s,c,f,d,v){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var y=this;y.ver=2,c=c||vs,y[Fr]=m7(s,c),y[au]=tl(s,d),y[Wu]=nl(s,v),f&&(y[im]=f)}return a.envelopeType=jA,a.dataType=$b,a})(),Iae=(function(){function a(s,c,f,d,v,y,g){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var C=this;C.ver=2,C.url=Om(s,f),C[Ni]=sr(s,c)||vs,C[au]=tl(s,v),C[Wu]=nl(s,y),g&&(C.domProcessing=g.domProcessing,C[GC]=g[GC],C.networkConnect=g.networkConnect,C.perfTotal=g.perfTotal,C.receivedResponse=g.receivedResponse,C.sentRequest=g.sentRequest)}return a.envelopeType=OA,a.dataType=Vb,a})();function ol(a){var s="ai."+a+".";return function(c){return s+c}}var Bm=ol("application"),Pr=ol("device"),s2=ol("location"),ah=ol("operation"),$A=ol("session"),sl=ol("user"),Dc=ol("cloud"),Vm=ol("internal"),z7=(function(a){Zs(s,a);function s(){return a.call(this)||this}return s})(QZ({applicationVersion:Bm("ver"),applicationBuild:Bm("build"),applicationTypeId:Bm("typeId"),applicationId:Bm("applicationId"),applicationLayer:Bm("layer"),deviceId:Pr("id"),deviceIp:Pr("ip"),deviceLanguage:Pr("language"),deviceLocale:Pr("locale"),deviceModel:Pr("model"),deviceFriendlyName:Pr("friendlyName"),deviceNetwork:Pr("network"),deviceNetworkName:Pr("networkName"),deviceOEMName:Pr("oemName"),deviceOS:Pr("os"),deviceOSVersion:Pr("osVersion"),deviceRoleInstance:Pr("roleInstance"),deviceRoleName:Pr("roleName"),deviceScreenResolution:Pr("screenResolution"),deviceType:Pr("type"),deviceMachineName:Pr("machineName"),deviceVMName:Pr("vmName"),deviceBrowser:Pr("browser"),deviceBrowserVersion:Pr("browserVersion"),locationIp:s2("ip"),locationCountry:s2("country"),locationProvince:s2("province"),locationCity:s2("city"),operationId:ah("id"),operationName:ah("name"),operationParentId:ah("parentId"),operationRootId:ah("rootId"),operationSyntheticSource:ah("syntheticSource"),operationCorrelationVector:ah("correlationVector"),sessionId:$A("id"),sessionIsFirst:$A("isFirst"),sessionIsNew:$A("isNew"),userAccountAcquisitionDate:sl("accountAcquisitionDate"),userAccountId:sl("accountId"),userAgent:sl("userAgent"),userId:sl("id"),userStoreRegion:sl("storeRegion"),userAuthUserId:sl("authUserId"),userAnonymousUserAcquisitionDate:sl("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:sl("authUserAcquisitionDate"),cloudName:Dc("name"),cloudRole:Dc("role"),cloudRoleVer:Dc("roleVer"),cloudRoleInstance:Dc("roleInstance"),cloudEnvironment:Dc("environment"),cloudLocation:Dc("location"),cloudDeploymentUnit:Dc("deploymentUnit"),internalNodeName:Vm("nodeName"),internalSdkVersion:Vm("sdkVersion"),internalAgentVersion:Vm("agentVersion"),internalSnippet:Vm("snippet"),internalSdkSrc:Vm("sdkSrc")})),_a={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},_n=new z7;function ws(a,s,c,f,d,v){c=sr(f,c)||vs,(Oe(a)||Oe(s)||Oe(c))&&wa("Input doesn't contain all required fields");var y="";a[D3]&&(y=a[D3],delete a[D3]);var g={name:c,time:Vf(new Date),iKey:y,ext:v||{},tags:[],data:{},baseType:s,baseData:a};return Oe(d)||Gt(d,function(C,E){g[Ia][C]=E}),g}function $m(a){var s=null;if(Ke(Event))s=new Event(a);else{var c=jr();c&&c[sb]&&(s=c[sb]("Event"),s.initEvent(a,!0,!0))}return s}function H7(a,s){Zf(a,null,null,s)}function Mae(a){var s=jr(),c=$u(),f=!1,d=[],v=1;c&&!Oe(c.onLine)&&!c.onLine&&(v=2);var y=0,g=L(),C=el(jo("OfflineListener"),a);try{if(I(Ta())&&(f=!0),s){var E=s.body||s;E.ononline&&I(E)&&(f=!0)}}catch{f=!1}function I(Q){var ge=!1;return Q&&(ge=lu(Q,"online",X,C),ge&&lu(Q,"offline",$,C)),ge}function D(){return g}function L(){return!(y===2||v===2)}function F(){var Q=L();g!==Q&&(g=Q,Ye(d,function(ge){var K={isOnline:g,rState:v,uState:y};try{ge(K)}catch{}}))}function O(Q){y=Q,F()}function X(){v=1,F()}function $(){v=2,F()}function Y(){var Q=Ta();if(Q&&f){if(H7(Q,C),s){var ge=s.body||s;Cn(ge.ononline)||H7(ge,C)}f=!1}}function Z(Q){return d[pt](Q),{rm:function(){var ge=An(d,Q);if(ge>-1)return d[Lo](ge,1)}}}return{isOnline:D,isListening:function(){return f},unload:Y,addListener:Z,setOnlineState:O}}var zA="AppInsightsPropertiesPlugin",q7="AppInsightsChannelPlugin",G7="ApplicationInsightsAnalytics",u2="toString",HA="isStorageUseDisabled",oh="_addHook",un="core",Da="diagLog",Lc="track",l2="trackPageView",mo="config",qA="trackPreviousPageVisit",Rc="sendPageViewInternal",GA="refUri",sh="startTime",zm="properties",xs="duration",KA="sendPageViewPerformanceInternal",WA="populatePageViewPerformanceEvent",Hm="href",K7="sendExceptionInternal",qm="error",XA="lineNumber",YA="columnNumber",JA="CreateAutoException",c2="addTelemetryInitializer",Pae="overridePageViewDuration",QA="autoExceptionInstrumented",W7="autoTrackPageVisitTime",X7="isBrowserLinkTrackingEnabled",Gm="length",Y7="enableAutoRouteTracking",ZA="getTraceCtx",J7="enableUnhandledPromiseRejectionTracking",eE="autoUnhandledPromiseInstrumented",tE="getEntriesByType",Q7="isPerformanceTimingSupported",Z7="getPerformanceTiming",d2="navigationStart",ej="shouldCollectDuration",tj="isPerformanceTimingDataReady",Km="responseStart",_ae="requestStart",f2="loadEventEnd",nE="responseEnd",h2="connectEnd",rE="pageVisitTime";function Dae(a,s,c,f){var d,v=null,y=[],g=!1,C=!1,E;c&&(E=c.logger);function I(F){c&&c.flush(F,function(){})}function D(){v||(v=Ca((function(){v=null;var F=y.slice(0),O=!1;y=[],Ye(F,function(X){X()?O=!0:y.push(X)}),y[Gm]>0&&D(),O&&I(!0)}),100))}function L(F){y.push(F),D()}return d={},d[l2]=function(F,O){var X=F.name;if(Oe(X)||typeof X!="string"){var $=jr();X=F.name=$&&$.title||""}var Y=F.uri;if(Oe(Y)||typeof Y!="string"){var Z=ms();Y=F.uri=Z&&Z[Hm]||""}if(c&&c[mo]&&(Y=F.uri=Ma(F.uri,c[mo])),!C){var Q=Sa(),ge=Q&&Q[tE]&&Q[tE]("navigation");if(ge&&ge[0]&&!Cn(Q.timeOrigin)){var K=ge[0].loadEventStart;F[sh]=new Date(Q.timeOrigin+K)}else{var we=(O||F[zm]||{})[xs]||0;F[sh]=new Date(new Date().getTime()-we)}C=!0}if(!f[Q7]()){a[Rc](F,O),I(!0),x9()||Je(E,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var x=!1,se,te=f[Z7]()[d2];te>0&&(se=ta(te,+new Date),f[ej](se)||(se=void 0));var Be;!Oe(O)&&!Oe(O[xs])&&(Be=O[xs]),(s||!isNaN(Be))&&(isNaN(Be)&&(O||(O={}),O[xs]=se),a[Rc](F,O),I(!0),x=!0);var Me=6e4;O||(O={}),L(function(){var Ie=!1;try{if(f[tj]()){Ie=!0;var je={name:X,uri:Y};f[WA](je),!je.isValid&&!x?(O[xs]=se,a[Rc](F,O)):(x||(O[xs]=je.durationMs,a[Rc](F,O)),g||(a[KA](je,O),g=!0))}else te>0&&ta(te,+new Date)>Me&&(Ie=!0,x||(O[xs]=Me,a[Rc](F,O)))}catch(ee){Je(E,1,38,"trackPageView failed on page load calculation: "+pn(ee),{exception:at(ee)})}return Ie})},d.teardown=function(F,O){if(v){v.cancel(),v=null;var X=y.slice(0);y=[],Ye(X,function($){$()})}},d}var Lae=36e5,nj=["googlebot","adsbot-google","apis-google","mediapartners-google"];function rj(){var a=Sa();return a&&!!a.timing}function Rae(){var a=Sa();return a&&a.getEntriesByType&&a.getEntriesByType("navigation")[Gm]>0}function Nae(){var a=Sa(),s=a?a.timing:0;return s&&s.domainLookupStart>0&&s[d2]>0&&s[Km]>0&&s[_ae]>0&&s[f2]>0&&s[nE]>0&&s[h2]>0&&s.domLoading>0}function ij(){return rj()?Sa().timing:null}function Oae(){return Rae()?Sa()[tE]("navigation")[0]:null}function aj(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c=$u()||{},f=c.userAgent,d=!1;if(f)for(var v=0;v<nj[Gm];v++)d=d||Bn(f.toLowerCase(),nj[v])!==-1;if(d)return!1;for(var v=0;v<a[Gm];v++)if(a[v]<0||a[v]>=Lae)return!1;return!0}function jae(a){var s,c=Hf(a);return s={},s[WA]=function(f){f.isValid=!1;var d=Oae(),v=ij(),y=0,g=0,C=0,E=0,I=0;(d||v)&&(d?(y=d[xs],g=d[sh]===0?d[h2]:ta(d[sh],d[h2]),C=ta(d.requestStart,d[Km]),E=ta(d[Km],d[nE]),I=ta(d.responseEnd,d[f2])):(y=ta(v[d2],v[f2]),g=ta(v[d2],v[h2]),C=ta(v.requestStart,v[Km]),E=ta(v[Km],v[nE]),I=ta(v.responseEnd,v[f2])),y===0?Je(c,2,10,"error calculating page view performance.",{total:y,network:g,request:C,response:E,dom:I}):aj(y,g,C,E,I)?y<di(g)+di(C)+di(E)+di(I)?Je(c,2,8,"client performance math error.",{total:y,network:g,request:C,response:E,dom:I}):(f.durationMs=y,f.perfTotal=f[xs]=su(y),f.networkConnect=su(g),f.sentRequest=su(C),f.receivedResponse=su(E),f.domProcessing=su(I),f.isValid=!0):Je(c,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:y,network:g,request:C,response:E,dom:I}))},s[Z7]=ij,s[Q7]=rj,s[tj]=Nae,s[ej]=aj,s}function Uae(a,s){var c;return c={pageVisitStartTime:so(),pageName:a,pageUrl:s},c[rE]=0,c}function Fae(a,s){var c,f="prevPageVisitData";function d(y,g){var C=null;try{if(C=v(),Um()){LA(a,f)!=null&&wa("Cannot call startPageVisit consecutively without first calling stopPageVisit");var E=Oo().stringify(Uae(y,g));E7(a,f,E)}}catch(I){Cc(a,"Call to restart failed: "+at(I)),C=null}return C}function v(){var y=null;try{if(Um()){var g=so(),C=LA(a,f);C&&dm()&&(y=Oo().parse(C),y[rE]=g-y.pageVisitStartTime,I7(a,f))}}catch(E){Cc(a,"Stop page visit timer failed: "+at(E)),y=null}return y}return c={},c[qA]=function(y,g){try{var C=d(y,g);C&&s(C.pageName,C.pageUrl,C[rE])}catch(E){Cc(a,"Auto track page visit time failed, metric will not be collected: "+at(E))}},c._logger=a,c.pageVisitTimeTrackingHandler=s,c}function oj(a,s){var c={},f={action:null,start:function(d){typeof c[d]<"u"&&Je(a,2,62,"start was called more than once for this event without calling stop.",{name:d,key:d},!0),c[d]=+new Date},stop:function(d,v,y,g){var C=c[d];if(isNaN(C))Je(a,2,63,"stop was called without a corresponding start.",{name:d,key:d},!0);else{var E=+new Date,I=ta(C,E);f.action(d,v,I,y,g)}delete c[d],c[d]=void 0}};return f}var gi,Bae="event";function Wm(a,s){a&&a.dispatchEvent&&s&&a.dispatchEvent(s)}function Vae(a){if(a&&a.reason){var s=a.reason;return!ct(s)&&Ke(s[u2])?s[u2]():at(s)}return a||""}var sj=6e4,$ae=xf((gi={sessionRenewalMs:yN(uj,1800*1e3),sessionExpirationMs:yN(uj,1440*60*1e3),disableExceptionTracking:Tr()},gi[W7]=Tr(),gi[Pae]=Tr(),gi[J7]=Tr(),gi[eE]=!1,gi.samplingPercentage=wb(zae,100),gi[HA]=Tr(),gi[X7]=Tr(),gi[Y7]=Tr(),gi.namePrefix=GZ(),gi.enableDebug=Tr(),gi.disableFlushOnBeforeUnload=Tr(),gi.disableFlushOnUnload=Tr(!1,"disableFlushOnBeforeUnload"),gi.expCfg=hi({inclScripts:!1,expLog:void 0,maxLogs:50}),gi.routeTraceStrategy=0,gi));function uj(a,s){return a=a||s,a<sj&&(a=sj),+a}function zae(a){return!isNaN(a)&&a>0&&a<=100}function Hae(a){Cn(a[HA])||(a[HA]?Gie():Kie())}var qae=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.identifier=G7,c.priority=180,c.autoRoutePVDelay=500;var f,d,v,y,g,C,E,I,D,L,F,O,X,$,Y,Z,Q,ge,K,we,x,se;return or(s,c,function(te,Be){var Me=Be[oh];P(),te.getCookieMgr=function(){return z3(te[un])},te.processTelemetry=function(oe,ne){te.processNext(oe,ne)},te.trackEvent=function(oe,ne){try{var Ue=ws(oe,Jf,RA,te[Da](),ne);te[un][Lc](Ue)}catch(ze){Ne(2,39,"trackTrace failed, trace will not be collected: "+pn(ze),{exception:at(ze)})}},te.startTrackEvent=function(oe){try{f.start(oe)}catch(ne){Ne(1,29,"startTrackEvent failed, event will not be collected: "+pn(ne),{exception:at(ne)})}},te.stopTrackEvent=function(oe,ne,Ue){try{f.stop(oe,void 0,ne,Ue)}catch(ze){Ne(1,30,"stopTrackEvent failed, event will not be collected: "+pn(ze),{exception:at(ze)})}},te.trackTrace=function(oe,ne){try{var Ue=ws(oe,$b,jA,te[Da](),ne);te[un][Lc](Ue)}catch(ze){Ne(2,39,"trackTrace failed, trace will not be collected: "+pn(ze),{exception:at(ze)})}},te.trackMetric=function(oe,ne){try{var Ue=ws(oe,Qf,NA,te[Da](),ne);te[un][Lc](Ue)}catch(ze){Ne(1,36,"trackMetric failed, metric will not be collected: "+pn(ze),{exception:at(ze)})}},te[l2]=function(oe,ne){try{var Ue=oe||{};te[un]&&te[un][mo]&&(Ue.uri=Ma(Ue.uri,te[un][mo])),v[l2](Ue,Aa(Aa(Aa({},Ue.properties),Ue.measurements),ne)),Z&&g[qA](Ue.name,Ue.uri)}catch(ze){Ne(1,37,"trackPageView failed, page view will not be collected: "+pn(ze),{exception:at(ze)})}},te[Rc]=function(oe,ne,Ue){var ze=jr();if(ze&&(oe[GA]=oe[GA]===void 0?ze.referrer:oe[GA]),te[un]&&te[un][mo]&&(oe.refUri=Ma(oe.refUri,te[un][mo])),Oe(oe[sh])){var ot=(ne||oe[zm]||{})[xs]||0;oe[sh]=new Date(new Date().getTime()-ot)}var zt=ws(oe,Em,a2,te[Da](),ne,Ue);te[un][Lc](zt),Ie()},te[KA]=function(oe,ne,Ue){var ze=ws(oe,Vb,OA,te[Da](),ne,Ue);te[un][Lc](ze)},te.trackPageViewPerformance=function(oe,ne){var Ue=oe||{};try{y[WA](Ue),te[KA](Ue,ne)}catch(ze){Ne(1,37,"trackPageViewPerformance failed, page view will not be collected: "+pn(ze),{exception:at(ze)})}},te.startTrackPage=function(oe){try{if(typeof oe!="string"){var ne=jr();oe=ne&&ne.title||""}d.start(oe)}catch(Ue){Ne(1,31,"startTrackPage failed, page view may not be collected: "+pn(Ue),{exception:at(Ue)})}},te.stopTrackPage=function(oe,ne,Ue,ze){try{if(typeof oe!="string"){var ot=jr();oe=ot&&ot.title||""}if(typeof ne!="string"){var zt=ms();ne=zt&&zt[Hm]||""}te[un]&&te[un][mo]&&(ne=Ma(ne,te[un][mo])),d.stop(oe,ne,Ue,ze),Z&&g[qA](oe,ne)}catch(Te){Ne(1,32,"stopTrackPage failed, page view will not be collected: "+pn(Te),{exception:at(Te)})}},te[K7]=function(oe,ne,Ue){var ze=oe&&(oe.exception||oe[qm])||KS(oe)&&oe||{name:oe&&typeof oe,message:oe||vs};oe=oe||{};var ot=new Fm(te[Da](),ze,oe[zm]||ne,oe.measurements,oe.severityLevel,oe.id).toInterface(),zt=jr();if(zt&&Q!=null&&Q.inclScripts){var Te=hte(zt);ot[zm].exceptionScripts=JSON.stringify(Te)}if(Q!=null&&Q.expLog){var At=Q.expLog();At&&At.logs&&Pt(At.logs)&&(ot[zm].exceptionLog=At.logs.slice(0,Q.maxLogs).join(`
`))}var tn=ws(ot,Am,i2,te[Da](),ne,Ue);te[un][Lc](tn)},te.trackException=function(oe,ne){oe&&!oe.exception&&oe[qm]&&(oe.exception=oe[qm]);try{te[K7](oe,ne)}catch(Ue){Ne(1,35,"trackException failed, exception will not be collected: "+pn(Ue),{exception:at(Ue)})}},te._onerror=function(oe){var ne=oe&&oe[qm],Ue=oe&&oe.evt;try{if(!Ue){var ze=Ta();ze&&(Ue=ze[Bae])}var ot=oe&&oe.url||(jr()||{}).URL,zt=oe.errorSrc||"window.onerror@"+ot+":"+(oe[XA]||0)+":"+(oe[YA]||0),Te={errorSrc:zt,url:ot,lineNumber:oe[XA]||0,columnNumber:oe[YA]||0,message:oe.message};see(oe.message,oe.url,oe.lineNumber,oe.columnNumber,oe[qm])?Le(Fm[JA]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",ot,oe[XA]||0,oe[YA]||0,ne,Ue,null,zt),Te):(oe.errorSrc||(oe.errorSrc=zt),te.trackException({exception:oe,severityLevel:3},Te))}catch(tn){var At=ne?ne.name+", "+ne.message:"null";Ne(1,11,"_onError threw exception while logging error, error will not be collected: "+pn(tn),{exception:at(tn),errorString:At})}},te[c2]=function(oe){if(te[un])return te[un][c2](oe);C||(C=[]),C.push(oe)},te.initialize=function(oe,ne,Ue,ze){if(!te.isInitialized()){Oe(ne)&&wa("Error initializing"),Be.initialize(oe,ne,Ue,ze);try{x=el(jo(te.identifier),ne.evtNamespace&&ne.evtNamespace()),C&&(Ye(C,function(ot){ne[c2](ot)}),C=null),je(oe),y=jae(te[un]),v=Dae(te,Y.overridePageViewDuration,te[un],y),g=Fae(te[Da](),function(ot,zt,Te){return ee(ot,zt,Te)}),f=oj(te[Da](),"trackEvent"),f.action=function(ot,zt,Te,At,tn){At||(At={}),tn||(tn={}),At.duration=Te[u2](),te.trackEvent({name:ot,properties:At,measurements:tn})},d=oj(te[Da](),"trackPageView"),d.action=function(ot,zt,Te,At,tn){Oe(At)&&(At={}),At.duration=Te[u2]();var er={name:ot,uri:zt,properties:At,measurements:tn};te[Rc](er,At)},O1()&&(He(),Ce())}catch(ot){throw te.setInitialized(!1),ot}}},te._doTeardown=function(oe,ne){v&&v.teardown(oe,ne),Zf(window,null,null,x),P()},te._getDbgPlgTargets=function(){return[se,O]};function Ie(){if(te[un]){var oe=te[un].getPlugin("AjaxDependencyPlugin");oe&&oe.plugin&&oe.plugin.resetAjaxAttempts&&oe.plugin.resetAjaxAttempts()}}function je(oe){var ne=te.identifier,Ue=te[un];te[oh](pr(oe,function(){var ze=Bo(null,oe,Ue);Y=ze.getExtCfg(ne,$ae),O=O||oe[QA]||Y[QA],Q=Y.expCfg,Z=Y[W7],ge=Y.routeTraceStrategy||0,oe.storagePrefix&&DA(oe.storagePrefix),Hae(Y),E=Y[X7],me()}))}function ee(oe,ne,Ue){var ze={PageName:oe,PageUrl:ne};te.trackMetric({name:"PageVisitTime",average:Ue,max:Ue,min:Ue,sampleCount:1},ze)}function me(){if(!I&&E){var oe=["/browserLinkSignalR/","/__browserLink/"],ne=function(Ue){if(E&&Ue.baseType===Im){var ze=Ue.baseData;if(ze){for(var ot=0;ot<oe[Gm];ot++)if(ze.target&&Bn(ze.target,oe[ot])>=0)return!1}}return!0};te[oh](te[c2](ne)),I=!0}}function Le(oe,ne){var Ue=ws(oe,Am,i2,te[Da](),ne);te[un][Lc](Ue)}function He(){var oe=Ta(),ne=ms();te[oh](pr(Y,function(){F=Y.disableExceptionTracking,!F&&!O&&!Y[QA]&&(Me(Gb(oe,"onerror",{ns:x,rsp:function(Ue,ze,ot,zt,Te,At){!F&&Ue.rslt!==!0&&te._onerror(Fm[JA](ze,ot,zt,Te,At,Ue.evt))}},!1)),se++,O=!0)})),gt(oe,ne)}function Ce(){var oe=Ta(),ne=ms();te[oh](pr(Y,function(){if(D=Y[Y7]===!0,oe&&D&&!L&&PQ()){var Ue=w9();Ke(Ue.pushState)&&Ke(Ue.replaceState)&&typeof Event!==_C&&qe(oe,Ue,ne)}}))}function qe(oe,ne,Ue){if(L)return;var ze=Y.namePrefix||"";function ot(){D&&Wm(oe,$m(ze+"locationchange"))}function zt(){if(we&&(K=we),we=Ue&&Ue[Hm]||"",te[un]&&te[un][mo]&&(we=Ma(we,te[un][mo])),D){var Te=void 0;if(te[un]&&te[un][ZA]){var At=te[un][ZA](!1);At&&ge===1?Te=po(At):Te=te[un][ZA](!0),Te.traceId=Ac(),Te.pageName=sr(te[Da](),Te.pageName||"_unknown_"),te[un].setTraceCtx(Te)}Ca((function(tn){te[l2]({refUri:tn,properties:{duration:0}})}).bind(te,K),te.autoRoutePVDelay)}}Me(Gb(ne,"pushState",{ns:x,rsp:function(){D&&(Wm(oe,$m(ze+"pushState")),Wm(oe,$m(ze+"locationchange")))}},!0)),Me(Gb(ne,"replaceState",{ns:x,rsp:function(){D&&(Wm(oe,$m(ze+"replaceState")),Wm(oe,$m(ze+"locationchange")))}},!0)),lu(oe,ze+"popstate",ot,x),lu(oe,ze+"locationchange",zt,x),L=!0}function gt(oe,ne){te[oh](pr(Y,function(){X=Y[J7]===!0,O=O||Y[eE],X&&!$&&(Me(Gb(oe,"onunhandledrejection",{ns:x,rsp:function(Ue,ze){X&&Ue.rslt!==!0&&te._onerror(Fm[JA](Vae(ze),ne?ne[Hm]:"",0,0,ze,Ue.evt))}},!1)),se++,Y[eE]=$=!0)}))}function Ne(oe,ne,Ue,ze,ot){te[Da]().throwInternal(oe,ne,Ue,ze,ot)}function P(){f=null,d=null,v=null,y=null,g=null,C=null,E=!1,I=!1,D=!1,L=!1,F=!1,O=!1,X=!1,$=!1,Z=!1,Ie();var oe=ms();K=oe&&oe[Hm]||"",te[un]&&te[un][mo]&&(K=Ma(K,te[un][mo])),we=null,x=null,Y=null,se=0,Dt(te,"config",{g:function(){return Y}})}Dt(te,"_pageViewManager",{g:function(){return v}}),Dt(te,"_pageViewPerformanceManager",{g:function(){return y}}),Dt(te,"_pageVisitTimeManager",{g:function(){return g}}),Dt(te,"_evtNamespace",{g:function(){return"."+x}})}),c}return s.Version="3.4.3",s})(Yf),p2="featureOptIn",lj="scheduleFetchTimeout";function cj(a,s,c,f){try{var d=c>f;d&&(a=null);var v=c==0?aZ({},a):a;return v&&s&&!d&&Gt(v,function(y){var g=s[y];g&&(Kr(v[y])&&Kr(g)?v[y]=cj(v[y],g,++c,f):delete v[y])}),v}catch{}return a}var uh="featureOptIn.",dj=".mode",fj=".onCfg",hj=".offCfg";function Gae(a,s,c){var f;if(!s||!s.enabled)return null;var d=(s[p2]||{})[a]||{mode:1},v=d.mode,y=d.onCfg,g=d.offCfg,C=(c||{})[a]||{mode:2},E=C.mode,I=C.onCfg,D=C.offCfg,L=!!C.blockCdnCfg,F=uh+a+dj,O=uh+a+fj,X=uh+a+hj,$=E,Y=I,Z=D;return L||(v===4||v===5?($=v==4?3:2,Y=y||I,Z=g||D):v===2||E===2?($=2,Y=I||y,Z=D||g):v===3?($=3,Y=I||y,Z=D||g):v===1&&E===1&&($=1)),f={},f[F]=$,f[O]=Y,f[X]=Z,f}function Kae(a,s){try{if(!a||!a.enabled)return null;if(!a[p2])return a.config;var c=a[p2],f=a.config||{};return Gt(c,function(d){var v=Gae(d,a,s.config[p2]);Oe(v)||(Gt(v,function(y,g){_9(f,y,g)}),Wae(d,v,f))}),f}catch{}return null}function Wae(a,s,c){var f=s[uh+a+dj],d=s[uh+a+fj],v=s[uh+a+hj],y=null;f===3&&(y=d),f===2&&(y=v),y&&Gt(y,function(g,C){_9(c,g,C)})}var Xm,Xae="ai_cfgsync",Yae="GET",Jae=18e5,lh=void 0,Qae={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},Zae=xf((Xm={syncMode:1,blkCdnCfg:lh,customEvtName:lh,cfgUrl:lh,overrideSyncFn:lh,overrideFetchFn:lh,onCfgChangeReceive:lh},Xm[lj]=Jae,Xm.nonOverrideConfigs=Qae,Xm.enableAjax=!1,Xm)),eoe=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.priority=198,c.identifier="AppInsightsCfgSyncPlugin";var f,d,v,y,g,C,E,I,D,L,F,O,X,$,Y,Z,Q=!1,ge;return or(s,c,function(K,we){x(),K.initialize=function(Ne,P,oe,ne){we.initialize(Ne,P,oe,ne),y=el(jo(K.identifier),P.evtNamespace&&P.evtNamespace()),se(Ne)},K.getCfg=function(){return d},K.pause=function(){Q=!0,gt()},K.resume=function(){Q=!1,qe()},K.setCfg=function(Ne){return te(Ne)},K.sync=function(Ne){return Me(Ne)},K.updateEventListenerName=function(Ne){return Ie(Ne)},K._doTeardown=function(Ne,P){Be(),gt(),x()},K._getDbgPlgTargets=function(){return[I,E,v,D,X]};function x(){d=null,v=null,y=null,g=null,E=null,I=null,X=null,C=null,L=null,F=null,D=null,ge=!1,Y=null,Z=null,O=null}function se(Ne){var P=K.identifier,oe=K.core;K._addHook(pr(Ne,function(){var ne=Bo(null,Ne,oe);f=ne.getExtCfg(P,Zae);var Ue=D;D=!!f.blkCdnCfg,ge=!!f.enableAjax,!Oe(Ue)&&Ue!==D&&(!D&&g?$&&$(g,me,I):gt()),Oe(E)&&(E=f.syncMode===2),Oe(I)&&(I=f.syncMode===1);var ze=f.customEvtName||Xae;v!==ze&&(E?Ie(ze):(Be(),v=ze)),Oe(g)&&(g=f.cfgUrl),g||(d=Ne,I&&Me())})),Z=f.overrideSyncFn,Y=f.overrideFetchFn,O=f.onCfgChangeReceive,X=f.nonOverrideConfigs,L=f[lj],$=je(),F=0,g&&!D&&$&&$(g,me,I)}function te(Ne,P){if(Ne){if(d=Ne,P&&!Q)return Me();if(E&&!Q)return K.core.updateCfg(Ne),!0}return!1}function Be(){try{var Ne=co();Ne&&Zf(Ne,null,null,y)}catch{}}function Me(Ne){try{return Z&&Ke(Z)?Z(d,Ne):See(v,d,Ne)}catch{}return!1}function Ie(Ne){try{return Be(),Ne&&(v=Ne,He()),!0}catch{}return!1}function je(){var Ne=Y;return Oe(Ne)&&S3()&&(Ne=ee),Ne}function ee(Ne,P,oe){var ne=co(),Ue=ne&&ne.fetch||null;if(Ne&&Ue&&Ke(Ue))try{var ze={method:Yae};ge||(ze[Ju]=!0);var ot=new Request(Ne,ze);if(!ge)try{ot[Ju]=!0}catch{}ea(fetch(ot),function(zt){var Te=zt.value;zt.rejected?Le(P,400):Te.ok?ea(Te.text(),function(At){Le(P,Te.status,At.value,oe)}):Le(P,Te.status,null,oe)})}catch{}}function me(Ne,P,oe){try{if(Ne>=200&&Ne<400&&P){F=0;var ne=Oo();if(ne){var Ue=ne.parse(P),ze=Kae(Ue,K.core),ot=ze&&Li(ze)&&Ce(ze);ot&&te(ot,oe)}}else F++;F<3&&qe()}catch{}}function Le(Ne,P,oe,ne){try{Ne(P,oe,ne)}catch{}}function He(){if(E){var Ne=co();if(Ne)try{lu(Ne,v,function(P){var oe=P&&P.detail;if(O&&oe)O(oe);else{var ne=oe&&oe.cfg,Ue=ne&&Li(ne)&&Ce(ne);Ue&&te(Ue)}},y,!0)}catch{}}}function Ce(Ne,P){var oe=null;try{Ne&&(oe=cj(Ne,X,0,5))}catch{}return oe}function qe(){!C&&L&&(C=Ca(function(){C=null,$(g,me,I)},L),C.unref())}function gt(){C&&C.cancel(),C=null,F=0}K.processTelemetry=function(Ne,P){K.processNext(Ne,P)}}),c}return s.__ieDyn=1,s})(Yf),ul="duration";function ll(a,s){return{baseType:a,baseData:s,aiDataContract:{baseType:1,baseData:1}}}var Wr="tags",iE="deviceType",Fi="data",vo="name",Ym="traceID",Ut="length",Jm="stringify",cl="measurements",aE="responseCode",Nc="toString",Oc="enqueue",jc="count",ks="push",oE="emitLineDelimitedJson",ch="clear",g2="markAsSent",Qm="clearSent",sE="bufferOverride",Zm="BUFFER_KEY",dl="SENT_BUFFER_KEY",dh="concat",ev="MAX_BUFFER_SIZE",tv="triggerSend",mi="diagLog",uE="initialize",nv="_sender",rv="endpointUrl",iv="instrumentationKey",lE="customHeaders",pj="maxBatchSizeInBytes",cE="onunloadDisableBeacon",dE="isBeaconApiDisabled",gj="alwaysUseXhrOverride",mj="enableSessionStorageBuffer",Ts="_buffer",vj="onunloadDisableFetch",yj="disableSendBeaconSplit",m2="getSenderInst",av="baseType",Uc="_onError",fE="_onPartialSuccess",v2="_onSuccess",hE="itemsReceived",pE="itemsAccepted",y2="sampleRate",toe="Microsoft.ApplicationInsights.{0}.RemoteDependency";function noe(a,s,c,f){var d,v=f,y=f;if(s&&s[Ut]>0){var g=e2(s);if(d=g.host,!v)if(g.pathname!=null){var C=g.pathname[Ut]===0?"/":g.pathname;C.charAt(0)!=="/"&&(C="/"+C),y=g.pathname,v=sr(a,c?c+" "+C:C)}else v=sr(a,s)}else d=f,v=f;return{target:d,name:v,data:y}}function roe(a,s,c,f,d,v,y,g,C,E,I,D){C===void 0&&(C="Ajax");var L=noe(a,c,g,f),F={ver:2,id:s,duration:su(d),success:v,resultCode:""+y,type:sr(a,C),data:Om(a,f)||L[Fi],target:sr(a,L.target),name:sr(a,L[vo]),properties:tl(a,I),measurements:nl(a,D),aiDataContract:{id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0}};return E&&(F.target=""+F.target+" | "+E),F}var ioe="Microsoft.ApplicationInsights.{0}.Request";function aoe(a,s,c,f,d,v,y,g,C,E){var I;return I={ver:2,id:s,name:sr(a,c),duration:su(f),success:d},I[aE]=Qt(v||"0"),I.source=sr(a,y),I.url=Om(a,g),I.properties=tl(a,C),I.measurements=nl(a,E),I.aiDataContract={id:1,ver:1,name:0,responseCode:1,duration:1,success:1,source:0,url:0,properties:0,measurements:0},I}var gE="baseType",jn="baseData",_r="properties",bj="true";function gr(a,s,c){return Pn(a,s,c,E1)}function ooe(a,s,c){var f=c[Wr]=c[Wr]||{},d=s.ext=s.ext||{},v=s[Wr]=s[Wr]||{},y=d.user;y&&(gr(f,_n.userAuthUserId,y.authId),gr(f,_n.userId,y.id||y.localId));var g=d.app;g&&gr(f,_n.sessionId,g.sesId);var C=d.device;C&&(gr(f,_n.deviceId,C.id||C.localId),gr(f,_n[iE],C.deviceClass),gr(f,_n.deviceIp,C.ip),gr(f,_n.deviceModel,C.model),gr(f,_n[iE],C[iE]));var E=s.ext.web;if(E){gr(f,_n.deviceLanguage,E.browserLang),gr(f,_n.deviceBrowserVersion,E.browserVer),gr(f,_n.deviceBrowser,E.browser);var I=c[Fi]=c[Fi]||{},D=I[jn]=I[jn]||{},L=D[_r]=D[_r]||{};gr(L,"domain",E.domain),gr(L,"isManual",E.isManual?bj:null),gr(L,"screenRes",E.screenRes),gr(L,"userConsent",E.userConsent?bj:null)}var F=d.os;F&&(gr(f,_n.deviceOS,F[vo]),gr(f,_n.deviceOSVersion,F.osVer));var O=d.trace;O&&(gr(f,_n.operationParentId,O.parentID),gr(f,_n.operationName,sr(a,O[vo])),gr(f,_n.operationId,O[Ym]));for(var X={},$=v[Ut]-1;$>=0;$--){var Y=v[$];Gt(Y,function(Q,ge){X[Q]=ge}),v.splice($,1)}Gt(v,function(Q,ge){X[Q]=ge});var Z=Aa(Aa({},f),X);Z[_n.internalSdkVersion]||(Z[_n.internalSdkVersion]=sr(a,"javascript:".concat(soe.Version),64)),c[Wr]=xN(Z)}function du(a,s,c){Oe(a)||Gt(a,function(f,d){ao(d)?c[f]=d:ct(d)?s[f]=d:dm()&&(s[f]=Oo()[Jm](d))})}function fl(a,s){Oe(a)||Gt(a,function(c,f){a[c]=f||s})}function hl(a,s,c,f){var d=new Zie(a,f,s);gr(d,"sampleRate",c[$N]);var v=(c[jn]||{}).startTime;GS(v)&&(d.time=Vf(v)),d.iKey=c.iKey;var y=c.iKey.replace(/-/g,"");return d[vo]=d[vo].replace("{0}",y),ooe(a,c,d),c[Wr]=c[Wr]||[],xN(d)}function pl(a,s){Oe(s[jn])&&Je(a,1,46,"telemetryItem.baseData cannot be null.")}var soe={Version:"3.4.3"};function uoe(a,s,c){pl(a,s);var f=s[jn][cl]||{},d=s[jn][_r]||{};du(s[Fi],d,f),Oe(c)||fl(d,c);var v=s[jn];if(Oe(v))return Cc(a,"Invalid input for dependency data"),null;var y=v[_r]&&v[_r][zN]?v[_r][zN]:"GET",g=roe(a,v.id,v.target,v[vo],v[ul],v.success,v[aE],y,v.type,v.correlationContext,d,f),C=ll(Im,g);return hl(a,toe,s,C)}function loe(a,s,c){pl(a,s);var f=s[jn][cl]||{},d=s[jn][_r]||{};du(s[Fi],d,f),Oe(c)||fl(d,c);var v=s[jn],y=aoe(a,v.id,v[vo],v[ul],v.success,v[aE],v.source,v.url,d,f),g=ll(iA,y);return hl(a,ioe,s,g)}function wj(a,s,c){pl(a,s);var f={},d={};s[gE]!==Jf&&(f.baseTypeSource=s[gE]),s[gE]===Jf?(f=s[jn][_r]||{},d=s[jn][cl]||{}):s[jn]&&du(s[jn],f,d),du(s[Fi],f,d),Oe(c)||fl(f,c);var v=s[jn][vo],y=new tae(a,v,f,d),g=ll(Jf,y);return hl(a,RA,s,g)}function coe(a,s,c){pl(a,s);var f=s[jn][cl]||{},d=s[jn][_r]||{};du(s[Fi],d,f),Oe(c)||fl(d,c);var v=s[jn],y=Fm.CreateFromInterface(a,v,d,f),g=ll(Am,y);return hl(a,i2,s,g)}function doe(a,s,c){pl(a,s);var f=s[jn],d=f[_r]||{},v=f[cl]||{};du(s[Fi],d,v),Oe(c)||fl(d,c);var y=new Cae(a,f[vo],f.average,f.sampleCount,f.min,f.max,f.stdDev,d,v),g=ll(Qf,y);return hl(a,NA,s,g)}function foe(a,s,c){pl(a,s);var f,d=s[jn];!Oe(d)&&!Oe(d[_r])&&!Oe(d[_r][ul])?(f=d[_r][ul],delete d[_r][ul]):!Oe(s[Fi])&&!Oe(s[Fi][ul])&&(f=s[Fi][ul],delete s[Fi][ul]);var v=s[jn],y;((s.ext||{}).trace||{})[Ym]&&(y=s.ext.trace[Ym]);var g=v.id||y,C=v[vo],E=v.uri,I=v[_r]||{},D=v[cl]||{};if(Oe(v.refUri)||(I.refUri=v.refUri),Oe(v.pageType)||(I.pageType=v.pageType),Oe(v.isLoggedIn)||(I.isLoggedIn=v.isLoggedIn[Nc]()),!Oe(v[_r])){var L=v[_r];Gt(L,function(X,$){I[X]=$})}du(s[Fi],I,D),Oe(c)||fl(I,c);var F=new Aae(a,C,E,f,I,D,g),O=ll(Em,F);return hl(a,a2,s,O)}function hoe(a,s,c){pl(a,s);var f=s[jn],d=f[vo],v=f.uri||f.url,y=f[_r]||{},g=f[cl]||{};du(s[Fi],y,g),Oe(c)||fl(y,c);var C=new Iae(a,d,v,void 0,y,g,f),E=ll(Vb,C);return hl(a,OA,s,E)}function poe(a,s,c){pl(a,s);var f=s[jn].message,d=s[jn].severityLevel,v=s[jn][_r]||{},y=s[jn][cl]||{};du(s[Fi],v,y),Oe(c)||fl(v,c);var g=new Eae(a,f,d,v,y),C=ll($b,g);return hl(a,jA,s,C)}var xj=(function(){function a(s,c){var f=[],d=!1,v=c.maxRetryCnt;this._get=function(){return f},this._set=function(y){return f=y,f},or(a,this,function(y){y[Oc]=function(g){if(y[jc]()>=c.eventsLimitInMem){d||(Je(s,2,105,"Maximum in-memory buffer size reached: "+y[jc](),!0),d=!0);return}g.cnt=g.cnt||0,!(!Oe(v)&&g.cnt>v)&&f[ks](g)},y[jc]=function(){return f[Ut]},y.size=function(){for(var g=f[Ut],C=0;C<f[Ut];C++)g+=f[C].item[Ut];return c[oE]||(g+=2),g},y[ch]=function(){f=[],d=!1},y.getItems=function(){return f.slice(0)},y.batchPayloads=function(g){if(g&&g[Ut]>0){var C=[];Ye(g,function(I){C[ks](I.item)});var E=c[oE]?C.join(`
`):"["+C.join(",")+"]";return E}return null},y.createNew=function(g,C,E){var I=f.slice(0);g=g||s,C=C||{};var D=E?new kj(g,C):new mE(g,C);return Ye(I,function(L){D[Oc](L)}),D}})}return a.__ieDyn=1,a})(),mE=(function(a){Zs(s,a);function s(c,f){var d=a.call(this,c,f)||this;return or(s,d,function(v,y){v[g2]=function(g){y[ch]()},v[Qm]=function(g){}}),d}return s.__ieDyn=1,s})(xj),goe=["AI_buffer","AI_sentBuffer"],kj=(function(a){Zs(s,a);function s(f,d){var v=a.call(this,f,d)||this,y=!1,g=d?.namePrefix,C=d[sE]||{getItem:LA,setItem:E7},E=C.getItem,I=C.setItem,D=d.maxRetryCnt;return or(s,v,function(L,F){var O=ge(s[Zm]),X=ge(s[dl]),$=x(),Y=X[dh]($),Z=L._set(O[dh](Y));Z[Ut]>s[ev]&&(Z[Ut]=s[ev]),we(s[dl],[]),we(s[Zm],Z),L[Oc]=function(te){if(L[jc]()>=s[ev]){y||(Je(f,2,67,"Maximum buffer size reached: "+L[jc](),!0),y=!0);return}te.cnt=te.cnt||0,!(!Oe(D)&&te.cnt>D)&&(F[Oc](te),we(s[Zm],L._get()))},L[ch]=function(){F[ch](),we(s[Zm],L._get()),we(s[dl],[]),y=!1},L[g2]=function(te){we(s[Zm],L._set(Q(te,L._get())));var Be=ge(s[dl]);Be instanceof Array&&te instanceof Array&&(Be=Be[dh](te),Be[Ut]>s[ev]&&(Je(f,1,67,"Sent buffer reached its maximum size: "+Be[Ut],!0),Be[Ut]=s[ev]),we(s[dl],Be))},L[Qm]=function(te){var Be=ge(s[dl]);Be=Q(te,Be),we(s[dl],Be)},L.createNew=function(te,Be,Me){Me=!!Me;var Ie=L._get().slice(0),je=ge(s[dl]).slice(0);te=te||f,Be=Be||{},L[ch]();var ee=Me?new s(te,Be):new mE(te,Be);return Ye(Ie,function(me){ee[Oc](me)}),Me&&ee[g2](je),ee};function Q(te,Be){var Me=[],Ie=[];return Ye(te,function(je){Ie[ks](je.item)}),Ye(Be,function(je){!Ke(je)&&An(Ie,je.item)===-1&&Me[ks](je)}),Me}function ge(te){var Be=te;return Be=g?g+"_"+Be:Be,K(Be)}function K(te){try{var Be=E(f,te);if(Be){var Me=Oo().parse(Be);if(ct(Me)&&(Me=Oo().parse(Me)),Me&&Pt(Me))return Me}}catch(Ie){Je(f,1,42," storage key: "+te+", "+pn(Ie),{exception:at(Ie)})}return[]}function we(te,Be){var Me=te;try{Me=g?g+"_"+Me:Me;var Ie=JSON[Jm](Be);I(f,Me,Ie)}catch(je){I(f,Me,JSON[Jm]([])),Je(f,2,41," storage key: "+Me+", "+pn(je)+". Buffer cleared",{exception:at(je)})}}function x(){var te=[];try{return Ye(goe,function(Be){var Me=se(Be);if(te=te[dh](Me),g){var Ie=g+"_"+Be,je=se(Ie);te=te[dh](je)}}),te}catch(Be){Je(f,2,41,"Transfer events from previous buffers: "+pn(Be)+". previous Buffer items can not be removed",{exception:at(Be)})}return[]}function se(te){try{var Be=K(te),Me=[];return Ye(Be,function(Ie){var je={item:Ie,cnt:0};Me[ks](je)}),I7(f,te),Me}catch{}return[]}}),v}var c;return c=s,s.VERSION="_1",s.BUFFER_KEY="AI_buffer"+c.VERSION,s.SENT_BUFFER_KEY="AI_sentBuffer"+c.VERSION,s.MAX_BUFFER_SIZE=2e3,s})(xj),vE="__aiCircularRefCheck";function yE(a,s,c){var f={};if(!s)return Je(a,1,48,"cannot serialize object because it is null or undefined",{name:c},!0),f;if(s[vE])return Je(a,2,50,"Circular reference detected while serializing object",{name:c},!0),f;if(!s.aiDataContract){if(c==="measurements")f=bE(a,s,2);else if(c==="properties")f=bE(a,s,1);else if(c==="tags")f=bE(a,s,1);else if(Pt(s))f=Tj(a,s,c);else{Je(a,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:c},!0);try{Oo()[Jm](s),f=s}catch(d){Je(a,1,48,d&&Ke(d[Nc])?d[Nc]():"Error serializing object",null,!0)}}return f}return s[vE]=!0,Gt(s.aiDataContract,function(d,v){var y=Ke(v)?v():v,g=y&1,C=y&4,E=y&2,I=s[d]!==void 0,D=Kr(s[d])&&s[d]!==null;if(g&&!I&&!E)Je(a,1,24,"Missing required field specification. The field is required but not present on source",{field:d,name:c});else if(!C){var L=void 0;D?E?L=Tj(a,s[d],d):L=yE(a,s[d],d):L=s[d],L!==void 0&&(f[d]=L)}}),delete s[vE],f}function Tj(a,s,c){var f;if(s)if(!Pt(s))Je(a,1,54,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:c},!0);else{f=[];for(var d=0;d<s[Ut];d++){var v=s[d],y=yE(a,v,c+"["+d+"]");f[ks](y)}}return f}function bE(a,s,c,f){var d;return s&&(d={},Gt(s,function(v,y){var g;y===void 0?g="undefined":y===null&&(g="null"),c===1&&!g?y[Nc]?g=y[Nc]():g="invalid field: toString() is not defined.":c===2&&!g&&(g=parseFloat(y)),(g||!Oe(y))&&(d[v]=g)})),d}var moe=(function(){function a(s){or(a,this,function(c){c.serialize=function(f){var d=yE(s,f,"root");try{return Oo()[Jm](d)}catch(v){Je(s,1,48,v&&Ke(v[Nc])?v[Nc]():"Error serializing object",null,!0)}}})}return a.__ieDyn=1,a})(),voe=8,yoe=2147483647;function b2(a){var s=0,c=a;if(c){for(;c[Ut]<voe;)c=c[dh](c);for(var f=5381,d=0;d<c[Ut];++d)f=(f<<5)+f+c.charCodeAt(d),f=f&f;s=oZ(f)/yoe}return s*100}function boe(){var a=new z7;return{getScore:function(s){var c=0;return s[Wr]&&s[Wr][a.userId]?c=b2(s[Wr][a.userId]):s.ext&&s.ext.user&&s.ext.user.id?c=b2(s.ext.user.id):s[Wr]&&s[Wr][a.operationId]?c=b2(s[Wr][a.operationId]):s.ext&&s.ext.telemetryTrace&&s.ext.telemetryTrace[Ym]?c=b2(s.ext.telemetryTrace[Ym]):c=Math.random()*100,c}}}function woe(a,s,c){var f=!1;return(s==null||s>=100||a[av]===Qf)&&(f=!0),f||(f=c.getScore(a)<s),f}function xoe(a,s){var c=boe();(a>100||a<0)&&(Je(s,2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:a},!0),a=100);var f={sampleRate:a,generator:c,isSampledIn:function(d){return woe(d,f[y2],f.generator)}};return f}var Un,Ss,$o=void 0,Sj="",koe=65e3;function Cj(a){try{return a.responseText}catch{}return null}function Toe(a){return a&&a.sendPOST}var Aj=xf((Un={endpointUrl:wb(E1,_3+$f)},Un[oE]=Tr(),Un.maxBatchInterval=15e3,Un[pj]=102400,Un.disableTelemetry=Tr(),Un[mj]=Tr(!0),Un.isRetryDisabled=Tr(),Un[dE]=Tr(!0),Un[yj]=Tr(!0),Un.disableXhr=Tr(),Un[vj]=Tr(),Un[cE]=Tr(),Un[iv]=$o,Un.namePrefix=$o,Un.samplingPercentage=wb(Soe,100),Un[lE]=$o,Un.convertUndefined=$o,Un.eventsLimitInMem=1e4,Un[sE]=!1,Un.httpXHROverride={isVal:Toe,v:$o},Un[gj]=Tr(),Un.transports=$o,Un.retryCodes=$o,Un.corsPolicy=$o,Un.maxRetryCnt={isVal:ao,v:10},Un)),Ej="X-Set-Cross-Origin-Resource-Policy";function Soe(a){return!isNaN(a)&&a>0&&a<=100}var Coe=(Ss={},Ss[Jf]=wj,Ss[$b]=poe,Ss[Em]=foe,Ss[Vb]=hoe,Ss[Am]=coe,Ss[Qf]=doe,Ss[Im]=uoe,Ss[iA]=loe,Ss),Aoe=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.priority=1001,c.identifier=q7;var f,d,v,y,g,C,E,I,D=0,L,F,O,X,$,Y,Z,Q,ge,K,we,x,se,te,Be,Me,Ie,je,ee,me,Le,He,Ce,qe,gt,Ne,P,oe;return or(s,c,function(ne,Ue){Vn(),ne.pause=function(){et(),y=!0},ne.resume=function(){y&&(y=!1,d=null,Fe(),Lt())},ne.flush=function(H,Pe,_e){if(H===void 0&&(H=!0),!y){et();try{var tt=ne[tv](H,null,_e||1);return ea(tt,function(B){return Pe?(Pe(!B.rejected),!0):H?gs(function(yt){yt(!B.rejected)}):tt})}catch(B){Je(ne[mi](),1,22,"flush failed, telemetry will not be collected: "+pn(B),{exception:at(B)})}}},ne.onunloadFlush=function(){if(!y)if(Z||me)try{return ne[tv](!0,xe,2)}catch(H){Je(ne[mi](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+pn(H),{exception:at(H)})}else ne.flush(!1)},ne.addHeader=function(H,Pe){I[H]=Pe},ne[uE]=function(H,Pe,_e,tt){ne.isInitialized()&&Je(ne[mi](),1,28,"Sender is already initialized"),Ue[uE](H,Pe,_e,tt);var B=ne.identifier;C=new moe(Pe.logger),f=0,d=null,v=0,ne[nv]=null,E=0;var yt=ne[mi]();O=el(jo("Sender"),Pe.evtNamespace&&Pe.evtNamespace()),F=Mae(O),ne._addHook(pr(H,function(Vt){var dt=Vt.cfg;dt.storagePrefix&&DA(dt.storagePrefix);var $n=Bo(null,dt,Pe),kt=$n.getExtCfg(B,Aj),Sr=kt[rv];if(X&&Sr===X){var aa=dt[rv];aa&&aa!==Sr&&(kt[rv]=aa)}var Fn=jt("CompressionStream");oe=cm("zipPayload",dt,!1),Ke(Fn)||(oe=!1);var xo=kt.corsPolicy;xo?(xo==="same-origin"||xo==="same-site"||xo==="cross-origin")&&c.addHeader(Ej,xo):delete I[Ej],_o(kt[iv])&&(kt[iv]=dt[iv]),Dt(ne,"_senderConfig",{g:function(){return kt}}),$!==kt[rv]&&(X=$=kt[rv]),Pe.activeStatus()===zu.PENDING?ne.pause():Pe.activeStatus()===zu.ACTIVE&&ne.resume(),K&&K!==kt[lE]&&Ye(K,function(mr){delete I[mr.header]}),Y=kt[pj],Z=(kt[cE]===!1||kt[dE]===!1)&&fm(),Q=kt[cE]===!1&&fm(),ge=kt[dE]===!1&&fm(),me=kt[gj],Le=!!kt.disableXhr,P=kt.retryCodes;var bi=kt[sE],Ho=!!kt[mj]&&(!!bi||Um()),Ra=kt.namePrefix,wi=Ho!==Me||Ho&&je!==Ra||Ho&&Ie!==bi;if(ne[Ts]){if(wi)try{ne[Ts]=ne[Ts].createNew(yt,kt,Ho)}catch(mr){Je(ne[mi](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+pn(mr),{exception:at(mr)})}Fe()}else ne[Ts]=Ho?new kj(yt,kt):new mE(yt,kt);je=Ra,Me=Ho,Ie=bi,He=!kt[vj]&&S3(!0),gt=!!kt[yj],ne._sample=xoe(kt.samplingPercentage,yt),x=kt[iv],!_o(x)&&!$i(x,dt)&&Je(yt,1,100,"Invalid Instrumentation key "+x),K=kt[lE],ct(X)&&!MA(X)&&K&&K[Ut]>0?Ye(K,function(mr){c.addHeader(mr.header,mr.value)}):K=null,ee=kt.enableSendPromise;var gu=ot();Ne?Ne.SetConfig(gu):(Ne=new Xte,Ne[uE](gu,yt));var Yr=kt.httpXHROverride,Dn=null,Is=null,Sv=SN([3,1,2],kt.transports);Dn=Ne&&Ne[m2](Sv,!1);var ed=Ne&&Ne.getFallbackInst();Ce=function(mr,zi){return yi(ed,mr,zi)},qe=function(mr,zi){return yi(ed,mr,zi,!1)},Dn=me?Yr:Dn||Yr||ed,ne[nv]=function(mr,zi){return yi(Dn,mr,zi)},He&&(L=$e);var td=SN([3,1],kt.unloadTransports);He||(td=td.filter(function(mr){return mr!==2})),Is=Ne&&Ne[m2](td,!0),Is=me?Yr:Is||Yr,(me||kt.unloadTransports||!L)&&Is&&(L=function(mr,zi){return yi(Is,mr,zi)}),L||(L=Ce),we=kt.disableTelemetry,se=kt.convertUndefined||$o,te=kt.isRetryDisabled,Be=kt.maxBatchInterval}))},ne.processTelemetry=function(H,Pe){Pe=ne._getTelCtx(Pe);var _e=Pe[mi]();try{var tt=gn(H,_e);if(!tt)return;var B=Xt(H,_e);if(!B)return;var yt=C.serialize(B),Vt=ne[Ts];Fe(yt);var dt={item:yt,cnt:0,bT:H[av],iN:H[vo]};Vt[Oc](dt),Lt()}catch($n){Je(_e,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+pn($n),{exception:at($n)})}ne.processNext(H,Pe)},ne.isCompletelyIdle=function(){return!y&&D===0&&ne._buffer[jc]()===0},ne.getOfflineListener=function(){return F},ne._xhrReadyStateChange=function(H,Pe,_e){if(!he(Pe))return zt(H,Pe,_e)},ne[tv]=function(H,Pe,_e){H===void 0&&(H=!0);var tt;if(!y)try{var B=ne[Ts];if(we)B[ch]();else{if(B[jc]()>0){var yt=B.getItems();ia(_e||0,H),Pe?tt=Pe.call(ne,yt,H):tt=ne[nv](yt,H)}v=+new Date}et()}catch(dt){var Vt=EN();(!Vt||Vt>9)&&Je(ne[mi](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+pn(dt),{exception:at(dt)})}return tt},ne.getOfflineSupport=function(){return{getUrl:function(){return X},createPayload:La,serialize:ut,batch:vi,shouldProcess:function(H){return!!gn(H)}}},ne._doTeardown=function(H,Pe){ne.onunloadFlush(),Kf(F,!1),Vn()},ne[Uc]=function(H,Pe,_e,tt){if(!he(H))return Te(H,Pe,_e,tt)},ne[fE]=function(H,Pe){if(!he(H))return At(H,Pe)},ne[v2]=function(H,Pe){if(!he(H))return tn(H)},ne._xdrOnLoad=function(H,Pe){if(!he(Pe))return ze(H,Pe)};function ze(H,Pe){var _e=Cj(H);if(H&&(_e+""=="200"||_e===""))f=0,ne[v2](Pe,0);else{var tt=nA(_e);tt&&tt[hE]&&tt[hE]>tt[pE]&&!te?ne[fE](Pe,tt):ne[Uc](Pe,TN(H))}}function ot(){try{var H={xdrOnComplete:function(_e,tt,B){var yt=er(B);if(yt)return ze(_e,yt)},fetchOnComplete:function(_e,tt,B,yt){var Vt=er(yt);if(Vt)return fe(_e.status,Vt,_e.url,Vt[Ut],_e.statusText,B||"")},xhrOnComplete:function(_e,tt,B){var yt=er(B);if(yt)return zt(_e,yt,yt[Ut])},beaconOnRetry:function(_e,tt,B){return Ae(_e,tt,B)}},Pe={enableSendPromise:ee,isOneDs:!1,disableCredentials:!1,disableXhr:Le,disableBeacon:!ge,disableBeaconSync:!Q,senderOnCompleteCallBack:H};return Pe}catch{}return null}function zt(H,Pe,_e){H.readyState===4&&fe(H.status,Pe,H.responseURL,_e,Cb(H),Cj(H)||H.response)}function Te(H,Pe,_e,tt){Je(ne[mi](),2,26,"Failed to send telemetry.",{message:Pe}),ne._buffer&&ne._buffer[Qm](H);var B=Ht();if(B&&B.listeners&&B.listeners[Ut]){var yt=Xr(H);yt&&B.eventsDiscarded(yt,1,tt)}}function At(H,Pe){for(var _e=[],tt=[],B=Pe.errors.reverse(),yt=0,Vt=B;yt<Vt.length;yt++){var dt=Vt[yt],$n=H.splice(dt.index,1)[0];Qe(dt.statusCode)?tt[ks]($n):_e[ks]($n)}H[Ut]>0&&ne[v2](H,Pe[pE]),_e[Ut]>0&&ne[Uc](_e,Cb(null,["partial success",Pe[pE],"of",Pe.itemsReceived].join(" "))),tt[Ut]>0&&(lt(tt),Je(ne[mi](),2,40,"Partial success. Delivered: "+H[Ut]+", Failed: "+_e[Ut]+". Will retry to send "+tt[Ut]+" our of "+Pe[hE]+" items"))}function tn(H,Pe){ne._buffer&&ne._buffer[Qm](H);var _e=Ht();if(_e&&_e.listeners&&_e.listeners[Ut]){var tt=Xr(H);tt&&_e.eventsSent(tt)}}function er(H){try{if(H){var Pe=H,_e=Pe.oriPayload;return _e&&_e[Ut]?_e:null}}catch{}return null}function gn(H,Pe){if(we)return!1;if(!H)return Pe&&Je(Pe,1,7,"Cannot send empty telemetry"),!1;if(H.baseData&&!H[av])return Pe&&Je(Pe,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(H[av]||(H[av]="EventData"),!ne[nv])return Pe&&Je(Pe,1,28,"Sender was not initialized"),!1;var _e=H[y2];if(Oe(_e)||!ao(_e)||_e<0||_e>100)if(pu(H))H[$N]=ne._sample[y2];else return Pe&&Je(Pe,2,33,"Telemetry item was sampled out and not sent",{SampleRate:ne._sample[y2]}),!1;return!0}function Xt(H,Pe){var _e=H.iKey||x,tt=s.constructEnvelope(H,_e,Pe,se);if(!tt){Je(Pe,1,47,"Unable to create an AppInsights envelope");return}var B=!1;if(H[Wr]&&H[Wr][P3]&&(Ye(H[Wr][P3],function(yt){try{yt&&yt(tt)===!1&&(B=!0,Cc(Pe,"Telemetry processor check returns false"))}catch(Vt){Je(Pe,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+pn(Vt),{exception:at(Vt)},!0)}}),delete H[Wr][P3]),!B)return tt}function ut(H){var Pe=Sj,_e=ne[mi]();try{var tt=gn(H,_e),B=null;tt&&(B=Xt(H,_e)),B&&(Pe=C.serialize(B))}catch{}return Pe}function vi(H){var Pe=Sj;return H&&H[Ut]&&(Pe="["+H.join(",")+"]"),Pe}function La(H){var Pe=ke();return{urlString:X,data:H,headers:Pe}}function pu(H){return ne._sample.isSampledIn(H)}function bl(H,Pe,_e,tt){Pe===200&&H?ne._onSuccess(H,H[Ut]):tt&&ne[Uc](H,tt)}function yi(H,Pe,_e,tt){tt===void 0&&(tt=!0);var B=function(aa,Fn,xo){return bl(Pe,aa,Fn,xo)},yt=ra(Pe),Vt=H&&H.sendPOST;if(Vt&&yt){tt&&ne._buffer[g2](Pe);var dt,$n=!1,kt,Sr;return Ne.preparePayload(function(aa){dt=Vt(aa,B,!_e),$n=!0,kt&&pb(dt,kt,Sr)},oe,yt,!_e),$n?dt:gs(function(aa,Fn){kt=aa,Sr=Fn})}return null}function ra(H){if(Pt(H)&&H[Ut]>0){var Pe=ne[Ts].batchPayloads(H),_e=ke(),tt={data:Pe,urlString:X,headers:_e,disableXhrSync:Le,disableFetchKeepAlive:!He,oriPayload:H};return tt}return null}function ke(){try{var H=I||{};return MA(X)&&(H[fn[6]]=fn[7]),H}catch{}return null}function Fe(H){var Pe=H?H[Ut]:0;return ne[Ts].size()+Pe>Y?((!F||F.isOnline())&&ne[tv](!0,null,10),!0):!1}function fe(H,Pe,_e,tt,B,yt){var Vt=null;if(ne._appId||(Vt=nA(yt),Vt&&Vt.appId&&(ne._appId=Vt.appId)),(H<200||H>=300)&&H!==0){if((H===301||H===307||H===308)&&!ve(_e)){ne[Uc](Pe,B,void 0,H);return}if(F&&!F.isOnline()){if(!te){var dt=10;lt(Pe,dt),Wn(Pe,H),Je(ne[mi](),2,40,". Offline - Response Code: ".concat(H,". Offline status: ").concat(!F.isOnline(),". Will retry to send ").concat(Pe.length," items."))}return}!te&&Qe(H)?(lt(Pe),Wn(Pe,H),Je(ne[mi](),2,40,". Response code "+H+". Will retry to send "+Pe[Ut]+" items.")):ne[Uc](Pe,B,void 0,H)}else ve(_e),H===206?(Vt||(Vt=nA(yt)),Vt&&!te?ne[fE](Pe,Vt):ne[Uc](Pe,B,void 0,H)):(f=0,ne[v2](Pe,tt))}function ve(H){return E>=10?!1:!Oe(H)&&H!==""&&H!==X?(X=H,++E,!0):!1}function xe(H,Pe){if(L)L(H,!1);else{var _e=Ne&&Ne[m2]([3],!0);return yi(_e,H,Pe)}}function Ae(H,Pe,_e){var tt=H,B=tt&&tt.oriPayload;if(gt)qe&&qe(B,!0),Je(ne[mi](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var yt=[],Vt=0;Vt<B[Ut];Vt++){var dt=B[Vt],$n=[dt],kt=ra($n);_e(kt,Pe)?ne._onSuccess($n,$n[Ut]):yt[ks](dt)}yt[Ut]>0&&(qe&&qe(yt,!0),Je(ne[mi](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function he(H){try{if(H&&H[Ut])return ct(H[0])}catch{}return null}function $e(H,Pe){var _e=null;if(Pt(H)){for(var tt=H[Ut],B=0;B<H[Ut];B++)tt+=H[B].item[Ut];var yt=Ne.getSyncFetchPayload();yt+tt<=koe?_e=2:fm()?_e=3:(_e=1,Je(ne[mi](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var Vt=Ne&&Ne[m2]([_e],!0);return yi(Vt,H,Pe)}return null}function lt(H,Pe){if(Pe===void 0&&(Pe=1),!(!H||H[Ut]===0)){var _e=ne[Ts];_e[Qm](H),f++;for(var tt=0,B=H;tt<B.length;tt++){var yt=B[tt];yt.cnt=yt.cnt||0,yt.cnt++,_e[Oc](yt)}Ot(Pe),Lt()}}function Ot(H){var Pe=10,_e;if(f<=1)_e=Pe;else{var tt=(Math.pow(2,f)-1)/2,B=di(Math.random()*tt*Pe)+1;B=H*B,_e=Fg(p9(B,3600),Pe)}var yt=so()+_e*1e3;d=yt}function Lt(){if(!g&&!y){var H=d?Fg(0,d-so()):0,Pe=Fg(Be,H);g=Ca(function(){g=null,ne[tv](!0,null,1)},Pe)}}function et(){g&&g.cancel(),g=null,d=null}function Qe(H){return Oe(P)?H===401||H===408||H===429||H===500||H===502||H===503||H===504:P[Ut]&&P.indexOf(H)>-1}function Ht(){var H="getNotifyMgr",Pe,_e=ne.core;return _e&&(_e[H]?Pe=_e[H]():Pe=_e._notificationManager),Pe}function ia(H,Pe){var _e=Ht();if(_e&&_e.eventsSendRequest)try{_e.eventsSendRequest(H,Pe)}catch(tt){Je(ne[mi](),1,74,"send request notification failed: "+pn(tt),{exception:at(tt)})}}function Xr(H){if(H&&H[Ut]){var Pe=[];return Ye(H,function(_e){if(_e){var tt=_e.bT||"EventData";Pe[ks]({name:_e.iN||tt,baseType:tt})}}),Pe[Ut]?Pe:null}return null}function Wn(H,Pe){var _e=Ht();if(_e&&_e.eventsRetry&&_e.listeners&&_e.listeners[Ut]){var tt=Xr(H);tt&&_e.eventsRetry(tt,Pe)}}function $i(H,Pe){var _e=Pe.disableInstrumentationKeyValidation,tt=Oe(_e)?!1:_e;if(tt)return!0;var B="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",yt=new RegExp(B);return yt.test(H)}function Vn(){ne[nv]=null,ne[Ts]=null,ne._appId=null,ne._sample=null,I={},F=null,f=0,d=null,v=null,y=!1,g=null,C=null,E=0,D=0,L=null,O=null,X=null,$=null,Y=0,Z=!1,K=null,we=!1,x=null,se=$o,te=!1,Me=null,je=$o,Le=!1,He=!1,gt=!1,Ce=null,qe=null,Ne=null,Dt(ne,"_senderConfig",{g:function(){return kN({},Aj)}})}}),c}return s.constructEnvelope=function(c,f,d,v){var y;f!==c.iKey&&!Oe(f)?y=Aa(Aa({},c),{iKey:f}):y=c;var g=Coe[y.baseType]||wj;return g(d,y,v)},s})(Yf),Ij="duration",ov="properties",Cs="requestUrl",fu="length",sv="aborted",zo="traceId",As="spanId",Fc="traceFlags",Bc="traceState",w2="context",x2="_addHook",yo="core",wE="includeCorrelationHeaders",k2="getAbsoluteUrl",Vc="headers",na="requestHeaders",T2="setRequestHeader",Mj="trackDependencyDataInternal",fh="startTime",hh="toLowerCase",xE="enableRequestHeaderTracking",Pj="enableAjaxErrorStatusText",_j="enableAjaxPerfTracking",Dj="maxAjaxCallsPerView",Lj="excludeRequestFromAutoTrackingPatterns",kE="disableAjaxTracking",Rj="ajaxPerfLookupDelay",Nj="disableFetchTracking",Oj="enableResponseHeaderTracking",Es="status",$c="statusText",S2="headerMap",zc="requestSentTime",Hc="method",TE="errorStatusText",jj="stateChangeAttached",SE="responseText",uv="responseFinishedTime",CE="CreateTrackItem",Uj="getAllResponseHeaders",AE="perfTiming",EE="ajaxDiagnosticsMessage",IE="correlationContext",ME="ajaxTotalDuration";function Fj(a,s,c){var f=0,d=a[s],v=a[c];return d&&v&&(f=ta(d,v)),f}function qc(a,s,c,f,d){var v=0,y=Fj(c,f,d);return y&&(v=gl(a,s,su(y))),v}function gl(a,s,c){var f="ajaxPerf",d=0;if(a&&s&&c){var v=a[f]=a[f]||{};v[s]=c,d=1}return d}function Eoe(a,s){var c=a[AE],f=s[ov]||{},d=0,v="name",y="Start",g="End",C="domainLookup",E="connect",I="redirect",D="request",L="response",F="startTime",O=C+y,X=C+g,$=E+y,Y=E+g,Z=D+y,Q=D+g,ge=L+y,K=L+g,we=I+y,x=I=g,se="transferSize",te="encodedBodySize",Be="decodedBodySize",Me="serverTiming";if(c){d|=qc(f,I,c,we,x),d|=qc(f,C,c,O,X),d|=qc(f,E,c,$,Y),d|=qc(f,D,c,Z,Q),d|=qc(f,L,c,ge,K),d|=qc(f,"networkConnect",c,F,Y),d|=qc(f,"sentRequest",c,Z,K);var Ie=c[Ij];Ie||(Ie=Fj(c,F,K)||0),d|=gl(f,Ij,Ie),d|=gl(f,"perfTotal",Ie);var je=c[Me];if(je){var ee={};Ye(je,function(me,Le){var He=kb(me[v]||""+Le),Ce=ee[He]||{};Gt(me,function(qe,gt){(qe!==v&&ct(gt)||ao(gt))&&(Ce[qe]&&(gt=Ce[qe]+";"+gt),(gt||!ct(gt))&&(Ce[qe]=gt))}),ee[He]=Ce}),d|=gl(f,Me,ee)}d|=gl(f,se,c[se]),d|=gl(f,te,c[te]),d|=gl(f,Be,c[Be])}else a.perfMark&&(d|=gl(f,"missing",a.perfAttempts));d&&(s[ov]=f)}function Ioe(){var a;return a={openDone:!1,setRequestHeaderDone:!1,sendDone:!1,abortDone:!1},a[jj]=!1,a}function Moe(a,s){var c,f=s,d=(c={perfMark:null,completed:!1,requestHeadersSize:null},c[na]=null,c.responseReceivingDuration=null,c.callbackDuration=null,c[ME]=null,c.aborted=0,c.pageUrl=null,c.requestUrl=null,c.requestSize=0,c.method=null,c.status=null,c[zc]=null,c.responseStartedTime=null,c[uv]=null,c.callbackFinishedTime=null,c.endTime=null,c.xhrMonitoringState=Ioe(),c.clientFailure=0,c.traceCtx=a,c.perfTiming=null,c[k2]=function(){return d[Cs]?Fie(d[Cs]):null},c.getPathName=function(){return d[Cs]?Om(f,Bie(d[Hc],d[Cs])):null},c[CE]=function(v,y,g){var C;if(d.ajaxTotalDuration=gC(ta(d.requestSentTime,d.responseFinishedTime)*1e3)/1e3,d[ME]<0)return null;var E=(C={id:"|"+a[zo]+"."+a[As],target:d[k2](),name:d.getPathName(),type:v,startTime:null,duration:d[ME],success:+d[Es]>=200&&+d[Es]<400,responseCode:+d[Es]},C[ov]={HttpMethod:d[Hc]},C),I=E[ov];if(d[sv]&&(I[sv]=!0),d[zc]&&(E[fh]=new Date,E[fh].setTime(d[zc])),Eoe(this,E),y&&oo(d.requestHeaders)[fu]>0&&(I[na]=d[na]),g){var D=g();if(D){var L=D[IE];if(L&&(E.correlationContext=L),D[S2]&&oo(D.headerMap)[fu]>0&&(I.responseHeaders=D[S2]),d[TE])if(+d[Es]>=400){var F=D.type;(F===""||F==="text")&&(I.responseText=D.responseText?D[$c]+" - "+D[SE]:D[$c]),F==="json"&&(I.responseText=D.response?D[$c]+" - "+JSON.stringify(D.response):D[$c])}else d[Es]===0&&(I.responseText=D[$c]||"")}}return E},c.getPartAProps=function(){var v=null,y=d.traceCtx.parentCtx;if(y&&(y[zo]||y[As])){v={};var g=v[_a.TraceExt]={traceID:y[zo],parentID:y[As]};Oe(y[Fc])||(g[Fc]=y[Fc])}return v},c);return d}var ur,C2="diagLog",ml="_ajaxData",Gc="fetch",lv="Failed to monitor XMLHttpRequest",Bj=", monitoring data for this ajax call ",ph=Bj+"may be incorrect.",Vj=Bj+"won't be sent.",$j="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",zj="Failed to add custom defined request context as configured call back may missing a null check.",Hj="Failed to calculate the duration of the ",qj=0;function Poe(){var a=co();return!a||Oe(a.Request)||Oe(a.Request[Qs])||Oe(a[Gc])?null:a[Gc]}function _oe(a,s){var c,f=!1,d=EN();if(d&&d<9&&(f=!1),f)try{var v=new XMLHttpRequest,y={xh:[],i:(c={},c[s]={},c)};v[ml]=y;var g=XMLHttpRequest[Qs].open;XMLHttpRequest[Qs].open=g}catch(C){f=!1,cv(a,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:at(C)})}return f}var gh=function(a,s){return a&&s&&a[ml]?(a[ml].i||{})[s]:null},Doe=function(a,s,c){if(a){var f=(a[ml]||{}).xh;f&&f.push({n:s,v:c})}},PE=function(a,s){var c=!1;if(a){var f=(a[ml]||{}).xh;f&&Ye(f,function(d){if(d.n===s)return c=!0,-1})}return c};function A2(a,s){var c="";try{var f=gh(a,s);f&&f[Cs]&&(c+="(url: '"+f[Cs]+"')")}catch{}return c}function cv(a,s,c,f,d){Je(a[C2](),1,s,c,f,d)}function hu(a,s,c,f,d){Je(a[C2](),2,s,c,f,d)}function dv(a,s,c){return function(f){var d;cv(a,s,c,(d={},d[EE]=A2(f.inst,a._ajaxDataId),d.exception=at(f.err),d))}}function mh(a,s){return a&&s?Bn(a,s):-1}function Gj(a,s,c){var f={id:s,fn:c};return a.push(f),{remove:function(){Ye(a,function(d,v){if(d.id===f.id)return a.splice(v,1),-1})}}}function Kj(a,s,c,f){var d=!0;return Ye(s,function(v,y){try{v.fn.call(null,c)===!1&&(d=!1)}catch(g){Je(a&&a.logger,1,64,"Dependency "+f+" [#"+y+"] failed: "+pn(g),{exception:at(g)},!0)}}),d}function Loe(a,s,c,f,d,v){var y=a[fu],g=!0;if(y>0){var C=c.traceCtx,E={core:s,xhr:f,input:d,init:v,aborted:!!c[sv]};Xs(E,{traceId:{g:function(){return C[zo]},s:function(I){C[zo]=I}},spanId:{g:function(){return C[As]},s:function(I){C[As]=I}},traceFlags:{g:function(){return C[Fc]},s:function(I){C[Fc]=I}},traceState:{g:function(){return C[Bc]}},context:{g:function(){return c[w2]||{}},s:function(I){c[w2]=I}}}),g=Kj(s,a,E,"listener")}return g}var E2="*.blob.core.",Roe=ka([E2+"windows.net",E2+"chinacloudapi.cn",E2+"cloudapi.de",E2+"usgovcloudapi.net"]),Noe=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],Ooe=ka((ur={},ur[Dj]=500,ur[kE]=!1,ur[Nj]=!1,ur[Lj]=void 0,ur.disableCorrelationHeaders=!1,ur.distributedTracingMode=1,ur.correlationHeaderExcludedDomains=Roe,ur.correlationHeaderDomains=void 0,ur.correlationHeaderExcludePatterns=void 0,ur.appId=void 0,ur.enableCorsCorrelation=!1,ur[xE]=!1,ur[Oj]=!1,ur[Pj]=!1,ur[_j]=!1,ur.maxAjaxPerfLookupAttempts=3,ur[Rj]=25,ur.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],ur.addRequestContext=void 0,ur.addIntEndpoints=!0,ur)),joe=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.identifier=s.identifier,c.priority=120;var f,d,v,y,g,C,E,I,D,L,F,O,X,$,Y,Z,Q,ge,K,we,x,se,te,Be,Me,Ie,je,ee,me,Le,He;return or(s,c,function(Ce,qe){var gt=qe[x2];Ne(),Ce.initialize=function(fe,ve,xe,Ae){Ce.isInitialized()||(qe.initialize(fe,ve,xe,Ae),x=el(jo("ajax"),ve&&ve.evtNamespace&&ve.evtNamespace()),P(fe),ot(),Ue(),oe())},Ce._doTeardown=function(){Ne()},Ce.trackDependencyData=function(fe,ve){Fe(Me,Ce[yo],null,fe,ve)},Ce.resetAjaxAttempts=function(){E=0},Ce[wE]=function(fe,ve,xe,Ae){var he=Ce._currentWindowHost||v;if(Loe(Be,Ce[yo],fe,Ae,ve,xe)){if(ve||ve===""){if(k7(y,fe[k2](),he)){xe||(xe={});var $e=fe.traceCtx,lt=new Headers(xe[Vc]||(ve instanceof Request?ve[Vc]||{}:{}));if(L){var Ot="|"+$e[zo]+"."+$e[As];lt.set(fn[3],Ot),g&&(fe[na][fn[3]]=Ot)}var Lt=Le||I&&I.appId();if(Lt&&(lt.set(fn[0],fn[2]+Lt),g&&(fe[na][fn[0]]=fn[2]+Lt)),D){var et=$e[Fc];Oe(et)&&(et=1);var Qe=aO(rO($e[zo],$e[As],et));lt.set(fn[4],Qe),g&&(fe[na][fn[4]]=Qe)}if(F&&$e[Bc]&&!$e[Bc].isEmpty){var Ht=$e[Bc].hdrs();if(Ht&&Ht[fu]>0){var ia=!1;Ye(Ht,function(Xr){Xr&&(ia?lt.append(fn[5],Xr):(ia=!0,lt.set(fn[5],Xr)))})}g&&(fe[na][fn[5]]=Ht.join(","))}xe[Vc]=lt}}else if(Ae&&k7(y,fe[k2](),he)){var $e=fe.traceCtx;if(L)if(PE(Ae,fn[3]))hu(Ce,71,"Unable to set ["+fn[3]+"] as it has already been set by another instance");else{var Ot="|"+$e[zo]+"."+$e[As];Ae[T2](fn[3],Ot),g&&(fe[na][fn[3]]=Ot)}var Lt=Le||I&&I.appId();if(Lt&&(PE(Ae,fn[0])?hu(Ce,71,"Unable to set ["+fn[0]+"] as it has already been set by another instance"):(Ae[T2](fn[0],fn[2]+Lt),g&&(fe[na][fn[0]]=fn[2]+Lt))),D){var et=$e[Fc];if(Oe(et)&&(et=1),PE(Ae,fn[4]))hu(Ce,71,"Unable to set ["+fn[4]+"] as it has already been set by another instance");else{var Qe=aO(rO($e[zo],$e[As],et));Ae[T2](fn[4],Qe),g&&(fe[na][fn[4]]=Qe)}}if(F&&$e[Bc]&&!$e[Bc].isEmpty){var Ht=$e[Bc].hdrs();Ht&&Ht[fu]>0&&Ye(Ht,function(Vn){Vn&&Ae[T2](fn[5],Vn)}),g&&(fe[na][fn[5]]=Ht.join(","))}}}return Ae||xe},Ce[Mj]=function(fe,ve,xe){if($===-1||E<$){(me===2||me===1)&&typeof fe.id=="string"&&fe.id[fe.id[fu]-1]!=="."&&(fe.id+="."),Oe(fe[fh])&&(fe[fh]=new Date);var Ae=ws(fe,Im,P7,Ce[C2](),ve,xe);Ce[yo].track(Ae)}else E===$&&cv(Ce,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++E},Ce.addDependencyListener=function(fe){return Gj(Be,te++,fe)},Ce.addDependencyInitializer=function(fe){return Gj(Me,te++,fe)};function Ne(){var fe=ms();f=!1,d=!1,He=!1,v=fe&&fe.host&&fe.host[hh](),y=null,g=!1,C=!1,E=0,I=null,D=!1,F=!1,L=!1,O=null,X=!1,$=0,Y=!1,Z={},Q=!1,ge=!1,K=null,we=null,x=null,te=0,Be=[],Me=[],se=jo("ajaxData"),Ce._ajaxDataId=se,Ie=null,je=1,ee=1,me=1,Le=null}function P(fe){Ce[x2](pr(fe,function(ve){var xe=ve.cfg,Ae=Bo(null,xe,Ce[yo]);y=Ae.getExtCfg(s.identifier,Ooe),me=y.distributedTracingMode,g=y[xE],C=y[Pj],X=y[_j],$=y[Dj],K=[].concat(y[Lj]||[],y.addIntEndpoints!==!1?Noe:[]),we=y.addRequestContext;var he=me&15;L=he===0||he===1,D=he===1||he===2,F=!!(me&16),X&&(O=se),Q=!!y[kE],je=y.maxAjaxPerfLookupAttempts,ee=y[Rj],Ie=y.ignoreHeaders,Le=y.appId}))}function oe(){var fe=Ce[yo].getPlugin(zA);fe&&(I=fe.plugin[w2])}function ne(fe){var ve=!0;return(fe||Ie)&&Ye(Ie,(function(xe){if(xe[hh]()===fe[hh]())return ve=!1,-1})),ve}function Ue(){var fe=Poe();if(fe){var ve=co(),xe=fe.polyfill;Ce[x2](pr(y,function(){ge=!!y[Nj],Y=y[Oj],!ge&&!f?(gt(mA(ve,Gc,{ns:x,req:function(Ae,he,$e){var lt;if(!ge&&f&&!zt(null,he,$e)&&!(xe&&d)){var Ot=Ae.ctx();lt=bl(he,$e);var Lt=Ce[wE](lt,he,$e);Lt!==$e&&Ae.set(1,Lt),Ot.data=lt}},rsp:function(Ae,he){if(!ge){var $e=Ae.ctx().data;$e&&(Ae.rslt=Ae.rslt.then(function(lt){return ra(Ae,(lt||{})[Es],he,lt,$e,function(){var Ot,Lt=(Ot={statusText:(lt||{})[$c],headerMap:null},Ot[IE]=ke(lt),Ot);if(Y&&lt){var et={};lt.headers.forEach(function(Qe,Ht){ne(Ht)&&(et[Ht]=Qe)}),Lt[S2]=et}return Lt}),lt}).catch(function(lt){throw ra(Ae,0,he,null,$e,null,{error:lt.message||at(lt)}),lt}))}},hkErr:dv(Ce,15,"Failed to monitor Window.fetch"+ph)},!0,x9())),f=!0):xe&&!He&&(gt(mA(ve,Gc,{ns:x,req:function(Ae,he,$e){zt(null,he,$e)}})),He=!0)})),xe&&(ve[Gc].polyfill=xe)}}function ze(fe,ve,xe){gt(mne(fe,ve,xe))}function ot(){_oe(Ce,se)&&Ce[x2](pr(y,function(){Q=!!y[kE],g=y[xE],!Q&&!d&&(ze(XMLHttpRequest,"open",{ns:x,req:function(fe,ve,xe,Ae){if(!Q){var he=fe.inst,$e=gh(he,se);!zt(he,xe)&&Te(he,$e,!0)&&((!$e||!$e.xhrMonitoringState.openDone)&&($e=er(he,ve,xe,Ae)),gn(he,$e))}},hkErr:dv(Ce,15,lv+".open"+ph)}),ze(XMLHttpRequest,"send",{ns:x,req:function(fe,ve){if(!Q){var xe=fe.inst,Ae=gh(xe,se);Te(xe,Ae)&&!Ae.xhrMonitoringState.sendDone&&(La("xhr",Ae),Ae[zc]=t2(),Ce[wE](Ae,void 0,void 0,xe),Ae.xhrMonitoringState.sendDone=!0)}},hkErr:dv(Ce,17,lv+ph)}),ze(XMLHttpRequest,"abort",{ns:x,req:function(fe){if(!Q){var ve=fe.inst,xe=gh(ve,se);Te(ve,xe)&&!xe.xhrMonitoringState.abortDone&&(xe[sv]=1,xe.xhrMonitoringState.abortDone=!0)}},hkErr:dv(Ce,13,lv+".abort"+ph)}),ze(XMLHttpRequest,"setRequestHeader",{ns:x,req:function(fe,ve,xe){if(!Q){var Ae=fe.inst,he=gh(Ae,se);he&&Te(Ae,he)&&(Doe(Ae,ve,xe),g&&ne(ve)&&(he[na][ve]=xe))}},hkErr:dv(Ce,71,lv+".setRequestHeader"+ph)}),d=!0)}))}function zt(fe,ve,xe){var Ae=!1,he=((ct(ve)?ve:(ve||{}).url||"")||"")[hh]();if(Ye(K,function(Ot){var Lt=Ot;ct(Ot)&&(Lt=new RegExp(Ot)),Ae||(Ae=Lt.test(he))}),Ae)return Ae;var $e=mh(he,"?"),lt=mh(he,"#");return($e===-1||lt!==-1&&lt<$e)&&($e=lt),$e!==-1&&(he=he.substring(0,$e)),Oe(fe)?Oe(ve)||(Ae=(typeof ve=="object"?ve[Ju]===!0:!1)||(xe?xe[Ju]===!0:!1)):Ae=fe[Ju]===!0||he[Ju]===!0,!Ae&&he&&MA(he)&&(Ae=!0),Ae?Z[he]||(Z[he]=1):Z[he]&&(Ae=!0),Ae}function Te(fe,ve,xe){var Ae=!0,he=d;return Oe(fe)||(Ae=xe===!0||!Oe(ve)),he&&Ae}function At(){var fe=null;Ce[yo]&&Ce[yo].getTraceCtx&&(fe=po(Ce[yo].getTraceCtx())),!fe&&I&&I.telemetryTrace&&(fe=qie(I.telemetryTrace));var ve=po(fe);return ve[zo]=ve[zo]||Ac(),ve[As]=Bu(Ac(),0,16),Moe(ve,Ce[C2]())}function tn(fe,ve,xe){if(ve){xe!==void 0&&(ve[ov]=Aa(Aa({},ve.properties),xe));var Ae=fe.getPartAProps();Fe(Me,Ce[yo],fe,ve,xe,Ae)}}function er(fe,ve,xe,Ae){var he=fe[ml]=fe[ml]||{xh:[],i:{}},$e=he.i=he.i||{},lt=$e[se]=$e[se]||At();return lt[Hc]=ve,lt[Cs]=xe,lt.xhrMonitoringState.openDone=!0,lt[na]={},lt.async=Ae,lt[TE]=C,lt}function gn(fe,ve){ve.xhrMonitoringState[jj]=lu(fe,"readystatechange",function(){var xe;try{fe&&fe.readyState===4&&Te(fe,ve)&&ut(fe)}catch(he){var Ae=at(he);(!Ae||mh(Ae[hh](),"c00c023f")===-1)&&cv(Ce,16,lv+" 'readystatechange' event handler"+ph,(xe={},xe[EE]=A2(fe,se),xe.exception=Ae,xe))}},x)}function Xt(fe){try{var ve=fe.responseType;if(ve===""||ve==="text")return fe[SE]}catch{}return null}function ut(fe){var ve=gh(fe,se);ve[uv]=t2(),ve[Es]=fe[Es];function xe(Ae,he){var $e=he||{};$e.ajaxDiagnosticsMessage=A2(fe,se),Ae&&($e.exception=at(Ae)),hu(Ce,14,Hj+"ajax call"+Vj,$e)}pu("xmlhttprequest",ve,function(){try{var Ae=ve[CE]("Ajax",g,function(){var Ot,Lt=(Ot={statusText:fe[$c],headerMap:null},Ot[IE]=vi(fe),Ot.type=fe.responseType,Ot[SE]=Xt(fe),Ot.response=fe.response,Ot);if(Y){var et=fe[Uj]();if(et){var Qe=En(et).split(/[\r\n]+/),Ht={};Ye(Qe,function(ia){var Xr=ia.split(": "),Wn=Xr.shift(),$i=Xr.join(": ");ne(Wn)&&(Ht[Wn]=$i)}),Lt[S2]=Ht}}return Lt}),he=void 0;try{we&&(he=we({status:fe[Es],xhr:fe}))}catch{hu(Ce,104,zj)}Ae||xe(null,{requestSentTime:ve[zc],responseFinishedTime:ve[uv]}),tn(ve,Ae,he)}finally{try{var $e=fe[ml]||{i:{}},lt=$e.i||{};lt[se]&&(lt[se]=null)}catch{}}},function(Ae){xe(Ae,null)})}function vi(fe){var ve;try{var xe=fe[Uj]();if(xe!==null){var Ae=mh(xe[hh](),fn[8]);if(Ae!==-1){var he=fe.getResponseHeader(fn[0]);return T7(he)}}}catch($e){hu(Ce,18,$j,(ve={},ve[EE]=A2(fe,se),ve.exception=at($e),ve))}}function La(fe,ve){if(ve[Cs]&&O&&X){var xe=Sa();if(xe&&Ke(xe.mark)){qj++;var Ae=O+fe+"#"+qj;xe.mark(Ae);var he=xe.getEntriesByName(Ae);he&&he[fu]===1&&(ve.perfMark=he[0])}}}function pu(fe,ve,xe,Ae){var he=ve.perfMark,$e=Sa(),lt=je,Ot=ee,Lt=ve[Cs],et=0;(function Qe(){try{if($e&&he){et++;for(var Ht=null,ia=$e.getEntries(),Xr=ia[fu]-1;Xr>=0;Xr--){var Wn=ia[Xr];if(Wn){if(Wn.entryType==="resource")Wn.initiatorType===fe&&(mh(Wn.name,Lt)!==-1||mh(Lt,Wn.name)!==-1)&&(Ht=Wn);else if(Wn.entryType==="mark"&&Wn.name===he.name){ve[AE]=Ht;break}if(Wn[fh]<he[fh]-1e3)break}}}!he||ve[AE]||et>=lt||ve.async===!1?(he&&Ke($e.clearMarks)&&$e.clearMarks(he.name),ve.perfAttempts=et,xe()):Ca(Qe,Ot)}catch($i){Ae($i)}})()}function bl(fe,ve){var xe=At();xe[zc]=t2(),xe[TE]=C;var Ae;if(fe instanceof Request?Ae=(fe||{}).url||"":Ae=fe,Ae===""){var he=ms();he&&he.href&&(Ae=V1(he.href,"#")[0])}Ce[yo]&&Ce[yo].config&&(Ae=Ma(Ae,Ce[yo].config)),xe[Cs]=Ae;var $e="GET";ve&&ve[Hc]?$e=ve[Hc]:fe&&fe instanceof Request&&($e=fe[Hc]),xe[Hc]=$e;var lt={};if(g){var Ot=new Headers((ve?ve[Vc]:0)||(fe instanceof Request?fe[Vc]||{}:{}));Ot.forEach(function(Lt,et){ne(et)&&(lt[et]=Lt)})}return xe[na]=lt,La(Gc,xe),xe}function yi(fe){var ve="";try{Oe(fe)||(typeof fe=="string"?ve+="(url: '".concat(fe,"')"):ve+="(url: '".concat(fe.url,"')"))}catch(xe){cv(Ce,15,"Failed to grab failed fetch diagnostics message",{exception:at(xe)})}return ve}function ra(fe,ve,xe,Ae,he,$e,lt){if(!he)return;function Ot(Lt,et,Qe){var Ht=Qe||{};Ht.fetchDiagnosticsMessage=yi(xe),et&&(Ht.exception=at(et)),hu(Ce,Lt,Hj+"fetch call"+Vj,Ht)}he[uv]=t2(),he[Es]=ve,pu(Gc,he,function(){var Lt=he[CE]("Fetch",g,$e),et;try{we&&(et=we({status:ve,request:xe,response:Ae}))}catch{hu(Ce,104,zj)}Lt||Ot(14,null,{requestSentTime:he[zc],responseFinishedTime:he[uv]}),tn(he,Lt,et)},function(Lt){Ot(18,Lt,null)})}function ke(fe){if(fe&&fe[Vc])try{var ve=fe[Vc].get(fn[0]);return T7(ve)}catch(xe){hu(Ce,18,$j,{fetchDiagnosticsMessage:yi(fe),exception:at(xe)})}}function Fe(fe,ve,xe,Ae,he,$e){var lt=!0,Ot=fe[fu];if(Ot>0){var Lt={item:Ae,properties:he,sysProperties:$e,context:xe?xe[w2]:null,aborted:xe?!!xe[sv]:!1};lt=Kj(ve,fe,Lt,"initializer")}lt&&Ce[Mj](Ae,he,$e)}}),c}return s.prototype.processTelemetry=function(c,f){this.processNext(c,f)},s.prototype.addDependencyInitializer=function(c){return null},s.identifier="AjaxDependencyPlugin",s})(Yf),Uoe=(function(){function a(){}return a})(),Foe=(function(){function a(){this.id="browser",this.deviceClass="Browser"}return a})(),Boe="3.4.3",Voe=(function(){function a(s,c){var f=this,d=pr(s,function(){var v=s.sdkExtension;f.sdkVersion=(v?v+"_":"")+"javascript:"+Boe});c&&c.add(d)}return a})(),$oe=(function(){function a(){}return a})(),I2="session",M2="sessionManager",P2="isUserCookieSet",_2="isNewUser",Wj="applySessionContext",Xj="applyApplicationContext",Yj="applyOperationContext",Jj="applyOperatingSystemContxt",Qj="applyLocationContext",Zj="applyInternalContext",D2="getSessionId",eU="sessionCookiePostfix",Kc="automaticSession",vh="accountId",yh="authenticatedId",fv="acquisitionDate",L2="renewalDate",hv="cookieSeparator",_E="authUserCookieName",zoe="ai_session",Hoe=864e5,qoe=18e5,Goe=6e4,tU=(function(){function a(){}return a})(),Koe=(function(){function a(s,c,f){var d=this,v,y,g=Hf(c),C=z3(c),E,I;or(a,d,function(D){s||(s={});var L=pr(s,function(Z){E=s.sessionExpirationMs||Hoe,I=s.sessionRenewalMs||qoe;var Q=s[eU]||s.namePrefix||"";v=zoe+Q});f&&f.add(L),D[Kc]=new tU,D.update=function(){var Z=so(),Q=!1,ge=D[Kc];if(ge.id||(Q=!F(ge)),!Q&&E>0){var K=Z-ge[fv],we=Z-ge[L2];Q=K<0||we<0,Q=Q||K>E,Q=Q||we>I}Q?X(Z):(!y||Z-y>Goe)&&$(ge,Z)},D.backup=function(){var Z=D[Kc];Y(Z.id,Z[fv],Z[L2])};function F(Z,Q){var ge=!1,K=C.get(v);if(K&&Ke(K.split))ge=O(Z,K);else{var we=C7(g,v);we&&(ge=O(Z,we))}return ge||!!Z.id}function O(Z,Q){var ge=!1,K=", session will be reset",we=Q.split("|");if(we.length>=2)try{var x=+we[1]||0,se=+we[2]||0;isNaN(x)||x<=0?Je(g,2,27,"AI session acquisition date is 0"+K):isNaN(se)||se<=0?Je(g,2,27,"AI session renewal date is 0"+K):we[0]&&(Z.id=we[0],Z[fv]=x,Z[L2]=se,ge=!0)}catch(te){Je(g,1,9,"Error parsing ai_session value ["+(Q||"")+"]"+K+" - "+pn(te),{exception:at(te)})}return ge}function X(Z){var Q=s.getNewId||C3;D[Kc].id=Q(s.idLength||22),D[Kc][fv]=Z,$(D[Kc],Z),r2()||Je(g,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function $(Z,Q){var ge=Z[fv];Z[L2]=Q;var K=I,we=ge+E-Q,x=[Z.id,ge,Q],se=0;we<K?se=we/1e3:se=K/1e3;var te=s.cookieDomain||null;C.set(v,x.join("|"),E>0?se:null,te),y=Q}function Y(Z,Q,ge){A7(g,v,[Z,Q,ge].join("|"))}})}return a.__ieDyn=1,a})();function nU(a){return!(typeof a!="string"||!a||a.match(/,|;|=| |\|/))}var Woe=(function(){function a(s,c,f){this.isNewUser=!1,this.isUserCookieSet=!1;var d=Hf(c),v=z3(c),y;or(a,this,function(g){Dt(g,"config",{g:function(){return s}});var C=pr(s,function(){var L=s.userCookiePostfix||"";y=a.userCookieName+L;var F=v.get(y);if(F){g[_2]=!1;var O=F.split(a[hv]);O.length>0&&(g.id=O[0],g[P2]=!!g.id)}if(!g.id){g.id=E();var X=I(g.id);D(X.join(a[hv]));var $=(s.namePrefix||"")+"ai_session";Wie(d,$)}g[vh]=s[vh]||void 0;var Y=v.get(a[_E]);if(Y){Y=decodeURI(Y);var Z=Y.split(a[hv]);Z[0]&&(g[yh]=Z[0]),Z.length>1&&Z[1]&&(g[vh]=Z[1])}});f&&f.add(C);function E(){var L=s||{},F=L.getNewId||C3,O=F(L.idLength?s.idLength:22);return O}function I(L){var F=Vf(new Date);g.accountAcquisitionDate=F,g[_2]=!0;var O=[L,F];return O}function D(L){var F=31536e3;g[P2]=v.set(y,L,F)}g.setAuthenticatedUserContext=function(L,F,O){O===void 0&&(O=!1);var X=!nU(L)||F&&!nU(F);if(X){Je(d,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}g[yh]=L;var $=g[yh];F&&(g[vh]=F,$=[g[yh],g.accountId].join(a[hv])),O&&v.set(a[_E],encodeURI($))},g.clearAuthenticatedUserContext=function(){g[yh]=null,g[vh]=null,v.del(a[_E])},g.update=function(L){if(g.id!==L||!g[P2]){var F=L||E(),O=I(F);D(O.join(a[hv]))}}})}return a.cookieSeparator="|",a.userCookieName="ai_user",a.authUserCookieName="ai_authUser",a})(),R2="ext",N2="tags",Xoe;function bh(a,s){a&&a[s]&&oo(a[s]).length===0&&delete a[s]}function rU(){return null}function Yoe(a){var s=a?a.getTraceCtx():null,c={};function f(){var D=a?a.getTraceCtx():null;return s&&D!==s&&(c={}),D}function d(D){var L,F=f();if(!Cn(c[D]))L=c[D];else if(F){if(D in F)L=F[D];else{var O="get"+C9(D);Ke(F[O])&&(L=F[O])}Ke(L)&&(L=JS(L,F))}return L}function v(D,L,F){var O=f();if(O){if(D in O)Ke(O[D])?JS(O[D],O,[L]):O[D]=L;else{var X="set"+C9(D);Ke(O[X])&&O[X](L)}c[D]=Xoe,L&&ct(L)&&F&&F()!==L&&(s=O,c[D]=L)}}function y(){return d("traceId")}function g(){var D=f(),L=c.spanId;if(D&&Cn(L)){var F=D.parentCtx;F&&(L=F.spanId)}return L||d("spanId")}function C(){return d("traceFlags")}function E(){return sr(a?a.logger:null,d("getName")||d("pageName"))}function I(D,L){return function(F){v(D,F,L)}}return Xs({},{traceID:{g:y,s:I("traceId",y)},parentID:{g,s:I("spanId",g)},traceFlags:{g:C,s:I("traceFlags",C)},name:{g:E,s:I("pageName",E)}})}var Joe=(function(){function a(s,c,f){var d=this,v=s.logger;or(a,this,function(y){y.appId=rU,y[D2]=rU,y.application=new Uoe,y.internal=new Voe(c,f),O1()&&(y[M2]=new Koe(c,s,f),y.device=new Foe,y.location=new $oe,y.user=new Woe(c,s,f),y[I2]=new tU,Dt(y,"telemetryTrace",{l:lo(function(){return Yoe(s)})})),y[D2]=function(){var g=y[I2],C=null;if(g&&ct(g.id))C=g.id;else{var E=(y[M2]||{})[Kc];C=E&&ct(E.id)?E.id:null}return C},y[Wj]=function(g,C){Pn(Ui(g.ext,_a.AppExt),"sesId",y[D2](),ct)},y[Jj]=function(g,C){Pn(g.ext,_a.OSExt,y.os)},y[Xj]=function(g,C){var E=y.application;if(E){var I=Ui(g,N2);Pn(I,_n.applicationVersion,E.ver,ct),Pn(I,_n.applicationBuild,E.build,ct)}},y.applyDeviceContext=function(g,C){var E=y.device;if(E){var I=Ui(Ui(g,R2),_a.DeviceExt);Pn(I,"localId",E.id,ct),Pn(I,"ip",E.ip,ct),Pn(I,"model",E.model,ct),Pn(I,"deviceClass",E.deviceClass,ct)}},y[Zj]=function(g,C){var E=y.internal;if(E){var I=Ui(g,N2);Pn(I,_n.internalAgentVersion,E.agentVersion,ct),Pn(I,_n.internalSdkVersion,sr(v,E.sdkVersion,64),ct),(g.baseType===bm.dataType||g.baseType===Em)&&(Pn(I,_n.internalSnippet,E.snippetVer,ct),Pn(I,_n.internalSdkSrc,E.sdkSrc,ct))}},y[Qj]=function(g,C){var E=d.location;E&&Pn(Ui(g,N2,[]),_n.locationIp,E.ip,ct)},y[Yj]=function(g,C){var E=y.telemetryTrace;if(E){var I=Ui(Ui(g,R2),_a.TraceExt,{traceID:void 0,parentID:void 0});Pn(I,"traceID",E.traceID,ct,Oe),Pn(I,"name",E.name,ct,Oe),Pn(I,"parentID",E.parentID,ct,Oe)}},y.applyWebContext=function(g,C){var E=d.web;E&&Pn(Ui(g,R2),_a.WebExt,E)},y.applyUserContext=function(g,C){var E=y.user;if(E){var I=Ui(g,N2,[]);Pn(I,_n.userAccountId,E[vh],ct);var D=Ui(Ui(g,R2),_a.UserExt);Pn(D,"id",E.id,ct),Pn(D,"authId",E[yh],ct)}},y.cleanUp=function(g,C){var E=g.ext;E&&(bh(E,_a.DeviceExt),bh(E,_a.UserExt),bh(E,_a.WebExt),bh(E,_a.OSExt),bh(E,_a.AppExt),bh(E,_a.TraceExt))}})}return a.__ieDyn=1,a})(),vl,DE,wh=null,Qoe=xf((vl={accountId:wh,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:wh,sdkExtension:wh,isBrowserLinkTrackingEnabled:!1,appId:wh},vl[D2]=wh,vl.namePrefix=DE,vl[eU]=DE,vl.userCookiePostfix=DE,vl.idLength=22,vl.getNewId=wh,vl)),Zoe=(function(a){Zs(s,a);function s(){var c=a.call(this)||this;c.priority=110,c.identifier=zA;var f,d,v;return or(s,c,function(y,g){C(),Dt(y,"context",{g:function(){return d}}),y.initialize=function(D,L,F,O){g.initialize(D,L,F,O),E(D)},y.processTelemetry=function(D,L){if(!Oe(D)){L=y._getTelCtx(L),D.name===a2&&L.diagLog().resetInternalMessageCount();var F=d||{};F[I2]&&!ct(d[I2].id)&&F[M2]&&F[M2].update();var O=F.user;if(O&&!O[P2]&&O.update(F.user.id),I(D,L),O&&O[_2]&&(O[_2]=!1,!v)){var X=new bm(72,($u()||{}).userAgent||"");Zee(L.diagLog(),1,X)}y.processNext(D,L)}},y._doTeardown=function(D,L){C()};function C(){f=null,d=null,v=!0}function E(D){var L=y.identifier,F=y.core;y._addHook(pr(D,function(){var O=Bo(null,D,F);D.storagePrefix&&DA(D.storagePrefix),v=D.disableUserInitMessage!==!1,f=O.getExtCfg(L,Qoe),y._extConfig=f})),d=new Joe(F,f,y._unloadHooks),y.context.appId=function(){var O=F.getPlugin(q7);return O?O.plugin._appId:null}}function I(D,L){Ui(D,"tags",[]),Ui(D,"ext",{});var F=y.context;F[Wj](D,L),F[Xj](D,L),F.applyDeviceContext(D,L),F[Yj](D,L),F.applyUserContext(D,L),F[Jj](D,L),F.applyWebContext(D,L),F[Qj](D,L),F[Zj](D,L),F.cleanUp(D,L)}}),c}return s.__ieDyn=1,s})(Yf),iU="AuthenticatedUserContext",xh="track",kh=void 0,aU="",O2="snippet",ese="getCookieMgr",tse="startTrackPage",nse="stopTrackPage",LE="flush",rse="startTrackEvent",ise="stopTrackEvent",ase="addTelemetryInitializer",oU="pollInternalLogs",RE="getPlugin",NE="evtNamespace",ose=xh+"Event",sse=xh+"Trace",use=xh+"Metric",lse=xh+"PageView",sU=xh+"Exception",cse=xh+"DependencyData",dse="set"+iU,fse="clear"+iU,hse="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",OE="connectionString",jE="version",Wc="queue",j2="instrumentationKey",pv="userOverrideEndpointUrl",UE="endpointUrl",gv="onunloadFlush",bo="context",uU="addHousekeepingBeforeUnload",FE="sendMessage",mv="unload",lU="removeNotificationListener",pse="updateSnippetDefinitions",vv="logger",yv="attribContainer",bv="attributes",Th="spanContext",cU="traceId",Xc="spanId",Sh="kind",Ch="baseData",wo="type",U2="responseCode",Yc="target",BE="traceFlags",dU="az.namespace",fU="azure.resource_provider.namespace",gse="Microsoft.EventHub",mse="message_bus.destination",hU="timeSinceEnqueued",vse=Bg(function(){return new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/)}),yse="http.",bse="_MS.ProcessedByMetricExtractors",wse=Bg(xse);function xse(){return[bse,Hne,i7,qne,Gne,Kne,Wne,Xne,Yne,Jne,Qne,a7,o7,s7,u7,l7,TA,Zne,ere,tre,nre,rre,ire,are,ore,sre,ure,lre,cre,yse+"status_text",dre,fre,hre,pre,gre,mre,vre,yre,bre,wre,xre,kre,Tre,Sre,Cre,Are,Ere,Ire,Mre,Pre,_re,Dre,Lre,Rre,Nre]}function kse(a,s,c,f){var d=a.tags=a.tags||[],v=s[yv]||cu(s[bv]);d[c.operationId]=s[Th]()[cU],(s.parentSpanContext||{})[Xc]&&(d[c.operationParentId]=s.parentSpanContext[Xc]);var y=v.get(Vne);y&&(d[c.userAuthUserId]=Qt(y));var g=v.get($ne);g&&(d[c.userId]=Qt(g));var C=Mie(v);C&&(d["ai.user.userAgent"]=String(C)),Aie(v)&&(d[c.operationSyntheticSource]="True");var E=v.get(Bne);if(E&&(d[c.locationIp]=Qt(E)),s[Sh]===1){var I=Zb(v);if(E||(d[c.locationIp]=Eie(v)),I){var D=v.get(zne),L=Qb(v);if(d[c.operationName]=s.name,D)d[c.operationName]=I+" "+Ma(Qt(D),f);else if(L)try{var F=Ma(w7(Qt(L)),f);d[c.operationName]=I+" "+F}catch{}}else d[c.operationName]=s.name}else{var O=v.get(c.operationName);O&&(d[c.operationName]=O)}}function Tse(a,s){var c=!1;return(OQ(wse.v,a)||uZ(a,"microsoft.")||a===s.operationName)&&(c=!0),c}function Sse(a,s,c){if(c){var f=a[Ch]=a[Ch]||{},d=f.properties=f.properties||{};c.forEach(function(v,y){Tse(v,s)||(d[v]=y)})}}function Cse(a,s,c,f){if(c){var d=Qb(s);if(d)try{var v=w7(Qt(d));v&&(a.name=c+" "+Ma(v,f))}catch{}a[wo]="Http",a.data=Ma(f7(s),f);var y=EA(s);y&&(a[U2]=+y);var g=IA(s);if(g){try{var C=vse.v.exec(g);if(C!==null){var E=C[1],I=C[3];(E==="https"&&I===":443"||E==="http"&&I===":80")&&(g=C[1]+C[2]+C[4])}}catch{}a[Yc]=g}}return!!c}function Ase(a,s,c){if(c){String(c)===jre?a[wo]="mysql":String(c)===Ure?a[wo]="postgresql":String(c)===Ore?a[wo]="mongodb":String(c)===Fre?a[wo]="redis":Lie(String(c))?a[wo]="SQL":a[wo]=String(c);var f=s.get(o7),d=s.get(s7);f?a.data=String(f):d&&(a.data=String(d));var v=IA(s),y=s.get(u7);v?a[Yc]=y?v+"|"+Qt(y):v:a[Yc]=Qt(y||c)}return!!c}function Ese(a,s,c){if(c){qQ(c)==="wcf"?a[wo]="WCF Service":a[wo]="GRPC";var f=s.get(TA);Oe(f)||(a[U2]=+f);var d=IA(s);d?a[Yc]=Qt(d):a[Yc]=String(c)}return!!c}function Ise(a,s,c){var f=s[yv]||cu(s[bv]),d="Dependency";s[Sh]===3?d="Queue Message":s[Sh]===0&&s.parentSpanContext&&(d="InProc");var v=s[Th](),y={name:s.name,id:v[Xc]||a.getTraceCtx()[Xc],success:(s.status||{}).code!==2,responseCode:0,type:d,duration:Rm(s.duration),data:aU,target:aU,properties:kh,measurements:kh};return Cse(y,f,Zb(f),a.config)||Ase(y,f,f.get(a7))||Ese(y,f,f.get(l7)),ws(y,Im,P7.replace("{0}.",""),a[vv])}function Mse(a,s,c){var f=s[yv]||cu(s[bv]),d=s[Th](),v={name:s.name,id:d[Xc]||a.getTraceCtx()[Xc],success:s.status.code!==0?s.status.code===1:(Number(EA(f))||0)<400,responseCode:0,duration:Rm(s.duration),source:void 0},y=Zb(f),g=f.get(TA);if(y){v.url=Ma(f7(f),a.config);var C=EA(f);C&&(v[U2]=+C)}else g&&(v[U2]=+g);return ws(v,iA,eae.replace("{0}.",""),a[vv])}function Pse(a,s){var c=null,f=s[yv]||cu(s[bv]),d=_n,v=s[Sh];if(v==1||v==4?c=Mse(a,s):(v==2||v==3||v==0)&&(c=Ise(a,s)),c){var y=c[Ch]=c[Ch]||{};y.startTime=new Date(Rm(s.startTime));var g=c.ext=c.ext||{},C=g.dt=g.dt||{};C.spanId=C.spanId||s[Th]()[Xc],C.traceId=C.traceId||s[Th]()[cU];var E=s[Th]()[BE];Oe(E)||(C[BE]=C[BE]||E),kse(c,s,d,a.config),Sse(c,d,f);var I=f.get("microsoft.sample_rate");Oe(I)||(c.sampleRate=Number(I));var D=f.get(fU)||f.get(dU);D&&(s[Sh]===0&&(y[wo]="InProc | "+D),D===gse&&_se(c,s))}return c}function _se(a,s){var c=a[Ch]=a[Ch]||{},f=s[yv]||cu(s[bv]),d=f.get(fU)||f.get(dU),v=Qt(f.get(i7)||f.get("peer.address")||"unknown").replace(/\/$/g,""),y=f.get(mse)||"unknown",g=c[wo]||"",C=s[Sh];if(C===2)g=d,c[Yc]=v+"/"+y;else if(C===3)g="Queue Message | "+d,c[Yc]=v+"/"+y;else if(C===4){g="Queue Message | "+d,c.source=v+"/"+y;var E=c.measurements=c.measurements||{},I=f.get("timeSinceEnqueued");if(I)E[hU]=Number(I);else{var D=parseFloat(Qt(f.get("enqueuedTime")));isNaN(D)&&(D=0),E[hU]=Rm(s.startTime)-D}}c[wo]=g}var Jc,Ah,VE,wv,pU="dependencies",gU="properties",mU="_snippetVersion",vU="appInsightsNew",yU="getSKUDefaults",Dse=[O2,pU,gU,mU,vU,yU,"trace","otelApi"],Lse=[O2,pU,gU,mU,vU,yU],bU="iKeyUsage",wU="CdnUsage",xU="SdkLoaderVer",Rse="zipPayload",kU="SdkStats",Nse="3.4.3",Ose={samplingRate:100,maxSendNumber:1},jse={monthInterval:3,daysOfMonth:[28]},F2={disabled:!0,limit:hi(Ose),interval:hi(jse)},Use={connectionString:kh,endpointUrl:kh,instrumentationKey:kh,userOverrideEndpointUrl:kh,diagnosticLogInterval:wb(Fse,1e4),featureOptIn:(Jc={},Jc[bU]={mode:3},Jc[wU]={mode:2},Jc[xU]={mode:2},Jc[Rse]={mode:1},Jc[kU]={mode:3},Jc),sdkStats:hi({int:9e5}),throttleMgrCfg:hi((Ah={},Ah[109]=hi(F2),Ah[106]=hi(F2),Ah[111]=hi(F2),Ah[110]=hi(F2),Ah)),extensionConfig:hi((VE={},VE.AppInsightsCfgSyncPlugin=hi({cfgUrl:hse,syncMode:2}),VE))};function Fse(a){return a&&a>0}function TU(a,s){return am(function(c,f){ea(s,function(d){var v=d&&d.value,y=null;!d.rejected&&v&&(a[OE]=v,y=M7(v)),c(y)})})}function Bse(a,s,c,f){var d=lo(eie,[{host:a}]);return a.core.setTraceProvider(lo(function(){return Lne(a,s,d.v,c,f)})),d}var Vse=(function(){function a(s){var c=this,f,d,v,y,g,C,E,I,D,L,F,O,X,$,Y,Z;or(a,this,function(Q){se(),Dt(Q,"config",{g:function(){return I}}),Ye(["pluginVersionStringArr","pluginVersionString"],function(Me){Dt(Q,Me,{g:function(){return E?E[Me]:null}})}),y=""+(s.sv||s[jE]||""),s[Wc]=s[Wc]||[],s[jE]=s[jE]||2;var ge=ho(s.config||{},Use);I=ge.cfg,D=new qae,Dt(Q,"appInsights",{g:function(){return D}}),d=new Zoe,f=new joe,v=new Aoe,E=new Kte,Dt(Q,"core",{g:function(){return E}}),Dt(Q,"otelApi",{g:function(){return Y?Y.v:null}}),Dt(Q,"trace",{g:function(){return Y?Y.v.trace:null}}),Be(pr(ge,function(){var Me=I[OE];if(_o(Me)){var Ie=am(function(Le,He){ea(TU(I,Me),function(Ce){if(Ce.rejected)Le(null);else{var qe=I[j2],gt=Ce.value;qe=gt&&gt.instrumentationkey||qe,Le(qe)}})}),je=I[pv];Oe(je)&&(je=am(function(Le,He){ea(TU(I,Me),function(Ce){if(Ce.rejected)Le(null);else{var qe=I[UE],gt=Ce.value,Ne=gt&&gt.ingestionendpoint;qe=Ne?Ne+$f:qe,Le(qe)}})})),I[j2]=Ie,I[UE]=je}if(ct(Me)&&Me){var ee=M7(Me),me=ee.ingestionendpoint;I.endpointUrl=I[pv]?I[pv]:me+$f,I[j2]=ee.instrumentationkey||I[j2]}I.endpointUrl=I[pv]?I[pv]:I[UE]})),Q[O2]=s,Q[LE]=function(Me,Ie){Me===void 0&&(Me=!0);var je;return Ub(E,function(){return"AISKU.flush"},function(){Me&&!Ie&&(je=gs(function(Le){Ie=Le}));var ee=1,me=function(){ee--,ee===0&&Ie()};Ye(E.getChannels(),function(Le){Le&&(ee++,Le[LE](Me,me))}),me()},null,Me),je},Q[gv]=function(Me){Me===void 0&&(Me=!0),Ye(E.getChannels(),function(Ie){Ie[gv]?Ie[gv]():Ie[LE](Me)})},Q.loadAppInsights=function(Me,Ie,je){Me===void 0&&(Me=!1),Me&&VQ("Legacy Mode is no longer supported");function ee(me){if(me){var Le="";Oe(y)||(Le+=y),Q[bo]&&Q[bo].internal&&(Q[bo].internal.snippetVer=Le||"-"),Gt(Q,function(He,Ce){ct(He)&&!Ke(Ce)&&He&&He[0]!=="_"&&An(Dse,He)===-1&&me[He]!==Ce&&(me[He]=Ce)})}}return Ub(Q.core,function(){return"AISKU.loadAppInsights"},function(){E.initialize(I,[v,d,f,D,L],Ie,je),Y=Bse(Q,"aisku",K,we),Dt(Q,"context",{g:function(){return d[bo]}}),F||(F=new Yie(E));var me=$se();me&&Q[bo]&&(Q[bo].internal.sdkSrc=me),ee(Q[O2]),Q.emptyQueue(),Q[oU](),Q[uU](Q),Be(pr(ge,function(){var Le=!1;if(I.throttleMgrCfg[109]&&(Le=!I.throttleMgrCfg[109].disabled),!F.isReady()&&I.extensionConfig&&I.extensionConfig[L.identifier]&&Le&&F.onReadyState(!0),!O&&!I[OE]&&cm(bU,I,!0)&&(F[FE](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),O=!0),!X&&Q[bo].internal.sdkSrc&&Q[bo].internal.sdkSrc.indexOf("az416426")!=-1&&cm(wU,I,!0)&&(F[FE](110,"See Cdn support notice at aka.ms/JsActiveCdn"),X=!0),!$&&parseInt(y)<6&&cm(xU,I,!0)&&(F[FE](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),$=!0),cm(kU,I,!0))Z||(Z=nne(E,Nse),E.addNotificationListener(Z));else if(Z){try{Z[mv](),E[lU](Z)}catch{}Z=null}}))}),Q},Q[pse]=function(Me){JZ(Me,Q,function(Ie){return Ie&&An(Lse,Ie)===-1})},Q.emptyQueue=function(){try{if(Pt(Q.snippet[Wc])){for(var Me=Q.snippet[Wc].length,Ie=0;Ie<Me;Ie++){var je=Q.snippet[Wc][Ie];je()}Q.snippet[Wc]=void 0,delete Q.snippet[Wc]}}catch(me){var ee={};me&&Ke(me.toString)&&(ee.exception=me.toString())}},Q[uU]=function(Me){if(O1()||b9()){var Ie=function(){if(Me[gv](!1),Ke(Q.core[RE])){var ee=c.core[RE](zA);if(ee){var me=ee.plugin;me&&me[bo]&&me[bo]._sessionManager&&me[bo]._sessionManager.backup()}}},je=!1;C||(C=el(g,E[NE]&&E[NE]())),Be(pr(I,function(ee){var me=ee.cfg,Le=Me.appInsights,He=Bo(null,me,Le.core),Ce=He.getExtCfg(Le.identifier||G7);te();var qe=me.disablePageUnloadEvents;Ce.disableFlushOnBeforeUnload||(fne(Ie,qe,C)&&(je=!0),fA(Ie,qe,C)&&(je=!0),!je&&!yee()&&Je(E[vv],1,19,"Could not add handler for beforeunload and pagehide")),!je&&!Ce.disableFlushOnUnload&&fA(Ie,qe,C)}))}},Q.getSender=function(){return v},Q[mv]=function(Me,Ie,je){var ee=!1,me;Me!==!1&&!Ie&&(me=gs(function(He){Ie=He}));function Le(He){ee||(ee=!0,E&&(E.setTraceProvider(null),Y&&Y.v.shutdown(),Y=null),se(),Ie&&Ie(He))}if(te(),Z&&E){try{Z[mv](),E[lU](Z)}catch{}Z=null}return Q[gv](Me),E[mv]&&E[mv](Me,Le,je),me},sm(Q,D,[ese,ose,lse,"trackPageViewPerformance",sU,"_onerror",sse,use,tse,nse,rse,ise]),sm(Q,x,[cse,"addDependencyListener","addDependencyInitializer"]),sm(Q,E,[ase,oU,"stopPollingInternalLogs",RE,"addPlugin",NE,"addUnloadCb","updateCfg","onCfgChange","getTraceCtx","setTraceCtx","startSpan","getActiveSpan","setActiveSpan","setTraceProvider","getTraceProvider"]),sm(Q,function(){var Me=d[bo];return Me?Me.user:null},[dse,fse]);function K(Me){Y&&Me&&Me.isRecording()&&!Y.v.cfg.traceCfg.suppressTracing&&xA(E,Me,function(){try{var Ie=Pse(E,Me);Ie&&Q.core.track(Ie)}catch(je){Je(E[vv],2,64,"Error processing span - "+at(je))}})}function we(Me,Ie,je){Y&&xA(E,Me,function(){try{Q[sU]({exception:Ie,properties:{time:je}})}catch(ee){Je(E[vv],2,64,"Error processing exception - "+at(ee))}})}function x(){return f}function se(){g=jo("AISKU"),C=null,f=null,d=null,v=null,y=null,F=null,O=!1,X=!1,$=!1,Z=null,L=new eoe}function te(){C&&(hne(null,C),pne(null,C))}function Be(Me){E.addUnloadHook(Me)}})}return a.prototype.addDependencyInitializer=function(s){return null},a})();function $se(){if(wv)return wv;var a=null,s=!1,c=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var f=(document||{}).currentScript;f&&(a=f.src)}catch{}if(a){try{var d=a.toLowerCase();if(d){var v="";Ye(c,function(y,g){if(Bn(d,y)!==-1)return v="cdn"+(g+1),Bn(d,"/scripts/")===-1&&(Bn(d,"/next/")!==-1?v+="-next":Bn(d,"/beta/")!==-1&&(v+="-beta")),wv=v+(s?".mod":""),-1})}}catch{}wv=a}return wv}var Eh=(a=>(a.PlayerLoadDurationMs="playerLoadDurationMs",a.BufferDurationMs="bufferDurationMs",a.InitialPlaybackStartDurationMs="initialPlaybackStartDurationMs",a.PosterImageLoadDurationMs="posterImageLoadDurationMs",a))(Eh||{}),Bi=(a=>(a.BufferComplete="BufferComplete",a.CommonPlayerImpression="CommonPlayerImpression",a.ContentCheckpoint="ContentCheckpoint",a.ContentComplete="ContentComplete",a.ContentError="ContentError",a.FullScreenEnter="FullScreenEnter",a.FullScreenExit="FullScreenExit",a.InviewEnter="InviewEnter",a.InviewExit="InviewExit",a.Mute="Mute",a.Pause="Pause",a.Play="Play",a.PlayerError="PlayerError",a.Replay="Replay",a.Resume="Resume",a.Seek="Seek",a.Unmute="Unmute",a.VideoAudioTrackControl="VideoAudioTrackControl",a.VideoPlayerClick="VideoPlayerClick",a))(Bi||{});class SU{constructor(s,c,f,d=!1,v){this.reporterName="Reporter",this._playerInfo=s,this._player=c,this._playerStateContext=f,this._isDebugMode=d,v&&(this.reporterName=v)}log(s){this._isDebugMode&&console.log(JSON.stringify(s),this.reporterName)}get playerInfo(){return this._playerInfo}set playerInfo(s){this._playerInfo=s}reportNominalMetric(s,c){if(this.shouldEmitNominalMetric(s)){const f=this.formatNominalMetric(s,this.getBaseTelemetryData(),c);this.log(f),this.emitTelemetry(f)}}reportNumericMetric(s,c){if(this.shouldEmitNumericMetric(s)){const f=this.formatNumericMetric(s,c,this.getBaseTelemetryData());this.log(f),this.emitTelemetry(f)}}reportError(s){if(this.shouldEmitError(s.errorType)){const c=this.formatError(s,this.getBaseTelemetryData());this.log(c),this.emitTelemetry(c)}}getBaseTelemetryData(){var s;return{deliveryMethod:this._playerInfo.deliveryMethod,playerInstanceId:this._playerInfo.playerInstanceId,playerCommit:this._playerInfo.playerCommit,playerVersionNumber:this._playerInfo.playerVersionNumber,playerUrl:this._playerInfo.playerUrl,title:this._playerInfo.title,videoId:this._playerInfo.videoId,videoElapsedTime:this._player.currentTime,videoDuration:this._player.duration,language:this._player.options.language,playerState:{autoplay:(s=this._player)==null?void 0:s.autoplay,muted:this._player.muted,loop:this._player.loop,visible:this._playerStateContext.value.visible}}}}class zse extends SU{constructor(s,c,f,d=!1){super(s,c,f,d,"AppInsightsReporter"),this.hasEmittedFirstNonUmpMessage=!1,this.playerTech="shaka",this.formatNominalMetric=()=>{throw new Error("Unsupported by AppInsights reporter.")},this.shouldEmitNominalMetric=()=>!1,this.shouldEmitNumericMetric=v=>Object.values(Eh).includes(v),this.shouldEmitError=()=>!0,this.isException=v=>v.exception!==void 0;try{this._appInsights=this.initAppInsights()}catch(v){d&&console.error("Error Initializing AppInsights.",v)}this.contextProvider=f}initAppInsights(){const s=new Vse({config:{connectionString:"InstrumentationKey=81bc6725-8164-4f38-93f8-ea681394304b;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/;ApplicationId=ef77fed2-4fcc-4568-aed4-b87c867a1e21",disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0}});return s.loadAppInsights(),s.addTelemetryInitializer(this.telemetryInitializer.bind(this)),s}telemetryInitializer(s){var c;return s.baseData=s.baseData||{},s.baseData.properties={...s.baseData.properties,deliveryMethod:this._playerInfo.deliveryMethod,playerInstanceId:this._playerInfo.playerInstanceId,playerVersionNumber:this._playerInfo.playerVersionNumber,uri:window.location.href,partnerName:this._playerInfo.partnerName,playerTech:this.playerTech,playerVisible:(c=this.contextProvider.value)==null?void 0:c.visible,vidnm:this._playerInfo.title},document.referrer&&document.referrer!==window.location.href&&(s.baseData.properties.referrer=document.referrer),s.baseData.properties.ump?(delete s.baseData.properties.ump,!0):(s.baseData.properties.nonump=!0,this.hasEmittedFirstNonUmpMessage?!1:(this.hasEmittedFirstNonUmpMessage=!0,!0))}emitTelemetry(s){var c,f;this.isException(s)?(c=this._appInsights)==null||c.trackException(s):(f=this._appInsights)==null||f.trackMetric({name:s.name,average:s.average,properties:s.properties})}formatNumericMetric(s,c,f){return{name:s,average:c,properties:{playerUrl:f.playerUrl,language:f.language,ump:!0}}}formatError(s,c){return{exception:Object.assign(new Error(s.errorDescription),{name:s.errorType}),properties:{playerUrl:c.playerUrl,language:c.language,errorMessage:s.errorDescription,ump:!0}}}}var Dr=(a=>(a[a.VideoSeen=239]="VideoSeen",a[a.VideoStart=240]="VideoStart",a[a.VideoPause=241]="VideoPause",a[a.VideoContinue=242]="VideoContinue",a[a.VideoCheckpoint=243]="VideoCheckpoint",a[a.VideoJump=244]="VideoJump",a[a.VideoComplete=245]="VideoComplete",a[a.VideoBuffering=246]="VideoBuffering",a[a.VideoError=247]="VideoError",a[a.VideoMute=248]="VideoMute",a[a.VideoUnmute=249]="VideoUnmute",a[a.VideoFullscreen=250]="VideoFullscreen",a[a.VideoUnfullscreen=251]="VideoUnfullscreen",a[a.VideoReplay=252]="VideoReplay",a[a.VideoPlayerLoad=253]="VideoPlayerLoad",a[a.VideoPlayerClick=254]="VideoPlayerClick",a[a.VideoVolumeControl=255]="VideoVolumeControl",a[a.VideoAudioTrackControl=256]="VideoAudioTrackControl",a[a.VideoClosedCaptionControl=257]="VideoClosedCaptionControl",a[a.VideoClosedCaptionStyle=258]="VideoClosedCaptionStyle",a[a.VideoResolutionControl=259]="VideoResolutionControl",a[a.VideoUndefinedEvent=0]="VideoUndefinedEvent",a))(Dr||{});const CU={243:{actionType:"A",telemetryMethodType:"capturePageAction"},245:{actionType:"A",telemetryMethodType:"capturePageAction"},246:{actionType:"A",telemetryMethodType:"captureContentUpdate"},253:{actionType:"A",telemetryMethodType:"captureContentUpdate"},239:{actionType:"O",telemetryMethodType:"captureContentUpdate"},0:{actionType:"O",telemetryMethodType:"captureContentUpdate"},247:{actionType:"O",telemetryMethodType:"captureContentUpdate"},252:{actionType:"CL",telemetryMethodType:"capturePageAction"},240:{actionType:"CL",telemetryMethodType:"capturePageAction"},241:{actionType:"CL",telemetryMethodType:"capturePageAction"},242:{actionType:"CL",telemetryMethodType:"capturePageAction"},244:{actionType:"CL",telemetryMethodType:"capturePageAction"},248:{actionType:"CL",telemetryMethodType:"capturePageAction"},249:{actionType:"CL",telemetryMethodType:"capturePageAction"},250:{actionType:"CL",telemetryMethodType:"capturePageAction"},251:{actionType:"CL",telemetryMethodType:"capturePageAction"},254:{actionType:"CL",telemetryMethodType:"capturePageAction"},255:{actionType:"CL",telemetryMethodType:"capturePageAction"},256:{actionType:"CL",telemetryMethodType:"capturePageAction"},257:{actionType:"CL",telemetryMethodType:"capturePageAction"},258:{actionType:"CL",telemetryMethodType:"capturePageAction"},259:{actionType:"CL",telemetryMethodType:"capturePageAction"}},$E={BufferComplete:Dr.VideoBuffering,CommonPlayerImpression:Dr.VideoPlayerLoad,ContentCheckpoint:Dr.VideoCheckpoint,ContentComplete:Dr.VideoComplete,ContentError:Dr.VideoError,FullScreenEnter:Dr.VideoFullscreen,FullScreenExit:Dr.VideoUnfullscreen,InviewEnter:Dr.VideoSeen,Mute:Dr.VideoMute,Pause:Dr.VideoPause,Play:Dr.VideoStart,PlayerError:Dr.VideoError,Replay:Dr.VideoReplay,Resume:Dr.VideoContinue,Seek:Dr.VideoJump,Unmute:Dr.VideoUnmute,VideoAudioTrackControl:Dr.VideoAudioTrackControl,VideoPlayerClick:Dr.VideoPlayerClick};class Hse extends SU{constructor(s,c,f,d=!1){super(s,c,f,d,"MartechReporter"),this.formatNominalMetric=(v,y,g)=>{const C=$E[v],E=CU[C];return{actionType:v===Bi.Play&&g!=null&&g.autoplay?"A":E?.actionType,behavior:C,contentTags:{...this.createContentTags(y),additionalData:g}}},this.formatNumericMetric=()=>{throw new Error("Unsupported by Martech reporter.")},this.formatError=(v,y)=>({actionType:"O",behavior:$E.ContentError,contentTags:{...this.createContentTags(y),errorDetails:v}}),this.shouldEmitNominalMetric=v=>$E[v]!==void 0,this.shouldEmitNumericMetric=()=>!1,this.shouldEmitError=()=>!0,this.createContentTags=v=>({playerInstanceId:v.playerInstanceId,containerName:"Universal Media Player",compnm:"Universal Media Player",vidnm:v.title,vidid:v.videoId,vidpct:Math.round(v.videoElapsedTime/v.videoDuration*100),viddur:Math.round(v.videoDuration),vidwt:Math.round(v.videoElapsedTime),playerState:v.playerState})}emitTelemetry(s){var c,f,d,v;const y=window.owap,g=window.awa,{telemetryMethodType:C}=CU[s.behavior];(c=y?.isInitialized)!=null&&c.call(y)?(f=y?.[C])==null||f.call(y,null,s):g?.isInitialized===!0&&((v=(d=g?.ct)==null?void 0:d[C])==null||v.call(d,null,s))}}class qse{constructor(s,c,f,d,v=!1){this._playerInfo={},this.reporters=[],d&&this.reporters.push(new Hse(s,c,f,v)),this.sampleInstance()&&this.reporters.push(new zse(s,c,f,v)),this.playerInfo=s}get playerInfo(){return this._playerInfo}set playerInfo(s){this._playerInfo=s,s.partnerName||console.warn('"partnerName" is undefined and must be provided to the video player options.'),this.reporters.forEach(c=>c.playerInfo=s)}sampleInstance(){return Math.random()*100<1}reportNominalMetric(s,c){this.reporters.forEach(f=>f.reportNominalMetric(s,c))}reportNumericMetric(s,c){this.reporters.forEach(f=>f.reportNumericMetric(s,c))}reportError(s){this.reporters.forEach(c=>c.reportError(s))}}function Gse(a,s,c){const f=d=>{Kse(d,s,c)};return a.addEventListener("error",f),s.addEventListener("error",f),()=>{a.removeEventListener("error",f),s.removeEventListener("error",f)}}function Kse(a,s,c){if(s.dispatchEvent(new Mt("playererror")),a instanceof on.util.FakeEvent){const f=a.detail;f.umpErrorType?c.reportError({errorType:f.umpErrorType,errorDescription:f.umpErrorDescription}):c.reportError({errorType:`Shaka Error: ${f.code}. Severity: ${f.severity}`,errorDescription:`${f.category}: ${f.data.toString()}`})}else c.reportError({errorType:"unknown error event",errorDescription:"unknown error event"})}function Wse(a,s,c){Jse(a,c),Xse(a,c),Yse(a,c),Qse(a,c),Zse(a,s,c),eue(a,s,c),oue(a,c),tue(a,s,c),sue(a,s,c),nue(a,c),rue(a,c),iue(a,c),aue(a,s,c),uue(s,c)}function Xse(a,s){a.addEventListener("play",()=>{const c=performance.now();a.addEventListener("playing",()=>{s.reportNumericMetric(Eh.InitialPlaybackStartDurationMs,performance.now()-c)},{once:!0})},{once:!0})}function Yse(a,s){a.addEventListener("umpplay",c=>{var f;const d=((f=c.detail)==null?void 0:f.autoplay)===!0;s.reportNominalMetric(Bi.Play,{autoplay:d})},{once:!0})}function Jse(a,s){a.addEventListener("ended",()=>{s.reportNominalMetric(Bi.ContentComplete)},{once:!0})}function Qse(a,s){a.addEventListener("umppause",()=>{s.reportNominalMetric(Bi.Pause)})}function Zse(a,s,c){a.addEventListener("resume",()=>{s.dispatchEvent(new Mt("resume")),c.reportNominalMetric(Bi.Resume)})}function eue(a,s,c){a.addEventListener("replay",()=>{s.dispatchEvent(new Mt("replay")),c.reportNominalMetric(Bi.Replay)})}function tue(a,s,c){let f;a.addEventListener("buffering",d=>{d.buffering?(s.dispatchEvent(new Mt("buffering")),f=performance.now()):(c.reportNominalMetric(Bi.BufferComplete),c.reportNumericMetric(Eh.BufferDurationMs,performance.now()-f))})}function nue(a,s){a.addEventListener("fullscreenchanged",()=>{a.fullscreen?s.reportNominalMetric(Bi.FullScreenEnter):s.reportNominalMetric(Bi.FullScreenExit)})}function rue(a,s){a.addEventListener("playerloadmediastart",()=>{const c=performance.now();a.addEventListener("playerloadmediaend",()=>{s.reportNumericMetric(Eh.PlayerLoadDurationMs,performance.now()-c)})})}function iue(a,s){const c=performance.now();a.addEventListener("playerposterloadcomplete",()=>{s.reportNumericMetric(Eh.PosterImageLoadDurationMs,performance.now()-c)},{once:!0})}function aue(a,s,c){const f=[.25,.5,.75],d=a.options.checkpoints.filter(v=>v>=0&&v<=1).sort((v,y)=>v-y);a.addEventListener("timeupdate",()=>{const v=a.currentTime/a.duration;for(;f.length>0&&v>=f[0];)f.shift(),c.reportNominalMetric(Bi.ContentCheckpoint);for(;d.length>0&&v>=d[0];)d.shift(),s.dispatchEvent(new Mt("checkpoint"))})}function oue(a,s){a.addEventListener("seeked",()=>{(a.currentTime>=.2||a.currentTime===0)&&s.reportNominalMetric(Bi.Seek)})}function sue(a,s,c){let f=a.options.muted;a.addEventListener("volumechange",()=>{const d=a.volume===0||a.muted;f!==d&&(f=d,c.reportNominalMetric(d?Bi.Mute:Bi.Unmute),s.dispatchEvent(new Mt(d?"mute":"unmute")))})}function uue(a,s){a.addEventListener("ready",()=>{s.reportNominalMetric(Bi.CommonPlayerImpression)},{once:!0})}function lue(a,s){return c=>{const f={deliveryMethod:"cdn",playerInstanceId:a.umpId,playerVersionNumber:1787249673866,playerCommit:"65da2678cf5608f632907a3051fbeb0c310a1962",playerUrl:UJ,title:c.options.unlocalizedTitle||c.options.title,partnerName:c.options.partnerName},d=new qse(f,c,s,c.options.reporting,c.options.debug);Wse(c,a,d);const v=Gse(c,a,d);return()=>{v()}}}const cue=`<svg width='24' height='24'
     viewBox='0 0 24 24'
     xmlns='http://www.w3.org/2000/svg'
    class="spinner-icon"
  >
  <defs>
    <clipPath id="circleClip">
      <circle cx="12" cy="12" r="12"/>
    </clipPath>
  </defs>
  <style>
    .spinner-icon {
      --stroke-width: 2;
      --stroke-bg: #333;
      --stroke-fg: #fff;

      transform-origin: center;
      animation: rotate 2s linear infinite;
      stroke-width: var(--stroke-width);
    }

    .spinner-bg {
      stroke: var(--stroke-bg);
    }
    
    .spinner-stroke {
      stroke: var(--stroke-fg);
      animation: animate-stroke 1.5s ease-out infinite;
    }

    @keyframes rotate {
      100% {
        transform: rotate(360deg)
      }
    }

    @keyframes animate-stroke {
      0% {
        stroke-dasharray: 0 150;
        stroke-dashoffset: 0;
      }

      47.5% {
        stroke-dasharray: 42 150;
        stroke-dashoffset: -16;
      }

      95%,
      100% {
        stroke-dasharray: 42 150;
        stroke-dashoffset: -59
      }
    }
  </style>
    <circle class="spinner-bg" cx='12' cy='12' r='9.5' fill='none' clip-path="url(#circleClip)"></circle>
    <circle class="spinner-stroke" cx='12' cy='12' r='9.5' fill='none' clip-path="url(#circleClip)"></circle>
</svg>`;function due(a){return`data:image/svg+xml,${encodeURIComponent(a).replace(/'/g,"%27").replace(/"/g,"%22")}`}const fue=kn`
.spinner{background-image:url('${xS(due(cue))}');background-repeat:no-repeat;background-position:center;background-size:cover;width:var(--size-8);height:var(--size-8)}
`;var hue=Object.defineProperty,pue=Object.getOwnPropertyDescriptor,AU=(a,s,c,f)=>{for(var d=f>1?void 0:f?pue(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&hue(s,c,d),d};let B2=class extends xn{render(){return this.playerState.controlsState==="none"||!this.playerState.loading?null:xt`<div class="spinner"></div>`}};B2.styles=[fue,kn`
.spinner{width:var(--size-12);height:var(--size-12)}
`],AU([Rr({context:Nr,subscribe:!0})],B2.prototype,"playerState",2),B2=AU([Yn("ump-loading-spinner")],B2);const EU=kn`
:host{--border-radius-none:0;--border-radius-small:2px;--border-radius-medium:4px;--border-radius-large:6px;--border-radius-x-large:8px;--border-radius-circular:10000px;--font-size-base-100:0.625rem;--font-size-base-200:0.75rem;--font-size-base-300:0.875rem;--font-size-base-400:1rem;--font-size-base-500:1.25rem;--font-size-base-600:1.5rem;--font-size-hero-700:1.75rem;--font-size-hero-800:2rem;--font-size-hero-900:2.5rem;--font-size-hero-1000:2.25rem;--font-weight-regular:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--duration-ultra-fast:50ms;--duration-faster:100ms;--duration-fast:150ms;--duration-normal:200ms;--duration-gentle:250ms;--duration-slow:300ms;--duration-slower:400ms;--duration-ultra-slow:500ms;--curve-accelerate-max:cubic-bezier(0.9,0.1,1,0.2);--curve-accelerate-mid:cubic-bezier(1,0,1,1);--curve-accelerate-min:cubic-bezier(0.8,0,0.78,1);--curve-decelerate-max:cubic-bezier(0.1,0.9,0.2,1);--curve-decelerate-mid:cubic-bezier(0,0,0,1);--curve-decelerate-min:cubic-bezier(0.33,0,0.1,1);--curve-easy-ease-max:cubic-bezier(0.8,0,0.2,1);--curve-easy-ease:cubic-bezier(0.33,0,0.67,1);--curve-linear:cubic-bezier(0,0,1,1);--line-height-base-100:0.875rem;--line-height-base-200:1rem;--line-height-base-300:1.25rem;--line-height-base-400:1.375rem;--line-height-base-500:1.75rem;--line-height-base-600:2rem;--line-height-hero-700:2.25rem;--line-height-hero-800:2.5rem;--line-height-hero-900:3.125rem;--line-height-hero-1000:5.75rem;--spacing-none:0;--spacing-xxs:0.125rem;--spacing-xs:0.25rem;--spacing-s-nudge:0.375rem;--spacing-s:0.5rem;--spacing-m-nudge:0.625rem;--spacing-m:0.75rem;--spacing-l:1rem;--spacing-xl:1.25rem;--spacing-xxl:1.5rem;--spacing-xxxl:2rem;--spacing-xxxxl:2.25rem;--size-0:0px;--size-px:1px;--size-0-5:0.125rem;--size-1:0.25rem;--size-1-5:0.375rem;--size-2:0.5rem;--size-2-5:0.625rem;--size-3:0.75rem;--size-3-5:0.875rem;--size-4:1rem;--size-5:1.25rem;--size-6:1.5rem;--size-7:1.75rem;--size-8:2rem;--size-9:2.25rem;--size-10:2.5rem;--size-11:2.75rem;--size-12:3rem;--size-14:3.5rem;--size-16:4rem;--size-20:5rem;--size-24:6rem;--size-28:7rem;--size-32:8rem;--size-36:9rem;--size-40:10rem;--size-44:11rem;--size-48:12rem;--size-52:13rem;--size-56:14rem;--size-60:15rem;--size-64:16rem;--size-72:18rem;--size-80:20rem;--size-96:24rem;--size-100:30rem;--stroke-width-thin:1px;--stroke-width-thick:2px;--stroke-width-thicker:3px;--stroke-width-thickest:4px;--stroke-width-high-contrast:6px;--stroke-width-focus:var(--stroke-width-thick);--color-neutral-shadow-ambient:rgb(0 0 0/24%);--color-neutral-shadow-key:rgb(0 0 0/28%);--color-neutral-shadow-ambient-lighter:rgb(0 0 0/12%);--color-neutral-shadow-key-lighter:rgb(0 0 0/14%);--color-neutral-shadow-ambient-darker:rgb(0 0 0/40%);--color-neutral-shadow-key-darker:rgb(0 0 0/48%);--color-brand-shadow-ambient:rgb(0 0 0/30%);--color-brand-shadow-key:rgb(0 0 0/25%);--color-grey-2:#050505;--color-grey-4:#0a0a0a;--color-grey-6:#0f0f0f;--color-grey-8:#141414;--color-grey-10:#1a1a1a;--color-grey-12:#1f1f1f;--color-grey-14:#242424;--color-grey-16:#292929;--color-grey-18:#2e2e2e;--color-grey-20:#333;--color-grey-22:#383838;--color-grey-24:#3d3d3d;--color-grey-26:#424242;--color-grey-28:#474747;--color-grey-30:#4d4d4d;--color-grey-32:#525252;--color-grey-34:#575757;--color-grey-36:#5c5c5c;--color-grey-38:#616161;--color-grey-40:#666;--color-grey-42:#6b6b6b;--color-grey-44:#707070;--color-grey-46:#757575;--color-grey-48:#7a7a7a;--color-grey-50:#808080;--color-grey-52:#858585;--color-grey-54:#8a8a8a;--color-grey-56:#8f8f8f;--color-grey-58:#949494;--color-grey-60:#999;--color-grey-62:#9e9e9e;--color-grey-64:#a3a3a3;--color-grey-66:#a8a8a8;--color-grey-68:#adadad;--color-grey-70:#b3b3b3;--color-grey-72:#b8b8b8;--color-grey-74:#bdbdbd;--color-grey-76:#c2c2c2;--color-grey-78:#c7c7c7;--color-grey-80:#ccc;--color-grey-82:#d1d1d1;--color-grey-84:#d6d6d6;--color-grey-86:#dbdbdb;--color-grey-88:#e0e0e0;--color-grey-90:#e6e6e6;--color-grey-92:#ebebeb;--color-grey-94:#f0f0f0;--color-grey-96:#f5f5f5;--color-grey-98:#fafafa;--color-white:#fff;--color-white-alpha-5:rgb(255 255 255/5%);--color-white-alpha-10:rgb(255 255 255/10%);--color-white-alpha-20:rgb(255 255 255/20%);--color-white-alpha-30:rgb(255 255 255/30%);--color-white-alpha-40:rgb(255 255 255/40%);--color-white-alpha-50:rgb(255 255 255/50%);--color-white-alpha-60:rgb(255 255 255/60%);--color-white-alpha-70:rgb(255 255 255/70%);--color-white-alpha-80:rgb(255 255 255/80%);--color-white-alpha-90:rgb(255 255 255/90%);--color-black:#000;--color-black-alpha-5:rgb(0 0 0/5%);--color-black-alpha-10:rgb(0 0 0/10%);--color-black-alpha-20:rgb(0 0 0/20%);--color-black-alpha-30:rgb(0 0 0/30%);--color-black-alpha-40:rgb(0 0 0/40%);--color-black-alpha-50:rgb(0 0 0/50%);--color-black-alpha-60:rgb(0 0 0/60%);--color-black-alpha-70:rgb(0 0 0/70%);--color-black-alpha-80:rgb(0 0 0/80%);--color-black-alpha-90:rgb(0 0 0/90%);--color-grey-10-alpha-5:rgb(26 26 26/5%);--color-grey-10-alpha-10:rgb(26 26 26/10%);--color-grey-10-alpha-20:rgb(26 26 26/20%);--color-grey-10-alpha-30:rgb(26 26 26/30%);--color-grey-10-alpha-40:rgb(26 26 26/40%);--color-grey-10-alpha-50:rgb(26 26 26/50%);--color-grey-10-alpha-60:rgb(26 26 26/60%);--color-grey-10-alpha-70:rgb(26 26 26/70%);--color-grey-10-alpha-80:rgb(26 26 26/80%);--color-grey-10-alpha-90:rgb(26 26 26/90%);--color-grey-12-alpha-5:rgb(31 31 31/5%);--color-grey-12-alpha-10:rgb(31 31 31/10%);--color-grey-12-alpha-20:rgb(31 31 31/20%);--color-grey-12-alpha-30:rgb(31 31 31/30%);--color-grey-12-alpha-40:rgb(31 31 31/40%);--color-grey-12-alpha-50:rgb(31 31 31/50%);--color-grey-12-alpha-60:rgb(31 31 31/60%);--color-grey-12-alpha-70:rgb(31 31 31/70%);--color-grey-12-alpha-80:rgb(31 31 31/80%);--color-grey-12-alpha-90:rgb(31 31 31/90%);--color-grey-14-alpha-5:rgb(36 36 36/5%);--color-grey-14-alpha-10:rgb(36 36 36/10%);--color-grey-14-alpha-20:rgb(36 36 36/20%);--color-grey-14-alpha-30:rgb(36 36 36/30%);--color-grey-14-alpha-40:rgb(36 36 36/40%);--color-grey-14-alpha-50:rgb(36 36 36/50%);--color-grey-14-alpha-60:rgb(36 36 36/60%);--color-grey-14-alpha-70:rgb(36 36 36/70%);--color-grey-14-alpha-80:rgb(36 36 36/80%);--color-grey-14-alpha-90:rgb(36 36 36/90%);--color-brand-10:#061724;--color-brand-20:#082338;--color-brand-30:#0a2e4a;--color-brand-40:#0c3b5e;--color-brand-50:#0e4775;--color-brand-60:#0f548c;--color-brand-70:#115ea3;--color-brand-80:#0f6cbd;--color-brand-90:#2886de;--color-brand-100:#479ef5;--color-brand-110:#62abf5;--color-brand-120:#77b7f7;--color-brand-130:#96c6fa;--color-brand-140:#b4d6fa;--color-brand-150:#cfe4fa;--color-brand-160:#ebf3fc;--color-neutral-foreground-1:var(--color-white);--color-neutral-foreground-1-hover:var(--color-white);--color-neutral-foreground-1-pressed:var(--color-white);--color-neutral-foreground-1-selected:var(--color-white);--color-neutral-foreground-2:var(--color-grey-84);--color-neutral-foreground-2-hover:var(--color-white);--color-neutral-foreground-2-pressed:var(--color-white);--color-neutral-foreground-2-selected:var(--color-white);--color-neutral-foreground-2-brand-hover:var(--color-brand-100);--color-neutral-foreground-2-brand-pressed:var(--color-brand-90);--color-neutral-foreground-2-brand-selected:var(--color-brand-100);--color-neutral-foreground-3:var(--color-grey-68);--color-neutral-foreground-3-hover:var(--color-grey-84);--color-neutral-foreground-3-pressed:var(--color-grey-84);--color-neutral-foreground-3-selected:var(--color-grey-84);--color-neutral-foreground-3-brand-hover:var(--color-brand-100);--color-neutral-foreground-3-brand-pressed:var(--color-brand-90);--color-neutral-foreground-3-brand-selected:var(--color-brand-100);--color-neutral-foreground-4:var(--color-grey-60);--color-neutral-foreground-disabled:var(--color-grey-36);--color-neutral-foreground-inverted-disabled:var(--color-white-alpha-40);--color-brand-foreground-link:var(--color-brand-100);--color-brand-foreground-link-hover:var(--color-brand-110);--color-brand-foreground-link-pressed:var(--color-brand-90);--color-brand-foreground-link-selected:var(--color-brand-100);--color-neutral-foreground-2-link:var(--color-grey-84);--color-neutral-foreground-2-link-hover:var(--color-white);--color-neutral-foreground-2-link-pressed:var(--color-white);--color-neutral-foreground-2-link-selected:var(--color-white);--color-compound-brand-foreground-1:var(--color-brand-100);--color-compound-brand-foreground-1-hover:var(--color-brand-110);--color-compound-brand-foreground-1-pressed:var(--color-brand-90);--color-brand-foreground-1:var(--color-brand-100);--color-brand-foreground-2:var(--color-brand-110);--color-brand-foreground-2-hover:var(--color-brand-130);--color-brand-foreground-2-pressed:var(--color-brand-160);--color-neutral-foreground-1-static:var(--color-grey-14);--color-neutral-foreground-static-inverted:var(--color-white);--color-neutral-foreground-inverted:var(--color-grey-14);--color-neutral-foreground-inverted-hover:var(--color-grey-14);--color-neutral-foreground-inverted-pressed:var(--color-grey-14);--color-neutral-foreground-inverted-selected:var(--color-grey-14);--color-neutral-foreground-inverted-2:var(--color-grey-14);--color-neutral-foreground-on-brand:var(--color-white);--color-neutral-foreground-inverted-link:var(--color-white);--color-neutral-foreground-inverted-link-hover:var(--color-white);--color-neutral-foreground-inverted-link-pressed:var(--color-white);--color-neutral-foreground-inverted-link-selected:var(--color-white);--color-brand-foreground-inverted:var(--color-brand-80);--color-brand-foreground-inverted-hover:var(--color-brand-70);--color-brand-foreground-inverted-pressed:var(--color-brand-60);--color-brand-foreground-on-light:var(--color-brand-80);--color-brand-foreground-on-light-hover:var(--color-brand-70);--color-brand-foreground-on-light-pressed:var(--color-brand-50);--color-brand-foreground-on-light-selected:var(--color-brand-60);--color-neutral-background-1:var(--color-grey-16);--color-neutral-background-1-hover:var(--color-grey-24);--color-neutral-background-1-pressed:var(--color-grey-12);--color-neutral-background-1-selected:var(--color-grey-22);--color-neutral-background-2:var(--color-grey-12);--color-neutral-background-2-hover:var(--color-grey-20);--color-neutral-background-2-pressed:var(--color-grey-8);--color-neutral-background-2-selected:var(--color-grey-18);--color-neutral-background-3:var(--color-grey-8);--color-neutral-background-3-hover:var(--color-grey-16);--color-neutral-background-3-pressed:var(--color-grey-4);--color-neutral-background-3-selected:var(--color-grey-14);--color-neutral-background-4:var(--color-grey-4);--color-neutral-background-4-hover:var(--color-grey-12);--color-neutral-background-4-pressed:var(--color-black);--color-neutral-background-4-selected:var(--color-grey-10);--color-neutral-background-5:var(--color-black);--color-neutral-background-5-hover:var(--color-grey-8);--color-neutral-background-5-pressed:var(--color-grey-2);--color-neutral-background-5-selected:var(--color-grey-6);--color-neutral-background-6:var(--color-grey-20);--color-neutral-background-inverted:var(--color-white);--color-neutral-background-static:var(--color-grey-24);--color-neutral-background-alpha:var(--color-grey-10-alpha-50);--color-neutral-background-alpha-2:var(--color-grey-12-alpha-70);--color-neutral-background-disabled:var(--color-grey-8);--color-neutral-background-inverted-disabled:var(--color-white-alpha-10);--color-subtle-background:transparent;--color-subtle-background-hover:var(--color-grey-22);--color-subtle-background-pressed:var(--color-grey-18);--color-subtle-background-selected:var(--color-grey-20);--color-subtle-background-light-alpha-hover:var(--color-grey-14-alpha-80);--color-subtle-background-light-alpha-pressed:var(--color-grey-14-alpha-50);--color-subtle-background-light-alpha-selected:transparent;--color-subtle-background-inverted:transparent;--color-subtle-background-inverted-hover:var(--color-black-alpha-10);--color-subtle-background-inverted-pressed:var(--color-black-alpha-30);--color-subtle-background-inverted-selected:var(--color-black-alpha-20);--color-transparent-background:transparent;--color-transparent-background-hover:transparent;--color-transparent-background-pressed:transparent;--color-transparent-background-selected:transparent;--color-background-overlay:var(--color-black-alpha-50);--color-brand-background:var(--color-brand-70);--color-brand-background-hover:var(--color-brand-80);--color-brand-background-pressed:var(--color-brand-40);--color-brand-background-selected:var(--color-brand-60);--color-compound-brand-background:var(--color-brand-100);--color-compound-brand-background-hover:var(--color-brand-110);--color-compound-brand-background-pressed:var(--color-brand-90);--color-brand-background-static:var(--color-brand-80);--color-brand-background-2:var(--color-brand-20);--color-brand-background-2-hover:var(--color-brand-40);--color-brand-background-2-pressed:var(--color-brand-10);--color-brand-background-3-static:var(--color-brand-60);--color-brand-background-4-static:var(--color-brand-40);--color-brand-background-inverted:var(--color-white);--color-brand-background-inverted-hover:var(--color-brand-160);--color-brand-background-inverted-pressed:var(--color-brand-140);--color-brand-background-inverted-selected:var(--color-brand-150);--color-neutral-card-background:var(--color-grey-20);--color-neutral-card-background-hover:var(--color-grey-24);--color-neutral-card-background-pressed:var(--color-grey-18);--color-neutral-card-background-selected:var(--color-grey-22);--color-neutral-card-background-disabled:var(--color-grey-8);--color-neutral-stroke-accessible:var(--color-grey-68);--color-neutral-stroke-accessible-hover:var(--color-grey-74);--color-neutral-stroke-accessible-pressed:var(--color-grey-70);--color-neutral-stroke-accessible-selected:var(--color-brand-100);--color-neutral-stroke-1:var(--color-grey-40);--color-neutral-stroke-1-hover:var(--color-grey-46);--color-neutral-stroke-1-pressed:var(--color-grey-42);--color-neutral-stroke-1-selected:var(--color-grey-44);--color-neutral-stroke-2:var(--color-grey-32);--color-neutral-stroke-3:var(--color-grey-24);--color-neutral-stroke-subtle:var(--color-grey-4);--color-neutral-stroke-on-brand:var(--color-grey-16);--color-neutral-stroke-on-brand-2:var(--color-white);--color-neutral-stroke-on-brand-2-hover:var(--color-white);--color-neutral-stroke-on-brand-2-pressed:var(--color-white);--color-neutral-stroke-on-brand-2-selected:var(--color-white);--color-brand-stroke-1:var(--color-brand-100);--color-brand-stroke-2:var(--color-brand-50);--color-brand-stroke-2-hover:var(--color-brand-50);--color-brand-stroke-2-pressed:var(--color-brand-30);--color-brand-stroke-2-contrast:var(--color-brand-50);--color-compound-brand-stroke:var(--color-brand-100);--color-compound-brand-stroke-hover:var(--color-brand-110);--color-compound-brand-stroke-pressed:var(--color-brand-90);--color-neutral-stroke-disabled:var(--color-grey-26);--color-neutral-stroke-inverted-disabled:var(--color-white-alpha-40);--color-transparent-stroke:transparent;--color-transparent-stroke-interactive:transparent;--color-transparent-stroke-disabled:transparent;--color-neutral-stroke-alpha:var(--color-white-alpha-10);--color-neutral-stroke-alpha-2:var(--color-white-alpha-20);--color-stroke-focus-1:var(--color-black);--color-stroke-focus-2:var(--color-white);--shadow-2:0 0 2px var(--color-neutral-shadow-ambient),0 1px 2px var(--color-neutral-shadow-key);--shadow-4:0 0 2px var(--color-neutral-shadow-ambient),0 2px 4px var(--color-neutral-shadow-key);--shadow-8:0 0 2px var(--color-neutral-shadow-ambient),0 4px 8px var(--color-neutral-shadow-key);--shadow-16:0 0 2px var(--color-neutral-shadow-ambient),0 8px 16px var(--color-neutral-shadow-key);--shadow-28:0 0 8px var(--color-neutral-shadow-ambient),0 14px 28px var(--color-neutral-shadow-key);--shadow-64:0 0 8px var(--color-neutral-shadow-ambient),0 32px 64px var(--color-neutral-shadow-key);--shadow-2-brand:0 0 2px var(--color-brand-shadow-ambient),0 1px 2px var(--color-brand-shadow-key);--shadow-4-brand:0 0 2px var(--color-brand-shadow-ambient),0 2px 4px var(--color-brand-shadow-key);--shadow-8-brand:0 0 2px var(--color-brand-shadow-ambient),0 4px 8px var(--color-brand-shadow-key);--shadow-16-brand:0 0 2px var(--color-brand-shadow-ambient),0 8px 16px var(--color-brand-shadow-key);--shadow-28-brand:0 0 8px var(--color-brand-shadow-ambient),0 14px 28px var(--color-brand-shadow-key);--shadow-64-brand:0 0 8px var(--color-brand-shadow-ambient),0 32px 64px var(--color-brand-shadow-key);--font-family-default:'Segoe UI','Segoe UI Web (West European)',-apple-system,blinkmacsystemfont,roboto,'Helvetica Neue',sans-serif}@media (forced-colors:active){:host{--stroke-width-focus:4px}}
`,gue='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M16 13a1 1 0 0 1 1 1v9a1 1 0 1 1-2 0v-9a1 1 0 0 1 1-1m0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M2 16a14 14 0 1 1 28 0 14 14 0 0 1-28 0M16 4a12 12 0 1 0 0 24 12 12 0 0 0 0-24"/></svg>';var mue=Object.getOwnPropertyDescriptor,vue=(a,s,c,f)=>{for(var d=f>1?void 0:f?mue(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=y(d)||d);return d};let zE=class extends xn{render(){return xt`
      <div class="dialog">
        <div class="header-icon">${sn(gue)}</div>

        <div class="content">
          <hgroup>
            <h2>${ue("You may not access this content")}</h2>
          </hgroup>
        </div>
      </div>
    `}};zE.styles=[us,k1,kn`
:host{display:flex;align-items:center;justify-content:center;background-color:var(--color-neutral-background-2)}.dialog{padding:var(--spacing-xxxl) var(--spacing-xxxl);display:flex;align-items:center;gap:var(--spacing-xl);z-index:10;margin:var(--spacing-xxl);max-width:var(--size-100)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxl);padding-right:var(--spacing-xxxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-130);fill:currentcolor}.header-icon svg{display:block}h2{margin:0;padding:0}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}p{margin:0;padding:0}.select-container{display:flex;gap:var(--spacing-m)}
`],zE=vue([Yn("ump-age-gate-restricted")],zE);const yue='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M9 9a7 7 0 1 1 14 0A7 7 0 0 1 9 9m7-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12m.38 15H7.5A3.5 3.5 0 0 0 4 21.5v.67C4 24.32 6.77 30 16 30q.64 0 1.24-.04-.47-.45-.87-.96H16c-8.77 0-11-5.32-11-6.83v-.67A2.5 2.5 0 0 1 7.5 19h8.2q.3-.52.68-1m7.12-2a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15m4.53 4.72c.3.3.3.77 0 1.06l-5.25 5.25c-.3.3-.77.3-1.06 0l-2.5-2.5a.75.75 0 1 1 1.06-1.06l1.97 1.97 4.72-4.72c.3-.3.77-.3 1.06 0"/></svg>',bue=kn`
.select{--svg:url('data:image/svg+xml;utf8,${xS(encodeURIComponent('<svg width="16" height="16" fill="none" stroke="#666" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z" fill="#ffffff"/></svg>'))}');position:relative;display:inline-flex;align-items:center;gap:var(--spacing-s-nudge);margin:0;-webkit-appearance:none;appearance:none;padding:var(--spacing-s) var(--spacing-xxxl) var(--spacing-s) var(--spacing-l);color:var(--color-neutral-foreground-1);transition-duration:var(--duration-faster);transition-property:background,color;font-size:var(--font-size-base-400);transition-timing-function:var(--curve-easy-ease);cursor:pointer;-webkit-user-select:none;user-select:none;background-color:var(--color-neutral-background-1);border-radius:var(--border-radius-medium);border:none;background-image:var(--svg);background-repeat:no-repeat;background-position-y:center;background-position-x:calc(100% - 8px);font-family:var(--font-family-default)}.select:focus{outline:none;border-bottom:solid var(--stroke-width-thick) var(--color-brand-stroke-1)}.select:focus-within{outline:none;border-bottom:solid var(--stroke-width-thick) var(--color-brand-stroke-1)}.select.focus-always:focus,.select.focus-default:focus-visible{outline:var(--stroke-width-focus) solid var(--color-stroke-focus-2)}.select:active{outline:none}.select-outline{border:solid var(--stroke-width-thick) var(--color-neutral-stroke-1)}.select-outline.focus-always:focus,.select-outline.focus-default:focus-visible{border:solid var(--stroke-width-thick) var(--color-neutral-stroke-1)}
`;function wue(a){const s=new Date,c=new Date(a);c.setFullYear(s.getFullYear());let f=s.getFullYear()-a.getFullYear();return s<c&&f--,f}function HE(a,s){return Array.from({length:s-a+1},(c,f)=>a+f)}var xue=Object.defineProperty,kue=Object.getOwnPropertyDescriptor,xv=(a,s,c,f)=>{for(var d=f>1?void 0:f?kue(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&xue(s,c,d),d};const Tue=HE(1,12),Sue=HE(1,31),Cue=HE(1900,new Date().getFullYear()).reverse();let Qc=class extends xn{render(){return xt`
    <div class="dialog">
      <div class="header-icon">${sn(yue)}</div>

        <div class="content">
          <hgroup>
            <h2>${ue("Please enter your date of birth")}</h2>
          </hgroup>

          <div class="select-container">
            <div class="select-wrapper">
              <label for="month">${ue("Month")}</label>
              <select
                class=${st({...ht(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${ue("Month")}"
                data-testid="month"
                id="month"
                >
                <option disabled selected value=''></option>
                ${Tue.map(a=>xt`<option value=${a}>${a}</option>`)}
              </select>
            </div>

            <div class="select-wrapper">
              <label for="day">${ue("Day")}</label>
              <select
                class=${st({...ht(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${ue("Day")}"
                data-testid="day"
                id="day"
                >
                <option disabled selected value=''></option>
                ${Sue.map(a=>xt`<option value=${a}>${a}</option>`)}
              </select>
            </div>

            <div class="select-wrapper">
              <label for="year">${ue("Year")}</label>
              <select
                class=${st({...ht(this.playerState),select:!0,"select-outline":!0})}
                aria-label="${ue("Year")}"
                data-testid="year"
                id="year"
                >
                <option disabled selected value=''></option>
                ${Cue.map(a=>xt`<option value=${a}>${a}</option>`)}
              </select>
            </div>
          </div>

          <button
            type="button"
            class=${st({btn:!0,"btn-s":!0,"btn-brand":!0,...ht(this.playerState)})}
            data-testid="age-gate-submit"
          @click=${this.submitButtonClicked}>${ue("Submit")}</button>
        </div>
      </div>
    </div>
    `}submitButtonClicked(){const a=this.monthSelect.value,s=this.daySelect.value,c=this.yearSelect.value;if(!a||!s||!c)return;const f=wue(new Date(Number(c),Number(a)-1,Number(s)));this.dispatchEvent(new Mt("user-age-set-interaction",f))}};Qc.styles=[us,bue,k1,kn`
:host{display:flex;align-items:center;justify-content:center}.dialog{padding:var(--spacing-xxl) var(--spacing-xxxl);display:flex;align-items:flex-start;gap:var(--spacing-xl);z-index:10;margin:var(--spacing-xxl);max-width:var(--size-100)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxxl);padding-right:var(--spacing-xxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-130);fill:currentcolor}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}hgroup h2{margin:0;padding:0}hgroup p{margin:0;padding:0}.select-container{display:flex;flex-direction:row;gap:var(--spacing-m)}.select-wrapper{display:flex;flex-direction:column}.select{background-color:var(--color-brand-30)}.select-outline{border-color:var(--color-brand-150);border-width:var(--stroke-width-thin)}.select-outline.default:focus-visible,.select-outline.focus-always:focus{border-width:var(--stroke-width-thin)}
`],xv([Tn("#month")],Qc.prototype,"monthSelect",2),xv([Tn("#day")],Qc.prototype,"daySelect",2),xv([Tn("#year")],Qc.prototype,"yearSelect",2),xv([Rr({context:Nr,subscribe:!0})],Qc.prototype,"playerState",2),Qc=xv([Yn("ump-age-gate-verification")],Qc);const Aue='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M12.07 4.3a4.5 4.5 0 0 1 7.86 0l9.5 17c1.67 3-.5 6.7-3.94 6.7H6.51a4.5 4.5 0 0 1-3.93-6.7zm6.11.98a2.5 2.5 0 0 0-4.36 0l-9.5 17A2.5 2.5 0 0 0 6.51 26h18.98a2.5 2.5 0 0 0 2.19-3.72zM16 19.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M16 9a1 1 0 0 1 1 1v6.5a1 1 0 0 1-2 0V10a1 1 0 0 1 1-1"/></svg>';var Eue=Object.defineProperty,Iue=Object.getOwnPropertyDescriptor,IU=(a,s,c,f)=>{for(var d=f>1?void 0:f?Iue(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&Eue(s,c,d),d};let V2=class extends xn{render(){return xt`
      <div
        class="dialog message-container"
        data-testid="error-message"
        tabindex="0"
      >
        <div class="header-icon">${sn(Aue)}</div>

        <div class="content">
          <hgroup>
            <h2>${ue("Playback Error")}</h2>
            <p>${this.playerState.error}</p>
          </hgroup>
        </div>
      </div>
    `}};V2.styles=[us,k1,kn`
:host{display:flex;align-items:center;justify-content:center;background-color:var(--color-brand-10)}.message-container{display:flex;align-items:flex-start;gap:var(--spacing-xl);padding:var(--spacing-xxxl) var(--spacing-xxxl)}.content{display:flex;align-items:flex-start;flex-direction:column;gap:var(--spacing-xxl);padding-right:var(--spacing-xxxl)}.header-icon{padding:var(--spacing-s);color:var(--color-brand-foreground-1);fill:currentcolor}h2{margin:0;padding:0}hgroup{display:flex;flex-direction:column;gap:var(--spacing-xs)}p{margin:0;padding:0}.select-container{display:flex;gap:var(--spacing-m)}
`],IU([Rr({context:Nr,subscribe:!0})],V2.prototype,"playerState",2),V2=IU([Yn("ump-error-modal")],V2);var Mue=Object.defineProperty,Pue=Object.getOwnPropertyDescriptor,MU=(a,s,c,f)=>{for(var d=f>1?void 0:f?Pue(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&Mue(s,c,d),d};let $2=class extends xn{render(){return this.playerState.error?xt`<ump-error-modal class="modal"></ump-error-modal>`:this.playerState.ageGate==="waiting"?xt`<div
        data-testid="age-gate-overlay"
        class="overlay modal"
      ></div>`:this.playerState.ageGate==="verification"?xt`<ump-age-gate-verification
        class="modal"
      ></ump-age-gate-verification> `:this.playerState.ageGate==="denied"?xt`<ump-age-gate-restricted
        class="modal"
      ></ump-age-gate-restricted>`:null}updated(a){var s;super.updated(a);const c=!((s=this.shadowRoot)!=null&&s.children.length);this.ariaHidden=c.toString()}};$2.styles=[EU,kn`
:host([aria-hidden='true']){display:none}.overlay{background-color:var(--color-black)}.modal{position:absolute;inset:0;width:100%;height:100%;text-align:left}ump-age-gate-verification,ump-age-gate-restricted{background-color:var(--color-brand-10)}
`],MU([Rr({context:Nr,subscribe:!0})],$2.prototype,"playerState",2),$2=MU([Yn("ump-modals")],$2);const _ue=new Set(["http:","https:","blob:"]);function z2(a){return a.map(s=>({...s,src:s.src.trim(),type:PR[s.type]??s.type})).filter(Due).sort((s,c)=>{let f=MR.indexOf(s.type)-MR.indexOf(c.type);return f===0&&s.type==="video/mp4"&&(f=p1.indexOf(s.quality)-p1.indexOf(c.quality)),f}).filter(Lue)}function Due(a){let s="";try{s=new URL(a.src,window.location.href).protocol}catch{return!1}return _ue.has(s.toLowerCase())}function Lue(a){return document.createElement("video").canPlayType(a.type)!=""?!0:"ManagedMediaSource"in window||"MediaSource"in window}function PU(a){const s=a.map(c=>({...c,ccType:sY[c.ccType]??c.ccType})).reduce((c,f)=>(c[f.locale]||(c[f.locale]=[]),c[f.locale].push(f),c),{});return Object.values(s).map(c=>c.find(f=>f.ccType==="text/vtt")??c[0])}function qE(a){let s=!1,c;return(...f)=>(s||(c=a(...f),s=!0),c)}const Rue=qE(async()=>{try{const a=document.createElement("video"),s=a.volume;a.volume=s/2+.1;const c=a.volume;return s!==c&&await new Promise(f=>setTimeout(f,1)),s!==a.volume}catch{return!1}}),Nue=qE(()=>typeof document.createElement("div").requestFullscreen=="function");function Oue(a){return"webkitEnterFullscreen"in a&&"webkitSupportsFullscreen"in a&&typeof a.webkitEnterFullscreen=="function"&&a.webkitSupportsFullscreen}function jue(a,s){return Object.fromEntries(Object.entries(a).filter(([c,f])=>!s(c,f)))}function Uue(a){return jue(a,(s,c)=>c==null)}on.polyfill.installAll();const GE=["abort","canplay","canplaythrough","complete","cuechange","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"];class Fue extends on.Player{constructor(s,c,f){super(),this.videoElementEventListeners={},this.plugins=[],this.pluginOnDestroy=[],this.loadRequested=!1,this._autoplay=!1,this.captionsEnabled=!1,this.onFullscreenChange=()=>{this.dispatchEvent(new on.util.FakeEvent("fullscreenchanged"))},this.options={...ES,...Uue(s)},s.autoplay&&s.muted!==!1&&(this.options.muted=!0),this.videoElement=c,this.lastSelectedVolume=c.volume,this.captionDisplay=f,this.configure({streaming:{bufferBehind:300,ignoreTextStreamFailures:!0}})}async initialize(){this.plugins.forEach(s=>this.pluginOnDestroy.push(s(this))),this.setVideoContainer(this.captionDisplay.captionContainer),this.forwardVideoElementEvents(),this.loop=this.options.loop,this.muted=this.options.muted,this.options.hidePosterImage||(this.poster=this.options.poster),this.videoElement.disablePictureInPicture=!0,this.videoElement.playsInline=!0,await this.attach(this.videoElement)}async destroy(){Object.entries(this.videoElementEventListeners).forEach(([s,c])=>this.videoElement.removeEventListener(s,c)),this.pluginOnDestroy.forEach(s=>s()),this.removeFullscreenListener(),await super.destroy()}load(s,c,f){return f===PR.MP4&&(this.adaptiveBitrate=!1),super.load(s,c,f)}async loadCaptions(s=this.options.ccFiles){try{for(const c of PU(s))await this.addTextTrackAsync(c.url,c.locale,"captions",c.ccType)}catch(c){console.error(`Failed to load captions: ${c}`),this.dispatchUmpError({severity:on.util.Error.Severity.RECOVERABLE,umpErrorType:"Error loading captions",umpErrorDescription:JSON.stringify(c)})}}async play(){if(this.getLoadMode()===on.Player.LoadMode.NOT_LOADED){this.addEventListener("loadsourcescomplete",this.handleLoadSourcesComplete),this.loadRequest();return}return this.videoElement.play()}pause(){if(!this.isFullyLoaded()){this.removeEventListener("loadsourcescomplete",this.handleLoadSourcesComplete);return}return this.videoElement.pause()}loadRequest(){this.loadRequested||(this.loadRequested=!0,this.dispatchEvent(new on.util.FakeEvent("loadsourcesrequest")))}handleLoadSourcesComplete(){this.videoElement.play()}requestFullscreen(s){this.removeFullscreenListener(),Nue()?(this.fullscreenElement=s,s.addEventListener("fullscreenchange",this.onFullscreenChange),s.requestFullscreen({navigationUI:"hide"})):Oue(this.videoElement)&&this.videoElement.webkitEnterFullscreen()}exitFullscreen(){document.exitFullscreen()}get fullscreen(){return document.fullscreenElement!==null}get ended(){return this.videoElement.ended}get paused(){return this.videoElement.paused}get duration(){return this.videoElement.duration}get currentTime(){return this.videoElement.currentTime}set currentTime(s){this.videoElement.currentTime=s}get loop(){return this.videoElement.loop}set loop(s){this.videoElement.loop=s}get autoplay(){return this._autoplay}set autoplay(s){this._autoplay=s}get muted(){return this.volume===0?!0:this.videoElement.muted}set muted(s){this.videoElement.muted=s,this.videoElement.volume=s?0:this.lastSelectedVolume}get playbackRate(){return this.getPlaybackRate()}set playbackRate(s){this.videoElement.playbackRate=s}get poster(){return this.videoElement.poster}set poster(s){const c=new Image;c.addEventListener("load",()=>{this.dispatchEvent(new on.util.FakeEvent("playerposterloadcomplete"))}),c.src=s,this.videoElement.poster=c.src}get volume(){return this.videoElement.volume}set volume(s){this.videoElement.muted=!1,this.videoElement.volume=s}get adaptiveBitrate(){return this.getConfiguration().abr.enabled}set adaptiveBitrate(s){this.configure({abr:{enabled:s}})}get videoQualities(){if(this.getManifestType()){const s=this.filterRelatedAdaptiveTracks();return s.length===0?[]:[{videoId:vf.videoId,label:ue(vf.label)},...s]}else return this.filterStaticMp4Tracks()}get activeVideoId(){var s,c;if(this.getManifestType()){const f=(s=this.getVariantTracks().find(d=>d.active))==null?void 0:s.videoId;if(f)return f}else{const f=this.getAssetUri();return(c=this.options.sources.find(d=>d.src===f))==null?void 0:c.quality}}get buffered(){const s=this.videoElement,c=[];for(let f=0;f<s.buffered.length;f++)c.push({start:s.buffered.start(f),end:s.buffered.end(f)});return c}dispatchUmpError(s){this.dispatchEvent(new on.util.FakeEvent("error",new Map().set("detail",s)))}saveLastSelectedVolume(s){s!==0&&(this.lastSelectedVolume=s)}async selectVideoQuality(s){if(this.getManifestType()){if(s.videoId===vf.videoId){this.adaptiveBitrate=!0;return}this.adaptiveBitrate=!1;const c=this.getVariantTracks().filter(f=>f.audioId===this.activeAudioTrackId).find(f=>f.videoId===s.videoId);if(!c)throw new on.util.Error(on.util.Error.Severity.RECOVERABLE,on.util.Error.Category.MEDIA,on.util.Error.Code.VIDEO_ERROR);this.adaptiveBitrate=!1,this.selectVariantTrack(c,!0)}else{const c=z2(this.options.sources).find(v=>v.quality===s.videoId);if(!c)throw new on.util.Error(on.util.Error.Severity.RECOVERABLE,on.util.Error.Category.MEDIA,on.util.Error.Code.VIDEO_ERROR);const f=!this.paused,d=this.activeCaptionTrack;await this.load(c.src,this.videoElement.currentTime,c.type),f&&this.play(),await this.loadCaptions(),this.captionTrack=d}}get umpAudioTracks(){const s=this.getAudioTracks(),c=s.map(d=>d.originalLanguage??d.language),f=b1(c);return s.map((d,v)=>({displayName:f[c[v]],isDescriptiveAudio:this.isDescriptiveAudio(d.roles),shakaAudioTrack:d})).sort((d,v)=>d.displayName.localeCompare(v.displayName))}get activeAudioTrackId(){var s;const c=(s=this.getVariantTracks().find(f=>f.active))==null?void 0:s.audioId;if(c)return c}set audioTrack(s){this.selectAudioTrack(s)}get captionTracks(){const s=b1(this.getTextTracks().map(f=>f.language)),c=this.getTextTracks().map(f=>({captionId:f.id,language:f.language,label:s[f.language]})).sort((f,d)=>f.label.localeCompare(d.label));return[lc,...c]}get activeCaptionTrack(){var s;if(!this.captionsEnabled)return lc;const c=(s=this.getTextTracks().find(f=>f.active))==null?void 0:s.id;return this.captionTracks.find(f=>f.captionId===c)??lc}get activeCaptionTrackId(){return this.activeCaptionTrack.captionId}set captionTrack(s){if(s.captionId===lc.captionId){this.captionsEnabled=!1,this.selectTextTrack(null);return}this.captionsEnabled=!0;const c=this.getTextTracks().find(f=>f.language===s.language);this.selectTextTrack(c??null)}addPlugin(s){this.plugins.push(s)}addPlugins(...s){s.forEach(c=>this.addPlugin(c))}addEventListener(s,c,f){f?.once===!0?Bue(this,s,c):super.addEventListener(s,c,f)}forwardVideoElementEvents(){GE.forEach(s=>{const c=()=>this.dispatchEvent(new on.util.FakeEvent(s));this.videoElementEventListeners[s]=c,this.videoElement.addEventListener(s,c)})}filterStaticMp4Tracks(){return z2(this.options.sources).filter(s=>s.type==="video/mp4").sort((s,c)=>p1.indexOf(s.quality)-p1.indexOf(c.quality)).map(s=>({videoId:s.quality,label:s.quality}))}filterRelatedAdaptiveTracks(){const s=this.getVariantTracks(),c=s.find(f=>f.active);return c?s.filter(f=>f.audioId===c.audioId).sort((f,d)=>d.height===f.height||f.height==null||d.height==null?d.bandwidth-f.bandwidth:d.height-f.height).reduce((f,d)=>{const v=new Set(f.map(g=>g.height??g.bandwidth)),y=d.height??d.bandwidth;return v.has(y)||f.push(d),f},[]).map(f=>({videoId:f.videoId,label:f.height?f.height.toString():`${(f.bandwidth/1e6).toFixed(2)} Mbps`})):[]}removeFullscreenListener(){this.fullscreenElement&&this.fullscreenElement.removeEventListener("fullscreenchange",this.onFullscreenChange)}isDescriptiveAudio(s){return s.some(c=>[g1.dashIdentifier,g1.hlsIdentifier].includes(c))}}function Bue(a,s,c){const f=d=>{a.removeEventListener(s,f),c(d)};a.addEventListener(s,f)}class Vue{constructor(s,c){this.prefix=s,this.store=c}getItem(s){return this.store.getItem(this.prefixed(s))}getNumber(s){const c=this.getItem(s);if(c===null)return null;const f=Number(c);return isNaN(f)?null:f}setNumber(s,c){this.setItem(s,c.toString())}setItem(s,c){this.store.setItem(this.prefixed(s),c)}removeItem(s){this.store.removeItem(this.prefixed(s))}prefixed(s){return`${this.prefix}:${s}`}}const _U=new Vue(_R,window.sessionStorage),KE="agegateupdate",WE="UserAge";function $ue(a,s){return c=>{var f,d;if(c.options.ageGate===!1)return()=>{};let v=typeof c.options.ageGate=="object"&&typeof((f=c.options.ageGate)==null?void 0:f.minimumAge)=="number"?c.options.ageGate.minimumAge:null,y=typeof c.options.ageGate=="object"&&typeof((d=c.options.ageGate)==null?void 0:d.userAge)=="number"?c.options.ageGate.userAge:_U.getNumber(WE),g=!1;C();function C(){if(s.value.ageGate==="verified"){O();return}return v===0?E("verified"):v===null?E("waiting"):y===null?E("verification"):y>=v?E("verified"):E("denied")}function E(Z){const Q=s.value.ageGate;s.setValue({...s.value,ageGate:Z}),a.updateComplete.then(()=>{g&&Q==="verification"&&s.value.ageGate==="verified"&&a.focusPlayButton()})}function I(Z){v=Z.detail,C()}function D(Z){y=Z.detail,C(),zue(y)}function L(Z){g=!0,D(Z)}function F(Z){y=Z.detail,C(),window.removeEventListener(KE,F)}function O(){$.removeAllListeners(),Y.removeAllListeners()}function X(Z){if(Z.key!==`${_R}:${WE}`||!Z.newValue)return;const Q=Number(Z.newValue);isNaN(Q)||(y=Q,C(),window.removeEventListener("storage",X))}const $=Lg(window),Y=Lg(a);return $.addEventListener(KE,F),$.addEventListener("storage",X),Y.addEventListener("minimum-age-set",I),Y.addEventListener("user-age-set",D),Y.addEventListener("user-age-set-interaction",L),()=>{O()}}}function zue(a){_U.setNumber(WE,a),window.dispatchEvent(new Mt(KE,a))}const XE=new EventTarget;let YE=null;function Hue(a){a!==YE&&(YE=a,XE.dispatchEvent(new Event("change")))}function DU(){return YE}function que(a,s){return c=>{if(!c.options.autoplay)return()=>{};let f=!1;const d=window.matchMedia("(prefers-reduced-motion: reduce)"),v={threshold:c.options.percentage/100},y=new IntersectionObserver(O=>{F(O[0]),g()&&(O[0].isIntersecting?c.paused&&(f||(c.dispatchEvent(new on.util.FakeEvent("umpplay",new Map().set("detail",{autoplay:!0}))),f=!0),c.play()):c.paused||c.pause())},v);function g(){if(typeof s.value.ageGate=="string"&&s.value.ageGate!=="verified")return!1;const O=DU();return typeof O=="boolean"?O:!d.matches}function C(){c.autoplay=g()}function E(){C()}function I(){C()}function D(){C(),d.addEventListener("change",E),XE.addEventListener("change",I),a.addEventListener("click",L,{once:!0}),c.addEventListener("ended",L,{once:!0}),y.observe(a)}function L(){c.autoplay=!1,y.disconnect(),d.removeEventListener("change",E),XE.removeEventListener("change",I),a.removeEventListener("click",L)}const F=qE(O=>{(!c.autoplay||!O.isIntersecting)&&(c.options.hideControls==null&&s.setValue({...s.value,controlsState:"bigplaybutton"}),c.options.hidePosterImage||(c.poster=c.options.poster))});return D(),L}}function Gue(a){return()=>{async function s(){const c=await Rue();a.setValue({...a.value,showVolumeSlider:c})}return s(),()=>{}}}function Kue(a,s){return c=>{var f;function d(y){a.dir=y,s.setValue({...s.value,dir:y})}const v=(f=document.documentElement.getAttribute("dir"))==null?void 0:f.toLowerCase();return d(c.options.dir==="ltr"||c.options.dir==="rtl"?c.options.dir:v==="ltr"||v==="rtl"?v:"ltr"),()=>{}}}function Wue(a){return s=>(a.setValue({...a.value,disableKeyboardEvents:s.options.disableKeyboardEvents}),()=>{})}function Xue(a,s){return c=>{if(!c.options.showDownloadMenu)return s.setValue({...s.value,showDownloadMenu:!1}),()=>{};const f=Lg(a);f.addEventListener("download-file-clicked",d),f.addEventListener("download-files-updated",v),c.options.downloadableFiles.length>0&&y(c.options.downloadableFiles);async function d(g){let C=null;try{const{url:E}=g.detail,I=await fetch(E);if(!I.ok)throw new Error(`Failed to download file: ${I.url} ${I.statusText}`);const D=await I.blob();C=document.createElement("a"),C.href=URL.createObjectURL(D);const L=E.split("/").pop();C.download=L,document.body.appendChild(C),C.dispatchEvent(new MouseEvent("click",{bubbles:!1}))}catch(E){console.error(`Failed to download file: ${E}`)}finally{C!=null&&C.href&&(URL.revokeObjectURL(C.href),document.body.removeChild(C))}}function v(g){y(g.detail)}function y(g){const C=g.filter(F=>F.url),E=b1(C.filter(F=>F.mediaType==="video").map(F=>F.locale)),I=C.filter(F=>F.mediaType==="video").map(F=>({...F,lang:F.locale,locale:E[F.locale]})).sort((F,O)=>F.locale.localeCompare(O.locale)),D=b1(C.filter(F=>F.mediaType==="transcript").map(F=>F.locale)),L=C.filter(F=>F.mediaType==="transcript").map(F=>({...F,lang:F.locale,locale:D[F.locale]})).sort((F,O)=>F.locale.localeCompare(O.locale));s.setValue({...s.value,downloadableVideoFiles:I,downloadableTranscriptFiles:L})}return()=>{f.removeAllListeners()}}}function Yue(a){return s=>{const c={abrstatuschanged:()=>Zc(a,s),adaptation:()=>Zc(a,s),audiotrackschanged:()=>{JE(a,s)},loaded:()=>{JE(a,s),Zc(a,s),LU(a,s)},mediaqualitychanged:()=>Zc(a,s),trackschanged:()=>JE(a,s),textchanged:()=>Zc(a,s),texttrackvisibility:()=>Zc(a,s),timeupdate:()=>Que(a,s),variantchanged:()=>Zc(a,s),volumechange:()=>LU(a,s),ended:()=>Zue(a),playing:()=>ele(a),pause:()=>tle(a),seeking:()=>nle(a),durationchange:()=>rle(a,s),fullscreenchanged:()=>ile(a,s),ratechange:()=>ale(a,s),error:f=>ole(a,s,f.detail),progress:()=>sle(a,s)};return Jue(a,s),ule(a,s),Object.entries(c).forEach(([f,d])=>s.addEventListener(f,d)),()=>{}}}function Jue(a,s){const c=s.options.playbackRates.map(f=>({label:f===1?"Normal":`${f}x`,value:f}));a.setValue({...a.value,playbackRates:c})}function Que(a,s){a.setValue({...a.value,currentTime:s.currentTime})}function LU(a,s){a.setValue({...a.value,volume:s.volume,muted:s.muted})}function Zc(a,s){const c=s.activeVideoId;a.setValue({...a.value,activeVideoQualityId:c,selectedVideoQualityId:s.adaptiveBitrate?vf.videoId:c,selectedCaptionTrackId:s.activeCaptionTrackId})}function JE(a,s){a.setValue({...a.value,videoQualities:s.videoQualities,audioTracks:s.umpAudioTracks,captionTracks:s.captionTracks})}function Zue(a){a.setValue({...a.value,ended:!0})}function ele(a){a.setValue({...a.value,paused:!1})}function tle(a){a.setValue({...a.value,paused:!0})}function nle(a){a.setValue({...a.value,ended:!1})}function rle(a,s){a.setValue({...a.value,duration:s.duration})}function ile(a,s){a.setValue({...a.value,fullscreen:s.fullscreen})}function ale(a,s){a.setValue({...a.value,playbackRate:s.playbackRate})}function ole(a,s,c){c.severity===on.util.Error.Severity.CRITICAL&&(s.options.showImageOnError?(s.unload(),a.setValue({...a.value,controlsState:"none"})):a.setValue({...a.value,error:cY}))}function sle(a,s){a.setValue({...a.value,buffered:s.buffered})}function ule(a,s){function c(v){a.setValue({...a.value,loading:v})}function f(){c(!0);const v=s.currentTime,y=()=>{v!==s.currentTime&&(c(!1),s.removeEventListener("timeupdate",y))};s.addEventListener("timeupdate",y)}function d(v){v.detail.severity===on.util.Error.Severity.CRITICAL&&c(!1)}s.addEventListener("playerloadmediastart",f),s.addEventListener("waiting",f),s.addEventListener("error",d),s.addEventListener("ended",()=>c(!1)),s.addEventListener("playing",()=>c(!1)),s.addEventListener("canplay",()=>c(!1)),s.addEventListener("canplaythrough",()=>c(!1))}function lle(a,s){return c=>{const f=[],d={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},v=()=>{const L=a.getBoundingClientRect();return!(L.width===0||L.height===0)},y=L=>({size:()=>v(),visibility:()=>a.checkVisibility(d),all:()=>v()||a.checkVisibility(d)})[L](),g=L=>{const F=y(L);s.setValue({...s.value,visible:F}),F||c.pause()},C=L=>{L.forEach(F=>{F.type==="attributes"&&F.attributeName==="style"&&g("visibility")})},E={attributes:!0};(L=>{const F=new MutationObserver(C);for(;L;){F.observe(L,E),f.push(F);const O=L?.getRootNode();L=L?.assignedSlot||L?.parentElement||(O instanceof ShadowRoot?O.host:null)}})(a);const I=L=>{L.forEach(()=>{g("size")})},D=new ResizeObserver(I);return D.observe(a),g("all"),()=>{f.forEach(L=>L.disconnect()),D.disconnect()}}}function cle(a){return s=>(s.options.playFullScreen&&s.addEventListener("play",()=>{s.requestFullscreen(a)},{once:!0}),()=>{})}function dle(a){return s=>{s.options.qualityBehavior==="forceHighestQuality"&&s.configure({abr:{enable:!1,defaultBandwidthEstimate:1e10,useNetworkInformation:!1}}),a.setValue({...a.value,showQualityMenu:s.options.showQualityMenu});async function c(){if(s.options.qualityBehavior==="forceHighestQuality"&&s.getManifest()){const f=s.videoQualities[1];f&&s.selectVideoQuality(f)}}return s.addEventListener("loadsourcescomplete",c,{once:!0}),()=>{}}}const fle=`<svg
  width="38"
  height="37"
  viewBox="0 0 38 37"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    d="M8.01585 5.78125C5.14224 5.78125 2.81272 8.11077 2.81272 10.9844V12.695C2.81242 12.7102 2.81243 12.7253 2.81272 12.7405V26.0156C2.81272 28.8892 5.14224 31.2188 8.01585 31.2188H29.9846C32.8582 31.2188 35.1877 28.8892 35.1877 26.0156V12.7405C35.188 12.7253 35.188 12.7102 35.1877 12.695V10.9844C35.1877 8.11077 32.8582 5.78125 29.9846 5.78125H8.01585ZM32.8752 12.0281L19.0002 19.4993L5.12522 12.0281V10.9844C5.12522 9.38793 6.4194 8.09375 8.01585 8.09375H29.9846C31.581 8.09375 32.8752 9.38793 32.8752 10.9844V12.0281ZM5.12522 14.6546L18.452 21.8305C18.7943 22.0148 19.2062 22.0148 19.5484 21.8305L32.8752 14.6546V26.0156C32.8752 27.6121 31.581 28.9062 29.9846 28.9062H8.01585C6.4194 28.9062 5.12522 27.6121 5.12522 26.0156V14.6546Z"
  />
</svg>`,hle=`<svg
  width="16"
  height="30"
  viewBox="0 0 16 30"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2982)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M15.6346 4.86093C9.21328 4.47388 10.4141 7.03694 10.35 11.136C11.691 11.136 14.6137 11.1421 15.4183 11.1421C15.0983 13.2175 14.6746 15.9452 14.6045 16.3993C13.0777 16.4054 11.6819 16.4114 10.3592 16.4145C10.3653 19.008 10.3683 27.8614 10.344 29.3425C9.42357 29.3425 5.54394 29.3974 4.65708 29.3425C4.65708 27.258 4.65098 18.5631 4.65098 16.3993C3.51422 16.3993 1.47535 16.4114 0.012491 16.3932C0.012491 15.3265 -0.00579475 12.9829 0.012491 11.133C0.844494 11.1116 3.70012 11.133 4.66317 11.1025C4.66317 9.9139 4.65708 8.7619 4.65403 7.25332C4.63879 1.92911 8.11919 -1.12157 15.6407 0.387011C15.6407 1.64568 15.6407 3.93445 15.6407 4.86093H15.6346Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2982">
      <rect width="15.6343" height="29.37" fill="white" />
    </clipPath>
  </defs>
</svg>`,ple=`<svg
  width="24"
  height="24"
  viewBox="0 0 24 24"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2987)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M13.3045 7.94905L8.62619 7.98985L8.59559 24C10.1698 24 11.7439 24 13.3181 23.9831C13.3181 21.9567 13.3113 18.9444 13.3181 16.5372C13.3215 14.4599 13.4303 12.0731 16.1502 11.9712C18.9687 11.8658 19.0163 14.3953 19.0197 16.51C19.0231 18.8458 18.9007 21.5691 19.0197 23.8607L23.8918 23.8811C23.9292 23.5377 23.902 17.0438 23.902 16.5134C23.902 15.3337 23.9734 13.9975 23.9156 12.8347C23.7592 9.66941 21.3147 7.47306 18.1902 7.46966C16.854 7.46966 15.3546 7.99325 14.4502 8.81603C13.9913 9.23422 13.7295 9.62521 13.3283 10.0332C13.3283 9.36002 13.3147 8.57804 13.3011 7.94565L13.3045 7.94905ZM0.571791 23.8437H5.29087C5.28067 22.9563 5.28747 9.67961 5.29087 7.94905H0.571791V23.8437ZM2.61174 0.0272487C0.986581 0.255043 -0.18639 1.60141 0.024405 3.27417C0.2114 4.76673 1.53737 6.0723 3.26792 5.8615C4.74009 5.68131 6.04225 4.32474 5.82466 2.60778C5.64106 1.15602 4.3015 -0.210745 2.61174 0.0272487Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2987">
      <rect
        width="23.9422"
        height="24"
        fill="white"
        transform="translate(0.000610352)"
      />
    </clipPath>
  </defs>
</svg>`,gle=`<svg
  width="28"
  height="24"
  viewBox="0 0 28 24"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <g clip-path="url(#clip0_511_2985)">
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M20.2899 21.4804C19.8539 20.897 6.12454 2.76639 5.93862 2.51957C6.09569 2.51957 7.90683 2.51957 8.08955 2.51957C8.30112 2.80166 22.0401 20.7111 22.5947 21.4804H20.2899ZM17.001 10.0815C18.5685 8.26713 24.8995 0.891145 25.5951 0.0544945L21.7324 0.02885C20.6842 1.23734 15.5585 6.98811 15.0937 7.4978C14.4878 6.73167 9.34933 0.368639 9.07366 0H0.867432C1.87718 1.30466 10.4777 12.5081 10.8559 12.9985C8.76592 15.3963 2.15927 22.987 1.38994 23.8782L5.65012 23.9327L12.7889 15.781C13.8019 17.0792 18.5813 23.3653 19.216 24.0032C19.8924 24.0032 26.9703 23.9519 27.3902 23.9423C26.4991 22.7755 17.6068 10.8732 17.0042 10.0815H17.001Z"
    />
  </g>
  <defs>
    <clipPath id="clip0_511_2985">
      <rect
        width="26.5196"
        height="24"
        fill="white"
        transform="translate(0.867188)"
      />
    </clipPath>
  </defs>
</svg>`;function mle(a,s){return c=>{const f=()=>{var C,E,I,D,L,F,O;return(O=(F=(L=(D=(I=(E=(C=a.renderRoot)==null?void 0:C.querySelector("ump-controls"))==null?void 0:E.renderRoot)==null?void 0:I.querySelector("ump-control-bar"))==null?void 0:D.renderRoot)==null?void 0:L.querySelector("ump-more-menu"))==null?void 0:F.renderRoot)==null?void 0:O.querySelector('[data-id="more-menu-button"]')},d=vle(c).map(C=>yle(C));s.setValue({...s.value,shareOptions:d});function v(){s.setValue({...s.value,shareDialogOpened:!0})}function y(){s.setValue({...s.value,shareDialogOpened:!1}),requestAnimationFrame(()=>{var C,E;(E=(C=f())==null?void 0:C.focus)==null||E.call(C)})}const g=Lg(a);return g.addEventListener("share-button-clicked",v),g.addEventListener("share-dialog-closed",y),()=>{g.removeAllListeners()}}}function vle(a){return a.options.share?a.options.shareOptions.length===0?ER:a.options.shareOptions:[]}function yle(a){const s=new URL(window.location.href);s.searchParams.delete("jsapi");const c=s.toString();switch(a){case"facebook":return{id:"facebook",url:`https://www.facebook.com/share.php?u=${encodeURIComponent(c)}`,icon:hle};case"linkedin":return{id:"linkedin",url:`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(c)}&title=&summary=&source=`,icon:ple};case"x":return{id:"x",url:`https://x.com/share?url=${encodeURIComponent(c)}&text=`,icon:gle};case"mail":return{id:"mail",url:`mailto:?subject=Check out this great video&body=${encodeURIComponent(c)}`,icon:fle};default:return{id:"copy",url:c,icon:""}}}async function RU(a,s){for(const c of a)try{await s.load(c.src,s.options.startTime,c.type);return}catch{s.dispatchUmpError({severity:on.util.Error.Severity.RECOVERABLE,umpErrorType:"Error loading video source",umpErrorDescription:`Error loading video source: ${c.src}`})}s.dispatchUmpError({severity:on.util.Error.Severity.CRITICAL,umpErrorType:"Error loading video source",umpErrorDescription:`Error loading video source(s): ${a.map(c=>c.src).join(", ")}`})}function ble(){return a=>{if(a.options.sources.length===0)return()=>{};a.addEventListener("loadsourcesrequest",s);async function s(){a.dispatchEvent(new on.util.FakeEvent("playerloadmediastart"));const c=z2(a.options.sources);await RU(c,a),await a.loadCaptions(),a.dispatchEvent(new on.util.FakeEvent("playerloadmediaend")),a.dispatchEvent(new on.util.FakeEvent("loadsourcescomplete"))}return()=>{}}}const wle="https://video.cascade.microsoft.com";class xle{constructor(s){this.dispose=()=>{this.abortController.abort()},this.options=s,this.abortController=new AbortController}async fetchVideoApiMetadata(){const s=this.options.adobeCms,c=this.abortController.signal,f=this.constructAdobeCmsEndpoint(s?.operatingGroup,s?.videoId,s?.posterWidth,s?.posterHeight),d=await fetch(f.toString(),{signal:c});if(!d.ok)throw new Error(`Error fetching AdobeCMS Metadata from ${f}`);const v=await d.json();return{poster:v.posterUrl,sources:this.parseVideoFiles(v.sources),ccFiles:PU(v.closedCaptions),downloadableFiles:v.downloadableFiles,title:v.videoTitle,ageGate:{minimumAge:v.minimumAge}}}constructAdobeCmsEndpoint(s,c,f,d){const v=new URL(`${wle}/api/og/${s}/videos/${c}/playback-info`);return f&&v.searchParams.set("posterWidth",f),d&&v.searchParams.set("posterHeight",d),v}parseVideoFiles(s){return z2(s.map(c=>({src:c.url,type:c.type})))}}function kle(a){return s=>{var c;const f=s.options.adobeCms,d=(c=s.options.plugins)==null?void 0:c.powerCms;if((!(f!=null&&f.operatingGroup)||!(f!=null&&f.videoId))&&!(d!=null&&d.videoId))return()=>{};let v=()=>{};const y=f!=null&&f.operatingGroup&&f!=null&&f.videoId?0:1,g=new AbortController;let C={};async function E(){var $,Y;if(!((Y=($=s.options.plugins)==null?void 0:$.powerCms)!=null&&Y.videoId))return;const Z=`https://www.microsoft.com/videoplayer/umpOptionsMappings/${s.options.plugins.powerCms.videoId}.json`,Q=g.signal,ge=await fetch(Z,{signal:Q});if(!ge.ok)throw new Error(`Failed to fetch video options mapping: ${ge.status} ${ge.statusText}`);C=await ge.json()}const I=E();s.addEventListener("loadsourcesrequest",X);const D=[],L=[];async function F(){await I;let $;switch(y){case 0:case 1:{const Y=new xle(y===1?C:s.options);v=Y.dispose,$=await Y.fetchVideoApiMetadata();break}}if(!$||$.sources.length===0)throw new Error("No metadata or no sources found in metadata");$.title&&(a.ariaLabel=$.title),D.push(...$.sources),s.options.hidePosterImage||(s.poster=$.poster),L.push(...$.ccFiles),a.dispatchEvent(new Mt("minimum-age-set",$.ageGate.minimumAge??0)),$.downloadableFiles.length>0&&a.dispatchEvent(new Mt("download-files-updated",$.downloadableFiles))}const O=(async()=>{try{await F()}catch($){$ instanceof Error&&s.dispatchUmpError({severity:on.util.Error.Severity.CRITICAL,umpErrorType:"Error fetching video metadata",umpErrorDescription:JSON.stringify($.message)})}})();async function X(){s.dispatchEvent(new on.util.FakeEvent("playerloadmediastart")),await O,await RU(D,s),await s.loadCaptions(L),s.dispatchEvent(new on.util.FakeEvent("playerloadmediaend")),s.dispatchEvent(new on.util.FakeEvent("loadsourcescomplete"))}return()=>{g.abort(),v()}}}function Tle(){try{return crypto.randomUUID()}catch{return`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,a=>(a^crypto.getRandomValues(new Uint8Array(1))[0]&15>>a/4).toString(16))}}var Sle=Object.defineProperty,Cle=Object.getOwnPropertyDescriptor,yl=(a,s,c,f)=>{for(var d=f>1?void 0:f?Cle(s,c):s,v=a.length-1,y;v>=0;v--)(y=a[v])&&(d=(f?y(s,c,d):y(d))||d);return f&&d&&Sle(s,c,d),d};on.polyfill.installAll();const QE="options";function ZE(a,s,c){const f=a instanceof Vi?a:Vi.getById(a);return c&&f.addEventListener("ready",c,{once:!0}),f.setAttribute("options",JSON.stringify(s)),f}Object.defineProperty(ZE,"allowAutoplay",{get:DU,set:Hue});let Vi=class extends xn{constructor(){super(...arguments),this.role="group",this.umpId=`ump-${Tle()}`,this.ariaLabel=null,this.playerStateContext=new hS(this,{context:Nr,initialValue:IR}),this.onVideoEvent=a=>{var s,c,f;this.dispatchEvent(new Mt(a.type,a.target)),a.type==="ended"?(s=this.ariaAnnouncer)==null||s.announce(ue("Ended")):a.type==="pause"?(c=this.ariaAnnouncer)==null||c.announce(ue("Paused")):a.type==="playing"&&((f=this.ariaAnnouncer)==null||f.announce(ue("Playing")))}}render(){return xt`
      <ump-caption-display></ump-caption-display>
      <ump-controls class="fill-parent"></ump-controls>
      <ump-loading-spinner></ump-loading-spinner>
      <ump-modals class="fill-parent"></ump-modals>
      <ump-aria-announcer></ump-aria-announcer>
    `}setMinimumAge(a){this.dispatchEvent(new Mt("minimum-age-set",a))}setAge(a){this.dispatchEvent(new Mt("user-age-set",a))}dispose(){this.destroyPlayer()}get currentState(){var a;if(this.player)return{duration:this.player.duration,currentTime:this.player.currentTime,percentageComplete:this.player.currentTime/this.player.duration,autoPlay:this.player.autoplay,muted:this.player.muted,loop:this.player.loop,title:this.player.options.title,powerCmsVideoId:(a=this.player.options.plugins.powerCms)==null?void 0:a.videoId,openControls:this.controls.hasOpenControl}}play(){var a;(a=this.player)==null||a.play()}pause(){var a;(a=this.player)==null||a.pause()}focusPlayButton(){this.controls.focusPlayButton()}async updated(a){a.has(QE)&&(await this.destroyPlayer(),this.options&&await this.initPlayer(this.options))}async disconnectedCallback(){super.disconnectedCallback(),await this.destroyPlayer()}connectedCallback(){super.connectedCallback(),this.requestUpdate()}async initPlayer(a){var s,c;this.playerStateContext.setValue(IR);const f=this.addVideo();this.player=new Fue(a,f,this.captionDisplay),this.player.addPlugins(lue(this,this.playerStateContext),ble(),kle(this),Yue(this.playerStateContext),Xue(this,this.playerStateContext),mle(this,this.playerStateContext),jJ(this,this.playerStateContext),$ue(this,this.playerStateContext),lle(this,this.playerStateContext),cle(this),que(this,this.playerStateContext),Gue(this.playerStateContext),dle(this.playerStateContext),Wue(this.playerStateContext),gY(this.playerStateContext),Kue(this,this.playerStateContext)),this.updateStyles(this.player),this.ariaLabel=((s=this.options)==null?void 0:s.title)||null,YY(JY((c=this.options)==null?void 0:c.language)),await this.player.initialize(),this.dispatchEvent(new Mt("ready",this.player))}addVideo(){var a;const s=document.createElement("video");return s.classList.add("fill-parent"),GE.forEach(c=>{s.addEventListener(c,this.onVideoEvent)}),(a=this.shadowRoot)==null||a.prepend(s),s}removeVideo(){var a;const s=(a=this.player)==null?void 0:a.getMediaElement();s&&(GE.forEach(c=>{s.removeEventListener(c,this.onVideoEvent)}),s.remove())}async destroyPlayer(){var a;this.removeVideo(),await((a=this.player)==null?void 0:a.destroy()),this.player=void 0}updateStyles(a){this.style.setProperty("--ump-aspect-ratio",a.options.aspectRatio.replace(":"," /")),a.options.layout==="fill"?this.style.setProperty("--ump-height","100%"):this.style.setProperty("--ump-height","unset")}static getById(a){const s=document.getElementById(a);if(!(s instanceof Vi))throw new Error(`Not a valid element. To use Universal Media Player, you must pass in an element named "${dY}" but you passed in id ${a} which resolves to element ${s?.tagName}.`);return s}};Vi.shadowRootOptions={...xn.shadowRootOptions,delegatesFocus:!0},Vi.styles=[EU,kn`
:host{--ump-aspect-ratio:unset;--ump-height:unset;container-type:size;container-name:universalmediaplayer;display:inline-block;position:relative;width:100%;height:var(--ump-height);aspect-ratio:var(--ump-aspect-ratio);background-color:var(--color-black);font-family:var(--font-family-default);font-size:var(--font-size-base-300);word-break:normal;min-height:256px;min-width:min(320px,100vw)}video{object-fit:contain}.fill-parent{position:absolute;inset:0;width:100%;height:100%}ump-controls{z-index:10}ump-modals{z-index:20}ump-loading-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:15}
`],yl([ir({reflect:!0})],Vi.prototype,"role",2),yl([ir({type:Object,attribute:QE,reflect:!0})],Vi.prototype,"options",2),yl([ir({reflect:!0})],Vi.prototype,"umpId",2),yl([ir({attribute:"aria-label",reflect:!0})],Vi.prototype,"ariaLabel",2),yl([Tn("ump-caption-display")],Vi.prototype,"captionDisplay",2),yl([Tn("ump-controls")],Vi.prototype,"controls",2),yl([Tn("ump-aria-announcer")],Vi.prototype,"ariaAnnouncer",2),Vi=yl([Yn("universal-media-player")],Vi),window.ump=ZE,window.ISOBoxer=DX;export{QE as OPTIONS_ATTRIBUTE_NAME,Vi as UniversalMediaPlayer,QY as registerTranslation,ZY as setTranslationLoader,ZE as ump};
