@zeniai/web-cockpit-ui 2.3.10-qa → 2.3.11-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{CreditAgentRoutes-DusCvj_q.js → CreditAgentRoutes-CPevggoc.js} +2 -2
- package/dist/assets/{Preview-B9BiNWaW.js → Preview-BMamgK_S.js} +1 -1
- package/dist/assets/{ScreenRoutes-BcwyX2VV.js → ScreenRoutes-o8LvLowz.js} +3 -3
- package/dist/assets/SignInScreen-B6LgD5P4.js +1 -0
- package/dist/assets/{analytics-CaPi_mY8.js → analytics-DSpkJPM7.js} +1 -1
- package/dist/assets/{analyticsHelper-MoAEgd0d.js → analyticsHelper-CJBkPjxJ.js} +1 -1
- package/dist/assets/core-QtfptIXK.js +14 -0
- package/dist/assets/{dash.all.min-t1qR7o_c.js → dash.all.min-BQtwjOsi.js} +2 -2
- package/dist/assets/empty-C7ZzbXa5.js +1 -0
- package/dist/assets/{empty-BwfklHNM.js → empty-CecspY8J.js} +1 -1
- package/dist/assets/{epic-CYAlB83b.js → epic-Dyg6XEWn.js} +2 -2
- package/dist/assets/{empty-roInh_Y5.js → index-7NXmQT2K.js} +1 -1
- package/dist/assets/{index-BzBBR_0c.js → index-BIj9NUIe.js} +1 -1
- package/dist/assets/{index-BpbBA2-X.js → index-BeWpNUQY.js} +1 -1
- package/dist/assets/index-CMwXamMD.js +2 -0
- package/dist/assets/index-CYFSU0rf.js +1 -0
- package/dist/assets/{index-Dex15ZS1.js → index-mt1yH3mP.js} +7090 -7086
- package/dist/assets/{index-CFhO0ZGh.js → index-s59ZEW8m.js} +1 -1
- package/dist/assets/{lexical-CHIyj2WY.js → lexical-ChKVMn8M.js} +1 -1
- package/dist/assets/{liveblocks-Dk_Mg5p9.js → liveblocks-Cityt5UV.js} +1 -1
- package/dist/assets/{lottie-BtRM1B9N.js → lottie-C3EU6GNH.js} +1 -1
- package/dist/assets/{mui-CSj3T8W9.js → mui-lU0EAn-V.js} +15 -15
- package/dist/assets/{react-vERkiOdV.js → react-B78ympPM.js} +1 -1
- package/dist/assets/{react-hmpT8vq5.js → react-B8jpEKxs.js} +1 -1
- package/dist/assets/{react-C6wKD3aL.js → react-BoAXZCOK.js} +1 -1
- package/dist/assets/{react-DCpX-jdD.js → react-BwL6K755.js} +1 -1
- package/dist/assets/{react-BZqHjk-v.js → react-CIp7L534.js} +1 -1
- package/dist/assets/{react-CLhUxX2Q.js → react-CX6DrXb7.js} +1 -1
- package/dist/assets/{react-D9RJSlGI.js → react-D0BwnETb.js} +1 -1
- package/dist/assets/react-ed_ICOB8.js +7 -0
- package/dist/assets/{recharts-CSrqHdyB.js → recharts-C0UvVU2x.js} +35 -35
- package/dist/assets/{sentry-DGboiCse.js → sentry-B1Rhm_fE.js} +2 -2
- package/dist/assets/{url-CSZY-J5_.js → url-CCL0JXS_.js} +1 -1
- package/dist/assets/{url-BPKQNHJU.js → url-EemMXLpP.js} +1 -1
- package/dist/assets/{utils-C54kZWZs.js → utils-p-vyP1Dj.js} +1 -1
- package/dist/assets/{zeni-epic-state-CO0biymf.js → zeni-epic-state-DtmZDsvz.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/SignInScreen-DMhnibbH.js +0 -1
- package/dist/assets/core-BYNnXTJh.js +0 -14
- package/dist/assets/index-BLWrPEcz.js +0 -2
- package/dist/assets/index-C8qrzh3B.js +0 -1
- package/dist/assets/index-DZ05bJmY.js +0 -1
- package/dist/assets/react-DOYhlfJE.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as pi}from"./zeni-epic-state-CO0biymf.js";import{c as bi,p as Fn}from"./sentry-DGboiCse.js";import"./core-BYNnXTJh.js";import"./mui-CSj3T8W9.js";import"./liveblocks-Dk_Mg5p9.js";import"./recharts-CSrqHdyB.js";(function(){try{var kt=typeof window<"u"?window:typeof bi<"u"?bi:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},Oe=new kt.Error().stack;Oe&&(kt._sentryDebugIds=kt._sentryDebugIds||{},kt._sentryDebugIds[Oe]="3a0b3882-8f87-4b26-9fac-b00814eeca7e",kt._sentryDebugIdIdentifier="sentry-dbid-3a0b3882-8f87-4b26-9fac-b00814eeca7e")}catch{}})();var Ud={7267:function(kt,Oe){Oe.byteLength=function(Y){var ee=Z(Y),p=ee[0],o=ee[1];return 3*(p+o)/4-o},Oe.toByteArray=function(Y){var ee,p,o=Z(Y),P=o[0],U=o[1],se=new N((function(Ie,Pe,Ge){return 3*(Pe+Ge)/4-Ge})(0,P,U)),ye=0,ke=U>0?P-4:P;for(p=0;p<ke;p+=4)ee=ie[Y.charCodeAt(p)]<<18|ie[Y.charCodeAt(p+1)]<<12|ie[Y.charCodeAt(p+2)]<<6|ie[Y.charCodeAt(p+3)],se[ye++]=ee>>16&255,se[ye++]=ee>>8&255,se[ye++]=255ⅇreturn U===2&&(ee=ie[Y.charCodeAt(p)]<<2|ie[Y.charCodeAt(p+1)]>>4,se[ye++]=255&ee),U===1&&(ee=ie[Y.charCodeAt(p)]<<10|ie[Y.charCodeAt(p+1)]<<4|ie[Y.charCodeAt(p+2)]>>2,se[ye++]=ee>>8&255,se[ye++]=255&ee),se},Oe.fromByteArray=function(Y){for(var ee,p=Y.length,o=p%3,P=[],U=16383,se=0,ye=p-o;se<ye;se+=U)P.push(q(Y,se,se+U>ye?ye:se+U));return o===1?(ee=Y[p-1],P.push(oe[ee>>2]+oe[ee<<4&63]+"==")):o===2&&(ee=(Y[p-2]<<8)+Y[p-1],P.push(oe[ee>>10]+oe[ee>>4&63]+oe[ee<<2&63]+"=")),P.join("")};for(var oe=[],ie=[],N=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0;R<64;++R)oe[R]=y[R],ie[y.charCodeAt(R)]=R;function Z(Y){var ee=Y.length;if(ee%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=Y.indexOf("=");return p===-1&&(p=ee),[p,p===ee?0:4-p%4]}function q(Y,ee,p){for(var o,P,U=[],se=ee;se<p;se+=3)o=(Y[se]<<16&16711680)+(Y[se+1]<<8&65280)+(255&Y[se+2]),U.push(oe[(P=o)>>18&63]+oe[P>>12&63]+oe[P>>6&63]+oe[63&P]);return U.join("")}ie[45]=62,ie[95]=63},44:function(kt,Oe,oe){var ie=oe(7267),N=oe(7986),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Oe.Buffer=q,Oe.SlowBuffer=function(L){return+L!=L&&(L=0),q.alloc(+L)},Oe.INSPECT_MAX_BYTES=50;var R=2147483647;function Z(L){if(L>R)throw new RangeError('The value "'+L+'" is invalid for option "size"');var M=new Uint8Array(L);return Object.setPrototypeOf(M,q.prototype),M}function q(L,M,f){if(typeof L=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(L)}return Y(L,M,f)}function Y(L,M,f){if(typeof L=="string")return(function(z,Te){if(typeof Te=="string"&&Te!==""||(Te="utf8"),!q.isEncoding(Te))throw new TypeError("Unknown encoding: "+Te);var Fe=0|se(z,Te),Re=Z(Fe),De=Re.write(z,Te);return De!==Fe&&(Re=Re.slice(0,De)),Re})(L,M);if(ArrayBuffer.isView(L))return(function(z){if(ve(z,Uint8Array)){var Te=new Uint8Array(z);return P(Te.buffer,Te.byteOffset,Te.byteLength)}return o(z)})(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(ve(L,ArrayBuffer)||L&&ve(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(L,SharedArrayBuffer)||L&&ve(L.buffer,SharedArrayBuffer)))return P(L,M,f);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=L.valueOf&&L.valueOf();if(E!=null&&E!==L)return q.from(E,M,f);var $=(function(z){if(q.isBuffer(z)){var Te=0|U(z.length),Fe=Z(Te);return Fe.length===0||z.copy(Fe,0,0,Te),Fe}return z.length!==void 0?typeof z.length!="number"||Ee(z.length)?Z(0):o(z):z.type==="Buffer"&&Array.isArray(z.data)?o(z.data):void 0})(L);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return q.from(L[Symbol.toPrimitive]("string"),M,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}function ee(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function p(L){return ee(L),Z(L<0?0:0|U(L))}function o(L){for(var M=L.length<0?0:0|U(L.length),f=Z(M),E=0;E<M;E+=1)f[E]=255&L[E];return f}function P(L,M,f){if(M<0||L.byteLength<M)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<M+(f||0))throw new RangeError('"length" is outside of buffer bounds');var E;return E=M===void 0&&f===void 0?new Uint8Array(L):f===void 0?new Uint8Array(L,M):new Uint8Array(L,M,f),Object.setPrototypeOf(E,q.prototype),E}function U(L){if(L>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return 0|L}function se(L,M){if(q.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||ve(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var f=L.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var $=!1;;)switch(M){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return cn(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*f;case"hex":return f>>>1;case"base64":return bn(L).length;default:if($)return E?-1:cn(L).length;M=(""+M).toLowerCase(),$=!0}}function ye(L,M,f){var E=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0)<=(M>>>=0))return"";for(L||(L="utf8");;)switch(L){case"hex":return mt(this,M,f);case"utf8":case"utf-8":return Ne(this,M,f);case"ascii":return Ht(this,M,f);case"latin1":case"binary":return be(this,M,f);case"base64":return we(this,M,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ve(this,M,f);default:if(E)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),E=!0}}function ke(L,M,f){var E=L[M];L[M]=L[f],L[f]=E}function Ie(L,M,f,E,$){if(L.length===0)return-1;if(typeof f=="string"?(E=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),Ee(f=+f)&&(f=$?0:L.length-1),f<0&&(f=L.length+f),f>=L.length){if($)return-1;f=L.length-1}else if(f<0){if(!$)return-1;f=0}if(typeof M=="string"&&(M=q.from(M,E)),q.isBuffer(M))return M.length===0?-1:Pe(L,M,f,E,$);if(typeof M=="number")return M&=255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(L,M,f):Uint8Array.prototype.lastIndexOf.call(L,M,f):Pe(L,[M],f,E,$);throw new TypeError("val must be string, number or Buffer")}function Pe(L,M,f,E,$){var z,Te=1,Fe=L.length,Re=M.length;if(E!==void 0&&((E=String(E).toLowerCase())==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(L.length<2||M.length<2)return-1;Te=2,Fe/=2,Re/=2,f/=2}function De(Ke,lt){return Te===1?Ke[lt]:Ke.readUInt16BE(lt*Te)}if($){var Se=-1;for(z=f;z<Fe;z++)if(De(L,z)===De(M,Se===-1?0:z-Se)){if(Se===-1&&(Se=z),z-Se+1===Re)return Se*Te}else Se!==-1&&(z-=z-Se),Se=-1}else for(f+Re>Fe&&(f=Fe-Re),z=f;z>=0;z--){for(var ze=!0,Ze=0;Ze<Re;Ze++)if(De(L,z+Ze)!==De(M,Ze)){ze=!1;break}if(ze)return z}return-1}function Ge(L,M,f,E){f=Number(f)||0;var $=L.length-f;E?(E=Number(E))>$&&(E=$):E=$;var z=M.length;E>z/2&&(E=z/2);for(var Te=0;Te<E;++Te){var Fe=parseInt(M.substr(2*Te,2),16);if(Ee(Fe))return Te;L[f+Te]=Fe}return Te}function yt(L,M,f,E){return En(cn(M,L.length-f),L,f,E)}function Ae(L,M,f,E){return En((function($){for(var z=[],Te=0;Te<$.length;++Te)z.push(255&$.charCodeAt(Te));return z})(M),L,f,E)}function ge(L,M,f,E){return En(bn(M),L,f,E)}function ue(L,M,f,E){return En((function($,z){for(var Te,Fe,Re,De=[],Se=0;Se<$.length&&!((z-=2)<0);++Se)Fe=(Te=$.charCodeAt(Se))>>8,Re=Te%256,De.push(Re),De.push(Fe);return De})(M,L.length-f),L,f,E)}function we(L,M,f){return M===0&&f===L.length?ie.fromByteArray(L):ie.fromByteArray(L.slice(M,f))}function Ne(L,M,f){f=Math.min(L.length,f);for(var E=[],$=M;$<f;){var z,Te,Fe,Re,De=L[$],Se=null,ze=De>239?4:De>223?3:De>191?2:1;if($+ze<=f)switch(ze){case 1:De<128&&(Se=De);break;case 2:(192&(z=L[$+1]))==128&&(Re=(31&De)<<6|63&z)>127&&(Se=Re);break;case 3:z=L[$+1],Te=L[$+2],(192&z)==128&&(192&Te)==128&&(Re=(15&De)<<12|(63&z)<<6|63&Te)>2047&&(Re<55296||Re>57343)&&(Se=Re);break;case 4:z=L[$+1],Te=L[$+2],Fe=L[$+3],(192&z)==128&&(192&Te)==128&&(192&Fe)==128&&(Re=(15&De)<<18|(63&z)<<12|(63&Te)<<6|63&Fe)>65535&&Re<1114112&&(Se=Re)}Se===null?(Se=65533,ze=1):Se>65535&&(Se-=65536,E.push(Se>>>10&1023|55296),Se=56320|1023&Se),E.push(Se),$+=ze}return(function(Ze){var Ke=Ze.length;if(Ke<=He)return String.fromCharCode.apply(String,Ze);for(var lt="",Yt=0;Yt<Ke;)lt+=String.fromCharCode.apply(String,Ze.slice(Yt,Yt+=He));return lt})(E)}Oe.kMaxLength=R,q.TYPED_ARRAY_SUPPORT=(function(){try{var L=new Uint8Array(1),M={foo:function(){return 42}};return Object.setPrototypeOf(M,Uint8Array.prototype),Object.setPrototypeOf(L,M),L.foo()===42}catch{return!1}})(),q.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(q.prototype,"parent",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.buffer}}),Object.defineProperty(q.prototype,"offset",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.byteOffset}}),q.poolSize=8192,q.from=function(L,M,f){return Y(L,M,f)},Object.setPrototypeOf(q.prototype,Uint8Array.prototype),Object.setPrototypeOf(q,Uint8Array),q.alloc=function(L,M,f){return(function(E,$,z){return ee(E),E<=0?Z(E):$!==void 0?typeof z=="string"?Z(E).fill($,z):Z(E).fill($):Z(E)})(L,M,f)},q.allocUnsafe=function(L){return p(L)},q.allocUnsafeSlow=function(L){return p(L)},q.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==q.prototype},q.compare=function(L,M){if(ve(L,Uint8Array)&&(L=q.from(L,L.offset,L.byteLength)),ve(M,Uint8Array)&&(M=q.from(M,M.offset,M.byteLength)),!q.isBuffer(L)||!q.isBuffer(M))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===M)return 0;for(var f=L.length,E=M.length,$=0,z=Math.min(f,E);$<z;++$)if(L[$]!==M[$]){f=L[$],E=M[$];break}return f<E?-1:E<f?1:0},q.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},q.concat=function(L,M){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return q.alloc(0);var f;if(M===void 0)for(M=0,f=0;f<L.length;++f)M+=L[f].length;var E=q.allocUnsafe(M),$=0;for(f=0;f<L.length;++f){var z=L[f];if(ve(z,Uint8Array))$+z.length>E.length?q.from(z).copy(E,$):Uint8Array.prototype.set.call(E,z,$);else{if(!q.isBuffer(z))throw new TypeError('"list" argument must be an Array of Buffers');z.copy(E,$)}$+=z.length}return E},q.byteLength=se,q.prototype._isBuffer=!0,q.prototype.swap16=function(){var L=this.length;if(L%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var M=0;M<L;M+=2)ke(this,M,M+1);return this},q.prototype.swap32=function(){var L=this.length;if(L%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var M=0;M<L;M+=4)ke(this,M,M+3),ke(this,M+1,M+2);return this},q.prototype.swap64=function(){var L=this.length;if(L%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var M=0;M<L;M+=8)ke(this,M,M+7),ke(this,M+1,M+6),ke(this,M+2,M+5),ke(this,M+3,M+4);return this},q.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?Ne(this,0,L):ye.apply(this,arguments)},q.prototype.toLocaleString=q.prototype.toString,q.prototype.equals=function(L){if(!q.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L||q.compare(this,L)===0},q.prototype.inspect=function(){var L="",M=Oe.INSPECT_MAX_BYTES;return L=this.toString("hex",0,M).replace(/(.{2})/g,"$1 ").trim(),this.length>M&&(L+=" ... "),"<Buffer "+L+">"},y&&(q.prototype[y]=q.prototype.inspect),q.prototype.compare=function(L,M,f,E,$){if(ve(L,Uint8Array)&&(L=q.from(L,L.offset,L.byteLength)),!q.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(M===void 0&&(M=0),f===void 0&&(f=L?L.length:0),E===void 0&&(E=0),$===void 0&&($=this.length),M<0||f>L.length||E<0||$>this.length)throw new RangeError("out of range index");if(E>=$&&M>=f)return 0;if(E>=$)return-1;if(M>=f)return 1;if(this===L)return 0;for(var z=($>>>=0)-(E>>>=0),Te=(f>>>=0)-(M>>>=0),Fe=Math.min(z,Te),Re=this.slice(E,$),De=L.slice(M,f),Se=0;Se<Fe;++Se)if(Re[Se]!==De[Se]){z=Re[Se],Te=De[Se];break}return z<Te?-1:Te<z?1:0},q.prototype.includes=function(L,M,f){return this.indexOf(L,M,f)!==-1},q.prototype.indexOf=function(L,M,f){return Ie(this,L,M,f,!0)},q.prototype.lastIndexOf=function(L,M,f){return Ie(this,L,M,f,!1)},q.prototype.write=function(L,M,f,E){if(M===void 0)E="utf8",f=this.length,M=0;else if(f===void 0&&typeof M=="string")E=M,f=this.length,M=0;else{if(!isFinite(M))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");M>>>=0,isFinite(f)?(f>>>=0,E===void 0&&(E="utf8")):(E=f,f=void 0)}var $=this.length-M;if((f===void 0||f>$)&&(f=$),L.length>0&&(f<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var z=!1;;)switch(E){case"hex":return Ge(this,L,M,f);case"utf8":case"utf-8":return yt(this,L,M,f);case"ascii":case"latin1":case"binary":return Ae(this,L,M,f);case"base64":return ge(this,L,M,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,L,M,f);default:if(z)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),z=!0}},q.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var He=4096;function Ht(L,M,f){var E="";f=Math.min(L.length,f);for(var $=M;$<f;++$)E+=String.fromCharCode(127&L[$]);return E}function be(L,M,f){var E="";f=Math.min(L.length,f);for(var $=M;$<f;++$)E+=String.fromCharCode(L[$]);return E}function mt(L,M,f){var E=L.length;(!M||M<0)&&(M=0),(!f||f<0||f>E)&&(f=E);for(var $="",z=M;z<f;++z)$+=st[L[z]];return $}function Ve(L,M,f){for(var E=L.slice(M,f),$="",z=0;z<E.length-1;z+=2)$+=String.fromCharCode(E[z]+256*E[z+1]);return $}function Ue(L,M,f){if(L%1!=0||L<0)throw new RangeError("offset is not uint");if(L+M>f)throw new RangeError("Trying to access beyond buffer length")}function Rt(L,M,f,E,$,z){if(!q.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>$||M<z)throw new RangeError('"value" argument is out of bounds');if(f+E>L.length)throw new RangeError("Index out of range")}function Zt(L,M,f,E,$,z){if(f+E>L.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function jt(L,M,f,E,$){return M=+M,f>>>=0,$||Zt(L,0,f,4),N.write(L,M,f,E,23,4),f+4}function Wt(L,M,f,E,$){return M=+M,f>>>=0,$||Zt(L,0,f,8),N.write(L,M,f,E,52,8),f+8}q.prototype.slice=function(L,M){var f=this.length;(L=~~L)<0?(L+=f)<0&&(L=0):L>f&&(L=f),(M=M===void 0?f:~~M)<0?(M+=f)<0&&(M=0):M>f&&(M=f),M<L&&(M=L);var E=this.subarray(L,M);return Object.setPrototypeOf(E,q.prototype),E},q.prototype.readUintLE=q.prototype.readUIntLE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L],$=1,z=0;++z<M&&($*=256);)E+=this[L+z]*$;return E},q.prototype.readUintBE=q.prototype.readUIntBE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L+--M],$=1;M>0&&($*=256);)E+=this[L+--M]*$;return E},q.prototype.readUint8=q.prototype.readUInt8=function(L,M){return L>>>=0,M||Ue(L,1,this.length),this[L]},q.prototype.readUint16LE=q.prototype.readUInt16LE=function(L,M){return L>>>=0,M||Ue(L,2,this.length),this[L]|this[L+1]<<8},q.prototype.readUint16BE=q.prototype.readUInt16BE=function(L,M){return L>>>=0,M||Ue(L,2,this.length),this[L]<<8|this[L+1]},q.prototype.readUint32LE=q.prototype.readUInt32LE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},q.prototype.readUint32BE=q.prototype.readUInt32BE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},q.prototype.readIntLE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L],$=1,z=0;++z<M&&($*=256);)E+=this[L+z]*$;return E>=($*=128)&&(E-=Math.pow(2,8*M)),E},q.prototype.readIntBE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=M,$=1,z=this[L+--E];E>0&&($*=256);)z+=this[L+--E]*$;return z>=($*=128)&&(z-=Math.pow(2,8*M)),z},q.prototype.readInt8=function(L,M){return L>>>=0,M||Ue(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},q.prototype.readInt16LE=function(L,M){L>>>=0,M||Ue(L,2,this.length);var f=this[L]|this[L+1]<<8;return 32768&f?4294901760|f:f},q.prototype.readInt16BE=function(L,M){L>>>=0,M||Ue(L,2,this.length);var f=this[L+1]|this[L]<<8;return 32768&f?4294901760|f:f},q.prototype.readInt32LE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},q.prototype.readInt32BE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},q.prototype.readFloatLE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),N.read(this,L,!0,23,4)},q.prototype.readFloatBE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),N.read(this,L,!1,23,4)},q.prototype.readDoubleLE=function(L,M){return L>>>=0,M||Ue(L,8,this.length),N.read(this,L,!0,52,8)},q.prototype.readDoubleBE=function(L,M){return L>>>=0,M||Ue(L,8,this.length),N.read(this,L,!1,52,8)},q.prototype.writeUintLE=q.prototype.writeUIntLE=function(L,M,f,E){L=+L,M>>>=0,f>>>=0,E||Rt(this,L,M,f,Math.pow(2,8*f)-1,0);var $=1,z=0;for(this[M]=255&L;++z<f&&($*=256);)this[M+z]=L/$&255;return M+f},q.prototype.writeUintBE=q.prototype.writeUIntBE=function(L,M,f,E){L=+L,M>>>=0,f>>>=0,E||Rt(this,L,M,f,Math.pow(2,8*f)-1,0);var $=f-1,z=1;for(this[M+$]=255&L;--$>=0&&(z*=256);)this[M+$]=L/z&255;return M+f},q.prototype.writeUint8=q.prototype.writeUInt8=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,1,255,0),this[M]=255&L,M+1},q.prototype.writeUint16LE=q.prototype.writeUInt16LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,65535,0),this[M]=255&L,this[M+1]=L>>>8,M+2},q.prototype.writeUint16BE=q.prototype.writeUInt16BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,65535,0),this[M]=L>>>8,this[M+1]=255&L,M+2},q.prototype.writeUint32LE=q.prototype.writeUInt32LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,4294967295,0),this[M+3]=L>>>24,this[M+2]=L>>>16,this[M+1]=L>>>8,this[M]=255&L,M+4},q.prototype.writeUint32BE=q.prototype.writeUInt32BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,4294967295,0),this[M]=L>>>24,this[M+1]=L>>>16,this[M+2]=L>>>8,this[M+3]=255&L,M+4},q.prototype.writeIntLE=function(L,M,f,E){if(L=+L,M>>>=0,!E){var $=Math.pow(2,8*f-1);Rt(this,L,M,f,$-1,-$)}var z=0,Te=1,Fe=0;for(this[M]=255&L;++z<f&&(Te*=256);)L<0&&Fe===0&&this[M+z-1]!==0&&(Fe=1),this[M+z]=(L/Te|0)-Fe&255;return M+f},q.prototype.writeIntBE=function(L,M,f,E){if(L=+L,M>>>=0,!E){var $=Math.pow(2,8*f-1);Rt(this,L,M,f,$-1,-$)}var z=f-1,Te=1,Fe=0;for(this[M+z]=255&L;--z>=0&&(Te*=256);)L<0&&Fe===0&&this[M+z+1]!==0&&(Fe=1),this[M+z]=(L/Te|0)-Fe&255;return M+f},q.prototype.writeInt8=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,1,127,-128),L<0&&(L=255+L+1),this[M]=255&L,M+1},q.prototype.writeInt16LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,32767,-32768),this[M]=255&L,this[M+1]=L>>>8,M+2},q.prototype.writeInt16BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,32767,-32768),this[M]=L>>>8,this[M+1]=255&L,M+2},q.prototype.writeInt32LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,2147483647,-2147483648),this[M]=255&L,this[M+1]=L>>>8,this[M+2]=L>>>16,this[M+3]=L>>>24,M+4},q.prototype.writeInt32BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[M]=L>>>24,this[M+1]=L>>>16,this[M+2]=L>>>8,this[M+3]=255&L,M+4},q.prototype.writeFloatLE=function(L,M,f){return jt(this,L,M,!0,f)},q.prototype.writeFloatBE=function(L,M,f){return jt(this,L,M,!1,f)},q.prototype.writeDoubleLE=function(L,M,f){return Wt(this,L,M,!0,f)},q.prototype.writeDoubleBE=function(L,M,f){return Wt(this,L,M,!1,f)},q.prototype.copy=function(L,M,f,E){if(!q.isBuffer(L))throw new TypeError("argument should be a Buffer");if(f||(f=0),E||E===0||(E=this.length),M>=L.length&&(M=L.length),M||(M=0),E>0&&E<f&&(E=f),E===f||L.length===0||this.length===0)return 0;if(M<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),L.length-M<E-f&&(E=L.length-M+f);var $=E-f;return this===L&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(M,f,E):Uint8Array.prototype.set.call(L,this.subarray(f,E),M),$},q.prototype.fill=function(L,M,f,E){if(typeof L=="string"){if(typeof M=="string"?(E=M,M=0,f=this.length):typeof f=="string"&&(E=f,f=this.length),E!==void 0&&typeof E!="string")throw new TypeError("encoding must be a string");if(typeof E=="string"&&!q.isEncoding(E))throw new TypeError("Unknown encoding: "+E);if(L.length===1){var $=L.charCodeAt(0);(E==="utf8"&&$<128||E==="latin1")&&(L=$)}}else typeof L=="number"?L&=255:typeof L=="boolean"&&(L=Number(L));if(M<0||this.length<M||this.length<f)throw new RangeError("Out of range index");if(f<=M)return this;var z;if(M>>>=0,f=f===void 0?this.length:f>>>0,L||(L=0),typeof L=="number")for(z=M;z<f;++z)this[z]=L;else{var Te=q.isBuffer(L)?L:q.from(L,E),Fe=Te.length;if(Fe===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(z=0;z<f-M;++z)this[z+M]=Te[z%Fe]}return this};var $t=/[^+/0-9A-Za-z-_]/g;function cn(L,M){var f;M=M||1/0;for(var E=L.length,$=null,z=[],Te=0;Te<E;++Te){if((f=L.charCodeAt(Te))>55295&&f<57344){if(!$){if(f>56319){(M-=3)>-1&&z.push(239,191,189);continue}if(Te+1===E){(M-=3)>-1&&z.push(239,191,189);continue}$=f;continue}if(f<56320){(M-=3)>-1&&z.push(239,191,189),$=f;continue}f=65536+($-55296<<10|f-56320)}else $&&(M-=3)>-1&&z.push(239,191,189);if($=null,f<128){if((M-=1)<0)break;z.push(f)}else if(f<2048){if((M-=2)<0)break;z.push(f>>6|192,63&f|128)}else if(f<65536){if((M-=3)<0)break;z.push(f>>12|224,f>>6&63|128,63&f|128)}else{if(!(f<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;z.push(f>>18|240,f>>12&63|128,f>>6&63|128,63&f|128)}}return z}function bn(L){return ie.toByteArray((function(M){if((M=(M=M.split("=")[0]).trim().replace($t,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M})(L))}function En(L,M,f,E){for(var $=0;$<E&&!($+f>=M.length||$>=L.length);++$)M[$+f]=L[$];return $}function ve(L,M){return L instanceof M||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===M.name}function Ee(L){return L!=L}var st=(function(){for(var L="0123456789abcdef",M=new Array(256),f=0;f<16;++f)for(var E=16*f,$=0;$<16;++$)M[E+$]=L[f]+L[$];return M})()},6877:function(kt,Oe){var oe={parseBuffer:function(y){return new ie(y).parse()},addBoxProcessor:function(y,R){typeof y=="string"&&typeof R=="function"&&(N.prototype._boxProcessors[y]=R)},createFile:function(){return new ie},createBox:function(y,R,Z){var q=N.create(y);return R&&R.append(q,Z),q},createFullBox:function(y,R,Z){var q=oe.createBox(y,R,Z);return q.version=0,q.flags=0,q},Utils:{}};oe.Utils.dataViewToString=function(y,R){var Z=R||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(Z).decode(y);var q=[],Y=0;if(Z==="utf-8")for(;Y<y.byteLength;){var ee=y.getUint8(Y++);ee<128||(ee<224?(ee=(31&ee)<<6,ee|=63&y.getUint8(Y++)):ee<240?(ee=(15&ee)<<12,ee|=(63&y.getUint8(Y++))<<6,ee|=63&y.getUint8(Y++)):(ee=(7&ee)<<18,ee|=(63&y.getUint8(Y++))<<12,ee|=(63&y.getUint8(Y++))<<6,ee|=63&y.getUint8(Y++))),q.push(String.fromCharCode(ee))}else for(;Y<y.byteLength;)q.push(String.fromCharCode(y.getUint8(Y++)));return q.join("")},oe.Utils.utf8ToByteArray=function(y){var R,Z;if(typeof TextEncoder<"u")R=new TextEncoder().encode(y);else for(R=[],Z=0;Z<y.length;++Z){var q=y.charCodeAt(Z);q<128?R.push(q):q<2048?(R.push(192|q>>6),R.push(128|63&q)):q<65536?(R.push(224|q>>12),R.push(128|63&q>>6),R.push(128|63&q)):(R.push(240|q>>18),R.push(128|63&q>>12),R.push(128|63&q>>6),R.push(128|63&q))}return R},oe.Utils.appendBox=function(y,R,Z){if(R._offset=y._cursor.offset,R._root=y._root?y._root:y,R._raw=y._raw,R._parent=y,Z!==-1)if(Z!=null){var q,Y=-1;if(typeof Z=="number")Y=Z;else{if(typeof Z=="string")q=Z;else{if(typeof Z!="object"||!Z.type)return void y.boxes.push(R);q=Z.type}for(var ee=0;ee<y.boxes.length;ee++)if(q===y.boxes[ee].type){Y=ee+1;break}}y.boxes.splice(Y,0,R)}else y.boxes.push(R)},Oe.parseBuffer=oe.parseBuffer,Oe.addBoxProcessor=oe.addBoxProcessor,Oe.createFile=oe.createFile,Oe.createBox=oe.createBox,Oe.createFullBox=oe.createFullBox,Oe.Utils=oe.Utils,oe.Cursor=function(y){this.offset=y===void 0?0:y};var ie=function(y){this._cursor=new oe.Cursor,this.boxes=[],y&&(this._raw=new DataView(y))};ie.prototype.fetch=function(y){var R=this.fetchAll(y,!0);return R.length?R[0]:null},ie.prototype.fetchAll=function(y,R){var Z=[];return ie._sweep.call(this,y,Z,R),Z},ie.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var y=N.parse(this);if(y.type===void 0)break;this.boxes.push(y)}return this},ie._sweep=function(y,R,Z){for(var q in this.type&&this.type==y&&R.push(this),this.boxes){if(R.length&&Z)return;ie._sweep.call(this.boxes[q],y,R,Z)}},ie.prototype.write=function(){var y,R=0;for(y=0;y<this.boxes.length;y++)R+=this.boxes[y].getLength(!1);var Z=new Uint8Array(R);for(this._rawo=new DataView(Z.buffer),this.bytes=Z,this._cursor.offset=0,y=0;y<this.boxes.length;y++)this.boxes[y].write();return Z.buffer},ie.prototype.append=function(y,R){oe.Utils.appendBox(this,y,R)};var N=function(){this._cursor=new oe.Cursor};N.parse=function(y){var R=new N;return R._offset=y._cursor.offset,R._root=y._root?y._root:y,R._raw=y._raw,R._parent=y,R._parseBox(),y._cursor.offset=R._raw.byteOffset+R._raw.byteLength,R},N.create=function(y){var R=new N;return R.type=y,R.boxes=[],R},N.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"],N.prototype._boxProcessors={},N.prototype._procField=function(y,R,Z){this._parsing?this[y]=this._readField(R,Z):this._writeField(R,Z,this[y])},N.prototype._procFieldArray=function(y,R,Z,q){var Y;if(this._parsing)for(this[y]=[],Y=0;Y<R;Y++)this[y][Y]=this._readField(Z,q);else for(Y=0;Y<this[y].length;Y++)this._writeField(Z,q,this[y][Y])},N.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},N.prototype._procEntries=function(y,R,Z){var q;if(this._parsing)for(this[y]=[],q=0;q<R;q++)this[y].push({}),Z.call(this,this[y][q]);else for(q=0;q<R;q++)Z.call(this,this[y][q])},N.prototype._procSubEntries=function(y,R,Z,q){var Y;if(this._parsing)for(y[R]=[],Y=0;Y<Z;Y++)y[R].push({}),q.call(this,y[R][Y]);else for(Y=0;Y<Z;Y++)q.call(this,y[R][Y])},N.prototype._procEntryField=function(y,R,Z,q){this._parsing?y[R]=this._readField(Z,q):this._writeField(Z,q,y[R])},N.prototype._procSubBoxes=function(y,R){var Z;if(this._parsing)for(this[y]=[],Z=0;Z<R;Z++)this[y].push(N.parse(this));else for(Z=0;Z<R;Z++)this._rawo?this[y][Z].write():this.size+=this[y][Z].getLength()},N.prototype._readField=function(y,R){switch(y){case"uint":return this._readUint(R);case"int":return this._readInt(R);case"template":return this._readTemplate(R);case"string":return R===-1?this._readTerminatedString():this._readString(R);case"data":return this._readData(R);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},N.prototype._readInt=function(y){var R=null,Z=this._cursor.offset-this._raw.byteOffset;switch(y){case 8:R=this._raw.getInt8(Z);break;case 16:R=this._raw.getInt16(Z);break;case 32:R=this._raw.getInt32(Z);break;case 64:var q=this._raw.getInt32(Z),Y=this._raw.getInt32(Z+4);R=q*Math.pow(2,32)+Y}return this._cursor.offset+=y>>3,R},N.prototype._readUint=function(y){var R,Z,q=null,Y=this._cursor.offset-this._raw.byteOffset;switch(y){case 8:q=this._raw.getUint8(Y);break;case 16:q=this._raw.getUint16(Y);break;case 24:q=((R=this._raw.getUint16(Y))<<8)+(Z=this._raw.getUint8(Y+2));break;case 32:q=this._raw.getUint32(Y);break;case 64:R=this._raw.getUint32(Y),Z=this._raw.getUint32(Y+4),q=R*Math.pow(2,32)+Z}return this._cursor.offset+=y>>3,q},N.prototype._readString=function(y){for(var R="",Z=0;Z<y;Z++){var q=this._readUint(8);R+=String.fromCharCode(q)}return R},N.prototype._readTemplate=function(y){return this._readUint(y/2)+this._readUint(y/2)/Math.pow(2,y/2)},N.prototype._readTerminatedString=function(){for(var y="";this._cursor.offset-this._offset<this._raw.byteLength;){var R=this._readUint(8);if(R===0)break;y+=String.fromCharCode(R)}return y},N.prototype._readData=function(y){var R=y>0?y:this._raw.byteLength-(this._cursor.offset-this._offset);if(R>0){var Z=new Uint8Array(this._raw.buffer,this._cursor.offset,R);return this._cursor.offset+=R,Z}return null},N.prototype._readUTF8String=function(){var y=this._raw.byteLength-(this._cursor.offset-this._offset),R=null;return y>0&&(R=new DataView(this._raw.buffer,this._cursor.offset,y),this._cursor.offset+=y),R&&oe.Utils.dataViewToString(R)},N.prototype._readUTF8TerminatedString=function(){var y=this._raw.byteLength-(this._cursor.offset-this._offset),R=null;if(y>0){var Z;for(R=new DataView(this._raw.buffer,this._cursor.offset,y),Z=0;Z<y&&R.getUint8(Z)!==0;Z++);R=new DataView(this._raw.buffer,this._cursor.offset,Z),this._cursor.offset+=Math.min(Z+1,y)}return R&&oe.Utils.dataViewToString(R)},N.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{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())}},N.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},N.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(N.parse(this))},N.prototype.append=function(y,R){oe.Utils.appendBox(this,y,R)},N.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 y=0;y<this.boxes.length;y++)this.size+=this.boxes[y].getLength();return this._data&&this._writeData(this._data),this.size},N.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 y=0;y<this.boxes.length;y++)this.boxes[y].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},N.prototype._writeInt=function(y,R){if(this._rawo){var Z=this._cursor.offset-this._rawo.byteOffset;switch(y){case 8:this._rawo.setInt8(Z,R);break;case 16:this._rawo.setInt16(Z,R);break;case 32:this._rawo.setInt32(Z,R);break;case 64:var q=Math.floor(R/Math.pow(2,32)),Y=R-q*Math.pow(2,32);this._rawo.setUint32(Z,q),this._rawo.setUint32(Z+4,Y)}this._cursor.offset+=y>>3}else this.size+=y>>3},N.prototype._writeUint=function(y,R){if(this._rawo){var Z,q,Y=this._cursor.offset-this._rawo.byteOffset;switch(y){case 8:this._rawo.setUint8(Y,R);break;case 16:this._rawo.setUint16(Y,R);break;case 24:Z=(16776960&R)>>8,q=255&R,this._rawo.setUint16(Y,Z),this._rawo.setUint8(Y+2,q);break;case 32:this._rawo.setUint32(Y,R);break;case 64:q=R-(Z=Math.floor(R/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(Y,Z),this._rawo.setUint32(Y+4,q)}this._cursor.offset+=y>>3}else this.size+=y>>3},N.prototype._writeString=function(y,R){for(var Z=0;Z<y;Z++)this._writeUint(8,R.charCodeAt(Z))},N.prototype._writeTerminatedString=function(y){if(y.length!==0){for(var R=0;R<y.length;R++)this._writeUint(8,y.charCodeAt(R));this._writeUint(8,0)}},N.prototype._writeTemplate=function(y,R){var Z=Math.floor(R),q=(R-Z)*Math.pow(2,y/2);this._writeUint(y/2,Z),this._writeUint(y/2,q)},N.prototype._writeData=function(y){if(y)if(this._rawo){if(y instanceof Array){for(var R=this._cursor.offset-this._rawo.byteOffset,Z=0;Z<y.length;Z++)this._rawo.setInt8(R+Z,y[Z]);this._cursor.offset+=y.length}y instanceof Uint8Array&&(this._root.bytes.set(y,this._cursor.offset),this._cursor.offset+=y.length)}else this.size+=y.length},N.prototype._writeUTF8String=function(y){var R=oe.Utils.utf8ToByteArray(y);if(this._rawo)for(var Z=new DataView(this._rawo.buffer,this._cursor.offset,R.length),q=0;q<R.length;q++)Z.setUint8(q,R[q]);else this.size+=R.length},N.prototype._writeField=function(y,R,Z){switch(y){case"uint":this._writeUint(R,Z);break;case"int":this._writeInt(R,Z);break;case"template":this._writeTemplate(R,Z);break;case"string":R==-1?this._writeTerminatedString(Z):this._writeString(R,Z);break;case"data":this._writeData(Z);break;case"utf8":this._writeUTF8String(Z)}},N.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},N.prototype._boxProcessors.avc1=N.prototype._boxProcessors.avc2=N.prototype._boxProcessors.avc3=N.prototype._boxProcessors.avc4=N.prototype._boxProcessors.hvc1=N.prototype._boxProcessors.hev1=N.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)},N.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_count","uint",32),this._procEntryField(y,"sample_offset",this.version===1?"int":"uint",32)}))},N.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},N.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},N.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"segment_duration","uint",this.version===1?64:32),this._procEntryField(y,"media_time","int",this.version===1?64:32),this._procEntryField(y,"media_rate_integer","int",16),this._procEntryField(y,"media_rate_fraction","int",16)}))},N.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)},N.prototype._boxProcessors.free=N.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},N.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},N.prototype._boxProcessors.ftyp=N.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var y=-1;this._parsing&&(y=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",y,"string",4)},N.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)},N.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},N.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},N.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},N.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},N.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(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},N.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},N.prototype._boxProcessors.meta=function(){this._procFullBox()},N.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},N.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},N.prototype._boxProcessors.mp4a=N.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)},N.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)},N.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},N.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)},N.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(y){this._procEntryField(y,"entity_id","uint",32)})),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},N.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},N.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},N.prototype._boxProcessors.sdtp=function(){this._procFullBox();var y=-1;this._parsing&&(y=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",y,"uint",8)},N.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(y){this._parsing||(y.reference=(1&y.reference_type)<<31,y.reference|=2147483647&y.referenced_size,y.sap=(1&y.starts_with_SAP)<<31,y.sap|=(3&y.SAP_type)<<28,y.sap|=268435455&y.SAP_delta_time),this._procEntryField(y,"reference","uint",32),this._procEntryField(y,"subsegment_duration","uint",32),this._procEntryField(y,"sap","uint",32),this._parsing&&(y.reference_type=y.reference>>31&1,y.referenced_size=2147483647&y.reference,y.starts_with_SAP=y.sap>>31&1,y.SAP_type=y.sap>>28&7,y.SAP_delta_time=268435455&y.sap)}))},N.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},N.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(y){this._procEntryField(y,"ranges_count","uint",32),this._procSubEntries(y,"ranges",y.ranges_count,(function(R){this._procEntryField(R,"level","uint",8),this._procEntryField(R,"range_size","uint",24)}))}))},N.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},N.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},N.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_count","uint",32),this._procEntryField(y,"sample_delta","uint",32)}))},N.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_delta","uint",32),this._procEntryField(y,"subsample_count","uint",16),this._procSubEntries(y,"subsamples",y.subsample_count,(function(R){this._procEntryField(R,"subsample_size","uint",this.version===1?32:16),this._procEntryField(R,"subsample_priority","uint",8),this._procEntryField(R,"discardable","uint",8),this._procEntryField(R,"codec_specific_parameters","uint",32)}))}))},N.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)},N.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},N.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},N.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(y){this._procEntryField(y,"time","uint",this.version===1?64:32),this._procEntryField(y,"moof_offset","uint",this.version===1?64:32),this._procEntryField(y,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(y,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(y,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},N.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)},N.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)},N.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(y){256&this.flags&&this._procEntryField(y,"sample_duration","uint",32),512&this.flags&&this._procEntryField(y,"sample_size","uint",32),1024&this.flags&&this._procEntryField(y,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(y,"sample_composition_time_offset",this.version===1?"int":"uint",32)}))},N.prototype._boxProcessors["url "]=N.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},N.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},N.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},N.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},N.prototype._boxProcessors.vtte=function(){}},9826:function(kt){var Oe,oe=typeof Reflect=="object"?Reflect:null,ie=oe&&typeof oe.apply=="function"?oe.apply:function(ye,ke,Ie){return Function.prototype.apply.call(ye,ke,Ie)};Oe=oe&&typeof oe.ownKeys=="function"?oe.ownKeys:Object.getOwnPropertySymbols?function(ye){return Object.getOwnPropertyNames(ye).concat(Object.getOwnPropertySymbols(ye))}:function(ye){return Object.getOwnPropertyNames(ye)};var N=Number.isNaN||function(ye){return ye!=ye};function y(){y.init.call(this)}kt.exports=y,kt.exports.once=function(ye,ke){return new Promise((function(Ie,Pe){function Ge(Ae){ye.removeListener(ke,yt),Pe(Ae)}function yt(){typeof ye.removeListener=="function"&&ye.removeListener("error",Ge),Ie([].slice.call(arguments))}se(ye,ke,yt,{once:!0}),ke!=="error"&&(function(Ae,ge){typeof Ae.on=="function"&&se(Ae,"error",ge,{once:!0})})(ye,Ge)}))},y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var R=10;function Z(ye){if(typeof ye!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ye)}function q(ye){return ye._maxListeners===void 0?y.defaultMaxListeners:ye._maxListeners}function Y(ye,ke,Ie,Pe){var Ge,yt,Ae,ge;if(Z(Ie),(yt=ye._events)===void 0?(yt=ye._events=Object.create(null),ye._eventsCount=0):(yt.newListener!==void 0&&(ye.emit("newListener",ke,Ie.listener?Ie.listener:Ie),yt=ye._events),Ae=yt[ke]),Ae===void 0)Ae=yt[ke]=Ie,++ye._eventsCount;else if(typeof Ae=="function"?Ae=yt[ke]=Pe?[Ie,Ae]:[Ae,Ie]:Pe?Ae.unshift(Ie):Ae.push(Ie),(Ge=q(ye))>0&&Ae.length>Ge&&!Ae.warned){Ae.warned=!0;var ue=new Error("Possible EventEmitter memory leak detected. "+Ae.length+" "+String(ke)+" listeners added. Use emitter.setMaxListeners() to increase limit");ue.name="MaxListenersExceededWarning",ue.emitter=ye,ue.type=ke,ue.count=Ae.length,ge=ue,console&&console.warn&&console.warn(ge)}return ye}function ee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(ye,ke,Ie){var Pe={fired:!1,wrapFn:void 0,target:ye,type:ke,listener:Ie},Ge=ee.bind(Pe);return Ge.listener=Ie,Pe.wrapFn=Ge,Ge}function o(ye,ke,Ie){var Pe=ye._events;if(Pe===void 0)return[];var Ge=Pe[ke];return Ge===void 0?[]:typeof Ge=="function"?Ie?[Ge.listener||Ge]:[Ge]:Ie?(function(yt){for(var Ae=new Array(yt.length),ge=0;ge<Ae.length;++ge)Ae[ge]=yt[ge].listener||yt[ge];return Ae})(Ge):U(Ge,Ge.length)}function P(ye){var ke=this._events;if(ke!==void 0){var Ie=ke[ye];if(typeof Ie=="function")return 1;if(Ie!==void 0)return Ie.length}return 0}function U(ye,ke){for(var Ie=new Array(ke),Pe=0;Pe<ke;++Pe)Ie[Pe]=ye[Pe];return Ie}function se(ye,ke,Ie,Pe){if(typeof ye.on=="function")Pe.once?ye.once(ke,Ie):ye.on(ke,Ie);else{if(typeof ye.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ye);ye.addEventListener(ke,(function Ge(yt){Pe.once&&ye.removeEventListener(ke,Ge),Ie(yt)}))}}Object.defineProperty(y,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(ye){if(typeof ye!="number"||ye<0||N(ye))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ye+".");R=ye}}),y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},y.prototype.setMaxListeners=function(ye){if(typeof ye!="number"||ye<0||N(ye))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ye+".");return this._maxListeners=ye,this},y.prototype.getMaxListeners=function(){return q(this)},y.prototype.emit=function(ye){for(var ke=[],Ie=1;Ie<arguments.length;Ie++)ke.push(arguments[Ie]);var Pe=ye==="error",Ge=this._events;if(Ge!==void 0)Pe=Pe&&Ge.error===void 0;else if(!Pe)return!1;if(Pe){var yt;if(ke.length>0&&(yt=ke[0]),yt instanceof Error)throw yt;var Ae=new Error("Unhandled error."+(yt?" ("+yt.message+")":""));throw Ae.context=yt,Ae}var ge=Ge[ye];if(ge===void 0)return!1;if(typeof ge=="function")ie(ge,this,ke);else{var ue=ge.length,we=U(ge,ue);for(Ie=0;Ie<ue;++Ie)ie(we[Ie],this,ke)}return!0},y.prototype.addListener=function(ye,ke){return Y(this,ye,ke,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(ye,ke){return Y(this,ye,ke,!0)},y.prototype.once=function(ye,ke){return Z(ke),this.on(ye,p(this,ye,ke)),this},y.prototype.prependOnceListener=function(ye,ke){return Z(ke),this.prependListener(ye,p(this,ye,ke)),this},y.prototype.removeListener=function(ye,ke){var Ie,Pe,Ge,yt,Ae;if(Z(ke),(Pe=this._events)===void 0)return this;if((Ie=Pe[ye])===void 0)return this;if(Ie===ke||Ie.listener===ke)--this._eventsCount==0?this._events=Object.create(null):(delete Pe[ye],Pe.removeListener&&this.emit("removeListener",ye,Ie.listener||ke));else if(typeof Ie!="function"){for(Ge=-1,yt=Ie.length-1;yt>=0;yt--)if(Ie[yt]===ke||Ie[yt].listener===ke){Ae=Ie[yt].listener,Ge=yt;break}if(Ge<0)return this;Ge===0?Ie.shift():(function(ge,ue){for(;ue+1<ge.length;ue++)ge[ue]=ge[ue+1];ge.pop()})(Ie,Ge),Ie.length===1&&(Pe[ye]=Ie[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ye,Ae||ke)}return this},y.prototype.off=y.prototype.removeListener,y.prototype.removeAllListeners=function(ye){var ke,Ie,Pe;if((Ie=this._events)===void 0)return this;if(Ie.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ie[ye]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete Ie[ye]),this;if(arguments.length===0){var Ge,yt=Object.keys(Ie);for(Pe=0;Pe<yt.length;++Pe)(Ge=yt[Pe])!=="removeListener"&&this.removeAllListeners(Ge);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(ke=Ie[ye])=="function")this.removeListener(ye,ke);else if(ke!==void 0)for(Pe=ke.length-1;Pe>=0;Pe--)this.removeListener(ye,ke[Pe]);return this},y.prototype.listeners=function(ye){return o(this,ye,!0)},y.prototype.rawListeners=function(ye){return o(this,ye,!1)},y.listenerCount=function(ye,ke){return typeof ye.listenerCount=="function"?ye.listenerCount(ke):P.call(ye,ke)},y.prototype.listenerCount=P,y.prototype.eventNames=function(){return this._eventsCount>0?Oe(this._events):[]}},7316:function(kt){kt.exports=function Oe(oe,ie){if(oe===ie)return!0;if(oe&&ie&&typeof oe=="object"&&typeof ie=="object"){if(oe.constructor!==ie.constructor)return!1;var N,y,R;if(Array.isArray(oe)){if((N=oe.length)!=ie.length)return!1;for(y=N;y--!=0;)if(!Oe(oe[y],ie[y]))return!1;return!0}if(oe.constructor===RegExp)return oe.source===ie.source&&oe.flags===ie.flags;if(oe.valueOf!==Object.prototype.valueOf)return oe.valueOf()===ie.valueOf();if(oe.toString!==Object.prototype.toString)return oe.toString()===ie.toString();if((N=(R=Object.keys(oe)).length)!==Object.keys(ie).length)return!1;for(y=N;y--!=0;)if(!Object.prototype.hasOwnProperty.call(ie,R[y]))return!1;for(y=N;y--!=0;){var Z=R[y];if(!Oe(oe[Z],ie[Z]))return!1}return!0}return oe!=oe&&ie!=ie}},7986:function(kt,Oe){Oe.read=function(oe,ie,N,y,R){var Z,q,Y=8*R-y-1,ee=(1<<Y)-1,p=ee>>1,o=-7,P=N?R-1:0,U=N?-1:1,se=oe[ie+P];for(P+=U,Z=se&(1<<-o)-1,se>>=-o,o+=Y;o>0;Z=256*Z+oe[ie+P],P+=U,o-=8);for(q=Z&(1<<-o)-1,Z>>=-o,o+=y;o>0;q=256*q+oe[ie+P],P+=U,o-=8);if(Z===0)Z=1-p;else{if(Z===ee)return q?NaN:1/0*(se?-1:1);q+=Math.pow(2,y),Z-=p}return(se?-1:1)*q*Math.pow(2,Z-y)},Oe.write=function(oe,ie,N,y,R,Z){var q,Y,ee,p=8*Z-R-1,o=(1<<p)-1,P=o>>1,U=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,se=y?0:Z-1,ye=y?1:-1,ke=ie<0||ie===0&&1/ie<0?1:0;for(ie=Math.abs(ie),isNaN(ie)||ie===1/0?(Y=isNaN(ie)?1:0,q=o):(q=Math.floor(Math.log(ie)/Math.LN2),ie*(ee=Math.pow(2,-q))<1&&(q--,ee*=2),(ie+=q+P>=1?U/ee:U*Math.pow(2,1-P))*ee>=2&&(q++,ee/=2),q+P>=o?(Y=0,q=o):q+P>=1?(Y=(ie*ee-1)*Math.pow(2,R),q+=P):(Y=ie*Math.pow(2,P-1)*Math.pow(2,R),q=0));R>=8;oe[N+se]=255&Y,se+=ye,Y/=256,R-=8);for(q=q<<R|Y,p+=R;p>0;oe[N+se]=255&q,se+=ye,q/=256,p-=8);oe[N+se-ye]|=128*ke}},5474:function(kt,Oe,oe){(function(ie){ie.parser=function(f,E){return new R(f,E)},ie.SAXParser=R,ie.SAXStream=q,ie.createStream=function(f,E){return new q(f,E)},ie.MAX_BUFFER_LENGTH=65536;var N,y=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function R(f,E){if(!(this instanceof R))return new R(f,E);var $=this;(function(z){for(var Te=0,Fe=y.length;Te<Fe;Te++)z[y[Te]]=""})($),$.q=$.c="",$.bufferCheckPosition=ie.MAX_BUFFER_LENGTH,$.opt=E||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!f,$.noscript=!(!f&&!$.opt.noscript),$.state=be.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=$.strictEntities?Object.create(ie.XML_ENTITIES):Object.create(ie.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(Ie)),$.trackPosition=$.opt.position!==!1,$.trackPosition&&($.position=$.line=$.column=0),Ve($,"onready")}ie.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(f){function E(){}return E.prototype=f,new E}),Object.keys||(Object.keys=function(f){var E=[];for(var $ in f)f.hasOwnProperty($)&&E.push($);return E}),R.prototype={end:function(){Wt(this)},write:function(f){var E=this;if(this.error)throw this.error;if(E.closed)return jt(E,"Cannot write after close. Assign an onready handler.");if(f===null)return Wt(E);typeof f=="object"&&(f=f.toString());for(var $=0,z="";z=M(f,$++),E.c=z,z;)switch(E.trackPosition&&(E.position++,z===`
|
|
1
|
+
import{H as pi}from"./zeni-epic-state-DtmZDsvz.js";import{b as bi,p as Fn}from"./sentry-B1Rhm_fE.js";import"./core-QtfptIXK.js";(function(){try{var kt=typeof window<"u"?window:typeof bi<"u"?bi:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},Oe=new kt.Error().stack;Oe&&(kt._sentryDebugIds=kt._sentryDebugIds||{},kt._sentryDebugIds[Oe]="04b32115-ae5f-4746-a8b6-e86ed40cebe2",kt._sentryDebugIdIdentifier="sentry-dbid-04b32115-ae5f-4746-a8b6-e86ed40cebe2")}catch{}})();var Ud={7267:function(kt,Oe){Oe.byteLength=function(Y){var ee=Z(Y),p=ee[0],o=ee[1];return 3*(p+o)/4-o},Oe.toByteArray=function(Y){var ee,p,o=Z(Y),P=o[0],U=o[1],se=new N((function(Ie,Pe,Ge){return 3*(Pe+Ge)/4-Ge})(0,P,U)),ye=0,ke=U>0?P-4:P;for(p=0;p<ke;p+=4)ee=ie[Y.charCodeAt(p)]<<18|ie[Y.charCodeAt(p+1)]<<12|ie[Y.charCodeAt(p+2)]<<6|ie[Y.charCodeAt(p+3)],se[ye++]=ee>>16&255,se[ye++]=ee>>8&255,se[ye++]=255ⅇreturn U===2&&(ee=ie[Y.charCodeAt(p)]<<2|ie[Y.charCodeAt(p+1)]>>4,se[ye++]=255&ee),U===1&&(ee=ie[Y.charCodeAt(p)]<<10|ie[Y.charCodeAt(p+1)]<<4|ie[Y.charCodeAt(p+2)]>>2,se[ye++]=ee>>8&255,se[ye++]=255&ee),se},Oe.fromByteArray=function(Y){for(var ee,p=Y.length,o=p%3,P=[],U=16383,se=0,ye=p-o;se<ye;se+=U)P.push(q(Y,se,se+U>ye?ye:se+U));return o===1?(ee=Y[p-1],P.push(oe[ee>>2]+oe[ee<<4&63]+"==")):o===2&&(ee=(Y[p-2]<<8)+Y[p-1],P.push(oe[ee>>10]+oe[ee>>4&63]+oe[ee<<2&63]+"=")),P.join("")};for(var oe=[],ie=[],N=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0;R<64;++R)oe[R]=y[R],ie[y.charCodeAt(R)]=R;function Z(Y){var ee=Y.length;if(ee%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=Y.indexOf("=");return p===-1&&(p=ee),[p,p===ee?0:4-p%4]}function q(Y,ee,p){for(var o,P,U=[],se=ee;se<p;se+=3)o=(Y[se]<<16&16711680)+(Y[se+1]<<8&65280)+(255&Y[se+2]),U.push(oe[(P=o)>>18&63]+oe[P>>12&63]+oe[P>>6&63]+oe[63&P]);return U.join("")}ie[45]=62,ie[95]=63},44:function(kt,Oe,oe){var ie=oe(7267),N=oe(7986),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Oe.Buffer=q,Oe.SlowBuffer=function(L){return+L!=L&&(L=0),q.alloc(+L)},Oe.INSPECT_MAX_BYTES=50;var R=2147483647;function Z(L){if(L>R)throw new RangeError('The value "'+L+'" is invalid for option "size"');var M=new Uint8Array(L);return Object.setPrototypeOf(M,q.prototype),M}function q(L,M,f){if(typeof L=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(L)}return Y(L,M,f)}function Y(L,M,f){if(typeof L=="string")return(function(z,Te){if(typeof Te=="string"&&Te!==""||(Te="utf8"),!q.isEncoding(Te))throw new TypeError("Unknown encoding: "+Te);var Fe=0|se(z,Te),Re=Z(Fe),De=Re.write(z,Te);return De!==Fe&&(Re=Re.slice(0,De)),Re})(L,M);if(ArrayBuffer.isView(L))return(function(z){if(ve(z,Uint8Array)){var Te=new Uint8Array(z);return P(Te.buffer,Te.byteOffset,Te.byteLength)}return o(z)})(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(ve(L,ArrayBuffer)||L&&ve(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(L,SharedArrayBuffer)||L&&ve(L.buffer,SharedArrayBuffer)))return P(L,M,f);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=L.valueOf&&L.valueOf();if(E!=null&&E!==L)return q.from(E,M,f);var $=(function(z){if(q.isBuffer(z)){var Te=0|U(z.length),Fe=Z(Te);return Fe.length===0||z.copy(Fe,0,0,Te),Fe}return z.length!==void 0?typeof z.length!="number"||Ee(z.length)?Z(0):o(z):z.type==="Buffer"&&Array.isArray(z.data)?o(z.data):void 0})(L);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return q.from(L[Symbol.toPrimitive]("string"),M,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}function ee(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function p(L){return ee(L),Z(L<0?0:0|U(L))}function o(L){for(var M=L.length<0?0:0|U(L.length),f=Z(M),E=0;E<M;E+=1)f[E]=255&L[E];return f}function P(L,M,f){if(M<0||L.byteLength<M)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<M+(f||0))throw new RangeError('"length" is outside of buffer bounds');var E;return E=M===void 0&&f===void 0?new Uint8Array(L):f===void 0?new Uint8Array(L,M):new Uint8Array(L,M,f),Object.setPrototypeOf(E,q.prototype),E}function U(L){if(L>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return 0|L}function se(L,M){if(q.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||ve(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var f=L.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&f===0)return 0;for(var $=!1;;)switch(M){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return cn(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*f;case"hex":return f>>>1;case"base64":return bn(L).length;default:if($)return E?-1:cn(L).length;M=(""+M).toLowerCase(),$=!0}}function ye(L,M,f){var E=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0)<=(M>>>=0))return"";for(L||(L="utf8");;)switch(L){case"hex":return mt(this,M,f);case"utf8":case"utf-8":return Ne(this,M,f);case"ascii":return Ht(this,M,f);case"latin1":case"binary":return be(this,M,f);case"base64":return we(this,M,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ve(this,M,f);default:if(E)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),E=!0}}function ke(L,M,f){var E=L[M];L[M]=L[f],L[f]=E}function Ie(L,M,f,E,$){if(L.length===0)return-1;if(typeof f=="string"?(E=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),Ee(f=+f)&&(f=$?0:L.length-1),f<0&&(f=L.length+f),f>=L.length){if($)return-1;f=L.length-1}else if(f<0){if(!$)return-1;f=0}if(typeof M=="string"&&(M=q.from(M,E)),q.isBuffer(M))return M.length===0?-1:Pe(L,M,f,E,$);if(typeof M=="number")return M&=255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(L,M,f):Uint8Array.prototype.lastIndexOf.call(L,M,f):Pe(L,[M],f,E,$);throw new TypeError("val must be string, number or Buffer")}function Pe(L,M,f,E,$){var z,Te=1,Fe=L.length,Re=M.length;if(E!==void 0&&((E=String(E).toLowerCase())==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(L.length<2||M.length<2)return-1;Te=2,Fe/=2,Re/=2,f/=2}function De(Ke,lt){return Te===1?Ke[lt]:Ke.readUInt16BE(lt*Te)}if($){var Se=-1;for(z=f;z<Fe;z++)if(De(L,z)===De(M,Se===-1?0:z-Se)){if(Se===-1&&(Se=z),z-Se+1===Re)return Se*Te}else Se!==-1&&(z-=z-Se),Se=-1}else for(f+Re>Fe&&(f=Fe-Re),z=f;z>=0;z--){for(var ze=!0,Ze=0;Ze<Re;Ze++)if(De(L,z+Ze)!==De(M,Ze)){ze=!1;break}if(ze)return z}return-1}function Ge(L,M,f,E){f=Number(f)||0;var $=L.length-f;E?(E=Number(E))>$&&(E=$):E=$;var z=M.length;E>z/2&&(E=z/2);for(var Te=0;Te<E;++Te){var Fe=parseInt(M.substr(2*Te,2),16);if(Ee(Fe))return Te;L[f+Te]=Fe}return Te}function yt(L,M,f,E){return En(cn(M,L.length-f),L,f,E)}function Ae(L,M,f,E){return En((function($){for(var z=[],Te=0;Te<$.length;++Te)z.push(255&$.charCodeAt(Te));return z})(M),L,f,E)}function ge(L,M,f,E){return En(bn(M),L,f,E)}function ue(L,M,f,E){return En((function($,z){for(var Te,Fe,Re,De=[],Se=0;Se<$.length&&!((z-=2)<0);++Se)Fe=(Te=$.charCodeAt(Se))>>8,Re=Te%256,De.push(Re),De.push(Fe);return De})(M,L.length-f),L,f,E)}function we(L,M,f){return M===0&&f===L.length?ie.fromByteArray(L):ie.fromByteArray(L.slice(M,f))}function Ne(L,M,f){f=Math.min(L.length,f);for(var E=[],$=M;$<f;){var z,Te,Fe,Re,De=L[$],Se=null,ze=De>239?4:De>223?3:De>191?2:1;if($+ze<=f)switch(ze){case 1:De<128&&(Se=De);break;case 2:(192&(z=L[$+1]))==128&&(Re=(31&De)<<6|63&z)>127&&(Se=Re);break;case 3:z=L[$+1],Te=L[$+2],(192&z)==128&&(192&Te)==128&&(Re=(15&De)<<12|(63&z)<<6|63&Te)>2047&&(Re<55296||Re>57343)&&(Se=Re);break;case 4:z=L[$+1],Te=L[$+2],Fe=L[$+3],(192&z)==128&&(192&Te)==128&&(192&Fe)==128&&(Re=(15&De)<<18|(63&z)<<12|(63&Te)<<6|63&Fe)>65535&&Re<1114112&&(Se=Re)}Se===null?(Se=65533,ze=1):Se>65535&&(Se-=65536,E.push(Se>>>10&1023|55296),Se=56320|1023&Se),E.push(Se),$+=ze}return(function(Ze){var Ke=Ze.length;if(Ke<=He)return String.fromCharCode.apply(String,Ze);for(var lt="",Yt=0;Yt<Ke;)lt+=String.fromCharCode.apply(String,Ze.slice(Yt,Yt+=He));return lt})(E)}Oe.kMaxLength=R,q.TYPED_ARRAY_SUPPORT=(function(){try{var L=new Uint8Array(1),M={foo:function(){return 42}};return Object.setPrototypeOf(M,Uint8Array.prototype),Object.setPrototypeOf(L,M),L.foo()===42}catch{return!1}})(),q.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(q.prototype,"parent",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.buffer}}),Object.defineProperty(q.prototype,"offset",{enumerable:!0,get:function(){if(q.isBuffer(this))return this.byteOffset}}),q.poolSize=8192,q.from=function(L,M,f){return Y(L,M,f)},Object.setPrototypeOf(q.prototype,Uint8Array.prototype),Object.setPrototypeOf(q,Uint8Array),q.alloc=function(L,M,f){return(function(E,$,z){return ee(E),E<=0?Z(E):$!==void 0?typeof z=="string"?Z(E).fill($,z):Z(E).fill($):Z(E)})(L,M,f)},q.allocUnsafe=function(L){return p(L)},q.allocUnsafeSlow=function(L){return p(L)},q.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==q.prototype},q.compare=function(L,M){if(ve(L,Uint8Array)&&(L=q.from(L,L.offset,L.byteLength)),ve(M,Uint8Array)&&(M=q.from(M,M.offset,M.byteLength)),!q.isBuffer(L)||!q.isBuffer(M))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===M)return 0;for(var f=L.length,E=M.length,$=0,z=Math.min(f,E);$<z;++$)if(L[$]!==M[$]){f=L[$],E=M[$];break}return f<E?-1:E<f?1:0},q.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},q.concat=function(L,M){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return q.alloc(0);var f;if(M===void 0)for(M=0,f=0;f<L.length;++f)M+=L[f].length;var E=q.allocUnsafe(M),$=0;for(f=0;f<L.length;++f){var z=L[f];if(ve(z,Uint8Array))$+z.length>E.length?q.from(z).copy(E,$):Uint8Array.prototype.set.call(E,z,$);else{if(!q.isBuffer(z))throw new TypeError('"list" argument must be an Array of Buffers');z.copy(E,$)}$+=z.length}return E},q.byteLength=se,q.prototype._isBuffer=!0,q.prototype.swap16=function(){var L=this.length;if(L%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var M=0;M<L;M+=2)ke(this,M,M+1);return this},q.prototype.swap32=function(){var L=this.length;if(L%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var M=0;M<L;M+=4)ke(this,M,M+3),ke(this,M+1,M+2);return this},q.prototype.swap64=function(){var L=this.length;if(L%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var M=0;M<L;M+=8)ke(this,M,M+7),ke(this,M+1,M+6),ke(this,M+2,M+5),ke(this,M+3,M+4);return this},q.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?Ne(this,0,L):ye.apply(this,arguments)},q.prototype.toLocaleString=q.prototype.toString,q.prototype.equals=function(L){if(!q.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L||q.compare(this,L)===0},q.prototype.inspect=function(){var L="",M=Oe.INSPECT_MAX_BYTES;return L=this.toString("hex",0,M).replace(/(.{2})/g,"$1 ").trim(),this.length>M&&(L+=" ... "),"<Buffer "+L+">"},y&&(q.prototype[y]=q.prototype.inspect),q.prototype.compare=function(L,M,f,E,$){if(ve(L,Uint8Array)&&(L=q.from(L,L.offset,L.byteLength)),!q.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(M===void 0&&(M=0),f===void 0&&(f=L?L.length:0),E===void 0&&(E=0),$===void 0&&($=this.length),M<0||f>L.length||E<0||$>this.length)throw new RangeError("out of range index");if(E>=$&&M>=f)return 0;if(E>=$)return-1;if(M>=f)return 1;if(this===L)return 0;for(var z=($>>>=0)-(E>>>=0),Te=(f>>>=0)-(M>>>=0),Fe=Math.min(z,Te),Re=this.slice(E,$),De=L.slice(M,f),Se=0;Se<Fe;++Se)if(Re[Se]!==De[Se]){z=Re[Se],Te=De[Se];break}return z<Te?-1:Te<z?1:0},q.prototype.includes=function(L,M,f){return this.indexOf(L,M,f)!==-1},q.prototype.indexOf=function(L,M,f){return Ie(this,L,M,f,!0)},q.prototype.lastIndexOf=function(L,M,f){return Ie(this,L,M,f,!1)},q.prototype.write=function(L,M,f,E){if(M===void 0)E="utf8",f=this.length,M=0;else if(f===void 0&&typeof M=="string")E=M,f=this.length,M=0;else{if(!isFinite(M))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");M>>>=0,isFinite(f)?(f>>>=0,E===void 0&&(E="utf8")):(E=f,f=void 0)}var $=this.length-M;if((f===void 0||f>$)&&(f=$),L.length>0&&(f<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var z=!1;;)switch(E){case"hex":return Ge(this,L,M,f);case"utf8":case"utf-8":return yt(this,L,M,f);case"ascii":case"latin1":case"binary":return Ae(this,L,M,f);case"base64":return ge(this,L,M,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,L,M,f);default:if(z)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),z=!0}},q.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var He=4096;function Ht(L,M,f){var E="";f=Math.min(L.length,f);for(var $=M;$<f;++$)E+=String.fromCharCode(127&L[$]);return E}function be(L,M,f){var E="";f=Math.min(L.length,f);for(var $=M;$<f;++$)E+=String.fromCharCode(L[$]);return E}function mt(L,M,f){var E=L.length;(!M||M<0)&&(M=0),(!f||f<0||f>E)&&(f=E);for(var $="",z=M;z<f;++z)$+=st[L[z]];return $}function Ve(L,M,f){for(var E=L.slice(M,f),$="",z=0;z<E.length-1;z+=2)$+=String.fromCharCode(E[z]+256*E[z+1]);return $}function Ue(L,M,f){if(L%1!=0||L<0)throw new RangeError("offset is not uint");if(L+M>f)throw new RangeError("Trying to access beyond buffer length")}function Rt(L,M,f,E,$,z){if(!q.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>$||M<z)throw new RangeError('"value" argument is out of bounds');if(f+E>L.length)throw new RangeError("Index out of range")}function Zt(L,M,f,E,$,z){if(f+E>L.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function jt(L,M,f,E,$){return M=+M,f>>>=0,$||Zt(L,0,f,4),N.write(L,M,f,E,23,4),f+4}function Wt(L,M,f,E,$){return M=+M,f>>>=0,$||Zt(L,0,f,8),N.write(L,M,f,E,52,8),f+8}q.prototype.slice=function(L,M){var f=this.length;(L=~~L)<0?(L+=f)<0&&(L=0):L>f&&(L=f),(M=M===void 0?f:~~M)<0?(M+=f)<0&&(M=0):M>f&&(M=f),M<L&&(M=L);var E=this.subarray(L,M);return Object.setPrototypeOf(E,q.prototype),E},q.prototype.readUintLE=q.prototype.readUIntLE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L],$=1,z=0;++z<M&&($*=256);)E+=this[L+z]*$;return E},q.prototype.readUintBE=q.prototype.readUIntBE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L+--M],$=1;M>0&&($*=256);)E+=this[L+--M]*$;return E},q.prototype.readUint8=q.prototype.readUInt8=function(L,M){return L>>>=0,M||Ue(L,1,this.length),this[L]},q.prototype.readUint16LE=q.prototype.readUInt16LE=function(L,M){return L>>>=0,M||Ue(L,2,this.length),this[L]|this[L+1]<<8},q.prototype.readUint16BE=q.prototype.readUInt16BE=function(L,M){return L>>>=0,M||Ue(L,2,this.length),this[L]<<8|this[L+1]},q.prototype.readUint32LE=q.prototype.readUInt32LE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},q.prototype.readUint32BE=q.prototype.readUInt32BE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},q.prototype.readIntLE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=this[L],$=1,z=0;++z<M&&($*=256);)E+=this[L+z]*$;return E>=($*=128)&&(E-=Math.pow(2,8*M)),E},q.prototype.readIntBE=function(L,M,f){L>>>=0,M>>>=0,f||Ue(L,M,this.length);for(var E=M,$=1,z=this[L+--E];E>0&&($*=256);)z+=this[L+--E]*$;return z>=($*=128)&&(z-=Math.pow(2,8*M)),z},q.prototype.readInt8=function(L,M){return L>>>=0,M||Ue(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},q.prototype.readInt16LE=function(L,M){L>>>=0,M||Ue(L,2,this.length);var f=this[L]|this[L+1]<<8;return 32768&f?4294901760|f:f},q.prototype.readInt16BE=function(L,M){L>>>=0,M||Ue(L,2,this.length);var f=this[L+1]|this[L]<<8;return 32768&f?4294901760|f:f},q.prototype.readInt32LE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},q.prototype.readInt32BE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},q.prototype.readFloatLE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),N.read(this,L,!0,23,4)},q.prototype.readFloatBE=function(L,M){return L>>>=0,M||Ue(L,4,this.length),N.read(this,L,!1,23,4)},q.prototype.readDoubleLE=function(L,M){return L>>>=0,M||Ue(L,8,this.length),N.read(this,L,!0,52,8)},q.prototype.readDoubleBE=function(L,M){return L>>>=0,M||Ue(L,8,this.length),N.read(this,L,!1,52,8)},q.prototype.writeUintLE=q.prototype.writeUIntLE=function(L,M,f,E){L=+L,M>>>=0,f>>>=0,E||Rt(this,L,M,f,Math.pow(2,8*f)-1,0);var $=1,z=0;for(this[M]=255&L;++z<f&&($*=256);)this[M+z]=L/$&255;return M+f},q.prototype.writeUintBE=q.prototype.writeUIntBE=function(L,M,f,E){L=+L,M>>>=0,f>>>=0,E||Rt(this,L,M,f,Math.pow(2,8*f)-1,0);var $=f-1,z=1;for(this[M+$]=255&L;--$>=0&&(z*=256);)this[M+$]=L/z&255;return M+f},q.prototype.writeUint8=q.prototype.writeUInt8=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,1,255,0),this[M]=255&L,M+1},q.prototype.writeUint16LE=q.prototype.writeUInt16LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,65535,0),this[M]=255&L,this[M+1]=L>>>8,M+2},q.prototype.writeUint16BE=q.prototype.writeUInt16BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,65535,0),this[M]=L>>>8,this[M+1]=255&L,M+2},q.prototype.writeUint32LE=q.prototype.writeUInt32LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,4294967295,0),this[M+3]=L>>>24,this[M+2]=L>>>16,this[M+1]=L>>>8,this[M]=255&L,M+4},q.prototype.writeUint32BE=q.prototype.writeUInt32BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,4294967295,0),this[M]=L>>>24,this[M+1]=L>>>16,this[M+2]=L>>>8,this[M+3]=255&L,M+4},q.prototype.writeIntLE=function(L,M,f,E){if(L=+L,M>>>=0,!E){var $=Math.pow(2,8*f-1);Rt(this,L,M,f,$-1,-$)}var z=0,Te=1,Fe=0;for(this[M]=255&L;++z<f&&(Te*=256);)L<0&&Fe===0&&this[M+z-1]!==0&&(Fe=1),this[M+z]=(L/Te|0)-Fe&255;return M+f},q.prototype.writeIntBE=function(L,M,f,E){if(L=+L,M>>>=0,!E){var $=Math.pow(2,8*f-1);Rt(this,L,M,f,$-1,-$)}var z=f-1,Te=1,Fe=0;for(this[M+z]=255&L;--z>=0&&(Te*=256);)L<0&&Fe===0&&this[M+z+1]!==0&&(Fe=1),this[M+z]=(L/Te|0)-Fe&255;return M+f},q.prototype.writeInt8=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,1,127,-128),L<0&&(L=255+L+1),this[M]=255&L,M+1},q.prototype.writeInt16LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,32767,-32768),this[M]=255&L,this[M+1]=L>>>8,M+2},q.prototype.writeInt16BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,2,32767,-32768),this[M]=L>>>8,this[M+1]=255&L,M+2},q.prototype.writeInt32LE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,2147483647,-2147483648),this[M]=255&L,this[M+1]=L>>>8,this[M+2]=L>>>16,this[M+3]=L>>>24,M+4},q.prototype.writeInt32BE=function(L,M,f){return L=+L,M>>>=0,f||Rt(this,L,M,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[M]=L>>>24,this[M+1]=L>>>16,this[M+2]=L>>>8,this[M+3]=255&L,M+4},q.prototype.writeFloatLE=function(L,M,f){return jt(this,L,M,!0,f)},q.prototype.writeFloatBE=function(L,M,f){return jt(this,L,M,!1,f)},q.prototype.writeDoubleLE=function(L,M,f){return Wt(this,L,M,!0,f)},q.prototype.writeDoubleBE=function(L,M,f){return Wt(this,L,M,!1,f)},q.prototype.copy=function(L,M,f,E){if(!q.isBuffer(L))throw new TypeError("argument should be a Buffer");if(f||(f=0),E||E===0||(E=this.length),M>=L.length&&(M=L.length),M||(M=0),E>0&&E<f&&(E=f),E===f||L.length===0||this.length===0)return 0;if(M<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),L.length-M<E-f&&(E=L.length-M+f);var $=E-f;return this===L&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(M,f,E):Uint8Array.prototype.set.call(L,this.subarray(f,E),M),$},q.prototype.fill=function(L,M,f,E){if(typeof L=="string"){if(typeof M=="string"?(E=M,M=0,f=this.length):typeof f=="string"&&(E=f,f=this.length),E!==void 0&&typeof E!="string")throw new TypeError("encoding must be a string");if(typeof E=="string"&&!q.isEncoding(E))throw new TypeError("Unknown encoding: "+E);if(L.length===1){var $=L.charCodeAt(0);(E==="utf8"&&$<128||E==="latin1")&&(L=$)}}else typeof L=="number"?L&=255:typeof L=="boolean"&&(L=Number(L));if(M<0||this.length<M||this.length<f)throw new RangeError("Out of range index");if(f<=M)return this;var z;if(M>>>=0,f=f===void 0?this.length:f>>>0,L||(L=0),typeof L=="number")for(z=M;z<f;++z)this[z]=L;else{var Te=q.isBuffer(L)?L:q.from(L,E),Fe=Te.length;if(Fe===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(z=0;z<f-M;++z)this[z+M]=Te[z%Fe]}return this};var $t=/[^+/0-9A-Za-z-_]/g;function cn(L,M){var f;M=M||1/0;for(var E=L.length,$=null,z=[],Te=0;Te<E;++Te){if((f=L.charCodeAt(Te))>55295&&f<57344){if(!$){if(f>56319){(M-=3)>-1&&z.push(239,191,189);continue}if(Te+1===E){(M-=3)>-1&&z.push(239,191,189);continue}$=f;continue}if(f<56320){(M-=3)>-1&&z.push(239,191,189),$=f;continue}f=65536+($-55296<<10|f-56320)}else $&&(M-=3)>-1&&z.push(239,191,189);if($=null,f<128){if((M-=1)<0)break;z.push(f)}else if(f<2048){if((M-=2)<0)break;z.push(f>>6|192,63&f|128)}else if(f<65536){if((M-=3)<0)break;z.push(f>>12|224,f>>6&63|128,63&f|128)}else{if(!(f<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;z.push(f>>18|240,f>>12&63|128,f>>6&63|128,63&f|128)}}return z}function bn(L){return ie.toByteArray((function(M){if((M=(M=M.split("=")[0]).trim().replace($t,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M})(L))}function En(L,M,f,E){for(var $=0;$<E&&!($+f>=M.length||$>=L.length);++$)M[$+f]=L[$];return $}function ve(L,M){return L instanceof M||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===M.name}function Ee(L){return L!=L}var st=(function(){for(var L="0123456789abcdef",M=new Array(256),f=0;f<16;++f)for(var E=16*f,$=0;$<16;++$)M[E+$]=L[f]+L[$];return M})()},6877:function(kt,Oe){var oe={parseBuffer:function(y){return new ie(y).parse()},addBoxProcessor:function(y,R){typeof y=="string"&&typeof R=="function"&&(N.prototype._boxProcessors[y]=R)},createFile:function(){return new ie},createBox:function(y,R,Z){var q=N.create(y);return R&&R.append(q,Z),q},createFullBox:function(y,R,Z){var q=oe.createBox(y,R,Z);return q.version=0,q.flags=0,q},Utils:{}};oe.Utils.dataViewToString=function(y,R){var Z=R||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(Z).decode(y);var q=[],Y=0;if(Z==="utf-8")for(;Y<y.byteLength;){var ee=y.getUint8(Y++);ee<128||(ee<224?(ee=(31&ee)<<6,ee|=63&y.getUint8(Y++)):ee<240?(ee=(15&ee)<<12,ee|=(63&y.getUint8(Y++))<<6,ee|=63&y.getUint8(Y++)):(ee=(7&ee)<<18,ee|=(63&y.getUint8(Y++))<<12,ee|=(63&y.getUint8(Y++))<<6,ee|=63&y.getUint8(Y++))),q.push(String.fromCharCode(ee))}else for(;Y<y.byteLength;)q.push(String.fromCharCode(y.getUint8(Y++)));return q.join("")},oe.Utils.utf8ToByteArray=function(y){var R,Z;if(typeof TextEncoder<"u")R=new TextEncoder().encode(y);else for(R=[],Z=0;Z<y.length;++Z){var q=y.charCodeAt(Z);q<128?R.push(q):q<2048?(R.push(192|q>>6),R.push(128|63&q)):q<65536?(R.push(224|q>>12),R.push(128|63&q>>6),R.push(128|63&q)):(R.push(240|q>>18),R.push(128|63&q>>12),R.push(128|63&q>>6),R.push(128|63&q))}return R},oe.Utils.appendBox=function(y,R,Z){if(R._offset=y._cursor.offset,R._root=y._root?y._root:y,R._raw=y._raw,R._parent=y,Z!==-1)if(Z!=null){var q,Y=-1;if(typeof Z=="number")Y=Z;else{if(typeof Z=="string")q=Z;else{if(typeof Z!="object"||!Z.type)return void y.boxes.push(R);q=Z.type}for(var ee=0;ee<y.boxes.length;ee++)if(q===y.boxes[ee].type){Y=ee+1;break}}y.boxes.splice(Y,0,R)}else y.boxes.push(R)},Oe.parseBuffer=oe.parseBuffer,Oe.addBoxProcessor=oe.addBoxProcessor,Oe.createFile=oe.createFile,Oe.createBox=oe.createBox,Oe.createFullBox=oe.createFullBox,Oe.Utils=oe.Utils,oe.Cursor=function(y){this.offset=y===void 0?0:y};var ie=function(y){this._cursor=new oe.Cursor,this.boxes=[],y&&(this._raw=new DataView(y))};ie.prototype.fetch=function(y){var R=this.fetchAll(y,!0);return R.length?R[0]:null},ie.prototype.fetchAll=function(y,R){var Z=[];return ie._sweep.call(this,y,Z,R),Z},ie.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var y=N.parse(this);if(y.type===void 0)break;this.boxes.push(y)}return this},ie._sweep=function(y,R,Z){for(var q in this.type&&this.type==y&&R.push(this),this.boxes){if(R.length&&Z)return;ie._sweep.call(this.boxes[q],y,R,Z)}},ie.prototype.write=function(){var y,R=0;for(y=0;y<this.boxes.length;y++)R+=this.boxes[y].getLength(!1);var Z=new Uint8Array(R);for(this._rawo=new DataView(Z.buffer),this.bytes=Z,this._cursor.offset=0,y=0;y<this.boxes.length;y++)this.boxes[y].write();return Z.buffer},ie.prototype.append=function(y,R){oe.Utils.appendBox(this,y,R)};var N=function(){this._cursor=new oe.Cursor};N.parse=function(y){var R=new N;return R._offset=y._cursor.offset,R._root=y._root?y._root:y,R._raw=y._raw,R._parent=y,R._parseBox(),y._cursor.offset=R._raw.byteOffset+R._raw.byteLength,R},N.create=function(y){var R=new N;return R.type=y,R.boxes=[],R},N.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"],N.prototype._boxProcessors={},N.prototype._procField=function(y,R,Z){this._parsing?this[y]=this._readField(R,Z):this._writeField(R,Z,this[y])},N.prototype._procFieldArray=function(y,R,Z,q){var Y;if(this._parsing)for(this[y]=[],Y=0;Y<R;Y++)this[y][Y]=this._readField(Z,q);else for(Y=0;Y<this[y].length;Y++)this._writeField(Z,q,this[y][Y])},N.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},N.prototype._procEntries=function(y,R,Z){var q;if(this._parsing)for(this[y]=[],q=0;q<R;q++)this[y].push({}),Z.call(this,this[y][q]);else for(q=0;q<R;q++)Z.call(this,this[y][q])},N.prototype._procSubEntries=function(y,R,Z,q){var Y;if(this._parsing)for(y[R]=[],Y=0;Y<Z;Y++)y[R].push({}),q.call(this,y[R][Y]);else for(Y=0;Y<Z;Y++)q.call(this,y[R][Y])},N.prototype._procEntryField=function(y,R,Z,q){this._parsing?y[R]=this._readField(Z,q):this._writeField(Z,q,y[R])},N.prototype._procSubBoxes=function(y,R){var Z;if(this._parsing)for(this[y]=[],Z=0;Z<R;Z++)this[y].push(N.parse(this));else for(Z=0;Z<R;Z++)this._rawo?this[y][Z].write():this.size+=this[y][Z].getLength()},N.prototype._readField=function(y,R){switch(y){case"uint":return this._readUint(R);case"int":return this._readInt(R);case"template":return this._readTemplate(R);case"string":return R===-1?this._readTerminatedString():this._readString(R);case"data":return this._readData(R);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},N.prototype._readInt=function(y){var R=null,Z=this._cursor.offset-this._raw.byteOffset;switch(y){case 8:R=this._raw.getInt8(Z);break;case 16:R=this._raw.getInt16(Z);break;case 32:R=this._raw.getInt32(Z);break;case 64:var q=this._raw.getInt32(Z),Y=this._raw.getInt32(Z+4);R=q*Math.pow(2,32)+Y}return this._cursor.offset+=y>>3,R},N.prototype._readUint=function(y){var R,Z,q=null,Y=this._cursor.offset-this._raw.byteOffset;switch(y){case 8:q=this._raw.getUint8(Y);break;case 16:q=this._raw.getUint16(Y);break;case 24:q=((R=this._raw.getUint16(Y))<<8)+(Z=this._raw.getUint8(Y+2));break;case 32:q=this._raw.getUint32(Y);break;case 64:R=this._raw.getUint32(Y),Z=this._raw.getUint32(Y+4),q=R*Math.pow(2,32)+Z}return this._cursor.offset+=y>>3,q},N.prototype._readString=function(y){for(var R="",Z=0;Z<y;Z++){var q=this._readUint(8);R+=String.fromCharCode(q)}return R},N.prototype._readTemplate=function(y){return this._readUint(y/2)+this._readUint(y/2)/Math.pow(2,y/2)},N.prototype._readTerminatedString=function(){for(var y="";this._cursor.offset-this._offset<this._raw.byteLength;){var R=this._readUint(8);if(R===0)break;y+=String.fromCharCode(R)}return y},N.prototype._readData=function(y){var R=y>0?y:this._raw.byteLength-(this._cursor.offset-this._offset);if(R>0){var Z=new Uint8Array(this._raw.buffer,this._cursor.offset,R);return this._cursor.offset+=R,Z}return null},N.prototype._readUTF8String=function(){var y=this._raw.byteLength-(this._cursor.offset-this._offset),R=null;return y>0&&(R=new DataView(this._raw.buffer,this._cursor.offset,y),this._cursor.offset+=y),R&&oe.Utils.dataViewToString(R)},N.prototype._readUTF8TerminatedString=function(){var y=this._raw.byteLength-(this._cursor.offset-this._offset),R=null;if(y>0){var Z;for(R=new DataView(this._raw.buffer,this._cursor.offset,y),Z=0;Z<y&&R.getUint8(Z)!==0;Z++);R=new DataView(this._raw.buffer,this._cursor.offset,Z),this._cursor.offset+=Math.min(Z+1,y)}return R&&oe.Utils.dataViewToString(R)},N.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{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())}},N.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},N.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(N.parse(this))},N.prototype.append=function(y,R){oe.Utils.appendBox(this,y,R)},N.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 y=0;y<this.boxes.length;y++)this.size+=this.boxes[y].getLength();return this._data&&this._writeData(this._data),this.size},N.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 y=0;y<this.boxes.length;y++)this.boxes[y].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},N.prototype._writeInt=function(y,R){if(this._rawo){var Z=this._cursor.offset-this._rawo.byteOffset;switch(y){case 8:this._rawo.setInt8(Z,R);break;case 16:this._rawo.setInt16(Z,R);break;case 32:this._rawo.setInt32(Z,R);break;case 64:var q=Math.floor(R/Math.pow(2,32)),Y=R-q*Math.pow(2,32);this._rawo.setUint32(Z,q),this._rawo.setUint32(Z+4,Y)}this._cursor.offset+=y>>3}else this.size+=y>>3},N.prototype._writeUint=function(y,R){if(this._rawo){var Z,q,Y=this._cursor.offset-this._rawo.byteOffset;switch(y){case 8:this._rawo.setUint8(Y,R);break;case 16:this._rawo.setUint16(Y,R);break;case 24:Z=(16776960&R)>>8,q=255&R,this._rawo.setUint16(Y,Z),this._rawo.setUint8(Y+2,q);break;case 32:this._rawo.setUint32(Y,R);break;case 64:q=R-(Z=Math.floor(R/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(Y,Z),this._rawo.setUint32(Y+4,q)}this._cursor.offset+=y>>3}else this.size+=y>>3},N.prototype._writeString=function(y,R){for(var Z=0;Z<y;Z++)this._writeUint(8,R.charCodeAt(Z))},N.prototype._writeTerminatedString=function(y){if(y.length!==0){for(var R=0;R<y.length;R++)this._writeUint(8,y.charCodeAt(R));this._writeUint(8,0)}},N.prototype._writeTemplate=function(y,R){var Z=Math.floor(R),q=(R-Z)*Math.pow(2,y/2);this._writeUint(y/2,Z),this._writeUint(y/2,q)},N.prototype._writeData=function(y){if(y)if(this._rawo){if(y instanceof Array){for(var R=this._cursor.offset-this._rawo.byteOffset,Z=0;Z<y.length;Z++)this._rawo.setInt8(R+Z,y[Z]);this._cursor.offset+=y.length}y instanceof Uint8Array&&(this._root.bytes.set(y,this._cursor.offset),this._cursor.offset+=y.length)}else this.size+=y.length},N.prototype._writeUTF8String=function(y){var R=oe.Utils.utf8ToByteArray(y);if(this._rawo)for(var Z=new DataView(this._rawo.buffer,this._cursor.offset,R.length),q=0;q<R.length;q++)Z.setUint8(q,R[q]);else this.size+=R.length},N.prototype._writeField=function(y,R,Z){switch(y){case"uint":this._writeUint(R,Z);break;case"int":this._writeInt(R,Z);break;case"template":this._writeTemplate(R,Z);break;case"string":R==-1?this._writeTerminatedString(Z):this._writeString(R,Z);break;case"data":this._writeData(Z);break;case"utf8":this._writeUTF8String(Z)}},N.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},N.prototype._boxProcessors.avc1=N.prototype._boxProcessors.avc2=N.prototype._boxProcessors.avc3=N.prototype._boxProcessors.avc4=N.prototype._boxProcessors.hvc1=N.prototype._boxProcessors.hev1=N.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)},N.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_count","uint",32),this._procEntryField(y,"sample_offset",this.version===1?"int":"uint",32)}))},N.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},N.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},N.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"segment_duration","uint",this.version===1?64:32),this._procEntryField(y,"media_time","int",this.version===1?64:32),this._procEntryField(y,"media_rate_integer","int",16),this._procEntryField(y,"media_rate_fraction","int",16)}))},N.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)},N.prototype._boxProcessors.free=N.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},N.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},N.prototype._boxProcessors.ftyp=N.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var y=-1;this._parsing&&(y=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",y,"string",4)},N.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)},N.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},N.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},N.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},N.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},N.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(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},N.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},N.prototype._boxProcessors.meta=function(){this._procFullBox()},N.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},N.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},N.prototype._boxProcessors.mp4a=N.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)},N.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)},N.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},N.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)},N.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(y){this._procEntryField(y,"entity_id","uint",32)})),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},N.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},N.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},N.prototype._boxProcessors.sdtp=function(){this._procFullBox();var y=-1;this._parsing&&(y=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",y,"uint",8)},N.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(y){this._parsing||(y.reference=(1&y.reference_type)<<31,y.reference|=2147483647&y.referenced_size,y.sap=(1&y.starts_with_SAP)<<31,y.sap|=(3&y.SAP_type)<<28,y.sap|=268435455&y.SAP_delta_time),this._procEntryField(y,"reference","uint",32),this._procEntryField(y,"subsegment_duration","uint",32),this._procEntryField(y,"sap","uint",32),this._parsing&&(y.reference_type=y.reference>>31&1,y.referenced_size=2147483647&y.reference,y.starts_with_SAP=y.sap>>31&1,y.SAP_type=y.sap>>28&7,y.SAP_delta_time=268435455&y.sap)}))},N.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},N.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(y){this._procEntryField(y,"ranges_count","uint",32),this._procSubEntries(y,"ranges",y.ranges_count,(function(R){this._procEntryField(R,"level","uint",8),this._procEntryField(R,"range_size","uint",24)}))}))},N.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},N.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},N.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_count","uint",32),this._procEntryField(y,"sample_delta","uint",32)}))},N.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(y){this._procEntryField(y,"sample_delta","uint",32),this._procEntryField(y,"subsample_count","uint",16),this._procSubEntries(y,"subsamples",y.subsample_count,(function(R){this._procEntryField(R,"subsample_size","uint",this.version===1?32:16),this._procEntryField(R,"subsample_priority","uint",8),this._procEntryField(R,"discardable","uint",8),this._procEntryField(R,"codec_specific_parameters","uint",32)}))}))},N.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)},N.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},N.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},N.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(y){this._procEntryField(y,"time","uint",this.version===1?64:32),this._procEntryField(y,"moof_offset","uint",this.version===1?64:32),this._procEntryField(y,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(y,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(y,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},N.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)},N.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)},N.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(y){256&this.flags&&this._procEntryField(y,"sample_duration","uint",32),512&this.flags&&this._procEntryField(y,"sample_size","uint",32),1024&this.flags&&this._procEntryField(y,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(y,"sample_composition_time_offset",this.version===1?"int":"uint",32)}))},N.prototype._boxProcessors["url "]=N.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},N.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},N.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},N.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},N.prototype._boxProcessors.vtte=function(){}},9826:function(kt){var Oe,oe=typeof Reflect=="object"?Reflect:null,ie=oe&&typeof oe.apply=="function"?oe.apply:function(ye,ke,Ie){return Function.prototype.apply.call(ye,ke,Ie)};Oe=oe&&typeof oe.ownKeys=="function"?oe.ownKeys:Object.getOwnPropertySymbols?function(ye){return Object.getOwnPropertyNames(ye).concat(Object.getOwnPropertySymbols(ye))}:function(ye){return Object.getOwnPropertyNames(ye)};var N=Number.isNaN||function(ye){return ye!=ye};function y(){y.init.call(this)}kt.exports=y,kt.exports.once=function(ye,ke){return new Promise((function(Ie,Pe){function Ge(Ae){ye.removeListener(ke,yt),Pe(Ae)}function yt(){typeof ye.removeListener=="function"&&ye.removeListener("error",Ge),Ie([].slice.call(arguments))}se(ye,ke,yt,{once:!0}),ke!=="error"&&(function(Ae,ge){typeof Ae.on=="function"&&se(Ae,"error",ge,{once:!0})})(ye,Ge)}))},y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var R=10;function Z(ye){if(typeof ye!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ye)}function q(ye){return ye._maxListeners===void 0?y.defaultMaxListeners:ye._maxListeners}function Y(ye,ke,Ie,Pe){var Ge,yt,Ae,ge;if(Z(Ie),(yt=ye._events)===void 0?(yt=ye._events=Object.create(null),ye._eventsCount=0):(yt.newListener!==void 0&&(ye.emit("newListener",ke,Ie.listener?Ie.listener:Ie),yt=ye._events),Ae=yt[ke]),Ae===void 0)Ae=yt[ke]=Ie,++ye._eventsCount;else if(typeof Ae=="function"?Ae=yt[ke]=Pe?[Ie,Ae]:[Ae,Ie]:Pe?Ae.unshift(Ie):Ae.push(Ie),(Ge=q(ye))>0&&Ae.length>Ge&&!Ae.warned){Ae.warned=!0;var ue=new Error("Possible EventEmitter memory leak detected. "+Ae.length+" "+String(ke)+" listeners added. Use emitter.setMaxListeners() to increase limit");ue.name="MaxListenersExceededWarning",ue.emitter=ye,ue.type=ke,ue.count=Ae.length,ge=ue,console&&console.warn&&console.warn(ge)}return ye}function ee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(ye,ke,Ie){var Pe={fired:!1,wrapFn:void 0,target:ye,type:ke,listener:Ie},Ge=ee.bind(Pe);return Ge.listener=Ie,Pe.wrapFn=Ge,Ge}function o(ye,ke,Ie){var Pe=ye._events;if(Pe===void 0)return[];var Ge=Pe[ke];return Ge===void 0?[]:typeof Ge=="function"?Ie?[Ge.listener||Ge]:[Ge]:Ie?(function(yt){for(var Ae=new Array(yt.length),ge=0;ge<Ae.length;++ge)Ae[ge]=yt[ge].listener||yt[ge];return Ae})(Ge):U(Ge,Ge.length)}function P(ye){var ke=this._events;if(ke!==void 0){var Ie=ke[ye];if(typeof Ie=="function")return 1;if(Ie!==void 0)return Ie.length}return 0}function U(ye,ke){for(var Ie=new Array(ke),Pe=0;Pe<ke;++Pe)Ie[Pe]=ye[Pe];return Ie}function se(ye,ke,Ie,Pe){if(typeof ye.on=="function")Pe.once?ye.once(ke,Ie):ye.on(ke,Ie);else{if(typeof ye.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ye);ye.addEventListener(ke,(function Ge(yt){Pe.once&&ye.removeEventListener(ke,Ge),Ie(yt)}))}}Object.defineProperty(y,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(ye){if(typeof ye!="number"||ye<0||N(ye))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ye+".");R=ye}}),y.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},y.prototype.setMaxListeners=function(ye){if(typeof ye!="number"||ye<0||N(ye))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ye+".");return this._maxListeners=ye,this},y.prototype.getMaxListeners=function(){return q(this)},y.prototype.emit=function(ye){for(var ke=[],Ie=1;Ie<arguments.length;Ie++)ke.push(arguments[Ie]);var Pe=ye==="error",Ge=this._events;if(Ge!==void 0)Pe=Pe&&Ge.error===void 0;else if(!Pe)return!1;if(Pe){var yt;if(ke.length>0&&(yt=ke[0]),yt instanceof Error)throw yt;var Ae=new Error("Unhandled error."+(yt?" ("+yt.message+")":""));throw Ae.context=yt,Ae}var ge=Ge[ye];if(ge===void 0)return!1;if(typeof ge=="function")ie(ge,this,ke);else{var ue=ge.length,we=U(ge,ue);for(Ie=0;Ie<ue;++Ie)ie(we[Ie],this,ke)}return!0},y.prototype.addListener=function(ye,ke){return Y(this,ye,ke,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(ye,ke){return Y(this,ye,ke,!0)},y.prototype.once=function(ye,ke){return Z(ke),this.on(ye,p(this,ye,ke)),this},y.prototype.prependOnceListener=function(ye,ke){return Z(ke),this.prependListener(ye,p(this,ye,ke)),this},y.prototype.removeListener=function(ye,ke){var Ie,Pe,Ge,yt,Ae;if(Z(ke),(Pe=this._events)===void 0)return this;if((Ie=Pe[ye])===void 0)return this;if(Ie===ke||Ie.listener===ke)--this._eventsCount==0?this._events=Object.create(null):(delete Pe[ye],Pe.removeListener&&this.emit("removeListener",ye,Ie.listener||ke));else if(typeof Ie!="function"){for(Ge=-1,yt=Ie.length-1;yt>=0;yt--)if(Ie[yt]===ke||Ie[yt].listener===ke){Ae=Ie[yt].listener,Ge=yt;break}if(Ge<0)return this;Ge===0?Ie.shift():(function(ge,ue){for(;ue+1<ge.length;ue++)ge[ue]=ge[ue+1];ge.pop()})(Ie,Ge),Ie.length===1&&(Pe[ye]=Ie[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ye,Ae||ke)}return this},y.prototype.off=y.prototype.removeListener,y.prototype.removeAllListeners=function(ye){var ke,Ie,Pe;if((Ie=this._events)===void 0)return this;if(Ie.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ie[ye]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete Ie[ye]),this;if(arguments.length===0){var Ge,yt=Object.keys(Ie);for(Pe=0;Pe<yt.length;++Pe)(Ge=yt[Pe])!=="removeListener"&&this.removeAllListeners(Ge);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(ke=Ie[ye])=="function")this.removeListener(ye,ke);else if(ke!==void 0)for(Pe=ke.length-1;Pe>=0;Pe--)this.removeListener(ye,ke[Pe]);return this},y.prototype.listeners=function(ye){return o(this,ye,!0)},y.prototype.rawListeners=function(ye){return o(this,ye,!1)},y.listenerCount=function(ye,ke){return typeof ye.listenerCount=="function"?ye.listenerCount(ke):P.call(ye,ke)},y.prototype.listenerCount=P,y.prototype.eventNames=function(){return this._eventsCount>0?Oe(this._events):[]}},7316:function(kt){kt.exports=function Oe(oe,ie){if(oe===ie)return!0;if(oe&&ie&&typeof oe=="object"&&typeof ie=="object"){if(oe.constructor!==ie.constructor)return!1;var N,y,R;if(Array.isArray(oe)){if((N=oe.length)!=ie.length)return!1;for(y=N;y--!=0;)if(!Oe(oe[y],ie[y]))return!1;return!0}if(oe.constructor===RegExp)return oe.source===ie.source&&oe.flags===ie.flags;if(oe.valueOf!==Object.prototype.valueOf)return oe.valueOf()===ie.valueOf();if(oe.toString!==Object.prototype.toString)return oe.toString()===ie.toString();if((N=(R=Object.keys(oe)).length)!==Object.keys(ie).length)return!1;for(y=N;y--!=0;)if(!Object.prototype.hasOwnProperty.call(ie,R[y]))return!1;for(y=N;y--!=0;){var Z=R[y];if(!Oe(oe[Z],ie[Z]))return!1}return!0}return oe!=oe&&ie!=ie}},7986:function(kt,Oe){Oe.read=function(oe,ie,N,y,R){var Z,q,Y=8*R-y-1,ee=(1<<Y)-1,p=ee>>1,o=-7,P=N?R-1:0,U=N?-1:1,se=oe[ie+P];for(P+=U,Z=se&(1<<-o)-1,se>>=-o,o+=Y;o>0;Z=256*Z+oe[ie+P],P+=U,o-=8);for(q=Z&(1<<-o)-1,Z>>=-o,o+=y;o>0;q=256*q+oe[ie+P],P+=U,o-=8);if(Z===0)Z=1-p;else{if(Z===ee)return q?NaN:1/0*(se?-1:1);q+=Math.pow(2,y),Z-=p}return(se?-1:1)*q*Math.pow(2,Z-y)},Oe.write=function(oe,ie,N,y,R,Z){var q,Y,ee,p=8*Z-R-1,o=(1<<p)-1,P=o>>1,U=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,se=y?0:Z-1,ye=y?1:-1,ke=ie<0||ie===0&&1/ie<0?1:0;for(ie=Math.abs(ie),isNaN(ie)||ie===1/0?(Y=isNaN(ie)?1:0,q=o):(q=Math.floor(Math.log(ie)/Math.LN2),ie*(ee=Math.pow(2,-q))<1&&(q--,ee*=2),(ie+=q+P>=1?U/ee:U*Math.pow(2,1-P))*ee>=2&&(q++,ee/=2),q+P>=o?(Y=0,q=o):q+P>=1?(Y=(ie*ee-1)*Math.pow(2,R),q+=P):(Y=ie*Math.pow(2,P-1)*Math.pow(2,R),q=0));R>=8;oe[N+se]=255&Y,se+=ye,Y/=256,R-=8);for(q=q<<R|Y,p+=R;p>0;oe[N+se]=255&q,se+=ye,q/=256,p-=8);oe[N+se-ye]|=128*ke}},5474:function(kt,Oe,oe){(function(ie){ie.parser=function(f,E){return new R(f,E)},ie.SAXParser=R,ie.SAXStream=q,ie.createStream=function(f,E){return new q(f,E)},ie.MAX_BUFFER_LENGTH=65536;var N,y=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function R(f,E){if(!(this instanceof R))return new R(f,E);var $=this;(function(z){for(var Te=0,Fe=y.length;Te<Fe;Te++)z[y[Te]]=""})($),$.q=$.c="",$.bufferCheckPosition=ie.MAX_BUFFER_LENGTH,$.opt=E||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!f,$.noscript=!(!f&&!$.opt.noscript),$.state=be.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=$.strictEntities?Object.create(ie.XML_ENTITIES):Object.create(ie.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(Ie)),$.trackPosition=$.opt.position!==!1,$.trackPosition&&($.position=$.line=$.column=0),Ve($,"onready")}ie.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(f){function E(){}return E.prototype=f,new E}),Object.keys||(Object.keys=function(f){var E=[];for(var $ in f)f.hasOwnProperty($)&&E.push($);return E}),R.prototype={end:function(){Wt(this)},write:function(f){var E=this;if(this.error)throw this.error;if(E.closed)return jt(E,"Cannot write after close. Assign an onready handler.");if(f===null)return Wt(E);typeof f=="object"&&(f=f.toString());for(var $=0,z="";z=M(f,$++),E.c=z,z;)switch(E.trackPosition&&(E.position++,z===`
|
|
2
2
|
`?(E.line++,E.column=0):E.column++),E.state){case be.BEGIN:if(E.state=be.BEGIN_WHITESPACE,z==="\uFEFF")continue;L(E,z);continue;case be.BEGIN_WHITESPACE:L(E,z);continue;case be.TEXT:if(E.sawRoot&&!E.closedRoot){for(var Te=$-1;z&&z!=="<"&&z!=="&";)(z=M(f,$++))&&E.trackPosition&&(E.position++,z===`
|
|
3
3
|
`?(E.line++,E.column=0):E.column++);E.textNode+=f.substring(Te,$-1)}z!=="<"||E.sawRoot&&E.closedRoot&&!E.strict?(!we(Y,z)||E.sawRoot&&!E.closedRoot||$t(E,"Text data outside of root node."),z==="&"?E.state=be.TEXT_ENTITY:E.textNode+=z):(E.state=be.OPEN_WAKA,E.startTagPosition=E.position);continue;case be.SCRIPT:z==="<"?E.state=be.SCRIPT_ENDING:E.script+=z;continue;case be.SCRIPT_ENDING:z==="/"?E.state=be.CLOSE_TAG:(E.script+="<"+z,E.state=be.SCRIPT);continue;case be.OPEN_WAKA:if(z==="!")E.state=be.SGML_DECL,E.sgmlDecl="";else if(!ue(Y,z))if(ue(Pe,z))E.state=be.OPEN_TAG,E.tagName=z;else if(z==="/")E.state=be.CLOSE_TAG,E.tagName="";else if(z==="?")E.state=be.PROC_INST,E.procInstName=E.procInstBody="";else{if($t(E,"Unencoded <"),E.startTagPosition+1<E.position){var Fe=E.position-E.startTagPosition;z=new Array(Fe).join(" ")+z}E.textNode+="<"+z,E.state=be.TEXT}continue;case be.SGML_DECL:(E.sgmlDecl+z).toUpperCase()===U?(Ue(E,"onopencdata"),E.state=be.CDATA,E.sgmlDecl="",E.cdata=""):E.sgmlDecl+z==="--"?(E.state=be.COMMENT,E.comment="",E.sgmlDecl=""):(E.sgmlDecl+z).toUpperCase()===se?(E.state=be.DOCTYPE,(E.doctype||E.sawRoot)&&$t(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):z===">"?(Ue(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=be.TEXT):(ue(o,z)&&(E.state=be.SGML_DECL_QUOTED),E.sgmlDecl+=z);continue;case be.SGML_DECL_QUOTED:z===E.q&&(E.state=be.SGML_DECL,E.q=""),E.sgmlDecl+=z;continue;case be.DOCTYPE:z===">"?(E.state=be.TEXT,Ue(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=z,z==="["?E.state=be.DOCTYPE_DTD:ue(o,z)&&(E.state=be.DOCTYPE_QUOTED,E.q=z));continue;case be.DOCTYPE_QUOTED:E.doctype+=z,z===E.q&&(E.q="",E.state=be.DOCTYPE);continue;case be.DOCTYPE_DTD:E.doctype+=z,z==="]"?E.state=be.DOCTYPE:ue(o,z)&&(E.state=be.DOCTYPE_DTD_QUOTED,E.q=z);continue;case be.DOCTYPE_DTD_QUOTED:E.doctype+=z,z===E.q&&(E.state=be.DOCTYPE_DTD,E.q="");continue;case be.COMMENT:z==="-"?E.state=be.COMMENT_ENDING:E.comment+=z;continue;case be.COMMENT_ENDING:z==="-"?(E.state=be.COMMENT_ENDED,E.comment=Zt(E.opt,E.comment),E.comment&&Ue(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+z,E.state=be.COMMENT);continue;case be.COMMENT_ENDED:z!==">"?($t(E,"Malformed comment"),E.comment+="--"+z,E.state=be.COMMENT):E.state=be.TEXT;continue;case be.CDATA:z==="]"?E.state=be.CDATA_ENDING:E.cdata+=z;continue;case be.CDATA_ENDING:z==="]"?E.state=be.CDATA_ENDING_2:(E.cdata+="]"+z,E.state=be.CDATA);continue;case be.CDATA_ENDING_2:z===">"?(E.cdata&&Ue(E,"oncdata",E.cdata),Ue(E,"onclosecdata"),E.cdata="",E.state=be.TEXT):z==="]"?E.cdata+="]":(E.cdata+="]]"+z,E.state=be.CDATA);continue;case be.PROC_INST:z==="?"?E.state=be.PROC_INST_ENDING:ue(Y,z)?E.state=be.PROC_INST_BODY:E.procInstName+=z;continue;case be.PROC_INST_BODY:if(!E.procInstBody&&ue(Y,z))continue;z==="?"?E.state=be.PROC_INST_ENDING:E.procInstBody+=z;continue;case be.PROC_INST_ENDING:z===">"?(Ue(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=be.TEXT):(E.procInstBody+="?"+z,E.state=be.PROC_INST_BODY);continue;case be.OPEN_TAG:ue(Ge,z)?E.tagName+=z:(cn(E),z===">"?ve(E):z==="/"?E.state=be.OPEN_TAG_SLASH:(we(Y,z)&&$t(E,"Invalid character in tag name"),E.state=be.ATTRIB));continue;case be.OPEN_TAG_SLASH:z===">"?(ve(E,!0),Ee(E)):($t(E,"Forward-slash in opening tag not followed by >"),E.state=be.ATTRIB);continue;case be.ATTRIB:if(ue(Y,z))continue;z===">"?ve(E):z==="/"?E.state=be.OPEN_TAG_SLASH:ue(Pe,z)?(E.attribName=z,E.attribValue="",E.state=be.ATTRIB_NAME):$t(E,"Invalid attribute name");continue;case be.ATTRIB_NAME:z==="="?E.state=be.ATTRIB_VALUE:z===">"?($t(E,"Attribute without value"),E.attribValue=E.attribName,En(E),ve(E)):ue(Y,z)?E.state=be.ATTRIB_NAME_SAW_WHITE:ue(Ge,z)?E.attribName+=z:$t(E,"Invalid attribute name");continue;case be.ATTRIB_NAME_SAW_WHITE:if(z==="=")E.state=be.ATTRIB_VALUE;else{if(ue(Y,z))continue;$t(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",Ue(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",z===">"?ve(E):ue(Pe,z)?(E.attribName=z,E.state=be.ATTRIB_NAME):($t(E,"Invalid attribute name"),E.state=be.ATTRIB)}continue;case be.ATTRIB_VALUE:if(ue(Y,z))continue;ue(o,z)?(E.q=z,E.state=be.ATTRIB_VALUE_QUOTED):($t(E,"Unquoted attribute value"),E.state=be.ATTRIB_VALUE_UNQUOTED,E.attribValue=z);continue;case be.ATTRIB_VALUE_QUOTED:if(z!==E.q){z==="&"?E.state=be.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=z;continue}En(E),E.q="",E.state=be.ATTRIB_VALUE_CLOSED;continue;case be.ATTRIB_VALUE_CLOSED:ue(Y,z)?E.state=be.ATTRIB:z===">"?ve(E):z==="/"?E.state=be.OPEN_TAG_SLASH:ue(Pe,z)?($t(E,"No whitespace between attributes"),E.attribName=z,E.attribValue="",E.state=be.ATTRIB_NAME):$t(E,"Invalid attribute name");continue;case be.ATTRIB_VALUE_UNQUOTED:if(we(P,z)){z==="&"?E.state=be.ATTRIB_VALUE_ENTITY_U:E.attribValue+=z;continue}En(E),z===">"?ve(E):E.state=be.ATTRIB;continue;case be.CLOSE_TAG:if(E.tagName)z===">"?Ee(E):ue(Ge,z)?E.tagName+=z:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=be.SCRIPT):(we(Y,z)&&$t(E,"Invalid tagname in closing tag"),E.state=be.CLOSE_TAG_SAW_WHITE);else{if(ue(Y,z))continue;we(Pe,z)?E.script?(E.script+="</"+z,E.state=be.SCRIPT):$t(E,"Invalid tagname in closing tag."):E.tagName=z}continue;case be.CLOSE_TAG_SAW_WHITE:if(ue(Y,z))continue;z===">"?Ee(E):$t(E,"Invalid characters in closing tag");continue;case be.TEXT_ENTITY:case be.ATTRIB_VALUE_ENTITY_Q:case be.ATTRIB_VALUE_ENTITY_U:var Re,De;switch(E.state){case be.TEXT_ENTITY:Re=be.TEXT,De="textNode";break;case be.ATTRIB_VALUE_ENTITY_Q:Re=be.ATTRIB_VALUE_QUOTED,De="attribValue";break;case be.ATTRIB_VALUE_ENTITY_U:Re=be.ATTRIB_VALUE_UNQUOTED,De="attribValue"}z===";"?(E[De]+=st(E),E.entity="",E.state=Re):ue(E.entity.length?Ae:yt,z)?E.entity+=z:($t(E,"Invalid character in entity name"),E[De]+="&"+E.entity+z,E.entity="",E.state=Re);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&(function(Se){for(var ze=Math.max(ie.MAX_BUFFER_LENGTH,10),Ze=0,Ke=0,lt=y.length;Ke<lt;Ke++){var Yt=Se[y[Ke]].length;if(Yt>ze)switch(y[Ke]){case"textNode":Rt(Se);break;case"cdata":Ue(Se,"oncdata",Se.cdata),Se.cdata="";break;case"script":Ue(Se,"onscript",Se.script),Se.script="";break;default:jt(Se,"Max buffer length exceeded: "+y[Ke])}Ze=Math.max(Ze,Yt)}var xt=ie.MAX_BUFFER_LENGTH-Ze;Se.bufferCheckPosition=xt+Se.position})(E),E},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var f;Rt(f=this),f.cdata!==""&&(Ue(f,"oncdata",f.cdata),f.cdata=""),f.script!==""&&(Ue(f,"onscript",f.script),f.script="")}};try{N=oe(3515).Stream}catch{N=function(){}}var Z=ie.EVENTS.filter((function(f){return f!=="error"&&f!=="end"}));function q(f,E){if(!(this instanceof q))return new q(f,E);N.apply(this),this._parser=new R(f,E),this.writable=!0,this.readable=!0;var $=this;this._parser.onend=function(){$.emit("end")},this._parser.onerror=function(z){$.emit("error",z),$._parser.error=null},this._decoder=null,Z.forEach((function(z){Object.defineProperty($,"on"+z,{get:function(){return $._parser["on"+z]},set:function(Te){if(!Te)return $.removeAllListeners(z),$._parser["on"+z]=Te,Te;$.on(z,Te)},enumerable:!0,configurable:!1})}))}q.prototype=Object.create(N.prototype,{constructor:{value:q}}),q.prototype.write=function(f){if(typeof pi=="function"&&typeof pi.isBuffer=="function"&&pi.isBuffer(f)){if(!this._decoder){var E=oe(748).StringDecoder;this._decoder=new E("utf8")}f=this._decoder.write(f)}return this._parser.write(f.toString()),this.emit("data",f),!0},q.prototype.end=function(f){return f&&f.length&&this.write(f),this._parser.end(),!0},q.prototype.on=function(f,E){var $=this;return $._parser["on"+f]||Z.indexOf(f)===-1||($._parser["on"+f]=function(){var z=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);z.splice(0,0,f),$.emit.apply($,z)}),N.prototype.on.call($,f,E)};var Y=`\r
|
|
4
4
|
`,ee="0124356789",p="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",o=`'"`,P=Y+">",U="[CDATA[",se="DOCTYPE",ye="http://www.w3.org/XML/1998/namespace",ke="http://www.w3.org/2000/xmlns/",Ie={xml:ye,xmlns:ke};Y=ge(Y),ee=ge(ee),p=ge(p);var Pe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ge=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,yt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ae=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function ge(f){return f.split("").reduce((function(E,$){return E[$]=!0,E}),{})}function ue(f,E){return(function($){return Object.prototype.toString.call($)==="[object RegExp]"})(f)?!!E.match(f):f[E]}function we(f,E){return!ue(f,E)}o=ge(o),P=ge(P);var Ne,He,Ht,be=0;for(var mt in ie.STATE={BEGIN:be++,BEGIN_WHITESPACE:be++,TEXT:be++,TEXT_ENTITY:be++,OPEN_WAKA:be++,SGML_DECL:be++,SGML_DECL_QUOTED:be++,DOCTYPE:be++,DOCTYPE_QUOTED:be++,DOCTYPE_DTD:be++,DOCTYPE_DTD_QUOTED:be++,COMMENT_STARTING:be++,COMMENT:be++,COMMENT_ENDING:be++,COMMENT_ENDED:be++,CDATA:be++,CDATA_ENDING:be++,CDATA_ENDING_2:be++,PROC_INST:be++,PROC_INST_BODY:be++,PROC_INST_ENDING:be++,OPEN_TAG:be++,OPEN_TAG_SLASH:be++,ATTRIB:be++,ATTRIB_NAME:be++,ATTRIB_NAME_SAW_WHITE:be++,ATTRIB_VALUE:be++,ATTRIB_VALUE_QUOTED:be++,ATTRIB_VALUE_CLOSED:be++,ATTRIB_VALUE_UNQUOTED:be++,ATTRIB_VALUE_ENTITY_Q:be++,ATTRIB_VALUE_ENTITY_U:be++,CLOSE_TAG:be++,CLOSE_TAG_SAW_WHITE:be++,SCRIPT:be++,SCRIPT_ENDING:be++},ie.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ie.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(ie.ENTITIES).forEach((function(f){var E=ie.ENTITIES[f],$=typeof E=="number"?String.fromCharCode(E):E;ie.ENTITIES[f]=$})),ie.STATE)ie.STATE[ie.STATE[mt]]=mt;function Ve(f,E,$){f[E]&&f[E]($)}function Ue(f,E,$){f.textNode&&Rt(f),Ve(f,E,$)}function Rt(f){f.textNode=Zt(f.opt,f.textNode),f.textNode&&Ve(f,"ontext",f.textNode),f.textNode=""}function Zt(f,E){return f.trim&&(E=E.trim()),f.normalize&&(E=E.replace(/\s+/g," ")),E}function jt(f,E){return Rt(f),f.trackPosition&&(E+=`
|
|
@@ -18,4 +18,4 @@ Char: `+b[A])}return A+1&&(A+=1),O}if(b.charCodeAt(A+1)===C){A=b.indexOf(X,A),A+
|
|
|
18
18
|
Live Delay: ${b.liveDelay-S}, Live catchup max drift: ${b.maxDrift}
|
|
19
19
|
`)}else n.liveDelay=b.liveDelay,n.liveCatchup.maxDrift=b.maxDrift,i.debug(`Found latency properties coming from service description: Live Delay: ${b.liveDelay}, Live catchup max drift: ${b.maxDrift}`)})(u),u.playbackRate&&(function(h){const b=h.playbackRate.min?Math.round(1e3*(h.playbackRate.min-1))/1e3:NaN,S=h.playbackRate.max?Math.round(1e3*(h.playbackRate.max-1))/1e3:NaN;n.liveCatchup.playbackRate.min=b,n.liveCatchup.playbackRate.max=S,i.debug(`Found latency properties coming from service description: Live catchup min playback rate: ${b}`),i.debug(`Found latency properties coming from service description: Live catchup max playback rate: ${S}`)})(u),u.operatingQuality,u.operatingBandwidth&&(function(h){if(!h||!h.operatingBandwidth||!h.operatingBandwidth.mediaType||h.operatingBandwidth.mediaType==="all")return;const b={};b.minBandwidth=h.operatingBandwidth.min,b.maxBandwidth=h.operatingBandwidth.max,b.targetBandwidth=h.operatingBandwidth.target;const S=[];h.operatingBandwidth.mediaType===Bl||h.operatingBandwidth.mediaType===Gl?S.push(h.operatingBandwidth.mediaType):h.operatingBandwidth.mediaType==="any"&&(S.push(Gl),S.push(Bl)),S.forEach((A=>{isNaN(b.minBandwidth)||g("minBitrate",A,b.minBandwidth),isNaN(b.maxBandwidth)||g("maxBitrate",A,b.maxBandwidth),isNaN(b.targetBandwidth)||g("initialBitrate",A,b.targetBandwidth)}))})(u),u.contentSteering&&(function(h){n.contentSteering=h.contentSteering})(u),u.clientDataReporting&&(function(h){n.clientDataReporting=h.clientDataReporting})(u))},reset:function(){m()},setConfig:function(c){c&&c.adapter&&(l=c.adapter)}},i=(0,R.default)(t).getInstance().getLogger(e),m(),e}Hl.__dashjs_factory_name="ServiceDescriptionController";var Cu=ie.default.getSingletonFactory(Hl);class xu{constructor(e){this._ranges=[];for(const n of e){const r=this._ranges,i={start:n.start,end:n.end},l=r.length?r[r.length-1]:null;!l||i.start>l.end?r.push(i):l.end=i.end}}get length(){return this._ranges.length}start(e){return this._ranges[e].start}end(e){return this._ranges[e].end}}var Yl=class{constructor(t,e){this.eventBus=e,this.mimeType=t,this.updating=!1,this.chunks=[],this.appendWindowStart=0,this.appendWindowEnd=1/0,this.timestampOffset=0,this.mode="segments"}appendBuffer(t,e,n){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"appendBuffer",data:t,start:e,end:n}),Number.isNaN(e)||(this.chunks.push({data:t,start:e,end:n}),this.chunks.sort(((r,i)=>r.start-i.start))),setTimeout((()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})}),10)}abort(){this.updating&&(this.updating=!1,this.eventBus.trigger("externalSourceBufferAbort",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType}))}remove(t,e){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"remove",start:t,end:e}),this.chunks=this.chunks.filter((n=>n.end<=t||n.start>=e)),setTimeout((()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})}),10)}get buffered(){return new xu(this.chunks)}};function Vl(t){const e=this.context,n=(0,Z.default)(e).getInstance(),r=t.textController,i=t.eventBus;let l,m,g,c,T,_,u=[],h=[],b=!1,S=t.mediaSource,A=null;function x(j){return j.mimeType+';codecs="'+j.codecs+'"'}function D(j){return c=r.getTextSourceBuffer(j),Promise.resolve()}function H(){if(typeof c.addEventListener=="function")try{c.addEventListener("updateend",d,!1),c.addEventListener("error",C,!1),c.addEventListener("abort",C,!1)}catch{_=setInterval(d,50)}else _=setInterval(d,50)}function K(){try{typeof c.removeEventListener=="function"&&(c.removeEventListener("updateend",d,!1),c.removeEventListener("error",C,!1),c.removeEventListener("abort",C,!1)),clearInterval(_)}catch(j){g.error(j)}}function V(j){return new Promise((ae=>{c&&n.get().streaming.buffer.useAppendWindow?W((()=>{try{if(!c)return void ae();let ne=S.duration,de=0;j&&!isNaN(j.start)&&!isNaN(j.duration)&&isFinite(j.duration)&&(ne=j.start+j.duration),j&&!isNaN(j.start)&&(de=j.start),c.appendWindowEnd===ne&&c.appendWindowStart===de||(c.appendWindowStart=0,c.appendWindowEnd=ne+.01,c.appendWindowStart=Math.max(de-.1,0),g.debug(`Updated append window for ${T.type}. Set start to ${c.appendWindowStart} and end to ${c.appendWindowEnd}`)),ae()}catch{g.warn("Failed to set append window"),ae()}})):ae()}))}function X(j){return new Promise((ae=>{c?W((()=>{try{c.timestampOffset===j||isNaN(j)||(c.timestampOffset=j,g.debug(`Set MSE timestamp offset to ${j}`)),ae()}catch{ae()}})):ae()}))}function k(){if(!b&&h.length>0){b=!0;const j=h[0];h.splice(0,1);const ae=function(){b=!1,h.length>0&&k.call(this),j&&j.data&&j.data.segmentType&&j.data.segmentType!==Ae.HTTPRequest.INIT_SEGMENT_TYPE&&delete j.data.bytes,j.promise.resolve({chunk:j.data})};try{if(A=j.request,j.data.bytes.byteLength===0)ae.call(this);else{try{g.debug(`Appending ${j.data.segmentType} from period ${j.data.streamId} to buffer. Request URL: ${j.request.url}, Representation: ID: ${j.data.representation.id}, bitrate: ${j.data.representation.bitrateInKbit}`)}catch{}c instanceof Yl?c.appendBuffer(j.data.bytes,j.data.start,j.data.end):c.appendBuffer?c.appendBuffer(j.data.bytes):c.append(j.data.bytes,j.data),W(ae.bind(this))}}catch(ne){g.fatal('SourceBuffer append failed "'+ne+'"'),h.length>0?k():b=!1,delete j.data.bytes,j.promise.reject({chunk:j.data,error:new Ft.default(ne.code,ne.message)})}}}function w(){u.length>0&&!c.updating&&(u.shift()(),w())}function d(){c.updating||w()}function C(j){const ae=j.target||{};(function(ne,de){let pe=de||{};i.trigger(ne,pe,{streamId:T.streamInfo.id,mediaType:m})})(p.default.SOURCE_BUFFER_ERROR,{error:ae,lastRequestAppended:A})}function W(j){try{u.push(j),c&&!c.updating&&w()}catch(ae){g.error(ae)}}return l={abort:function(){return new Promise((j=>{try{h=[],S.readyState==="open"?W((()=>{try{c&&c.abort(),j()}catch{j()}})):(c&&c.setTextTrack&&S.readyState==="ended"&&c.abort(),j())}catch{j()}}))},abortBeforeAppend:function(){return new Promise((j=>{W((()=>{const ae=c.appendWindowStart,ne=c.appendWindowEnd;c&&(c.abort(),c.appendWindowStart=ae,c.appendWindowEnd=ne),j()}))}))},append:function(j,ae=null){return new Promise(((ne,de)=>{j?(h.push({data:j,promise:{resolve:ne,reject:de},request:ae}),W(k.bind(this))):de({chunk:j,error:new Ft.default(qt.APPEND_ERROR_CODE,qt.APPEND_ERROR_MESSAGE)})}))},changeType:function(j){const ae=x(j);return new Promise((ne=>{W((()=>{c.changeType&&(g.debug(`Changing SourceBuffer codec to ${ae}`),c.changeType(ae)),ne()}))}))},getAllBufferRanges:function(){try{return c?.buffered}catch(j){return g.error("getAllBufferRanges exception: "+j.message),null}},getBuffer:function(){return c},getType:function(){return m},initializeForFirstUse:function(j,ae){T=j;const ne=j.streamInfo;m=T.type;const de=ae?x(ae):j.codec;try{if(de.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return D(ne);c=S.addSourceBuffer(de),H();const pe=[];return pe.push(V(T.streamInfo)),ae&&ae.mseTimeOffset!==void 0&&pe.push(X(ae.mseTimeOffset)),Promise.all(pe)}catch(pe){return T.type==o.default.TEXT&&!T.isFragmented||de.indexOf('codecs="stpp')!==-1||de.indexOf('codecs="vtt')!==-1||de.indexOf("text/vtt")!==-1?D(ne):Promise.reject(pe)}},initializeForStreamSwitch:function(j,ae,ne){T=j,m=T.type,(function(de){c=de.getBuffer()})(ne),H()},remove:function(j){return new Promise(((ae,ne)=>{const de=j.start,pe=j.end;de>=0&&pe>de?W((function(){try{c.remove(de,pe),W((function(){ae({from:de,to:pe,unintended:!1}),j.resolve&&j.resolve()}))}catch(ce){ne({from:de,to:pe,unintended:!1,error:new Ft.default(qt.REMOVE_ERROR_CODE,qt.REMOVE_ERROR_MESSAGE)}),j.reject&&j.reject(ce)}})):ae()}))},removeEventListeners:K,reset:function(){if(c){try{u=[],K(),b=!1,h=[],c.getClassName&&c.getClassName()==="TextSourceBuffer"||(g.debug("Removing sourcebuffer from media source"),S.removeSourceBuffer(c))}catch{}c=null}A=null},updateAppendWindow:V,updateTimestampOffset:X},g=(0,R.default)(e).getInstance().getLogger(l),l}Vl.__dashjs_factory_name="SourceBufferSink";var Kl=ie.default.getClassFactory(Vl);function Wl(t){const e=this.context;let n,r,i,l=[],m=t;function g(c,T){return l=l.filter((_=>!((isNaN(T)||_.start<T)&&(isNaN(c)||_.end>c)))),Promise.resolve()}return n={getAllBufferRanges:function(){let c=[];for(let _=0;_<l.length;_++){let u=l[_];c.length===0||u.start>c[c.length-1].end?c.push({start:u.start,end:u.end}):c[c.length-1].end=u.end}const T={start:function(_){return c[_].start},end:function(_){return c[_].end}};return Object.defineProperty(T,"length",{get:function(){return c.length}}),T},append:function(c){return c.segmentType!=="InitializationSegment"?(l.push(c),l.sort((function(T,_){return T.start-_.start})),i=null):i=c,r.debug("PreBufferSink appended chunk s: "+c.start+"; e: "+c.end),m&&m({chunk:c}),Promise.resolve()},remove:g,abort:function(){return Promise.resolve()},discharge:function(c,T){const _=(function(u,h){return l.filter((b=>(isNaN(h)||b.start<h)&&(isNaN(u)||b.end>u)))})(c,T);return i&&(_.push(i),i=null),g(c,T),_},reset:function(){l=[],i=null,m=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(c){c()},getBuffer:function(){return this}},r=(0,R.default)(e).getInstance().getLogger(n),n}Wl.__dashjs_factory_name="PreBufferSink";var Du=ie.default.getClassFactory(Wl);function $l(){let t={};return{save:function(e){const n=e.streamId,r=e.representation.id;t[n]=t[n]||{},t[n][r]=e},extract:function(e,n){return t&&t[e]&&t[e][n]?t[e][n]:null},reset:function(){t={}}}}$l.__dashjs_factory_name="InitCache";var li=ie.default.getSingletonFactory($l);const oi=.01,Ql="BufferController";function Xl(t){const e=(t=t||{}).capabilities,n=this.context,r=(0,ee.default)(n).getInstance(),i=t.fragmentModel,l=t.playbackController,m=t.representationController,g=t.settings,c=t.streamInfo,T=t.textController,_=t.type;let u,h,b,S,A,x,D,H,K,V,X,k,w,d,C,W,j,ae,ne,de,pe;function ce(_e,Be=null){return new Promise(((at,Le)=>{x=_e,K&&Be&&typeof K.discharge=="function"?(V=K,I(Be).then((()=>{at()})).catch((dt=>{Le(dt)}))):at()}))}function I(_e,Be=new Map,at){return new Promise(((Le,dt)=>{ae&&_e?x?(X=!1,(function(ht,fe,qe){return new Promise((bt=>{K=Kl(n).create({mediaSource:x,textController:T,eventBus:r}),(function(It,dn,$e){const Dt=m.getCurrentRepresentation();let nn=null;return _!==o.default.VIDEO&&_!==o.default.AUDIO||(nn=dn.get(_)),nn?(function(en,mn,rn,Nn){K.initializeForStreamSwitch(en,mn,rn);const Ln=[];return Ln.push(K.abortBeforeAppend()),Ln.push(Ce()),Ln.push(te(mn,Nn)),mn&&mn.mseTimeOffset!==void 0&&Ln.push(sn(mn)),Promise.allSettled(Ln)})(It,Dt,nn,$e):(function(en,mn){return K.initializeForFirstUse(en,mn)})(It,Dt)})(ht,fe,qe).then((()=>sn(m.getCurrentRepresentation()))).then((()=>{bt(K)})).catch((It=>{h.warn("Caught error on create SourceBuffer: "+It),bt(K)}))}))})(_e,Be,at).then((ht=>{Le(ht)})).catch((ht=>{dt(ht)}))):(X=!0,(function(){return new Promise(((ht,fe)=>{K=Du(n).create(B.bind(this)),sn(m.getCurrentRepresentation()).then((()=>{ht(K)})).catch((()=>{fe()}))}))})().then((ht=>{Le(ht)})).catch((ht=>{dt(ht)}))):Le(null)}))}function F(_e){g.get().streaming.cacheInitSegments&&(h.info("Init fragment finished loading saving to",_+"'s init cache"),ae.save(_e.chunk)),h.debug(`Appending init fragment for type ${_}, representationId ${_e.chunk.representation.id} and bandwidth ${_e.chunk.representation.bandwidth}`),G(_e.chunk)}function Q(_e){G(_e.chunk,_e.request)}function G(_e,Be=null){K&&(K.append(_e,Be).then((at=>{B(at)})).catch((at=>{B(at)})),_e.representation.mediaInfo.type===o.default.VIDEO&&it(p.default.VIDEO_CHUNK_RECEIVED,{chunk:_e}))}function v(_e){if(_e&&_e.length>0)for(let Be=0,at=_e.length;Be<at;Be++)h.debug("Buffered range: "+_e.start(Be)+" - "+_e.end(Be)+", currentTime = ",l.getTime())}function B(_e){if(_e.error)return _e.error.code===22&&(function(){if(j=!0,A=.8*zt(),h.warn("Quota exceeded, Critical Buffer: "+A),A>0){const Le=Math.max(.2*A,1),dt=A-Le,ht=Math.min(g.get().streaming.buffer.bufferTimeAtTopQuality,.9*dt),fe=Math.min(g.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*dt),qe={streaming:{buffer:{bufferToKeep:parseFloat(Le.toFixed(5)),bufferTimeAtTopQuality:parseFloat(ht.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(fe.toFixed(5))}}};g.update(qe)}})(),void(_e.error.code!==22&&ft()||(h.warn("Clearing playback buffer to overcome quota exceed situation"),it(p.default.QUOTA_EXCEEDED,{criticalBufferLevel:A,quotaExceededTime:_e.chunk.start}),yn(Qt())));if(!K||(nt(),j=!1,d=_e.chunk,!d||!d.endFragment))return;d&&!isNaN(d.index)&&(D=Math.max(d.index,D),ut());const Be=K.getAllBufferRanges();d.segmentType===Ae.HTTPRequest.MEDIA_SEGMENT_TYPE&&(v(Be),he(),(function(){if(isNaN(pe)||X)return;if(_!==o.default.AUDIO&&_!==o.default.VIDEO)return void(pe=NaN);const Le=l.getTime(),dt=We(Le,0),ht=We(pe,0);if(dt&&ht&&dt.start===ht.start)return void(pe=NaN);const fe=m.getCurrentRepresentation().segmentDuration,qe=We(pe,fe);qe&&(g.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(Le-pe)>fe?pe<=qe.end&&l.seek(Math.max(pe,qe.start),!1,!0):Le<qe.start&&l.seek(qe.start,!1,!0))})());let at=!1;k&&(k.indexOf(d)>0&&(at=!0),k=null),d&&!at&&it(p.default.BYTES_APPENDED_END_FRAGMENT,{startTime:d.start,index:d.index,bufferedRanges:Be,segmentType:d.segmentType,mediaType:_,representationId:d.representation.id})}function O(_e,Be){const at=[];return at.push(sn(_e)),at.push(K?K.abort():Promise.resolve()),at.push(te(_e,Be)),Promise.allSettled(at)}function te(_e,Be){if(!_e||!Be)return h.warn("BufferController._changeCodec() is missing the information about the Representations. Doing nothing"),Promise.resolve();if(_e&&Be&&_e.mimeType===Be.mimeType&&_e.codecFamily===Be.codecFamily)return h.debug(`Switching to new codec ${_e.codecs} without changeType as previous codec ${Be.codecs} is compatible.`),Promise.resolve();if(!g.get().streaming.buffer.useChangeType||!e.supportsChangeType())return h.debug("changeType() not available"),Promise.resolve();h.debug(`Using changeType() to switch from codec ${Be.codecs} to ${_e.codecs}`);const at=_e.dependentRepresentation?_e.dependentRepresentation:_e;return K.changeType(at)}function J(){return new Promise(((_e,Be)=>{let at=le();if(!at||at.length===0)return he(),void _e();yn(at).then((()=>{_e()})).catch((Le=>{Be(Le)}))}))}function le(_e){const Be=[],at=K.getAllBufferRanges();if(!at||at.length===0)return Be;if(!_e&&_e!==0||isNaN(_e))Be.push({start:at.start(0),end:at.end(at.length-1)+.5});else{const Le=(function(ht,fe){const qe=g.get().streaming.buffer.bufferToKeep,bt=fe.start(0);if(ht-bt>qe){let It=Math.max(0,ht-qe);const dn=i.getRequests({state:Se.FRAGMENT_MODEL_EXECUTED,time:ht,threshold:oi})[0];if(dn&&(It=Math.min(dn.startTime,It)),It>0)return{start:bt,end:It}}return null})(_e,at),dt=(function(ht,fe){const qe=fe.end(fe.length-1)+.5,bt=Ye(ht),It=c.manifestInfo.duration>=g.get().streaming.buffer.longFormContentDurationThreshold?g.get().streaming.buffer.bufferTimeAtTopQualityLongForm:g.get().streaming.buffer.bufferTimeAtTopQuality;let dn=isNaN(bt)?ht:Math.min(bt,ht+It);if(dn>=fe.end(fe.length-1))return null;const $e=i.getRequests({state:Se.FRAGMENT_MODEL_EXECUTED,time:ht,threshold:oi})[0];if($e&&(dn=Math.max($e.startTime+$e.duration,dn)),g.get().streaming.buffer.avoidCurrentTimeRangePruning){for(let Dt=0;Dt<fe.length;Dt++)if(fe.start(Dt)<=ht&&ht<=fe.end(Dt)&&fe.start(Dt)<=dn&&dn<=fe.end(Dt)){let nn=dn;dn=Dt+1<fe.length?fe.start(Dt+1):fe.end(Dt)+1,h.debug("Buffered range ["+fe.start(Dt)+", "+fe.end(Dt)+"] overlaps with targetTime "+ht+" and range to be pruned ["+nn+", "+qe+"], using ["+dn+", "+qe+"] instead"+(dn<qe?"":" (no actual pruning)"));break}}return dn<fe.end(fe.length-1)?{start:dn,end:qe}:null})(_e,at);Le&&Be.push(Le),dt&&Be.push(dt)}return Be}function he(){(!de||_===o.default.TEXT&&T.isTextEnabled())&&nt()}function me(){Ut()}function xe(){Ut(),pe=NaN}function We(_e,Be){if(!K)return null;const at=K.getAllBufferRanges();let Le,dt,ht=0,fe=0,qe=null,bt=null,It=0;const dn=isNaN(Be)?.15:Be;if(at!=null){for(dt=0,Le=at.length;dt<Le;dt++)if(ht=at.start(dt),fe=at.end(dt),qe===null)It=Math.abs(ht-_e),(_e>=ht&&_e<fe||It<=dn)&&(qe=ht,bt=fe);else{if(It=ht-bt,!(It<=dn))break;bt=fe}if(qe!==null)return{start:qe,end:bt}}return null}function nt(){if(l){let _e=l.getTime()||0;X&&(_e=isNaN(pe)?0:pe);const Be=g.get().streaming.gaps.jumpGaps&&!isNaN(g.get().streaming.gaps.smallGapLimit)?g.get().streaming.gaps.smallGapLimit:NaN;S=Math.max((function(at,Le){let dt,ht;return g.get().streaming.gaps.jumpGaps&&(Le=g.get().streaming.gaps.smallGapLimit),dt=We(at,Le),ht=dt===null?0:dt.end-at,ht})(_e,Be),0),it(p.default.BUFFER_LEVEL_UPDATED,{mediaType:_,bufferLevel:S}),Ut()}}function ut(){const _e=D>=H-1,Be=l.getTimeToStreamEnd(c)-S<1e-5;!_e&&!Be||b||(ot(!0),h.debug(`checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ${c.id} and type ${_}`))}function Ut(){if(_!==o.default.AUDIO&&_!==o.default.VIDEO)return;const _e=l.getLowLatencyModeEnabled()?g.get().streaming.buffer.lowLatencyStallThreshold:g.get().streaming.buffer.stallThreshold;S<=_e&&!b?Qe(y.BUFFER_EMPTY):(b||S>_e)&&Qe(y.BUFFER_LOADED)}function Qe(_e){w===_e||_e===y.BUFFER_EMPTY&&l.getTime()===0||_===o.default.TEXT&&!T.isTextEnabled()||(w=_e,it(p.default.BUFFER_LEVEL_STATE_CHANGED,{state:_e}),it(_e===y.BUFFER_LOADED?p.default.BUFFER_LOADED:p.default.BUFFER_EMPTY),h.debug(_e===y.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function wt(){K&&_!==o.default.TEXT&&(b||yn(Qt()))}function Qt(){const _e=[],Be=K.getAllBufferRanges();if(!Be||Be.length===0)return _e;const at=l.getTime();let Le=Math.max(0,at-g.get().streaming.buffer.bufferToKeep);const dt=i.getRequests({state:Se.FRAGMENT_MODEL_EXECUTED,time:at,threshold:oi})[0];if(dt)Le=Math.min(dt.startTime,Le);else if(at===0&&l.getIsDynamic())return[];if(Be.start(0)<=Le){const ht={start:0,end:Le};for(let fe=0;fe<Be.length&&Be.end(fe)<=Le;fe++)ht.end=Be.end(fe);ht.start<ht.end&&_e.push(ht)}return _e}function yn(_e){return new Promise(((Be,at)=>{if(!_e||!K||_e.length===0)return nt(),void Be();const Le=[];_e.forEach((dt=>{Le.push((function(ht){return new Promise(((fe,qe)=>{ht.resolve=fe,ht.reject=qe,ne.push(ht)}))})(dt))})),W||hn(),Promise.all(Le).then((()=>{Be()})).catch((dt=>{at(dt)}))}))}function hn(){try{if(ne.length===0||!K)return h.debug("Nothing to prune, halt pruning"),ne=[],void(W=!1);const _e=K.getBuffer();if(!_e||!_e.buffered||_e.buffered.length===0)return h.debug("SourceBuffer is empty (or does not exist), halt pruning"),ne=[],void(W=!1);const Be=ne.shift();h.debug(`${_}: Removing buffer from: ${Be.start} to ${Be.end}`),W=!0,l.getTime()<Be.end&&ot(!1),K.remove(Be).then((at=>{tn(at)})).catch((at=>{tn(at)}))}catch{W=!1}}function tn(_e){h.debug("onRemoved buffer from:",_e.from,"to",_e.to),K&&(v(K.getAllBufferRanges()),ne.length===0&&(W=!1,nt()),_e.unintended&&(h.warn("Detected unintended removal from:",_e.from,"to",_e.to,"setting streamprocessor time to",_e.from),it(p.default.SEEK_TARGET,{time:_e.from})),W?hn():(de?de=!1:nt(),it(p.default.BUFFER_CLEARED,{from:_e.from,to:_e.to,unintended:_e.unintended,hasEnoughSpaceToAppend:ft(),quotaExceeded:j})))}function sn(_e){return new Promise((Be=>{_e&&_e.mseTimeOffset!==void 0&&K&&K.updateTimestampOffset?K.updateTimestampOffset(_e.mseTimeOffset).then((()=>{Be()})).catch((()=>{Be()})):Be()}))}function Ce(){return K&&!b?K.updateAppendWindow(c):Promise.resolve()}function tt(){C++,C*(g.get().streaming.wallclockTimeUpdateInterval/1e3)>=g.get().streaming.buffer.bufferPruningInterval&&(C=0,wt())}function Xe(){Ut()}function ot(_e){b=_e,b?it(p.default.BUFFERING_COMPLETED):H=Number.POSITIVE_INFINITY}function zt(){try{const _e=K.getAllBufferRanges();let Be,at,Le=0;if(!_e)return Le;for(at=0,Be=_e.length;at<Be;at++)Le+=_e.end(at)-_e.start(at);return Le}catch{return 0}}function Ye(_e){try{let Be=_e;const at=K.getAllBufferRanges();if(!at||at.length===0)return NaN;let Le=0;for(;Be===_e&&Le<at.length;){const dt=at.start(Le),ht=at.end(Le);Be>=dt&&Be<=ht&&(Be=ht),Le+=1}return Be===_e?NaN:Be}catch{return NaN}}function ft(){const _e=zt();return isNaN(_e)||_e<A}function it(_e,Be){let at=Be||{};r.trigger(_e,at,{streamId:c.id,mediaType:_})}function vt(_e,Be){if(A=Number.POSITIVE_INFINITY,w=void 0,H=Number.POSITIVE_INFINITY,D=0,d=null,b=!1,W=!1,j=!1,S=0,C=0,ne=[],pe=NaN,X=!1,K){let at=K;K=null,_e||(Be?at.removeEventListeners():at.abort().then((()=>{at.reset(Be),at=null})))}de=!1}return u={appendInitSegmentFromCache:function(_e){const Be=ae.extract(c.id,_e);return!!Be&&(h.debug(`Appending init fragment for type ${_}, representationId ${Be.representation.id} and bandwidth ${Be.representation.bandwidth}`),G(Be),!0)},clearBuffers:yn,createBufferSink:I,dischargePreBuffer:function(){if(K&&V&&typeof V.discharge=="function"){const _e=V.getAllBufferRanges();if(_e.length>0){let Le="Beginning "+_+"PreBuffer discharge, adding buffer for:";for(let dt=0;dt<_e.length;dt++)Le+=" start: "+_e.start(dt)+", end: "+_e.end(dt)+";";h.debug(Le)}else h.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");k=[];let Be=V.discharge(),at=null;for(let Le=0;Le<Be.length;Le++){const dt=Be[Le];if(dt.segmentType!==Ae.HTTPRequest.INIT_SEGMENT_TYPE){const ht=ae.extract(dt.streamId,dt.representation.id);ht&&at!==ht&&(k.push(ht),K.append(ht),at=ht)}k.push(dt),K.append(dt)}V.reset(),V=null}},getAllRangesWithSafetyFactor:le,getBuffer:function(){return K},getBufferControllerType:function(){return Ql},getBufferLevel:function(){return S},getContinuousBufferTimeForTargetTime:Ye,getIsBufferingCompleted:function(){return b},getIsPruningInProgress:function(){return W},getMediaSource:function(){return x},getRangeAt:We,getStreamId:function(){return c.id},getType:function(){return _},hasBufferAtTime:function(_e){try{const Be=K.getAllBufferRanges();if(!Be||Be.length===0)return!1;let at=0;for(;at<Be.length;){const Le=Be.start(at),dt=Be.end(at);if(_e>=Le&&_e<=dt)return!0;at+=1}return!1}catch(Be){return h.error(Be),!1}},initialize:function(_e){ce(_e),r.on(p.default.INIT_FRAGMENT_LOADED,F,u),r.on(p.default.MEDIA_FRAGMENT_LOADED,Q,u),r.on(p.default.WALLCLOCK_TIME_UPDATED,tt,u),r.on(P.default.PLAYBACK_PLAYING,xe,u),r.on(P.default.PLAYBACK_PROGRESS,he,u),r.on(P.default.PLAYBACK_TIME_UPDATED,he,u),r.on(P.default.PLAYBACK_RATE_CHANGED,Xe,u),r.on(P.default.PLAYBACK_STALLED,me,u)},prepareForAbandonQualitySwitch:function(_e,Be){return O(_e,Be)},prepareForDefaultQualitySwitch:function(_e,Be){return O(_e,Be)},prepareForFastQualitySwitch:function(_e,Be){return O(_e,Be)},prepareForForceReplacementQualitySwitch:function(_e,Be){return new Promise((at=>{const Le=[];Le.push(K.abort()),Le.push(Ce()),Le.push(J()),Le.push(sn(_e)),Le.push(te(_e,Be)),Promise.allSettled(Le).then((()=>{ot(!1),at()}))}))},prepareForNonReplacementTrackSwitch:function(_e,Be){return new Promise((at=>{const Le=[];Le.push(Ce()),Le.push(te(_e,Be)),Promise.allSettled(Le).then((()=>{at()}))}))},prepareForPlaybackSeek:function(){return b&&ot(!1),K.abort()},prepareForReplacementTrackSwitch:function(_e,Be){return new Promise((at=>{const Le=[];Le.push(K.abort()),Le.push(Ce()),Le.push(te(_e,Be)),Le.push(J()),Le.push(sn(_e)),Promise.allSettled(Le).then((()=>{ot(!1),at()}))}))},pruneAllSafely:J,pruneBuffer:wt,reset:function(_e,Be){r.off(p.default.INIT_FRAGMENT_LOADED,F,this),r.off(p.default.MEDIA_FRAGMENT_LOADED,Q,this),r.off(p.default.WALLCLOCK_TIME_UPDATED,tt,this),r.off(P.default.PLAYBACK_PLAYING,xe,this),r.off(P.default.PLAYBACK_PROGRESS,he,this),r.off(P.default.PLAYBACK_TIME_UPDATED,he,this),r.off(P.default.PLAYBACK_RATE_CHANGED,Xe,this),r.off(P.default.PLAYBACK_STALLED,me,this),vt(_e,Be)},segmentRequestingCompleted:function(_e){isNaN(_e)||(H=_e,ut())},setIsBufferingCompleted:ot,setMediaSource:ce,setSeekTarget:function(_e){pe=_e},updateAppendWindow:Ce,updateBufferTimestampOffset:sn},h=(0,R.default)(n).getInstance().getLogger(u),ae=li(n).getInstance(),vt(),u}Xl.__dashjs_factory_name=Ql;var Mu=ie.default.getClassFactory(Xl);const Zl="NotFragmentedTextBufferController";function Jl(t){t=t||{};const e=this.context,n=(0,ee.default)(e).getInstance(),r=t.textController,i=t.errHandler,l=t.streamInfo,m=t.type;let g,c,T,_,u,h;function b(x){_=x}function S(x){c!==x&&(c=x,c&&(function(D){let H={};n.trigger(D,H,{streamId:l.id,mediaType:m})})(p.default.BUFFERING_COMPLETED))}function A(x){x.chunk.bytes&&!c&&(h.save(x.chunk),u.append(x.chunk),S(!0))}return g={initialize:function(x){b(x)},getStreamId:function(){return l.id},getType:function(){return m},getBufferControllerType:function(){return Zl},createBufferSink:function(x){return new Promise(((D,H)=>{try{u=Kl(e).create({mediaSource:_,textController:r,eventBus:n}),u.initializeForFirstUse(x),T||(u.getBuffer()&&typeof u.getBuffer().initialize=="function"&&u.getBuffer().initialize(),T=!0),D(u)}catch(K){i.error(new Ft.default(qt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,qt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+m)),H(K)}}))},dischargePreBuffer:function(){},getBuffer:function(){return u},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:b,getMediaSource:function(){return _},appendInitSegmentFromCache:function(x){return h.extract(l.id,x)!==null},getIsBufferingCompleted:function(){return c},setIsBufferingCompleted:S,getIsPruningInProgress:function(){return!1},reset:function(x){n.off(p.default.INIT_FRAGMENT_LOADED,A,g),!x&&u&&(u.abort(),u.reset(),u=null)},clearBuffers:function(){return Promise.resolve()},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return c=!1,Promise.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()},segmentRequestingCompleted:function(){}},T=!1,_=null,c=!1,h=li(e).getInstance(),n.on(p.default.INIT_FRAGMENT_LOADED,A,g),g}Jl.__dashjs_factory_name=Zl;var Pu=ie.default.getClassFactory(Jl);function eo(t){t=t||{};const e=this.context,n=(0,ee.default)(e).getInstance(),r=t.dashMetrics,i=t.mediaPlayerModel,l=t.fragmentModel,m=t.abrController,g=t.playbackController,c=t.textController,T=t.type,_=t.bufferController,u=t.representationController,h=t.settings;let b,S,A,x,D,H,K,V,X,k,w,d;function C(){K=(0,R.default)(e).getInstance().getLogger(x),v(),k=t.streamInfo}function W(){V=!0}function j(){V=!1}function ae(B){if(_.getIsBufferingCompleted())return;ne();const O=isNaN(B)?0:B;X=setTimeout(de,O)}function ne(){X&&(clearTimeout(X),X=null)}function de(){const B=i.getScheduleTimeout();try{if((function(){try{return T===o.default.TEXT&&!c.isTextEnabled()||g.isPaused()&&(!g.getStreamController().getInitialPlayback()||!g.getStreamController().getAutoPlay())&&!h.get().streaming.scheduling.scheduleWhilePaused}catch{return!1}})())return void ne();(function(){try{return!!V&&u.getCurrentRepresentation()&&(H==null||w||(function(){const O=u.getCurrentRepresentation();if(!T||!O)return!0;let te=O&&O.segmentDuration&&!isNaN(O.segmentDuration)?O.segmentDuration:0;const J=r.getCurrentBufferLevel(T),le=pe();return(le<=te||g.getLowLatencyModeEnabled()||T===o.default.AUDIO&&S)&&(te=0),J+te<le})())}catch{return!1}})()?(function(){if(m.handlePendingManualQualitySwitch(k.id,T))return;let O=!1;b&&(O=m.checkPlaybackQuality(T,k.id)),O||(function(){const te=u.getCurrentRepresentation();A||te.id!==H||w?(function(J){w?(K.debug("Switch track for "+T+", representation id = "+J.id),w=!1):K.debug("Quality has changed, get init request for representationid = "+J.id),n.trigger(p.default.INIT_FRAGMENT_NEEDED,{representationId:J.id,sender:x},{streamId:k.id,mediaType:T}),b=!1,A=!1})(te):(K.debug(`Media segment needed for ${T} and stream id ${k.id}`),n.trigger(p.default.MEDIA_FRAGMENT_NEEDED,{},{streamId:k.id,mediaType:T}),b=!0)})()})():ae(B)}catch{ae(B)}}function pe(){let B=NaN;const O=u.getCurrentRepresentation();return T&&O&&(B=T===o.default.TEXT?(function(){try{if(c.isTextEnabled()){const te=u.getCurrentRepresentation();if(isNaN(te.fragmentDuration)){const J=r.getCurrentSchedulingInfo(y.SCHEDULING_INFO);return J?J.duration:0}return te.fragmentDuration}return 0}catch{return 0}})():T===o.default.AUDIO&&S?(function(){try{const te=r.getCurrentBufferLevel(o.default.VIDEO),J=u.getCurrentRepresentation();return isNaN(J.fragmentDuration)?te+1:Math.max(te+1,J.fragmentDuration)}catch{return 0}})():(function(){try{const te=u.getCurrentRepresentation(),J=te.mediaInfo.streamInfo;return m.isPlayingAtTopQuality(te)?J.manifestInfo.duration>=h.get().streaming.buffer.longFormContentDurationThreshold?h.get().streaming.buffer.bufferTimeAtTopQualityLongForm:h.get().streaming.buffer.bufferTimeAtTopQuality:i.getBufferTimeDefaultUnadjusted()}catch{return i.getBufferTimeDefaultUnadjusted()}})()),B}function ce(){I(!0)}function I(B){if(g&&l){const O=l.getRequests({state:Se.FRAGMENT_MODEL_EXECUTED,time:g.getTime(),threshold:0})[0];O&&g.getTime()>=O.startTime&&((!D.representation||O.representation.mediaInfo.type===D.representation.mediaInfo.type&&O.representation.mediaInfo.index!==D.representation.mediaInfo.index)&&B&&(function(te){K.debug(`Track change rendered for streamId ${k.id} and type ${T}`),n.trigger(p.default.TRACK_CHANGE_RENDERED,{mediaType:T,oldMediaInfo:D&&D.representation&&D.representation.mediaInfo?D.representation.mediaInfo:null,newMediaInfo:te.representation.mediaInfo,streamId:k.id})})(O),D.representation&&O.representation.id===D.representation.id||!B||(function(te){K.debug(`Quality change rendered for streamId ${k.id} and type ${T}`),n.trigger(p.default.QUALITY_CHANGE_RENDERED,{mediaType:T,oldRepresentation:D.representation?D.representation:null,newRepresentation:te.representation,streamId:k.id})})(O),D.representation=O.representation)}}function F(){l.abortRequests(),ne()}function Q(){h.get().streaming.scheduling.scheduleWhilePaused||ae()}function G(B){r.updatePlayListTraceMetrics({playbackspeed:B.playbackRate.toString()})}function v(){b=!0,d=0,H=null,D={representation:null},w=!1,A=!1,V=!0}return x={clearScheduleTimer:ne,getBufferTarget:pe,getPlaybackController:function(){return g},getStreamId:function(){return k.id},getSwitchTrack:function(){return w},getTimeToLoadDelay:function(){return d},getType:function(){return T},initialize:function(B){S=B,n.on(p.default.URL_RESOLUTION_FAILED,F,x),n.on(P.default.PLAYBACK_STARTED,Q,x),n.on(P.default.PLAYBACK_RATE_CHANGED,G,x),n.on(P.default.PLAYBACK_TIME_UPDATED,ce,x),n.on(P.default.MANAGED_MEDIA_SOURCE_START_STREAMING,W,x),n.on(P.default.MANAGED_MEDIA_SOURCE_END_STREAMING,j,x)},reset:function(){n.off(p.default.URL_RESOLUTION_FAILED,F,x),n.off(P.default.PLAYBACK_STARTED,Q,x),n.off(P.default.PLAYBACK_RATE_CHANGED,G,x),n.off(P.default.PLAYBACK_TIME_UPDATED,ce,x),n.off(P.default.MANAGED_MEDIA_SOURCE_START_STREAMING,W,x),n.off(P.default.MANAGED_MEDIA_SOURCE_END_STREAMING,j,x),ne(),I(!1),v(),k=null},setShouldCheckPlaybackQuality:function(B){b=B},setInitSegmentRequired:function(B){A=B},setLastInitializedRepresentationId:function(B){H=B},setup:C,setSwitchTrack:function(B){w=B},setTimeToLoadDelay:function(B){d=B},startScheduleTimer:ae},C(),x}eo.__dashjs_factory_name="ScheduleController";var Ou=ie.default.getClassFactory(eo);const zu=/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g;var Lu=class extends zl{constructor(){super(),this.isPartialSegment=!0,this.replacementSubNumber=NaN,this.totalNumberOfPartialSegments=NaN}};function to(t){return t?t.totalNumberOfPartialSegments&&!isNaN(t.totalNumberOfPartialSegments)&&t.totalNumberOfPartialSegments>0&&!isNaN(t.subNumberOfPartialSegmentToRequest)?(function(e){const n=(function(r,i){const l=new Lu,m=r.segmentDurationInSeconds/r.totalNumberOfPartialSegments,{representation:g,timelineConverter:c,isDynamic:T,index:_,totalNumberOfPartialSegments:u}=r,h=no({representation:g,segmentDurationInSeconds:m,presentationStartTime:r.presentationStartTime+i*m,presentationEndTime:r.presentationStartTime+(i+1)*m,timelineConverter:c,isDynamic:T,mediaTimeInSeconds:r.mediaTimeInSeconds+i*m,index:_});return l.assignAttributes(h),l.replacementSubNumber=i,l.totalNumberOfPartialSegments=u,l})(e,e.subNumberOfPartialSegmentToRequest);return ao(n,e),n})(t):(function(e){const n=new ii,r=no(e);return n.assignAttributes(r),ao(n,e),n})(t):null}function no(t){const{representation:e,segmentDurationInSeconds:n,presentationStartTime:r,presentationEndTime:i,mediaTimeInSeconds:l,timelineConverter:m,isDynamic:g,index:c}=t,T={availabilityEndTime:m.calcAvailabilityEndTimeFromPresentationTime(i+n,e,g),availabilityStartTime:m.calcAvailabilityStartTimeFromPresentationTime(i,e,g),duration:n,index:c,mediaStartTime:l,presentationStartTime:r,replacementNumber:e.startNumber+c,representation:e};return T.wallStartTime=m.calcWallTimeForSegment(T,g),T}function ao(t,e){const{tManifest:n,mediaTime:r,mediaUrl:i,mediaRange:l}=e;t.replacementTime=n||r,t.media=dr(i,t.representation.id,t.replacementNumber,t.replacementSubNumber,t.representation.bandwidth,t.replacementTime),t.mediaRange=l,t.mediaUrl=i}function ro(t,e,n,r){const i=e.adaptation.period;if(isFinite(i.duration)&&i.start+i.duration<=n.presentationStartTime)return!1;if(r){if(e.availabilityTimeOffset==="INF")return!0;const l=t.getClientReferenceTime();return n.availabilityStartTime.getTime()<=l&&(!isFinite(n.availabilityEndTime)||n.availabilityEndTime.getTime()>=l)}return!0}function dr(t,e,n,r,i,l){return t&&(function(m,g,c,T,_,u){return m.replace(zu,((h,b,S,A)=>{let x,D;switch(b){case void 0:return"$";case"RepresentationID":x=g;break;case"Number":x=c;break;case"SubNumber":x=T;break;case"Bandwidth":x=_;break;case"Time":if(typeof u=="string")return u;x=u&&Math.round(u);break;default:x=null}if(x==null)return h;switch(A){case void 0:case"d":case"i":case"u":D=x.toString();break;case"o":D=x.toString(8);break;case"x":D=x.toString(16);break;case"X":D=x.toString(16).toUpperCase();break;default:D=x.toString()}const H=parseInt(S,10)||1;return D.padStart(H,"0")}))})(t,e,n,r,i,l)}function io(t){const{index:e,isDynamic:n,mediaRange:r,mediaTime:i,mediaUrl:l,representation:m,subNumberOfPartialSegmentToRequest:g,timelineConverter:c,totalNumberOfPartialSegments:T}=t;let _,u,h;_=m.segmentDuration,isNaN(_)&&(_=m.adaptation.period.duration),u=parseFloat((m.adaptation.period.start+e*_).toFixed(5)),h=parseFloat((u+_).toFixed(5));const b=to({index:e,isDynamic:n,mediaRange:r,mediaTime:i,mediaTimeInSeconds:c.calcMediaTimeFromPresentationTime(u,m),mediaUrl:l,presentationEndTime:h,presentationStartTime:u,representation:m,segmentDurationInSeconds:_,subNumberOfPartialSegmentToRequest:g,timelineConverter:c,totalNumberOfPartialSegments:T});return ro(c,m,b,n)?b:null}function si(t){const{durationInTimescale:e,fTimescale:n,index:r,subNumberOfPartialSegmentToRequest:i,isDynamic:l,mediaRange:m,mediaTime:g,mediaUrl:c,totalNumberOfPartialSegments:T,representation:_,tManifest:u,timelineConverter:h}=t,b=g/n,S=e/n;let A=h.calcPresentationTimeFromMediaTime(b,_),x=to({representation:_,segmentDurationInSeconds:S,presentationStartTime:A,presentationEndTime:A+S,mediaTimeInSeconds:b,timelineConverter:h,isDynamic:l,index:r,totalNumberOfPartialSegments:T,subNumberOfPartialSegmentToRequest:i,mediaUrl:c,mediaRange:m,tManifest:u,mediaTime:g});return ro(h,_,x,l)?x:null}function ui(t){return t.k}function lo(t){const e=(t=t||{}).eventBus,n=t.events,r=t.abrController,i=t.dashMetrics,l=t.playbackController,m=t.timelineConverter,g=t.type,c=t.streamInfo,T=t.segmentsController,_=t.isDynamic;let u,h,b;function S(){return g}function A(){return b?.mediaInfo.type===g?b:(function(){let k=b?.dependentRepresentation;if(k){if(!k.mediaInfo)throw new Error("dependentRepresentation has no mediaInfo!");if(k.mediaInfo.type===g)return k}return null})()}function x(){b=null,h=[]}function D(k){return new Promise(((w,d)=>{const C=k.hasInitialization(),W=k.hasSegments(),j=[];j.push(T.updateInitData(k,C)),j.push(T.updateSegmentData(k,W)),Promise.all(j).then((ae=>{var ne;ae[0]&&!ae[0].error&&(k=(function(de,pe){return pe&&!pe.error&&pe.representation?pe.representation:de})(k,ae[0])),ae[1]&&!ae[1].error&&(k=(function(de,pe){if(!pe||pe.error)return;const ce=pe.segments,I=[];let F,Q,G,v,B=0;for(F=0,Q=ce?ce.length:0;F<Q;F++)G=ce[F],v=si({durationInTimescale:G.duration,fTimescale:G.timescale,index:B,isDynamic:_,mediaRange:G.mediaRange,mediaTime:G.startTime,mediaUrl:G.media,representation:de,timelineConverter:m}),v&&(I.push(v),v=null,B++);return I.length>0&&(de.segments=I),de})(k,ae[1])),k.fragmentDuration=k.segmentDuration?k.segmentDuration:k.segments&&k.segments.length>0?k.segments[0].duration:NaN,(ne=k).mediaFinishedInformation=T.getMediaFinishedInformation(ne),(function(de){let pe,ce=i.getCurrentManifestUpdate(),I=!1;if(ce){for(let F=0;F<ce.representationInfo.length;F++)if(pe=ce.representationInfo[F],pe.index===de.index&&pe.mediaType===S()){I=!0;break}I||i.addManifestUpdateRepresentationInfo(de,S())}})(k),w()})).catch((ae=>{d(ae)}))}))}function H(k){if(!h||h.length===0)return null;const w=h.filter((d=>d.id===k));return w.length>0?w[0]:null}function K(k){e.trigger(n.DATA_UPDATE_COMPLETED,{currentRepresentation:b,error:k},{streamId:c.id,mediaType:g})}function V(k){b&&b.id===k.id||(function(w){(function(){if(!(r&&i&&l&&m))throw new Error(o.default.MISSING_CONFIG_ERROR)})();const d=new Date,C=1e3*l.getTime();w&&i.addRepresentationSwitch(w.adaptation.type,d,C,w.id),e.trigger(P.default.REPRESENTATION_SWITCH,{mediaType:g,streamId:c.id,currentRepresentation:w},{streamId:c.id,mediaType:g})})(k),b=k}function X(k){if(k.newDuration){const w=A();w&&w.adaptation.period&&(w.adaptation.period.duration=k.newDuration)}}return u={getCurrentCompositeRepresentation:function(){return b},getCurrentRepresentation:A,getRepresentationById:H,getStreamId:function(){return c.id},getType:S,prepareQualityChange:function(k){const w=h.filter((d=>d.id===k.id));w.length>0&&V(w[0])},reset:function(){e.off(P.default.MANIFEST_VALIDITY_CHANGED,X,u),x()},updateData:function(k,w,d){return new Promise(((C,W)=>{if(h=k,V(H(d)),g!==o.default.VIDEO&&g!==o.default.ENHANCEMENT&&g!==o.default.AUDIO&&(g!==o.default.TEXT||!w))return K(),void C();const j=[];for(let ae=0,ne=h.length;ae<ne;ae++){const de=h[ae];j.push(D(de))}Promise.all(j).then((()=>{(function(){r.setPlaybackQuality(g,c,b);const ae=i.getCurrentDVRInfo(g);ae&&i.updateManifestUpdateInfo({latency:ae.range.end-l.getTime()}),K()})(),C()})).catch((ae=>{W(ae)}))}))}},x(),e.on(P.default.MANIFEST_VALIDITY_CHANGED,X,u),u}lo.__dashjs_factory_name="RepresentationController";var Fu=ie.default.getClassFactory(lo);function oo(t){const e=(t=t||{}).eventBus,n=t.debug,r=t.urlUtils,i=t.type,l=t.streamInfo,m=t.segmentsController,g=t.timelineConverter,c=t.baseURLController;let T,_,u,h,b;function S(){return i}function A(){u=null}function x(k,w,d){const C=c.resolve(d.path);let W,j,ae={};return C&&w!==C.url&&r.isRelative(w)?(W=C.url,j=C.serviceLocation,ae=C.queryParams,w&&(W=r.resolve(w,W))):W=w,!r.isRelative(W)&&(k.url=W,k.serviceLocation=j,k.queryParams=ae,!0)}function D(k,w,d){let C=null;if(!w||!w.segmentInfoType)return C;const W=m.getSegmentByTime(w,d);return W&&(u=W,_.debug("Index for time "+d+" is "+W.index),C=H(0,W)),C}function H(k,w){if(w==null)return null;const d=new $,C=w.representation,W=C.bandwidth,j=dr(w.media,C.id,w.replacementNumber,w.replacementSubNumber,W,w.replacementTime);return d.adaptationIndex=C.adaptation.index,d.availabilityEndTime=w.availabilityEndTime,d.availabilityStartTime=w.availabilityStartTime,d.availabilityTimeComplete=C.availabilityTimeComplete,d.bandwidth=C.bandwidth,d.duration=w.duration,d.index=w.index,d.isPartialSegmentRequest=w.isPartialSegment,d.mediaStartTime=w.mediaStartTime,d.mediaType=S(),d.presentationStartTime=w.presentationStartTime,d.range=w.mediaRange,d.representation=C,d.startTime=w.presentationStartTime,d.timescale=C.timescale,d.type=Ae.HTTPRequest.MEDIA_SEGMENT_TYPE,d.wallStartTime=w.wallStartTime,x(d,j,C)?d:void 0}function K(k){if(!k)return{indexToRequest:0,subNumberOfPartialSegmentToRequest:NaN};const w=k.isPartialSegment,d=!isNaN(k.replacementSubNumber),C=!isNaN(k.totalNumberOfPartialSegments);if(w&&d&&C){const W=k.replacementSubNumber+1;return W<k.totalNumberOfPartialSegments?{indexToRequest:k.index,subNumberOfPartialSegmentToRequest:W}:{indexToRequest:k.index+1,subNumberOfPartialSegmentToRequest:0}}return{indexToRequest:k.index+1,subNumberOfPartialSegmentToRequest:NaN}}function V(k,w,d,C){let W=null;const j=m.getSegmentByIndex(w,d,C,u);if(j)W=H(0,j),u=j;else{if(h&&!b)return _.debug(S()+" No segment found at index: "+d+". Wait for next loop"),null;b=!0}return W}function X(){_.debug("Dynamic stream complete"),b=!0}return T={getCurrentIndex:function(){return u?u.index:-1},getInitRequest:function(k,w){return w?(function(d,C,W){const j=new $,ae=C.adaptation.period,ne=ae.start;if(j.mediaType=W,j.type=Ae.HTTPRequest.INIT_SEGMENT_TYPE,j.range=C.range,j.availabilityStartTime=g.calcAvailabilityStartTimeFromPresentationTime(ne,C,h),j.availabilityEndTime=g.calcAvailabilityEndTimeFromPresentationTime(ne+ae.duration,C,h),j.representation=C,x(j,C.initialization,C))return j.url=dr(j.url,C.id,void 0,void 0,C.bandwidth),j})(0,w,S()):null},getLastSegment:function(){return u},getNextSegmentRequest:function(k,w){if(!w||!w.segmentInfoType)return null;if((function(W){return W&&u&&W.endNumber&&u.replacementNumber&&u.replacementNumber>=W.endNumber})(w))return b=!0,null;let{indexToRequest:d,subNumberOfPartialSegmentToRequest:C}=K(u);return V(0,w,d,C)},getNextSegmentRequestIdempotent:function(k,w){let d=null,{indexToRequest:C,subNumberOfPartialSegmentToRequest:W}=K(u);const j=m.getSegmentByIndex(w,C,W,u);return j?(d=H(0,j),d):null},getSegmentRequestForTime:D,getStreamId:function(){return l.id},getStreamInfo:function(){return l},getType:S,getValidTimeAheadOfTargetTime:function(k,w,d,C){try{if(isNaN(k)||!w||!d)return NaN;if(k<0&&(k=0),isNaN(C)&&(C=.5),D(0,d,k))return k;if(d.adaptation.period.start+d.adaptation.period.duration<k)return NaN;const W=isFinite(d.adaptation.period.duration)?d.adaptation.period.start+d.adaptation.period.duration:k+30;let j=Math.min(k+C,W),ae=NaN,ne=null;for(;j<=W;){let de=null;if(j<=W&&(de=D(0,d,j)),de){ae=j,ne=de;break}j+=C}if(ne){const de=ne.startTime+ne.duration;return k>ne.startTime&&de-k>C?k:!isNaN(ne.startTime)&&k<ne.startTime&&ae>ne.startTime?ne.startTime+.001:Math.min(de-C,ae)}return ae}catch{return NaN}},initialize:function(k){h=k,b=!1,m.initialize(k)},isLastSegmentRequested:function(k,w){return!k||!u?!1:b?!0:!isFinite(k.adaptation.period.duration)||u.presentationStartTime+u.duration>w?!1:k.mediaFinishedInformation&&!isNaN(k.mediaFinishedInformation.numberOfSegments)&&!isNaN(u.index)&&u.index>=k.mediaFinishedInformation.numberOfSegments-1&&(!h||k.segmentInfoType===re.default.SEGMENT_TEMPLATE||h&&k.segmentInfoType===re.default.SEGMENT_LIST&&k.adaptation.period.nextPeriodId)?!0:!!(h&&k.adaptation.period.nextPeriodId&&k.segmentInfoType===re.default.SEGMENT_TIMELINE&&k.mediaFinishedInformation&&!isNaN(k.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&u&&!isNaN(u.mediaStartTime)&&!isNaN(u.duration)&&u.mediaStartTime+u.duration>=k.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(k,w){return w&&w.segmentInfoType?V(0,w,u?u.index:0,u&&u.isPartialSegment&&!isNaN(u.replacementSubNumber)?u.replacementSubNumber:NaN):null},reset:function(){A(),e.off(P.default.DYNAMIC_TO_STATIC,X,T)}},_=n.getLogger(T),A(),e.on(P.default.DYNAMIC_TO_STATIC,X,T),T}oo.__dashjs_factory_name="DashHandler";var so=ie.default.getClassFactory(oo);function uo(t,e){const n=(t=t||{}).timelineConverter,r=t.dashMetrics;let i;function l(g,c){if((function(){if(!n)throw new Error(o.default.MISSING_CONFIG_ERROR)})(),!g)return null;c===void 0&&(c=null);let T=null;const _=n.calcMediaTimeFromPresentationTime(c,g);return(function(u,h){const b=(function(W){return W.adaptation.period.mpd.manifest.Period[W.adaptation.period.index].AdaptationSet[W.adaptation.index].Representation[W.index].SegmentTemplate||W.adaptation.period.mpd.manifest.Period[W.adaptation.period.index].AdaptationSet[W.adaptation.index].Representation[W.index].SegmentList})(u),S=b.SegmentTimeline,A=b.SegmentURL;let x,D,H,K,V,X,k=0,w=-1;X=u.timescale,x=S.S;let d=!1;const C=x.length;for(H=0;H<C&&!d;H++)for(D=x[H],V=0,D.hasOwnProperty("r")&&(V=D.r),D.hasOwnProperty("t")&&(k=D.t),V<0&&(V=m(u,x[H+1],D,X,k/X)),K=0;K<=V&&!d;K++)w++,d=h({mediaTime:k,segmentBase:b,segmentURL:A,currentSElement:D,sElementCounterIncludingRepeats:w,sElementCounter:H}),d&&(u.segmentDuration=D.d/X),k+=D.d})(g,(function(u){const h=g.timescale;return(function(b,S){const{mediaTime:A,segmentBase:x,segmentURL:D,currentSElement:H,sElementCounterIncludingRepeats:K,sElementCounter:V}=S,X=H.d,k=g.timescale;return b<A+X&&b>=A&&((function(w){const{segmentBase:d,segmentURL:C,sElementCounter:W,currentSElement:j,mediaTime:ae,durationInTimescale:ne,fTimescale:de,requiredMediaTimeInTimescaleUnits:pe,sElementCounterIncludingRepeats:ce}=w;let I=(function(v,B,O){let te=v.media;return B&&(te=B[O].media||""),te})(d,C,W),F=(function(v,B,O){let te=v.mediaRange;return B&&(te=B[O].mediaRange),te})(j,C,W);const Q=ui(j),G=(function(v){if(!v||v.totalNumberOfPartialSegments===void 0||isNaN(v.totalNumberOfPartialSegments)||v.totalNumberOfPartialSegments<1)return;const{durationInTimescale:B,requiredMediaTimeInTimescaleUnits:O,mediaTime:te,totalNumberOfPartialSegments:J}=v,le=B/J;for(let he=0;he<J;he++){const me=te+he*le;if(O>=me&&O<me+le)return he}return NaN})({durationInTimescale:ne,requiredMediaTimeInTimescaleUnits:pe,mediaTime:ae,totalNumberOfPartialSegments:Q});T=si({timelineConverter:n,isDynamic:e,representation:g,mediaTime:ae,durationInTimescale:ne,fTimescale:de,mediaUrl:I,mediaRange:F,index:ce,tManifest:j.tManifest,totalNumberOfPartialSegments:Q,subNumberOfPartialSegmentToRequest:G})})({segmentBase:x,segmentURL:D,sElementCounter:V,currentSElement:H,mediaTime:A,durationInTimescale:X,fTimescale:k,requiredMediaTimeInTimescaleUnits:b,sElementCounterIncludingRepeats:K}),!0)})(parseFloat((_*h).toPrecision(15)),u)})),T}function m(g,c,T,_,u){let h;if(c&&c.hasOwnProperty("t"))h=c.t/_;else try{let b=0;if(isNaN(g.adaptation.period.start)||isNaN(g.adaptation.period.duration)||!isFinite(g.adaptation.period.duration)){const S=r.getCurrentDVRInfo();b=isNaN(S.end)?0:S.end}else b=g.adaptation.period.start+g.adaptation.period.duration;h=n.calcMediaTimeFromPresentationTime(b,g),g.segmentDuration=T.d/_}catch{h=0}return Math.max(Math.ceil((h-u)/(T.d/_))-1,0)}return i={getMediaFinishedInformation:function(g){if(!g)return 0;const c=(g.adaptation.period.mpd.manifest.Period[g.adaptation.period.index].AdaptationSet[g.adaptation.index].Representation[g.index].SegmentTemplate||g.adaptation.period.mpd.manifest.Period[g.adaptation.period.index].AdaptationSet[g.adaptation.index].Representation[g.index].SegmentList).SegmentTimeline;let T,_,u,h,b,S,A=0,x=0,D=0;S=g.timescale,T=c.S;const H=T.length;for(u=0;u<H;u++)for(_=T[u],b=0,_.hasOwnProperty("r")&&(b=_.r),_.hasOwnProperty("t")&&(A=_.t,x=A/S),b<0&&(b=m(g,T[u+1],_,S,x)),h=0;h<=b;h++)D++,A+=_.d,x=A/S;return{numberOfSegments:D,mediaTimeOfLastSignaledSegment:x}},getSegmentByIndex:function(g,c){return g?l(g,c&&!isNaN(c.presentationStartTime)?c.presentationStartTime+c.duration+.01:0):null},getSegmentByTime:l},i}uo.__dashjs_factory_name="TimelineSegmentsGetter";var Uu=ie.default.getClassFactory(uo);function co(t,e){const n=(t=t||{}).timelineConverter;let r;function i(m,g,c){if(!m)return null;const T=l(m),_=ui(T);_!==void 0&&_>=0&&(c=c!==void 0&&c<_?c:0);const u=io({index:g=Math.max(g,0),isDynamic:e,mediaTime:Math.round(g*m.segmentDuration*m.timescale,10),mediaUrl:T.media,representation:m,subNumberOfPartialSegmentToRequest:c,timelineConverter:n,totalNumberOfPartialSegments:_});return u&&m.endNumber&&u.replacementNumber>m.endNumber?null:u}function l(m){return m.adaptation.period.mpd.manifest.Period[m.adaptation.period.index].AdaptationSet[m.adaptation.index].Representation[m.index].SegmentTemplate}return r={getMediaFinishedInformation:function(m){const g={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!m)return g;const c=m.segmentDuration;return isNaN(c)?g.numberOfSegments=1:g.numberOfSegments=Math.ceil(m.adaptation.period.duration/c),g},getSegmentByIndex:i,getSegmentByTime:function(m,g){if(!m)return null;const c=m.segmentDuration;if(isNaN(c))return null;let T=n.calcPeriodRelativeTimeFromMpdRelativeTime(m,g);const _=l(m),u=Math.floor(T/c),h=(function(b){if(!b||b.totalNumberOfPartialSegments===void 0||isNaN(b.totalNumberOfPartialSegments)||b.totalNumberOfPartialSegments<1)return;const{totalNumberOfPartialSegments:S,representation:A,requestedTimeRelativeToPeriodStart:x,indexWithoutStartNumber:D}=b,H=D*A.segmentDuration,K=A.segmentDuration/S,V=x-H;let X=Math.floor(V/K);return X=Math.max(0,Math.min(X,S-1)),X})({totalNumberOfPartialSegments:ui(_),representation:m,requestedTimeRelativeToPeriodStart:T,indexWithoutStartNumber:u});return i(m,u,h)}},r}co.__dashjs_factory_name="TemplateSegmentsGetter";var ju=ie.default.getClassFactory(co);function fo(t,e){const n=(t=t||{}).timelineConverter;let r;function i(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(o.default.MISSING_CONFIG_ERROR)}function l(m,g){if(i(),!m)return null;const c=m.adaptation.period.mpd.manifest.Period[m.adaptation.period.index].AdaptationSet[m.adaptation.index].Representation[m.index].SegmentList,T=c.SegmentURL.length,_=m&&!isNaN(m.startNumber)?m.startNumber:1,u=Math.max(_-1,0),h=Math.max(g-u,0);let b=null;if(h<T){const S=c.SegmentURL[h];b=io({index:g,isDynamic:e,mediaRange:S.mediaRange,mediaTime:(_+g-1)*m.segmentDuration,representation:m,timelineConverter:n}),b&&(b.media=S.media?S.media:"",b.indexRange=S.indexRange)}return b}return r={getSegmentByIndex:l,getSegmentByTime:function(m,g){if(i(),!m)return null;const c=m.segmentDuration;if(isNaN(c))return null;const T=n.calcPeriodRelativeTimeFromMpdRelativeTime(m,g);return l(m,Math.floor(T/c))},getMediaFinishedInformation:function(m){const g={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!m)return g;const c=m.adaptation.period.mpd.manifest.Period[m.adaptation.period.index].AdaptationSet[m.adaptation.index].Representation[m.index].SegmentList,T=m&&!isNaN(m.startNumber)?m.startNumber:1,_=Math.max(T-1,0);return g.numberOfSegments=_+c.SegmentURL.length,g}},r}fo.__dashjs_factory_name="ListSegmentsGetter";var qu=ie.default.getClassFactory(fo);function go(t){const e=(t=t||{}).timelineConverter;let n;function r(){if(!e||!e.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(o.default.MISSING_CONFIG_ERROR)}function i(l,m){if(r(),!l)return null;const g=l.segments?l.segments.length:-1;let c;if(m<g&&(c=l.segments[m],c&&c.index===m))return c;for(let T=0;T<g;T++)if(c=l.segments[T],c&&c.index===m)return c;return null}return n={getSegmentByIndex:i,getSegmentByTime:function(l,m){r();const g=(function(c,T){if(!c)return-1;const _=c.segments,u=_?_.length:null;let h,b,S,A,x,D=-1;if(_&&u>0){for(x=0;x<u;x++)if(b=_[x],S=b.presentationStartTime,A=b.duration,h=A/2,T+h>=S&&T-h<S+A){D=b.index;break}}return D})(l,m);return i(l,g)},getMediaFinishedInformation:function(l){const m={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return l&&l.segments&&(m.numberOfSegments=l.segments.length),m}},n}go.__dashjs_factory_name="SegmentBaseGetter";var Bu=ie.default.getClassFactory(go);function mo(t){t=t||{};const e=this.context,n=t.dashConstants,r=t.type,i=t.segmentBaseController;let l,m;function g(c){return c?c.segments?m[n.SEGMENT_BASE]:m[c.segmentInfoType]:null}return l={initialize:function(c){m[n.SEGMENT_TIMELINE]=Uu(e).create(t,c),m[n.SEGMENT_TEMPLATE]=ju(e).create(t,c),m[n.SEGMENT_LIST]=qu(e).create(t,c),m[n.SEGMENT_BASE]=Bu(e).create(t,c)},updateInitData:function(c,T){return T?Promise.resolve():i.getSegmentBaseInitSegment({representation:c,mediaType:r})},updateSegmentData:function(c,T){return T?Promise.resolve():i.getSegmentList({mimeType:c.mimeType,representation:c,mediaType:r})},getSegmentByIndex:function(c,T,_,u){const h=g(c);return h?c.segmentInfoType?c.segmentInfoType===n.SEGMENT_TIMELINE?h.getSegmentByIndex(c,u):c.segmentInfoType===n.SEGMENT_TEMPLATE?h.getSegmentByIndex(c,T,_):h.getSegmentByIndex(c,T):h.getSegmentByIndex(c,T):null},getSegmentByTime:function(c,T){const _=g(c);return _?_.getSegmentByTime(c,T):null},getMediaFinishedInformation:function(c){const T=g(c);return T?T.getMediaFinishedInformation(c):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},m={},l}mo.__dashjs_factory_name="SegmentsController";var ho=ie.default.getClassFactory(mo);function po(){let t;return t={ntpToUTC:function(e){const n=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(n.getTime()+e).getTime()}},t}po.__dashjs_factory_name="TimeUtils";var Gu=ie.default.getSingletonFactory(po),wa=class{constructor(t){this.newMediaInfo=t.newMediaInfo,this.previouslySelectedRepresentation=t.previouslySelectedRepresentation,this.newRepresentation=t.newRepresentation}};function bo(t){t=t||{};let e,n,r,i,l,m,g,c,T,_,u,h,b,S,A,x,D,H,K=this.context,V=(0,ee.default)(K).getInstance(),X=t.abrController,k=t.adapter,w=t.boxParser,d=t.capabilities,C=t.dashMetrics,W=t.errHandler,j=t.fragmentModel,ae=t.manifestModel,ne=t.mediaController,de=t.mediaPlayerModel,pe=t.mimeType,ce=t.playbackController,I=t.segmentBlacklistController,F=t.settings,Q=t.streamInfo,G=t.textController,v=t.timelineConverter,B=t.type;function O(){return Q.id}function te(){return B}function J(){_=[],i=null,n=0,D=!1,x=!1,h=!1,m=null,H=!1,wt()}function le($e){return!isNaN($e)&&!isNaN(Q.duration)&&isFinite(Q.duration)&&$e>=Q.start+Q.duration}function he($e,Dt=!0){if($e.sender){if(ce.getIsManifestUpdateInProgress())We();else if((!i.isText||G.isTextEnabled())&&e&&$e.representationId&&!e.appendInitSegmentFromCache($e.representationId)){const nn=b.getCurrentRepresentation();if(nn.range===0)return void me();const en=l?l.getInitRequest(i,nn):null;en?j.executeRequest(en):Dt&&(S.setInitSegmentRequired(!0),We())}}}function me($e,Dt=!0){if(ce.getIsManifestUpdateInProgress()||e.getIsPruningInProgress())return void We();let nn=(function(){let en;if(isNaN(n)||te()===o.default.TEXT&&!G.isTextEnabled())return null;if(l){const mn=at();en=D?l.getSegmentRequestForTime(i,mn,n):x?l.repeatSegmentRequest(i,mn):l.getNextSegmentRequest(i,mn)}return en})();nn?(D=!1,x=!1,(function(en){isNaN(en.startTime+en.duration)||(n=en.startTime+en.duration),en.delayLoadingTime=new Date().getTime()+S.getTimeToLoadDelay(),S.setTimeToLoadDelay(0),(function(mn){let rn=mn.url;return mn.range&&(rn=rn.concat("_",mn.range)),I.contains(rn)})(en)?(T.warn(`Fragment request url ${en.url} for stream id ${Q.id} and media type ${B} is on the ignore list and will be skipped`),We()):(T.debug(`Next fragment request url for stream id ${Q.id} and media type ${B} is ${en.url} with request range ${en.range}`),j.executeRequest(en))})(nn)):(function(en){const mn=b.getCurrentRepresentation();try{if(F.get().streaming.gaps.enableSeekFix&&(D||ce.getTime()===0)){let rn;if(c?c&&mn.segmentInfoType===re.default.SEGMENT_TIMELINE&&(rn=(function(Nn){return l.getValidTimeAheadOfTargetTime(n,i,Nn,F.get().streaming.gaps.threshold)})(mn)):rn=(function(Nn){let Ln=l.getValidTimeAheadOfTargetTime(n,i,Nn,F.get().streaming.gaps.threshold);return isNaN(Ln)&&n>=Nn.adaptation.period.mpd.mediaPresentationDuration-Nn.segmentDuration&&(Ln=n-.1),Ln})(mn),!isNaN(rn)&&rn!==n)return void(function(Nn,Ln){ce.isSeeking()||ce.getTime()===0?(T.warn(`Adjusting playback time ${Nn} because of gap in the manifest. Seeking by ${Nn-n}`),ce.seek(Nn,!1,!1)):(T.warn(`Adjusting buffering time ${Nn} because of gap in the manifest. Adjusting time by ${Nn-n}`),It(Nn),Ln&&We())})(rn,en)}}catch(rn){T.error(rn)}xe()||en&&We()})(Dt)}function xe(){const $e=b.getCurrentRepresentation(),Dt=l.isLastSegmentRequested($e,n);if(Dt){const nn=l.getCurrentIndex();T.debug(`Segment requesting for stream ${Q.id} has finished`),V.trigger(p.default.STREAM_REQUESTING_COMPLETED,{segmentIndex:nn},{streamId:Q.id,mediaType:B}),e.segmentRequestingCompleted(nn),Be()}return Dt}function We(){const $e=de.getScheduleTimeout();S.startScheduleTimer($e)}function nt($e){C.addBufferState(B,$e.state,S.getBufferTarget()),$e.state!==y.BUFFER_EMPTY||ce.isSeeking()||(T.info("Buffer is empty! Stalling!"),C.pushPlayListTraceMetrics(new Date,Jn.REBUFFERING_REASON))}function ut($e){j.syncExecutedRequestsWithBufferedRange(e.getBuffer().getAllBufferRanges(),Q.duration),$e.quotaExceeded&&$e.from>ce.getTime()&&It($e.from),$e.hasEnoughSpaceToAppend&&$e.quotaExceeded&&S.startScheduleTimer()}function Ut($e){if(!$e||!$e.lastRequestAppended||!$e.lastRequestAppended.url)return;let Dt=$e.lastRequestAppended.url;$e.lastRequestAppended.range&&(Dt=Dt.concat("_",$e.lastRequestAppended.range)),T.warn(`Blacklisting segment with url ${Dt}`),I.add(Dt)}function Qe($e){if(T.debug(`Appended bytes for ${$e.mediaType} and stream id ${$e.streamId}`),$e.segmentType===Ae.HTTPRequest.INIT_SEGMENT_TYPE){const Dt=$e.representationId;S.setLastInitializedRepresentationId(Dt),T.info("["+B+"] lastInitializedRepresentationId changed to "+Dt)}u&&u.enabled?tt(u.newRepresentation,u.oldRepresentation):H||S.startScheduleTimer(0)}function wt(){u={newRepresentation:null,oldRepresentation:null,enabled:!1}}function Qt($e){return new Promise((Dt=>{if(!b)return Promise.resolve();let nn=null;var en;nn=$e.newRepresentation?{selectedRepresentation:(en=$e).newRepresentation,currentMediaInfo:en.newMediaInfo}:i!==null&&k.areMediaInfosEqual(i,$e.newMediaInfo)?(function(rn){return{currentMediaInfo:rn.newMediaInfo,selectedRepresentation:b.getCurrentRepresentation()}})($e):(function(rn){let Nn=NaN;return Nn=!F.get().streaming.abr.autoSwitchBitrate[rn.newMediaInfo.type]&&rn.previouslySelectedRepresentation?rn.previouslySelectedRepresentation.bitrateInKbit:X.getInitialBitrateFor(B),{selectedRepresentation:X.getOptimalRepresentationForBitrate(rn.newMediaInfo,Nn,!1),currentMediaInfo:rn.newMediaInfo}})($e),yn(nn.currentMediaInfo),V.trigger(),(function(rn){m&&rn.selectedRepresentation.dependentRepresentation&&(T.info("["+B+"] selectMediaInfo : call selectMediaInfo on enhancementStreamProcessor for index = "+rn.selectedRepresentation.absoluteIndex),m.selectMediaInfo(new wa({newMediaInfo:rn.selectedRepresentation.mediaInfo,newRepresentation:rn.selectedRepresentation})))})(nn);const mn=X.getPossibleVoRepresentations(i,!1);return b.updateData(mn,i.isFragmented,nn.selectedRepresentation.id).then((()=>{(function(){const rn=b.getCurrentCompositeRepresentation();e.getIsBufferingCompleted()||e.updateBufferTimestampOffset(rn)})(),Dt()})).catch((rn=>{T.error(rn),Dt()}))}))}function yn($e){k.areMediaInfosEqual(i,$e)||V.trigger(P.default.NEW_TRACK_SELECTED,{value:$e}),i=$e,X.handleNewMediaInfo(i),V.trigger(p.default.MEDIAINFO_UPDATED,{mediaType:B,streamId:Q.id,currentMediaInfo:i})}function hn($e){const Dt=$e.newRepresentation,nn=$e.oldRepresentation,en=dn();Dt&&nn||T.warn("_handleDifferentSwitchTypes() is missing the target representations"),$e.reason&&$e.reason.forceReplace?(function(mn,rn){j.abortRequests(),V.trigger(p.default.BUFFER_REPLACEMENT_STARTED,{mediaType:B,streamId:Q.id},{mediaType:B,streamId:Q.id}),S.setShouldCheckPlaybackQuality(!1),e.prepareForForceReplacementQualitySwitch(mn,rn).then((()=>{tn()})).catch((()=>{tn()}))})(Dt,nn):$e&&$e.reason&&$e.reason.forceAbandon?(function(mn,rn){e.prepareForAbandonQualitySwitch(mn,rn).then((()=>{sn()})).catch((()=>{sn()}))})(Dt,nn):!de.getFastSwitchEnabled()||en&&en.isPartialSegment?tt(Dt,nn):(function(mn,rn){const Nn=ce.getTime();let Ln=1.5*(isNaN(mn.fragmentDuration)?1:mn.fragmentDuration);const ma=j.getRequests({state:Se.FRAGMENT_MODEL_EXECUTED,time:Nn+Ln,threshold:0})[0];if(ma&&!i.isText){const ha=e.getBufferLevel(),Ta=X.getAbandonmentStateFor(Q.id,B);ma.bandwidth<mn.bandwidth&&ha>=Ln&&Ta===y.ALLOW_LOAD?e.prepareForFastQualitySwitch(mn,rn).then((()=>{Ce(Nn,Ln)})).catch((()=>{Ce(Nn,Ln)})):tt(mn,rn)}else tt(mn,rn)})(Dt,nn),C.pushPlayListTraceMetrics(new Date,Jn.REPRESENTATION_SWITCH_STOP_REASON),C.createPlaylistTraceMetrics(Dt.id,1e3*ce.getTime(),ce.getPlaybackRate())}function tn(){fe(),wt(),h=!1}function sn(){j.abortRequests(),x=!0,S.setShouldCheckPlaybackQuality(!1),S.startScheduleTimer(),h=!1}function Ce($e,Dt){j.abortRequests(),It($e+Dt),S.setShouldCheckPlaybackQuality(!1),S.startScheduleTimer(),h=!1}function tt($e,Dt){const nn=j.getRequests({state:Se.FRAGMENT_MODEL_LOADING});if(nn&&nn.length>0)return T.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),u.newRepresentation=$e,u.oldRepresentation=Dt,void(u.enabled=!0);e.prepareForDefaultQualitySwitch($e,Dt).then((()=>{Xe()})).catch((()=>{Xe()}))}function Xe(){S.setShouldCheckPlaybackQuality(!1),i.segmentAlignment||i.subSegmentAlignment?S.startScheduleTimer():qe(),wt(),h=!1}function ot($e){T.info("onFragmentLoadingAbandoned request: "+$e.request.url+" has been aborted"),ce.isSeeking()||S.getSwitchTrack()||h||(T.info("onFragmentLoadingAbandoned request: "+$e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),$e.request&&$e.request.isInitializationRequest()?S.setInitSegmentRequired(!0):It($e.request.startTime+$e.request.duration/2),S.startScheduleTimer(0))}function zt($e){T.info("OnFragmentLoadingCompleted for stream id "+Q.id+" and media type "+B+" - Url:",$e.request?$e.request.url:"undefined",$e.request.range?", Range:"+$e.request.range:""),i.isText&&S.startScheduleTimer(0),$e.error&&$e.request.serviceLocation&&(function(Dt){T.info("Fragment loading completed with an error"),Dt&&Dt.request&&Dt.request.type&&(Dt.request.type===Ae.HTTPRequest.INIT_SEGMENT_TYPE?he({representationId:Dt.request.representation.id,sender:{}},!1):Dt.request.type===Ae.HTTPRequest.MEDIA_SEGMENT_TYPE&&(It(Dt.request.startTime+Dt.request.duration/2),me(0,!1)))})($e)}function Ye(){It(ce.getTime()),_e().startScheduleTimer()}function ft($e){const Dt=$e.currentTrackInfo;if(!Dt)return;const nn=_.find((en=>en.index===Dt.index&&en.lang===Dt.lang));nn&&Qt(new wa({newMediaInfo:nn})).then((()=>{e.setIsBufferingCompleted(!1),It(ce.getTime()),S.setInitSegmentRequired(!0),S.startScheduleTimer()}))}function it($e){It($e.quotaExceededTime),Be()}function vt(){return e?e.getBuffer():null}function _e(){return S}function Be(){S&&S.clearScheduleTimer()}function at($e=NaN){let Dt;return isNaN($e)?Dt=b?b.getCurrentRepresentation():null:((0,et.checkInteger)($e),Dt=b?b.getRepresentationById($e):null),Dt}function Le(){return!!e&&e.getIsBufferingCompleted()}function dt($e){if(!F.get().streaming.enableManifestTimescaleMismatchFix)return;const Dt=$e.chunk,nn=Dt.bytes,en=at(Dt.representation.id);en&&(en.timescale=w.getMediaTimescaleFromMoov(nn))}function ht($e){const Dt=$e.chunk,nn=Dt.bytes,en=at(Dt.representation.id);if(en){let mn;if(F.get().streaming.parseInbandPrft&&$e.request.type===Ae.HTTPRequest.MEDIA_SEGMENT_TYPE){mn=mn||w.parse(nn);const Ln=(function(ma,ha){const Ta=ma.getBoxes("prft"),qa=[];return Ta.forEach((Pa=>{qa.push((function(oa,Oa){let sa="unknown";switch(oa.flags){case 0:sa=re.default.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:sa=re.default.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:sa=re.default.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}let pa=1e3*oa.ntp_timestamp_sec+oa.ntp_timestamp_frac/2**32*1e3;return pa=Gu(K).getInstance().ntpToUTC(pa),{type:sa,ntpTimestamp:pa,mediaTime:oa.media_time/Oa}})(Pa,ha))})),qa})(mn,en.timescale);Ln&&Ln.length&&V.trigger(P.default.INBAND_PRFT,{data:Ln},{streamId:Q.id,mediaType:B})}const rn=k.getEventsFor(en.mediaInfo,null,Q),Nn=k.getEventsFor(en,en,Q);if(rn&&rn.length>0||Nn&&Nn.length>0){const Ln=$e.request;mn=mn||w.parse(nn);const ma=(function(ha,Ta,qa,Pa){try{const oa={},Oa=[],sa=qa.concat(Pa);for(let aa=0,Qa=sa.length;aa<Qa;aa++)oa[sa[aa].schemeIdUri+"/"+sa[aa].value]=sa[aa];const pa=ha.getBoxes("emsg");if(!pa||pa.length===0)return Oa;const ua=ha.getBox("sidx"),$a=!ua||isNaN(ua.earliest_presentation_time)||isNaN(ua.timescale)?Ta&&!isNaN(Ta.mediaStartTime)?Ta.mediaStartTime:0:ua.earliest_presentation_time/ua.timescale,zr=Math.max($a,0),Lr=b.getCurrentRepresentation();for(let aa=0,Qa=pa.length;aa<Qa;aa++){const Ba=k.getEvent(pa[aa],oa,zr,Lr);Ba&&Oa.push(Ba)}return Oa}catch{return[]}})(mn,Ln,rn,Nn);V.trigger(p.default.INBAND_EVENTS,{events:ma},{streamId:Q.id})}}}function fe(){const $e=ce.getTime();F.get().streaming.buffer.flushBufferAtTrackSwitch&&ce.seek($e+.001,!1,!0),It($e),e.setSeekTarget($e),S.startScheduleTimer()}function qe(){const $e=ce.getTime(),Dt=e.getContinuousBufferTimeForTargetTime($e);It(isNaN(Dt)?$e:Dt),S.startScheduleTimer()}function bt($e){$e&&!isNaN($e.time)&&(It($e.time),e.setSeekTarget($e.time))}function It($e){n=$e,D=!0}function dn(){return l.getLastSegment()}return g={checkAndHandleCompletedBuffering:xe,clearScheduleTimer:Be,createBufferSinks:function($e,Dt){const nn=vt();return nn?Promise.resolve(nn):e?e.createBufferSink(i,$e,Dt):Promise.resolve(null)},dischargePreBuffer:function(){e.dischargePreBuffer()},finalisePlayList:function($e,Dt){C.pushPlayListTraceMetrics($e,Dt)},getAllMediaInfos:function(){return _},getBuffer:vt,getBufferController:function(){return e},getBufferLevel:function(){return e?e.getBufferLevel():0},getFragmentModel:function(){return j},getLastSegment:dn,getMediaInfo:function(){return i},getMediaSource:function(){return e.getMediaSource()},getRepresentation:at,getRepresentationController:function(){return b},getScheduleController:_e,getStreamId:O,getStreamInfo:function(){return Q},getType:te,initialize:function($e,Dt,nn){A=ho(K).create({events:p.default,eventBus:V,streamInfo:Q,timelineConverter:v,dashConstants:re.default,segmentBaseController:t.segmentBaseController,type:B}),l=so(K).create({baseURLController:t.baseURLController,boxParser:w,constants:o.default,dashConstants:re.default,dashMetrics:C,debug:(0,R.default)(K).getInstance(),errHandler:W,errors:qt,eventBus:V,events:p.default,mediaPlayerModel:de,segmentsController:A,settings:F,streamInfo:Q,timelineConverter:v,type:B,urlUtils:xn(K).getInstance()}),c=Q.manifestInfo.isDynamic,l.initialize(c),X.registerStreamType(B,g),b=Fu(K).create({abrController:X,adapter:k,dashConstants:re.default,dashMetrics:C,errors:qt,eventBus:V,events:p.default,isDynamic:c,playbackController:ce,segmentsController:A,streamInfo:Q,timelineConverter:v,type:B}),e=(function(en,mn){let rn=null;return en?(rn=en!==o.default.TEXT||mn?Mu(K).create({abrController:X,capabilities:d,errHandler:W,fragmentModel:j,manifestModel:ae,mediaController:ne,mediaPlayerModel:de,playbackController:ce,representationController:b,settings:F,streamInfo:Q,textController:G,type:en}):Pu(K).create({errHandler:W,fragmentModel:j,mimeType:pe,settings:F,streamInfo:Q,textController:G,type:en}),rn):(W.error(new Ft.default(qt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,qt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)})(B,nn),e&&e.initialize($e),S=Ou(K).create({abrController:X,adapter:k,bufferController:e,dashMetrics:C,fragmentModel:j,mediaController:ne,mediaPlayerModel:de,mimeType:pe,playbackController:ce,representationController:b,settings:F,streamInfo:Q,textController:G,type:B}),r=Dt,S.initialize(Dt),n=0,D=!1,x=!1},isBufferingCompleted:Le,prepareInnerPeriodPlaybackSeeking:function($e){return new Promise((Dt=>{if(e.hasBufferAtTime($e.seekTime))return e.pruneBuffer(),le(e.getContinuousBufferTimeForTargetTime($e.seekTime))&&e.setIsBufferingCompleted(!0),void Dt();Be(),j.abortRequests(),e.prepareForPlaybackSeek().then((()=>{const nn=e.getAllRangesWithSafetyFactor($e.seekTime);return e.clearBuffers(nn)})).then((()=>{const nn=e.getContinuousBufferTimeForTargetTime($e.seekTime);if(le(nn))e.setIsBufferingCompleted(!0),Dt();else{const en=isNaN(nn)?$e.seekTime:nn;It(en),e.setSeekTarget(en);const mn=[];mn.push(e.updateAppendWindow());const rn=at();mn.push(e.updateBufferTimestampOffset(rn)),Promise.all(mn).then((()=>{S.setInitSegmentRequired(!0),S.setShouldCheckPlaybackQuality(!1),S.startScheduleTimer(),Dt()}))}})).catch((nn=>{T.error(nn)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((($e,Dt)=>{try{Be(),j.abortRequests(),e.prepareForPlaybackSeek().then((()=>e.pruneAllSafely())).then((()=>{$e()}))}catch(nn){Dt(nn)}}))},prepareQualityChange:function($e){$e.newRepresentation&&((function(Dt){if(m)m.prepareQualityChange(Dt);else if(B===o.default.ENHANCEMENT){const nn=Dt.oldRepresentation.mediaInfo.type,en=Dt.newRepresentation.mediaInfo.type;if(nn===o.default.ENHANCEMENT&&en===o.default.VIDEO)return T.info("Stop "+B+" stream processor"),S.reset(),!0;if(nn===o.default.VIDEO&&en===o.default.ENHANCEMENT)return T.info("Start "+B+" stream processor"),Qt(new wa({newMediaInfo:Dt.newRepresentation.mediaInfo,newRepresentation:Dt.newRepresentation})).then((()=>{S.setup(),S.initialize(r),S.startScheduleTimer()})),!0}return!1})($e)||(u&&u.enabled&&T.warn(`Canceling queued representation switch to ${u.newRepresentation.id} for ${B}`),$e.isAdaptationSetSwitch?(T.debug(`Preparing quality switch to different AdaptationSet for type ${B} from representation id ${$e.oldRepresentation.id} to ${$e.newRepresentation.id}`),(function(Dt){const nn=Dt.newRepresentation;h=!0,Be(),S.setSwitchTrack(!0);const en=nn.mediaInfo;yn(en),Qt(new wa({newMediaInfo:en,newRepresentation:nn})).then((()=>{hn(Dt)}))})($e)):(T.debug(`Preparing quality within the same AdaptationSet for type ${B} from representation id ${$e.oldRepresentation.id} to ${$e.newRepresentation.id}`),(function(Dt){const nn=Dt.newRepresentation;h=!0,Be(),b.prepareQualityChange(nn),hn(Dt)})($e))))},prepareTrackSwitch:function($e,Dt=!1){return new Promise((nn=>{T.debug(`Preparing track switch for type ${B}`);const en=B===o.default.TEXT||Dt||F.get().streaming.trackSwitchMode[B]===o.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&ce.getTimeToStreamEnd(Q)>F.get().streaming.buffer.stallThreshold;e.getIsBufferingCompleted()&&!en?(function(mn){return new Promise((rn=>{const Nn=b.getCurrentRepresentation();e.prepareForNonReplacementTrackSwitch(Nn,mn).then((()=>{V.trigger(p.default.BUFFERING_COMPLETED,{},{streamId:Q.id,mediaType:B}),rn()})).catch((()=>{V.trigger(p.default.BUFFERING_COMPLETED,{},{streamId:Q.id,mediaType:B}),rn()}))}))})($e).then((()=>{nn()})):(S.setSwitchTrack(!0),en?(function(mn){return new Promise((rn=>{V.trigger(p.default.BUFFER_REPLACEMENT_STARTED,{mediaType:B,streamId:Q.id},{mediaType:B,streamId:Q.id}),j.abortRequests();const Nn=at();e.prepareForReplacementTrackSwitch(Nn,mn).then((()=>{fe(),rn()})).catch((()=>{fe(),rn()}))}))})($e).then((()=>{nn()})):(function(mn){return new Promise((rn=>{const Nn=()=>{const Ln=j.getRequests({state:Se.FRAGMENT_MODEL_LOADING});if(Ln&&Ln.length!==0)V.once(P.default.FRAGMENT_LOADING_COMPLETED,Nn,g);else{const ma=at();e.prepareForNonReplacementTrackSwitch(ma,mn).then((()=>{qe(),rn()})).catch((ha=>{T.error(ha),qe(),rn()}))}};Nn()}))})($e).then((()=>{nn()})))}))},probeNextRequest:function(){const $e=at();return l.getNextSegmentRequestIdempotent(i,$e)},reset:function($e,Dt){l&&l.reset(),e&&(e.reset($e,Dt),e=null),S&&(S.reset(),S=null),b&&(b.reset(),b=null),A&&(A=null),X&&X.unRegisterStreamType(O(),B),V.off(p.default.BUFFER_CLEARED,ut,g),V.off(p.default.BUFFER_LEVEL_STATE_CHANGED,nt,g),V.off(p.default.BYTES_APPENDED_END_FRAGMENT,Qe,g),V.off(p.default.FRAGMENT_LOADING_ABANDONED,ot,g),V.off(p.default.FRAGMENT_LOADING_COMPLETED,zt,g),V.off(p.default.INIT_FRAGMENT_LOADED,dt,g),V.off(p.default.INIT_FRAGMENT_NEEDED,he,g),V.off(p.default.MEDIA_FRAGMENT_LOADED,ht,g),V.off(p.default.MEDIA_FRAGMENT_NEEDED,me,g),V.off(p.default.QUOTA_EXCEEDED,it,g),V.off(p.default.SEEK_TARGET,bt,g),V.off(p.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ye,g),V.off(p.default.SET_NON_FRAGMENTED_TEXT,ft,g),V.off(p.default.SOURCE_BUFFER_ERROR,Ut,g),J(),B=null,Q=null},selectMediaInfo:Qt,setEnhancementStreamProcessor:function($e){m=$e,T.info("enhancementStreamProcessor = "+m)},setExplicitBufferingTime:It,setMediaInfoArray:function($e){_=$e},setMediaSource:function($e){return e.setMediaSource($e,i)},setTrackSwitchInProgress:function($e){H=$e},updateStreamInfo:function($e){return Q=$e,Le()?Promise.resolve():e.updateAppendWindow()}},T=(0,R.default)(K).getInstance().getLogger(g),J(),V.on(p.default.BUFFER_CLEARED,ut,g),V.on(p.default.BUFFER_LEVEL_STATE_CHANGED,nt,g),V.on(p.default.BYTES_APPENDED_END_FRAGMENT,Qe,g),V.on(p.default.FRAGMENT_LOADING_ABANDONED,ot,g),V.on(p.default.FRAGMENT_LOADING_COMPLETED,zt,g),V.on(p.default.INIT_FRAGMENT_LOADED,dt,g),V.on(p.default.INIT_FRAGMENT_NEEDED,he,g),V.on(p.default.MEDIA_FRAGMENT_LOADED,ht,g),V.on(p.default.MEDIA_FRAGMENT_NEEDED,me,g),V.on(p.default.QUOTA_EXCEEDED,it,g),V.on(p.default.SEEK_TARGET,bt,g),V.on(p.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ye,g),V.on(p.default.SET_NON_FRAGMENTED_TEXT,ft,g),V.on(p.default.SOURCE_BUFFER_ERROR,Ut,g),g}bo.__dashjs_factory_name="StreamProcessor";var Hu=ie.default.getClassFactory(bo),Yu=class{constructor(){this.streamId=null,this.segmentType=null,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representation=null,this.endFragment=null}},Vu=class extends ${constructor(t){super(t),this.checkForExistenceOnly=!0}};function yo(t){t=t||{};const e=this.context,n=t.eventBus,r=t.events,i=t.urlUtils,l=t.errors,m=t.streamId;let g,c;return g={abort:function(){c&&c.abort()},checkForExistence:function(T){const _=function(u){n.trigger(r.CHECK_FOR_EXISTENCE_COMPLETED,{request:T,exists:u})};if(T){let u=new Vu(T.url);c.load({request:u,success:function(){_(!0)},error:function(){_(!1)}})}else _(!1)},load:function(T){const _=function(u,h){n.trigger(r.LOADING_COMPLETED,{request:T,response:u||null,error:h||null,sender:g})};T?c.load({request:T,progress:function(u){n.trigger(r.LOADING_PROGRESS,{request:T,stream:u.stream,streamId:m}),u.data&&n.trigger(r.LOADING_DATA_PROGRESS,{request:T,response:u.data||null,error:null,sender:g})},success:function(u){_(u)},error:function(u,h,b){_(void 0,new Ft.default(l.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,b,h))},abort:function(u){u&&n.trigger(r.LOADING_ABANDONED,{mediaType:u.mediaType,request:u,sender:g})}}):_(void 0,new Ft.default(l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},reset:function(){c&&(c.abort(),c.reset(),c=null)},resetInitialSettings:function(){c&&c.resetInitialSettings()}},c=Ga(e).create({errHandler:t.errHandler,errors:l,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,urlUtils:i,constants:o.default,boxParser:t.boxParser,dashConstants:t.dashConstants,requestTimeout:t.settings.get().streaming.fragmentRequestTimeout}),g}yo.__dashjs_factory_name="FragmentLoader";var Ku=ie.default.getClassFactory(yo);function Eo(t){t=t||{};const e=this.context,n=(0,ee.default)(e).getInstance(),r=t.errHandler,i=t.mediaPlayerModel,l=t.dashMetrics,m=(0,R.default)(e).getInstance(),g=t.streamInfo;let c,T,_;function u(){return g.id}function h(){for(let S in _)_[S].reset();_={}}function b(S){if(!S.sender)return;const A=S.request,x=S.response,D=A.isInitializationRequest(),H=A.representation.mediaInfo.streamInfo;if(S.error&&(A.mediaType===o.default.AUDIO||A.mediaType===o.default.VIDEO||A.mediaType===o.default.TEXT&&A.representation.mediaInfo.isFragmented)&&n.trigger(p.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:S.request.serviceLocation}),!x||!H)return void T.warn("No "+A.mediaType+" bytes to push or stream is inactive.");const K=(function(V,X,k,w){const d=new Yu;return d.streamId=k,d.segmentType=X.type,d.start=X.startTime,d.duration=X.duration,d.end=d.start+d.duration,d.bytes=V,d.index=X.index,d.representation=X.representation,d.endFragment=w,d})(x,A,g.id,S.type!==p.default.FRAGMENT_LOADING_PROGRESS);n.trigger(D?p.default.INIT_FRAGMENT_LOADED:p.default.MEDIA_FRAGMENT_LOADED,{chunk:K,request:A},{streamId:H.id,mediaType:A.mediaType})}return c={getStreamId:u,getModel:function(S){let A=_[S];return A||(A=Se(e).create({streamInfo:g,type:S,dashMetrics:l,fragmentLoader:Ku(e).create({dashMetrics:l,mediaPlayerModel:i,errHandler:r,settings:t.settings,boxParser:t.boxParser,eventBus:n,events:p.default,errors:qt,dashConstants:t.dashConstants,urlUtils:t.urlUtils,streamId:u()}),debug:m,eventBus:n,events:p.default}),_[S]=A),A},reset:function(){n.off(P.default.FRAGMENT_LOADING_COMPLETED,b,this),n.off(P.default.FRAGMENT_LOADING_PROGRESS,b,this),h()}},T=m.getLogger(c),h(),n.on(P.default.FRAGMENT_LOADING_COMPLETED,b,c),n.on(P.default.FRAGMENT_LOADING_PROGRESS,b,c),c}Eo.__dashjs_factory_name="FragmentController";var Wu=ie.default.getClassFactory(Eo),$u=class{constructor(){this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}},Qu=class{constructor(){this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""}};function To(t){const e=this.context,n=t.adapter,r=t.baseURLController,i=t.streamInfo,l=t.timelineConverter,m=t.debug,g=t.eventBus,c=t.events,T=t.dashConstants,_=xn(e).getInstance();let u,h,b,S,A,x,D,H,K;function V(k,w){const d=new Qu;d.id=k.id,d.bitrate=k.bandwidth,d.width=k.width,d.height=k.height,d.tilesHor=1,d.tilesVert=1,k.essentialProperties&&k.essentialProperties.forEach((C=>{if(o.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(C.schemeIdUri)>=0&&C.value){const W=C.value.split("x");W.length!==2||isNaN(W[0])||isNaN(W[1])||(d.tilesHor=parseInt(W[0],10),d.tilesVert=parseInt(W[1],10))}})),w?D.updateSegmentData(k).then((C=>{(function(W,j,ae){let ne=[];const de=(function(pe,ce){const I=[];let F,Q,G,v,B=0;for(F=0,Q=pe.segments.length;F<Q;F++)G=pe.segments[F],v=si({durationInTimescale:G.duration,fTimescale:G.timescale,index:B,isDynamic:n.getIsDynamic(),mediaRange:G.mediaRange,mediaTime:G.startTime,mediaUrl:G.media,representation:ce,timelineConverter:l}),v&&(I.push(v),v=null,B++);return I})(ae,j);j.segments=de,j.fragmentDuration=j.segmentDuration||(j.segments&&j.segments.length>0?j.segments[0].duration:NaN),W.segmentDuration=j.segments[0].duration,W.readThumbnail=function(pe,ce){let I=null;ne.some((F=>{if(F.start<=pe&&F.end>pe)return I=F.url,!0})),I?ce(I):j.segments.some((F=>{if(F.mediaStartTime<=pe&&F.mediaStartTime+F.duration>pe){const Q=r.resolve(j.path),G=new Wr({method:"get",url:Q.url,responseType:"arraybuffer",customData:{request:{range:F.mediaRange},onloadend:function(B){let O=K.getSamplesInfo(B.target.response),te=new Blob([B.target.response.slice(O.sampleList[0].offset,O.sampleList[0].offset+O.sampleList[0].size)],{type:"image/jpeg"}),J=window.URL.createObjectURL(te);ne.push({start:F.mediaStartTime,end:F.mediaStartTime+F.duration,url:J}),ce&&ce(J)}}}),v=new $r({request:G});return H.load(G,v),!0}}))}})(d,k,C)})):(d.startNumber=k.startNumber,d.segmentDuration=k.segmentDuration,d.timescale=k.timescale,d.templateUrl=(function(C){const W=_.isRelative(C.media)?_.resolve(C.media,r.resolve(C.path).url):C.media;return W?dr(W,C.id):""})(k)),d.tilesHor>0&&d.tilesVert>0&&(d.widthPerTile=d.width/d.tilesHor,d.heightPerTile=d.height/d.tilesVert,h.push(d))}function X(){h=[],b=[],A=-1,x=null,S&&(S.reset(),S=null)}return u={addTracks:function(){if(!i||!n||(x=n.getMediaInfoForType(i,o.default.IMAGE),!x))return;const k=n.getVoRepresentations(x);k&&k.length>0&&k.forEach((w=>{(w.segmentInfoType===re.default.SEGMENT_TEMPLATE&&w.segmentDuration>0&&w.media||w.segmentInfoType===re.default.SEGMENT_TIMELINE)&&V(w),w.segmentInfoType===re.default.SEGMENT_BASE&&V(w,!0),b.push(w)})),h.length>0&&h.sort(((w,d)=>w.bitrate-d.bitrate))},getCurrentTrack:function(){return A<0?null:h[A]},getCurrentTrackIndex:function(){return A},getRepresentations:function(){return b},getThumbnailRequestForTime:function(k){let w;const d=n.getVoRepresentations(x);for(let C=0;C<d.length;C++)if(h[A].id===d[C].id){w=d[C];break}return S.getSegmentRequestForTime(x,w,k)},getTracks:function(){return h},reset:X,setTrackById:function(k){if(!h||h.length===0)return;const w=h.findIndex((d=>d.id===k));w!==-1&&(A=w)},setTrackByIndex:function(k){h&&h.length!==0&&(k>=h.length&&(k=h.length-1),A=k)}},X(),H=Gt(e).create({}),K=kr(e).getInstance(),D=ho(e).create({events:c,eventBus:g,streamInfo:i,timelineConverter:l,dashConstants:T,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController,type:o.default.IMAGE}),S=so(e).create({streamInfo:i,type:o.default.IMAGE,timelineConverter:l,segmentsController:D,baseURLController:r,debug:m,eventBus:g,events:c,dashConstants:T,urlUtils:_}),S.initialize(!!n&&n.getIsDynamic()),u}To.__dashjs_factory_name="ThumbnailTracks";var Xu=ie.default.getClassFactory(To);function _o(t){const e=this.context,n=t.streamInfo;let r,i;function l(g){i.setTrackByIndex(g)}function m(){i&&i.reset()}return r={getCurrentTrack:function(){return i.getCurrentTrack()},getCurrentTrackIndex:function(){return i.getCurrentTrackIndex()},getPossibleVoRepresentations:function(){return i.getRepresentations()},getStreamId:function(){return n.id},initialize:function(){i.addTracks();const g=i.getTracks();g&&g.length>0&&l(0)},provide:function(g,c){if(typeof c!="function")return;const T=i.getCurrentTrack();let _,u;if(!T||T.segmentDuration<=0||g==null)return void c(null);u=i.getThumbnailRequestForTime(g),u&&(T.segmentDuration=u.duration),_=g%T.segmentDuration;const h=Math.floor(_*T.tilesHor*T.tilesVert/T.segmentDuration),b=new $u;if(b.width=Math.floor(T.widthPerTile),b.height=Math.floor(T.heightPerTile),b.x=Math.floor(h%T.tilesHor)*T.widthPerTile,b.y=Math.floor(h/T.tilesHor)*T.heightPerTile,"readThumbnail"in T)return T.readThumbnail(g,(S=>{b.url=S,c(b)}));if(u)b.url=u.url,T.segmentDuration=NaN;else{const S=Math.floor(g/T.segmentDuration);b.url=(function(A,x){const D=x+A.startNumber;return dr(A.templateUrl,void 0,D,void 0,A.bandwidth,(D-1)*A.segmentDuration*A.timescale)})(T,S)}c(b)},reset:m,setTrackByIndex:l,setTrackById:function(g){i.setTrackById(g)}},m(),i=Xu(e).create({streamInfo:n,adapter:t.adapter,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:t.debug,eventBus:t.eventBus,events:t.events,dashConstants:t.dashConstants,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController}),r}_o.__dashjs_factory_name="ThumbnailController";var Zu=ie.default.getClassFactory(_o),Ju=class{constructor(t){this.eventBus=t,this.reset()}get duration(){return this._duration}set duration(t){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");this._duration=t}get readyState(){return this._readyState}addSourceBuffer(t){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");const e=new Yl(t,this.eventBus);return this.sourceBuffers.set(e,t),e}removeSourceBuffer(t){if(!this.sourceBuffers.has(t))throw new Error("ExternalSourceBuffer not found");this.sourceBuffers.delete(t)}open(){this._readyState="open",this.eventBus.trigger("externalMediaSourceOpen",{})}endOfStream(){if(this._readyState!=="open")throw new Error("ExternalMediaSource is not open");this._readyState="ended",this.eventBus.trigger("externalMediaSourceEnded",{})}close(){this._readyState="closed",this.eventBus.trigger("externalMediaSourceClosed",{})}reset(){this.sourceBuffers=new Map,this._duration=NaN,this._readyState="closed"}};const ed=[o.default.VIDEO,o.default.AUDIO,o.default.TEXT,o.default.MUXED,o.default.IMAGE];function vo(t){t=t||{};const e=this.context,n=(0,ee.default)(e).getInstance(),r=xn(e).getInstance(),i=t.manifestModel,l=t.mediaPlayerModel,m=t.dashMetrics,g=t.manifestUpdater,c=t.adapter,T=t.timelineConverter,_=t.capabilities,u=t.errHandler,h=t.abrController,b=t.playbackController,S=t.throughputController,A=t.eventController,x=t.mediaController,D=t.protectionController,H=t.textController,K=t.videoModel;let V=t.streamInfo;const X=t.settings;let k,w,d,C,W,j,ae,ne,de,pe,ce,I,F,Q,G,v;function B(Ye,ft,it){return new Promise(((vt,_e)=>{nt(),Ut();let Be=K.getElement();const at=[];ed.forEach((Le=>{if((Le!==o.default.TEXT||Ye)&&(Le!==o.default.VIDEO||!Be||Be&&/^VIDEO$/i.test(Be.nodeName))){const dt=it.find((ht=>ht.mediaInfo.type===Le));at.push(O(Le,Ye,dt))}})),Promise.all(at).then((()=>(function(Le){return new Promise((dt=>{const ht={},fe=d.map((qe=>{const bt=qe.getRepresentation();return qe.createBufferSinks(Le,bt)}));Promise.all(fe).then((qe=>{qe.forEach((bt=>{bt&&(ht[bt.getType()]=bt)})),dt(ht)})).catch((()=>{dt(ht)}))}))})(ft))).then((Le=>{if(d.length===0){const dt="No streams to play.";u.error(new Ft.default(qt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,dt,i.getValue())),w.fatal(dt)}else Xe();Ye&&H.createTracks(V),vt(Le)})).catch((Le=>{_e(Le)}))}))}function O(Ye,ft,it){let vt,_e=c.getAllMediaInfoForType(V,Ye),Be=[],at=null,Le=-1;if(!_e||_e.length===0)return w.info("No "+Ye+" data."),Promise.resolve();Ye===o.default.VIDEO&&(ae=!0),Ye===o.default.AUDIO&&(ne=!0);for(let ht=0,fe=_e.length;ht<fe;ht++)at=_e[ht],Ye===o.default.TEXT&&at.isEmbedded&&(H.addEmbeddedTrack(V,at),Be.push(at)),te(at)&&x.addTrack(at),at.type===o.default.ENHANCEMENT&&(Le=ht);if(Be.length>0&&(x.setInitialMediaSettingsForType(Ye,V),H.addMediaInfosToBuffer(V,Ye,Be)),_e=_e.filter((ht=>!ht.isEmbedded)),_e.length===0)return Promise.resolve();if(Ye===o.default.IMAGE)return pe=Zu(e).create({streamInfo:V,adapter:c,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:Q,eventBus:n,events:p.default,dashConstants:re.default,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController}),pe.initialize(),Promise.resolve();n.trigger(p.default.STREAM_INITIALIZING,{streamInfo:V,mediaInfo:at}),x.setInitialMediaSettingsForType(Ye,V);let dt=J(_e,ft,Ye);if(Le>=0){let ht=new Ju(n);ht.open(),ht.duration=V.manifestInfo.duration;let fe=J(_e,ht,o.default.ENHANCEMENT);fe.selectMediaInfo(new wa({newMediaInfo:_e[Le]})),dt.setEnhancementStreamProcessor(fe)}if(vt=x.getCurrentTrackFor(Ye,V.id),vt){const ht=Ye===o.default.TEXT&&vt.isEmbedded?_e[0]:vt,fe=new wa({newMediaInfo:ht,previouslySelectedRepresentation:it});return dt.selectMediaInfo(fe)}return Promise.resolve()}function te(Ye){const ft=Ye?Ye.type:null;let it;return ft===o.default.MUXED?(it="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",w.fatal(it),u.error(new Ft.default(qt.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,it,i.getValue())),!1):!(ft!==o.default.TEXT&&ft!==o.default.IMAGE&&Ye.contentProtection&&Ye.contentProtection.length>0&&!_.supportsEncryptedMedia()&&(u.error(new Ft.default(qt.CAPABILITY_MEDIAKEYS_ERROR_CODE,qt.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function J(Ye,ft,it){const vt=Ye&&Ye.length>0?Ye.filter((ht=>ht.type===it))[0]:null;let _e=de.getModel(vt?vt.type:null);const Be=vt?vt.type:null,at=vt?vt.mimeType:null,Le=vt?vt.isFragmented:null;let dt=Hu(e).create({abrController:h,adapter:c,baseURLController:t.baseURLController,boxParser:F,capabilities:_,dashMetrics:t.dashMetrics,errHandler:u,fragmentModel:_e,manifestModel:i,mediaController:x,mediaPlayerModel:l,mimeType:at,playbackController:b,segmentBaseController:t.segmentBaseController,segmentBlacklistController:ce,settings:X,streamInfo:V,textController:H,throughputController:S,timelineConverter:T,type:Be});return dt.initialize(ft,ae,Le),d.push(dt),dt.setMediaInfoArray(Ye),Be===o.default.TEXT&&H.addMediaInfosToBuffer(V,Be,Ye,_e),dt}function le(Ye){let ft=d?d.length:0;for(let it=0;it<ft;it++){let vt=d[it].getFragmentModel();vt.abortRequests(),vt.resetInitialSettings(),d[it].reset(!1,Ye)}H&&H.deactivateStream(V),pe&&(pe.reset(),pe=null),d=[],W=!1,j=!1,ot(!1),me(!1),n.trigger(p.default.STREAM_DEACTIVATED,{streamInfo:V})}function he(Ye){le(Ye),C=!1,ae=!1,ne=!1,G=!1,v=[]}function me(Ye){G=Ye}function xe(){return V?V.start:NaN}function We(){return V?V.id:null}function nt(){if(!K||!h)throw new Error(o.default.MISSING_CONFIG_ERROR)}function ut(Ye){Ye.error&&(u.error(Ye.error),w.fatal(Ye.error.message))}function Ut(){if(A){const Ye=c.getEventsFor(V);Ye&&Ye.length>0&&A.addInlineEvents(Ye,V.id)}}function Qe(Ye){let ft=wt(Ye);return ft?ft.getMediaInfo():null}function wt(Ye){return Ye?d.find((ft=>ft.getType()===Ye)):null}function Qt(){let Ye=Ce();const ft=Ye.length;if(ft!==0){for(let it=0;it<ft;it++)if(!Ye[it].isBufferingCompleted()&&(Ye[it].getType()===o.default.AUDIO||Ye[it].getType()===o.default.VIDEO))return void w.debug("onBufferingCompleted - One streamProcessor has finished but",Ye[it].getType(),"one is not buffering completed");w.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),j=!0,n.trigger(p.default.STREAM_BUFFERING_COMPLETED,{streamInfo:V},{streamInfo:V})}else w.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function yn(Ye){A&&A.addInbandEvents(Ye.events,V.id)}function hn(){Xe()}function tn(Ye){return Ye&&Ye.type?sn(Ye.type):null}function sn(Ye){return Ye?Ce().filter((function(ft){return ft.getType()===Ye}))[0]:null}function Ce(){let Ye,ft,it=[];for(let vt=0;vt<d.length;vt++)ft=d[vt],Ye=ft.getType(),Ye!==o.default.AUDIO&&Ye!==o.default.VIDEO&&Ye!==o.default.TEXT&&Ye!==o.default.ENHANCEMENT||it.push(ft);return it}function tt(){const Ye=d.length;for(let ft=0;ft<Ye&&d[ft];ft++)d[ft].getScheduleController().startScheduleTimer()}function Xe(){const Ye=d.length;if(D){D.clearMediaInfoArray();for(let ft=0;ft<Ye&&d[ft];ft++){const it=d[ft].getType(),vt=d[ft].getMediaInfo();if(it===o.default.AUDIO||it===o.default.VIDEO||it===o.default.TEXT&&vt&&vt.isFragmented){let _e=d[ft].getMediaInfo();_e&&D.initializeForMedia(_e)}}D.handleKeySystemFromManifest()}C||(C=!0,K.waitForReadyState(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(()=>{n.trigger(p.default.STREAM_INITIALIZED,{streamInfo:V})})))}function ot(Ye){I=Ye}function zt(){return I}return k={activate:function(Ye,ft,it=[]){return new Promise(((vt,_e)=>{if(!W)return zt()?(W=!0,n.trigger(p.default.STREAM_ACTIVATED,{streamInfo:V}),void vt()):void(function(Be,at,Le=[]){return B(Be,at,Le)})(Ye,ft,it).then((()=>{W=!0,it&&it.length>0&&tt(),n.trigger(p.default.STREAM_ACTIVATED,{streamInfo:V}),vt()})).catch((Be=>{_e(Be)}));vt()}))},checkAndHandleCompletedBuffering:function(){j||d.forEach((Ye=>{Ye.checkAndHandleCompletedBuffering()}))},deactivate:le,getAdapter:function(){return c},getCurrentMediaInfoForType:function(Ye){const ft=sn(Ye);return ft?ft.getMediaInfo():null},getCurrentRepresentationForType:function(Ye){const ft=sn(Ye);return ft?ft.getRepresentation():null},getDuration:function(){return V?V.duration:NaN},getHasAudioTrack:function(){return ne},getHasFinishedBuffering:function(){return j},getHasVideoTrack:function(){return ae},getId:We,getIsActive:function(){return W},getIsEndedEventSignaled:function(){return G},getPreloaded:zt,getRepresentationForTypeById:function(Ye,ft){let it;if(Ye===o.default.IMAGE){if(!pe)return null;it=pe.getPossibleVoRepresentations()}else it=(function(Be){let at=wt(Be);return at?at.getAllMediaInfos():[]})(Ye).flatMap((Be=>h.getPossibleVoRepresentationsFilteredBySettings(Be,!0)));if(!it||it.length===0)return null;const vt=it.filter((_e=>_e.id===ft));return vt&&vt.length>0?vt[0]:null},getRepresentationForTypeByIndex:function(Ye,ft){let it;if(Ye===o.default.IMAGE){if(!pe)return null;it=pe.getPossibleVoRepresentations()}else{const vt=Qe(Ye);it=h.getPossibleVoRepresentationsFilteredBySettings(vt,!0)}return it[ft=Math.max(Math.min(ft,it.length-1),0)]},getRepresentationsByType:function(Ye){if(nt(),Ye===o.default.IMAGE)return pe?pe.getPossibleVoRepresentations():[];const ft=Qe(Ye);return h.getPossibleVoRepresentationsFilteredBySettings(ft,!0)},getStartTime:xe,getStreamId:function(){return V?V.id:null},getStreamInfo:function(){return V},getStreamProcessors:Ce,getThumbnailController:function(){return pe},initialize:function(){n.on(p.default.BUFFERING_COMPLETED,Qt,k),n.on(p.default.INBAND_EVENTS,yn,k),n.on(p.default.DATA_UPDATE_COMPLETED,hn,k),D&&(n.on(p.default.KEY_ERROR,ut,k),n.on(p.default.SERVER_CERTIFICATE_UPDATED,ut,k),n.on(p.default.LICENSE_REQUEST_COMPLETE,ut,k),n.on(p.default.KEY_SYSTEM_SELECTED,ut,k),n.on(p.default.KEY_SESSION_CREATED,ut,k)),H.initializeForStream(V),n.trigger(p.default.STREAM_UPDATED,{streamInfo:V})},initializeForTextWithMediaSource:function(Ye){return new Promise(((ft,it)=>{O(o.default.TEXT,Ye,null).then((()=>(function(){const vt=sn(o.default.TEXT);return vt?vt.createBufferSinks():Promise.resolve()})())).then((()=>{H.createTracks(V),ft()})).catch((vt=>{it(vt)}))}))},prepareQualityChange:function(Ye){const ft=sn(Ye.mediaType);ft&&ft.prepareQualityChange(Ye)},prepareTrackChange:function(Ye){if(!W||!V)return;j=!1;let ft=Ye.newMediaInfo,it=i.getValue(),vt=tn(ft);if(!vt)return;let _e=b.getTime();if(w.info("Stream - Process track changed at current time "+_e),it.refreshManifestOnSwitchTrack)v.push(Ye),g.getIsUpdating()||(w.debug("Stream - Refreshing manifest for switch track"),g.refreshManifest());else{vt.clearScheduleTimer(),vt.setTrackSwitchInProgress(!0);const Be=vt.getRepresentation();vt.selectMediaInfo(new wa({newMediaInfo:ft})).then((()=>{const at=!!(Ye&&Ye.options&&Ye.options.hasOwnProperty("replaceBuffer"))&&Ye.options.replaceBuffer;return vt.prepareTrackSwitch(Be,at)})).then((()=>{vt.setTrackSwitchInProgress(!1)}))}},reset:function(Ye){de&&(de.reset(),de=null),h&&V&&h.clearDataForStream(V.id),ce&&(ce.reset(),ce=null),H&&V&&H.clearDataForStream(V.id),x&&V&&x.clearDataForStream(V.id),he(Ye),V=null,n.off(p.default.BUFFERING_COMPLETED,Qt,k),n.off(p.default.INBAND_EVENTS,yn,k),n.off(p.default.DATA_UPDATE_COMPLETED,hn,k),D&&(n.off(p.default.KEY_ERROR,ut,k),n.off(p.default.SERVER_CERTIFICATE_UPDATED,ut,k),n.off(p.default.LICENSE_REQUEST_COMPLETE,ut,k),n.off(p.default.KEY_SYSTEM_SELECTED,ut,k),n.off(p.default.KEY_SESSION_CREATED,ut,k))},setIsEndedEventSignaled:me,setMediaSource:function(Ye){return new Promise(((ft,it)=>{const vt=[];for(let _e=0;_e<d.length;)te(d[_e].getMediaInfo())?(vt.push(d[_e].setMediaSource(Ye)),_e++):(d[_e].reset(),d.splice(_e,1));Promise.all(vt).then((()=>{for(let _e=0;_e<d.length;_e++)d[_e].dischargePreBuffer();if(d.length===0){const _e="No streams to play.";u.error(new Ft.default(qt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,_e+"nostreams",i.getValue())),w.fatal(_e)}ft()})).catch((_e=>{w.error(_e),it(_e)}))}))},startPreloading:function(Ye,ft,it=[]){return new Promise(((vt,_e)=>{zt()?_e():(w.info(`[startPreloading] Preloading next stream with id ${We()}`),ot(!0),B(Ye,ft,it).then((()=>{for(let Be=0;Be<d.length&&d[Be];Be++)d[Be].setExplicitBufferingTime(xe()),d[Be].getScheduleController().startScheduleTimer();vt()})).catch((()=>{ot(!1),_e()})))}))},startScheduleControllers:tt,triggerProtectionError:function(Ye){ut(Ye)},updateData:function(Ye){return new Promise((ft=>{V=Ye,A&&Ut();let it,vt=[];for(let _e=0,Be=d.length;_e<Be;_e++){let at=d[_e];const Le=at.getMediaInfo();vt.push(at.updateStreamInfo(V));let dt=c.getAllMediaInfoForType(V,at.getType());if(dt=dt.filter((ht=>!ht.isEmbedded)),at.setMediaInfoArray(dt),dt)for(let ht=0;ht<dt.length;ht++)c.areMediaInfosEqual(Le,dt[ht])&&vt.push(at.selectMediaInfo(new wa({newMediaInfo:dt[ht]})))}Promise.all(vt).then((()=>{let _e=[];for(;v.length>0;){let Be=v.pop(),at=Be.newMediaInfo;if(it=tn(Be.oldMediaInfo),!it)return;const Le=it.getRepresentation();it.setTrackSwitchInProgress(!0),_e.push(it.prepareTrackSwitch(Le)),_e.push(it.selectMediaInfo(new wa({newMediaInfo:at})))}return Promise.all(_e)})).then((()=>{Xe(),it&&it.setTrackSwitchInProgress(!1),n.trigger(p.default.STREAM_UPDATED,{streamInfo:V}),ft()})).catch((_e=>{u.error(_e)}))}))}},(function(){try{Q=(0,R.default)(e).getInstance(),w=Q.getLogger(k),he(),F=kr(e).getInstance(),ce=Xt(e).create({updateEventName:p.default.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:p.default.SEGMENT_LOCATION_BLACKLIST_ADD}),de=Wu(e).create({streamInfo:V,mediaPlayerModel:l,dashMetrics:m,errHandler:u,settings:X,boxParser:F,dashConstants:re.default,urlUtils:r})}catch(Ye){throw Ye}})(),k}vo.__dashjs_factory_name="Stream";var td=ie.default.getClassFactory(vo);function di(){const t=this.context,e=(0,ee.default)(t).getInstance(),n=xn(t).getInstance();let r,i,l,m,g,c,T,_,u,h,b,S,A,x,D,H;function K(){_=[],u=[],h=null,b=null,A=null,S=NaN,l=!1,m=!1,x=g.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function V(){g.get().streaming.utcSynchronization.enabled&&!l&&!m&&A&&A.value&&A.schemeIdUri&&!isNaN(S)&&!isNaN(g.get().streaming.utcSynchronization.backgroundAttempts)&&(b&&(Date.now()-b)/1e3<30||(_=[],m=!0,X(isNaN(g.get().streaming.utcSynchronization.backgroundAttempts)?2:g.get().streaming.utcSynchronization.backgroundAttempts)))}function X(Q){try{if(Q<=0)return void I();const G=Date.now();c[A.schemeIdUri](A.value,(function(v){const B=Date.now(),O=w(G,B,v);_.push(O),X(Q-1)}),(function(){I()}))}catch{I()}}function k(Q=null){let G=Q||0;if(!u||u.length===0||G>=u.length)return void d();let v=u[G];if(v)if(c.hasOwnProperty(v.schemeIdUri)){const B=new Date().getTime();c[v.schemeIdUri](v.value,(function(O){const te=new Date().getTime(),J=w(B,te,O);A=v,d(J)}),(function(){k(G+1)}))}else k(G+1);else d()}function w(Q,G,v){return v-(G-(G-Q)/2)}function d(Q=NaN){let G=isNaN(Q);G&&g.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(function(){let v=T.getLatestMPDRequestHeaderValueByID("Date"),B=v!==null?new Date(v).getTime():Number.NaN;isNaN(B)?ce(!0):ce(!1,B-Date.now())})():ce(G,Q)}function C(Q){let G=Date.parse(Q);return isNaN(G)&&(G=(function(v){let B,O,te=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(v);return B=Date.UTC(parseInt(te[1],10),parseInt(te[2],10)-1,parseInt(te[3],10),parseInt(te[4],10),parseInt(te[5],10),te[6]&&(parseInt(te[6],10)||0),te[7]&&1e3*parseFloat(te[7])||0),te[9]&&te[10]&&(O=60*parseInt(te[9],10)+parseInt(te[10],10),B+=(te[8]==="+"?-1:1)*O*60*1e3),new Date(B).getTime()})(Q)),G}function W(Q){return Date.parse(Q)}function j(Q){return Date.parse(Q)}function ae(Q,G,v){v()}function ne(Q,G,v){let B=C(Q);isNaN(B)?v():G(B)}function de(Q,G,v,B,O){let te,J,le=!1,he=new XMLHttpRequest,me=O?Ae.HTTPRequest.HEAD:Ae.HTTPRequest.GET,xe=G.match(/\S+/g);if(G=xe.shift(),te=function(){le||(le=!0,xe.length?de(Q,xe.join(" "),v,B,O):B())},J=function(){let We,nt;he.status===200&&(We=O?he.getResponseHeader("Date"):he.response,nt=Q(We),isNaN(nt)||(v(nt),le=!0))},n.isRelative(G)){const We=H.resolve();We&&(G=n.resolve(G,We.url))}he.open(me,G),he.timeout=5e3,he.onload=J,he.onloadend=te,he.send()}function pe(Q,G,v){de(j,Q,G,v,!0)}function ce(Q,G){if(isNaN(S)||isNaN(G)||Q||(function(B){try{const O=F(B),te=isNaN(x)?30:x,J=isNaN(g.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:g.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,le=isNaN(g.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:g.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,he=isNaN(g.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:g.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;let me;O?(me=Math.min(te*J,le),i.debug(`Increasing timeBetweenSyncAttempts to ${me}`)):(me=Math.max(te/J,he),i.debug(`Decreasing timeBetweenSyncAttempts to ${me}`)),x=me}catch{}})(G),!Q&&!isNaN(G)){h=Date.now(),l=!1;const B=isNaN(S);S=G,B&&V(),i.debug(`Completed UTC sync. Setting client - server offset to ${G}`)}Q&&(A=null,l=!1,D.error(new Ft.default(qt.TIME_SYNC_FAILED_ERROR_CODE,qt.TIME_SYNC_FAILED_ERROR_MESSAGE)));const v=g.get().streaming.utcSynchronization.artificialTimeOffsetToApply;e.trigger(p.default.UPDATE_TIME_SYNC_OFFSET,{offset:G+v}),e.trigger(p.default.TIME_SYNCHRONIZATION_COMPLETED)}function I(){if(!_||_.length===0)return;const Q=_.reduce(((G,v)=>G+v),0)/_.length;F(Q)?i.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(i.debug(`Completed background UTC sync. Setting client - server offset to ${Q}`),S=Q,e.trigger(p.default.UPDATE_TIME_SYNC_OFFSET,{offset:S})),m=!1,b=Date.now()}function F(Q){try{if(isNaN(S))return!0;const G=g.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(g.get().streaming.utcSynchronization.maximumAllowedDrift)?g.get().streaming.utcSynchronization.maximumAllowedDrift:100;return Q>=S-G&&Q<=S+G}catch{return!0}}return r={initialize:function(){K(),c={"urn:mpeg:dash:utc:http-head:2014":pe,"urn:mpeg:dash:utc:http-xsdate:2014":de.bind(null,C),"urn:mpeg:dash:utc:http-iso:2014":de.bind(null,W),"urn:mpeg:dash:utc:direct:2014":ne,"urn:mpeg:dash:utc:http-head:2012":pe,"urn:mpeg:dash:utc:http-xsdate:2012":de.bind(null,C),"urn:mpeg:dash:utc:http-iso:2012":de.bind(null,W),"urn:mpeg:dash:utc:direct:2012":ne,"urn:mpeg:dash:utc:http-ntp:2014":ae,"urn:mpeg:dash:utc:ntp:2014":ae,"urn:mpeg:dash:utc:sntp:2014":ae}},attemptSync:function(Q,G){u=Q,l||((function(v){try{if(!v||!g.get().streaming.utcSynchronization.enabled)return!1;const B=isNaN(x)?30:x;return!(h&&B&&!isNaN(B))||(Date.now()-h)/1e3>=B}catch{return!0}})(G)?(l=!0,k()):e.trigger(p.default.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(Q){Q&&(Q.dashMetrics&&(T=Q.dashMetrics),Q.baseURLController&&(H=Q.baseURLController),Q.errHandler&&(D=Q.errHandler),Q.settings&&(g=Q.settings))},reset:function(){K(),e.off(p.default.ATTEMPT_BACKGROUND_SYNC,V,r)}},i=(0,R.default)(t).getInstance().getLogger(r),e.on(p.default.ATTEMPT_BACKGROUND_SYNC,V,r),r}di.__dashjs_factory_name="TimeSyncController";const ci=ie.default.getSingletonFactory(di);ci.HTTP_TIMEOUT_MS=5e3,ie.default.updateSingletonFactory(di.__dashjs_factory_name,ci);var nd=ci;function So(){let t,e,n,r,i;const l=this.context,m=(0,ee.default)(l).getInstance();return t={attachMediaSource:function(g){let c=window.URL.createObjectURL(e);return g.setSource(c),r==="managedMediaSource"&&(g.setDisableRemotePlayback(!0),e.addEventListener("startstreaming",(()=>{m.trigger(P.default.MANAGED_MEDIA_SOURCE_START_STREAMING)})),e.addEventListener("endstreaming",(()=>{m.trigger(P.default.MANAGED_MEDIA_SOURCE_END_STREAMING)}))),c},createMediaSource:function(){let g="WebKitMediaSource"in window,c="MediaSource"in window;return"ManagedMediaSource"in window?(e=new ManagedMediaSource,r="managedMediaSource",i.info("Created ManagedMediaSource")):c?(e=new MediaSource,r="mediaSource",i.info("Created MediaSource")):g&&(e=new WebKitMediaSource,i.info("Created WebkitMediaSource")),e},detachMediaSource:function(g){g.setSource(null)},setConfig:function(g){g&&g.settings&&(n=g.settings)},setDuration:function g(c){e&&e.readyState==="open"&&(c===null&&isNaN(c)||e.duration!==c&&(c!==1/0||n.get().streaming.buffer.mediaSourceDurationInfinity||(c=Math.pow(2,32)),(function(T){let _=T.sourceBuffers;for(let u=0;u<_.length;u++)if(_[u].updating)return!0;return!1})(e)?setTimeout(g.bind(null,c),50):(i.info("Set MediaSource duration:"+c),e.duration=c)))},setSeekable:function(g,c){e&&typeof e.setLiveSeekableRange=="function"&&typeof e.clearLiveSeekableRange=="function"&&e.readyState==="open"&&g>=0&&g<c&&(e.clearLiveSeekableRange(),e.setLiveSeekableRange(g,c))},signalEndOfStream:function(g){if(!g||g.readyState!=="open")return;let c=g.sourceBuffers;for(let T=0;T<c.length;T++)if(c[T].updating||c[T].buffered.length===0)return;i.info("call to mediaSource endOfStream"),g.endOfStream()}},i=(0,R.default)(l).getInstance().getLogger(t),t}So.__dashjs_factory_name="MediaSourceController";var ad=ie.default.getSingletonFactory(So);function wo(){const t="urn:mpeg:dash:event:2012",n="urn:mpeg:dash:event:callback:2015",l="discarded",m="updated",g="added",c=this.context,T=(0,ee.default)(c).getInstance();let _,u,h,b,S,A,x,D,H,K,V;function X(){if(!x||!D)throw new Error("setConfig function has to be called previously")}function k(){V=!1,h={},b={},S=null,K=!1,A=Date.now()/1e3}function w(){try{if(!K){K=!0;const ce=D.getTime();let I=ce-A;I=A>0?Math.max(0,I):0,d(b,I,ce),d(h,I,ce),C(b),C(h),A=ce,K=!1}}catch(ce){K=!1,u.error(ce)}}function d(ce,I,F){try{ne(ce,function(G){if(G!==void 0){const v=isNaN(G.duration)?0:G.duration;G.calculatedPresentationTime<=F&&G.calculatedPresentationTime+I+v>=F?pe(G,P.default.EVENT_MODE_ON_START):(de(F,v+I,G.calculatedPresentationTime)||(function(B){try{const O=B.eventStream.period.start+B.eventStream.period.duration;return B.calculatedPresentationTime>O}catch(O){return u.error(O),!1}})(G))&&(u.debug(`Removing event ${G.id} from period ${G.eventStream.period.id} as it is expired or invalid`),(function(B,O){try{const te=O.eventStream.schemeIdUri,J=O.eventStream.period.id,le=O.eventStream.value,he=O.id;B[J][te]=B[J][te].filter((me=>le&&me.eventStream.value&&me.eventStream.value!==le||me.id!==he)),B[J][te].length===0&&delete B[J][te]}catch(te){u.error(te)}})(ce,G))}})}catch(Q){u.error(Q)}}function C(ce){try{for(const I in ce)ce.hasOwnProperty(I)&&Object.keys(ce[I]).length===0&&delete ce[I]}catch(I){u.error(I)}}function W(ce,I,F=!1){const Q=ce.eventStream.schemeIdUri,G=ce.eventStream.value,v=ce.id;let B=l;I[Q]||(I[Q]=[]);const O=I[Q].findIndex((te=>(!G||te.eventStream.value&&te.eventStream.value===G)&&te.id===v));if(O===-1)I[Q].push(ce),ce.triggeredReceivedEvent=!1,ce.triggeredStartEvent=!1,B=g;else if(F){const te=I[Q][O];ce.triggeredReceivedEvent=te.triggeredReceivedEvent,ce.triggeredStartEvent=te.triggeredStartEvent,I[Q][O]=ce,B=m}return B}function j(ce){try{if(ce.eventStream.value==1){const I=ce.calculatedPresentationTime;let F;F=ce.calculatedPresentationTime==4294967295?NaN:ce.calculatedPresentationTime+ce.duration,T.trigger(P.default.MANIFEST_VALIDITY_CHANGED,{id:ce.id,validUntil:I,newDuration:F,newManifestValidAfter:NaN},{mode:P.default.EVENT_MODE_ON_START})}}catch(I){u.error(I)}}function ae(ce){try{const I=D.getTime();ne(ce,(function(F){const Q=F.eventStream&&F.eventStream.period&&!isNaN(F.eventStream.period.duration)?F.eventStream.period.duration:NaN,G=F.eventStream&&F.eventStream.period&&!isNaN(F.eventStream.period.start)?F.eventStream.period.start:NaN;if(isNaN(Q)||isNaN(G))return;const v=F.calculatedPresentationTime;Math.abs(v-I)<300&&pe(F,P.default.EVENT_MODE_ON_START)}))}catch(I){u.error(I)}}function ne(ce,I){try{if(ce){const F=Object.keys(ce);for(let Q=0;Q<F.length;Q++){const G=ce[F[Q]],v=Object.keys(G);for(let B=0;B<v.length;B++)G[v[B]].forEach((O=>{O!==void 0&&I(O)}))}}}catch(F){u.error(F)}}function de(ce,I,F){try{return ce-I>F}catch(Q){return u.error(Q),!1}}function pe(ce,I){try{const F=D.getTime(),Q=ce.id;if(I===P.default.EVENT_MODE_ON_RECEIVE&&!ce.triggeredReceivedEvent)return u.debug(`Received event ${Q}`),ce.triggeredReceivedEvent=!0,void T.trigger(ce.eventStream.schemeIdUri,{event:ce},{mode:I});ce.triggeredStartEvent||(ce.eventStream.schemeIdUri===t&&ce.eventStream.value==1?ce.duration===0&&ce.presentationTimeDelta===0||(u.debug(`Starting manifest refresh event ${Q} at ${F}`),(function(){try{X(),x.refreshManifest()}catch(G){u.error(G)}})()):ce.eventStream.schemeIdUri===n&&ce.eventStream.value==1?(u.debug(`Starting callback event ${Q} at ${F}`),(function(G){try{let v=Gt(c).create({});const B=new Wr({method:"get",url:G,responseType:"arraybuffer",customData:{}}),O=new $r({request:B});v.load(B,O)}catch(v){u.error(v)}})(ce.messageData instanceof Uint8Array?je.default.uint8ArrayToString(ce.messageData):ce.messageData)):(u.debug(`Starting event ${Q} from period ${ce.eventStream.period.id} at ${F}`),T.trigger(ce.eventStream.schemeIdUri,{event:ce},{mode:I}),H.get().streaming.events.deleteEventMessageDataTimeout>-1&&setTimeout((()=>{delete ce.messageData,delete ce.parsedMessageData}),H.get().streaming.events.deleteEventMessageDataTimeout)),ce.triggeredStartEvent=!0)}catch(F){u.error(F)}}return _={addInlineEvents:function(ce,I){try{if(X(),h[I]||(h[I]={}),ce)for(let F=0;F<ce.length;F++){let Q=ce[F];if(!de(D.getTime(),isNaN(Q.duration)?0:Q.duration,Q.calculatedPresentationTime)){let G=W(Q,h[I],!0);G===g?(u.debug(`Added inline event with id ${Q.id} from period ${I}`),pe(Q,P.default.EVENT_MODE_ON_RECEIVE)):G===m&&u.debug(`Updated inline event with id ${Q.id} from period ${I}`)}}}catch(F){throw F}},addInbandEvents:function(ce,I){try{X(),b[I]||(b[I]={});for(let F=0;F<ce.length;F++){let Q=ce[F];de(D.getTime(),isNaN(Q.duration)?0:Q.duration,Q.calculatedPresentationTime)||(W(Q,b[I],!1)===g?(Q.eventStream.schemeIdUri===t&&j(Q),u.debug(`Added inband event with id ${Q.id} from period ${I}`),pe(Q,P.default.EVENT_MODE_ON_RECEIVE)):u.debug(`Inband event with scheme_id_uri ${Q.eventStream.schemeIdUri}, value ${Q.eventStream.value}, period id ${I} and event id ${Q.id} was ignored because it has been added before.`))}w()}catch(F){throw F}},getInbandEvents:function(){return b},getInlineEvents:function(){return h},start:function(){try{X(),u.debug("Start Event Controller");const ce=H.get().streaming.events.eventControllerRefreshDelay;V||isNaN(ce)||(V=!0,S=setInterval(w,ce))}catch(ce){throw ce}},setConfig:function(ce){try{if(!ce)return;ce.manifestUpdater&&(x=ce.manifestUpdater),ce.playbackController&&(D=ce.playbackController),ce.settings&&(H=ce.settings)}catch(I){throw I}},reset:function(){(function(){try{S!==null&&V&&(clearInterval(S),S=null,V=!1,(function(){try{ae(b),ae(h)}catch(ce){u.error(ce)}})())}catch(ce){throw ce}})(),k()}},u=(0,R.default)(c).getInstance().getLogger(_),k(),_}wo.__dashjs_factory_name="EventController";var rd=ie.default.getSingletonFactory(wo),Wa={LEVELS:{WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}},Io=oe(445),ko=oe(1923);function Ao(){const t=this.context,e=(0,ee.default)(t).getInstance();let n,r,i,l,m,g,c,T,_,u,h,b,S,A,x,D,H,K,V,X,k,w,d,C,W,j,ae,ne,de,pe,ce,I,F,Q,G,v,B,O,te,J,le,he,me,xe,We,nt,ut,Ut;function Qe(){if(!(g&&g.hasOwnProperty("load")&&w&&w.hasOwnProperty("initialize")&&w.hasOwnProperty("reset")&&w.hasOwnProperty("getClientTimeOffset")&&c&&k&&_&&G))throw new Error(o.default.MISSING_CONFIG_ERROR)}function wt(){(function(){try{const Me=T.getStreamsInfo();if(!C&&Me.length===0)throw new Error("There are no periods in the MPD");C&&Me.length>0&&_.updateManifestUpdateInfo({currentTime:G.getTime(),buffered:Q.getBufferRange(),presentationStartTime:Me[0].start,clientTimeOffset:w.getClientTimeOffset()}),d.length>0&&(function(Kt){Kt.length!==0?d=d.filter((Jt=>{const pn=Kt.filter((Tn=>Tn.id===Jt.getId())).length>0||Jt.getId()===C.getId();return pn||(r.debug(`Removing stream ${Jt.getId()}`),Jt.reset(!0),Jt=null),pn})):r.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")})(Me);const ct=[];for(let Kt=0,Jt=Me.length;Kt<Jt;Kt++){const pn=Me[Kt];ct.push(yn(pn)),_.addManifestUpdateStreamInfo(pn)}Promise.all(ct).then((()=>new Promise(((Kt,Jt)=>{C?Kt():hn(Me,Kt,Jt)})))).then((()=>{e.trigger(p.default.STREAMS_COMPOSED),dn()})).catch((Kt=>{throw Kt}))}catch(Me){k.error(new Ft.default(qt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,Me.message+" nostreamscomposed",c.getValue())),I=!0,aa()}})()}function Qt(){We=!0}function yn(Me){let ct=$a(Me.id);return ct?ct.updateData(Me):(ct=td(t).create({manifestModel:c,mediaPlayerModel:B,dashMetrics:_,manifestUpdater:m,adapter:T,timelineConverter:w,capabilities:i,capabilitiesFilter:l,errHandler:k,baseURLController:S,segmentBaseController:A,textController:j,abrController:D,playbackController:G,throughputController:H,eventController:V,mediaController:K,protectionController:W,videoModel:Q,streamInfo:Me,settings:xe}),d.push(ct),ct.initialize(),Promise.resolve())}function hn(Me,ct,Kt){try{at();const Jt=_.getCurrentDVRInfo().range;if(Jt.end<Jt.start)return void(function(Tn,Pn,ba,da){nt&&clearTimeout(nt);const Xa=Math.min(1e3*(-1*(Tn.end-Tn.start)+2),2147483647);r.debug(`Waiting for ${Xa} ms before playback can start`),e.trigger(p.default.AST_IN_FUTURE,{delay:Xa}),nt=setTimeout((()=>{hn(Pn,ba,da)}),Xa)})(Jt,Me,ct,Kt);xe.get().streaming.applyProducerReferenceTime&&v.calculateProducerReferenceTimeOffsets(Me);const pn=Me[0].manifestInfo;if(xe.get().streaming.applyServiceDescription&&v.applyServiceDescription(pn),T.getIsDynamic()){const Tn=Ln(0,pn);G.computeAndSetLiveDelay(Tn,pn)}(xe.get().streaming.applyContentSteering&&b.shouldQueryBeforeStart()?b.loadSteeringData():Promise.resolve()).then((()=>{const Tn=c.getValue();Tn&&S.update(Tn),tn(),ct()})).catch((Tn=>{r.error(Tn),tn(),ct()}))}catch(Jt){Kt(Jt)}}function tn(){const Me=(function(){let Jt;return Jt=T.getIsDynamic()?(function(){let pn;const Tn=_.getCurrentDVRInfo();pn=(Tn&&Tn.range?Tn.range.end:0)-G.getOriginalLiveDelay();const Pn=Tn?Tn.range:null;if(Pn){if(isNaN(ut)&&ut.toString().indexOf("posix:")===-1){const da=mn(!0);isNaN(da)||(r.info(`Start time from URI parameters: ${da}`),pn=Math.min(pn,da))}else{r.info(`Start time provided by the app: ${ut}`);const da=rn(!0,ut);isNaN(da)||(pn=Math.min(pn,da))}const ba=xe.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;pn=Math.max(pn,Pn.start+ba)}return pn})():(function(){let pn=Ba()[0].getStreamInfo().start;if(isNaN(ut)){const Tn=mn(!1);isNaN(Tn)||(r.info(`Start time from URI parameters: ${Tn}`),pn=Math.max(pn,Tn))}else{r.info(`Start time provided by the app: ${ut}`);const Tn=rn(!1,ut);isNaN(Tn)||(pn=Math.max(pn,Tn))}return pn})(),Jt})();let ct=Be(Me);const Kt=ct!==null?ct:d[0];e.trigger(p.default.INITIAL_STREAM_SWITCH,{startTime:Me}),sn(Kt,null,Me),he||(he=setInterval((function(){!pe&&G.getTimeToStreamEnd()<=0&&!G.isSeeking()&&e.trigger(p.default.PLAYBACK_ENDED,{isLast:ua().isLast})}),200))}function sn(Me,ct,Kt){try{if(pe||!Me||ct===Me&&Me.getIsActive())return;pe=!0,e.trigger(p.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:ct?ct.getStreamInfo():null,toStreamInfo:Me.getStreamInfo()});let Jt=!1,pn=[],Tn=ot(ct);C=Me,ct&&(Jt=vt(Me,ct),pn=Xe(ct),ct.deactivate(Jt)),Kt=isNaN(Kt)?!Jt&&ct?Me.getStreamInfo().start:NaN:Kt,r.info(`Switch to stream ${Me.getId()}. Seektime is ${Kt}, current playback time is ${G.getTime()}. Seamless period switch is set to ${Jt}`),me=me.filter((Pn=>Pn.getId()!==C.getId())),G.initialize(ua(),!!ct),Q.getElement()?Ce({seekTime:Kt,keepBuffers:Jt,sourceBufferSinksFromPreviousPeriod:Tn,streamActivated:!1,representationsFromPreviousPeriod:pn}):tt({seekTime:Kt,keepBuffers:Jt,sourceBufferSinksFromPreviousPeriod:Tn})}catch{pe=!1}}function Ce(Me){let ct;function Kt(){if(!F||F.readyState!=="open")return;r.debug("MediaSource is open!"),window.URL.revokeObjectURL(ct),F.removeEventListener("sourceopen",Kt),F.removeEventListener("webkitsourceopen",Kt),en();const pn=_.getCurrentDVRInfo();u.setSeekable(pn.range.start,pn.range.end),Me.streamActivated?(isNaN(Me.seekTime)||G.seek(Me.seekTime,!0,!0),C.setMediaSource(F).then((()=>{C.initializeForTextWithMediaSource(F)}))):tt(Me)}function Jt(){F.addEventListener("sourceopen",Kt,!1),F.addEventListener("webkitsourceopen",Kt,!1),ct=u.attachMediaSource(Q),r.debug("MediaSource attached to element. Waiting on open...")}F?Me.keepBuffers?tt(Me):(u.detachMediaSource(Q),Jt()):(F=u.createMediaSource(),Jt())}function tt(Me){const ct=Me.representationsFromPreviousPeriod||[];C.activate(F,Me.sourceBufferSinksFromPreviousPeriod,ct).then((()=>{isNaN(Me.seekTime)||(e.trigger(p.default.SEEK_TARGET,{time:Me.seekTime},{streamId:C.getId()}),G.seek(Me.seekTime,!1,!0),C.startScheduleControllers()),pe=!1,e.trigger(p.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:ua()})}))}function Xe(Me){return(Me?Me.getStreamProcessors():[]).map((ct=>ct.getRepresentation()))}function ot(Me){const ct=new Map;return Me&&(Me?Me.getStreamProcessors():[]).forEach((Kt=>{const Jt=Kt.getBuffer();Jt&&ct.set(Jt.getType(),Jt)})),ct}function zt(Me){const ct=Be(Me.seekTime);ct&&ct!==C?ct&&ct!==C&&(Ye(ct),(function(Kt,Jt){const pn=Kt&&!isNaN(Kt.seekTime)?Kt.seekTime:NaN,Tn=C.getStreamProcessors().map((Pn=>Pn.prepareOuterPeriodPlaybackSeeking(Kt)));Promise.all(Tn).then((()=>{sn(Jt,C,pn)})).catch((Pn=>{k.error(Pn)}))})(Me,ct)):(Ye(),(function(Kt){C.getStreamProcessors().forEach((Jt=>Jt.prepareInnerPeriodPlaybackSeeking(Kt))),Pa(Jn.USER_REQUEST_STOP_REASON)})(Me)),oa(Ma.SEEK_START_REASON)}function Ye(Me=null){ft()}function ft(){me&&me.length>0&&(me.forEach((Me=>{Me.deactivate(!0)})),me=[])}function it(Me){if(Me.newMediaInfo.streamInfo.id===C.getId()){if(ft(),xe.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&Me.oldMediaInfo&&Me.oldMediaInfo.codec!==Me.newMediaInfo.codec){const ct=G.getTime();return C.deactivate(!1),void Ce({seekTime:ct,keepBuffers:!1,streamActivated:!1})}C.prepareTrackChange(Me)}}function vt(Me,ct){try{return xe.get().streaming.buffer.reuseExistingSourceBuffers&&(i.isProtectionCompatible(ct.getStreamInfo(),Me.getStreamInfo())||We)&&i.supportsChangeType()&&xe.get().streaming.buffer.useChangeType}catch{return!1}}function _e(Me,ct=null){if(!F||Me.getPreloaded()||!vt(Me,ct))return;const Kt=Xe(ct),Jt=ot(ct);Me.startPreloading(F,Jt,Kt).then((()=>{me.push(Me)}))}function Be(Me){if(isNaN(Me))return null;const ct=d.length;for(let Kt=0;Kt<ct;Kt++){const Jt=d[Kt];if(Me<parseFloat((Jt.getStartTime()+Jt.getDuration()).toFixed(5)))return Jt}return null}function at(){try{const Me=T.getIsDynamic(),ct=T.getStreamsInfo()[0].manifestInfo,Kt=G.getTime(),Jt=w.calcTimeShiftBufferWindow(d,Me),pn=Dt();if(Jt.start===void 0||Jt.end===void 0)return;pn&&pn.length!==0?pn.forEach((Tn=>{_.addDVRInfo(Tn.getType(),Kt,ct,Jt)})):_.addDVRInfo(o.default.VIDEO,Kt,ct,Jt)}catch{}}function Le(Me){if(J&&de){const ct=B.getInitialBufferLevel(),Kt=[o.default.TEXT];(isNaN(ct)||ct<=G.getBufferLevel(Kt)||T.getIsDynamic()&&ct>G.getLiveDelay())&&(J=!1,oa(Ma.INITIAL_PLAYOUT_START_REASON),G.play())}Me&&Me.mediaType&&_.addBufferLevel(Me.mediaType,new Date,1e3*Me.bufferLevel)}function dt(Me){Me.streamInfo.id===C.getId()&&ft(),$a(Me.streamInfo.id).prepareQualityChange(Me)}function ht(){if(T.getIsDynamic()&&G.getOriginalLiveDelay()!==0&&C){const Me=T.getStreamsInfo();if(Me.length>0){const ct=Me[0].manifestInfo,Kt=Ln(0,ct);G.computeAndSetLiveDelay(Kt,ct)}}}function fe(){if(Ta()){const Me=Q.getPlaybackQuality();Me&&_.addDroppedFrames(Me)}}function qe(){r.debug("[onPlaybackStarted]"),!J&&te&&oa(Ma.RESUME_FROM_PAUSE_START_REASON),J&&(J=!1),le&&(le=!1,xe.get().streaming.applyContentSteering&&!b.shouldQueryBeforeStart()&&b.loadSteeringData()),te=!1}function bt(Me){r.debug("[onPlaybackPaused]"),Me.ended||(te=!0,Pa(Jn.USER_REQUEST_STOP_REASON))}function It(Me){r.debug(`Stream with id ${Me.streamInfo.id} finished buffering`);const ct=Me.streamInfo.isLast;F&&ct?(r.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),u.signalEndOfStream(F)):dn()}function dn(){if(!C)return;if(!C.getHasFinishedBuffering())return void C.checkAndHandleCompletedBuffering();const Me=(function(Kt=null){try{const Jt=Kt||C||null;if(Jt){const pn=Jt.getStreamInfo();return d.filter((function(Tn){const Pn=Tn.getStreamInfo();return Pn.start>pn.start&&pn.id!==Pn.id}))}}catch{return[]}})(C);let ct=0;for(;ct<Me.length;){const Kt=Me[ct],Jt=ct===0?C:Me[ct-1];!Kt.getPreloaded()&&Jt.getHasFinishedBuffering()&&_e(Kt,Jt),ct+=1}}function $e(){he&&(clearInterval(he),he=null)}function Dt(){return C?C.getStreamProcessors():[]}function nn(Me){if(C&&!C.getIsEndedEventSignaled()){C.setIsEndedEventSignaled(!0);const ct=(function(Kt=null){const Jt=Kt||C||null;if(!Jt)return null;const pn=Jt.getStreamInfo(),Tn=pn.start;let Pn=0,ba=-1,da=NaN;for(;Pn<d.length;){const Xa=d[Pn].getStreamInfo(),hi=Xa.start-Tn;hi>0&&(isNaN(da)||hi<da)&&pn.id!==Xa.id&&(da=hi,ba=Pn),Pn+=1}return ba>=0?d[ba]:null})();ct?(r.debug(`StreamController onEnded, found next stream with id ${ct.getStreamInfo().id}. Switching from ${C.getStreamInfo().id} to ${ct.getStreamInfo().id}`),sn(ct,C,NaN)):(r.debug("StreamController no next stream found"),C.setIsEndedEventSignaled(!1)),Pa(ct?Jn.END_OF_PERIOD_STOP_REASON:Jn.END_OF_CONTENT_STOP_REASON)}Me&&Me.isLast&&($e(),b.stopSteeringRequestTimer())}function en(Me){const ct=Me||ua().manifestInfo.duration;u.setDuration(ct)}function mn(Me){const ct=x.getURIFragmentData();if(!ct||!ct.t)return NaN;const Kt=Ba()[0].getStreamInfo().start;return ct.t=ct.t.split(",")[0],Nn(Me,ct.t,Kt)}function rn(Me,ct){let Kt=0;return Me||(Kt=Ba()[0].getStreamInfo().start),Nn(Me,ct,Kt)}function Nn(Me,ct,Kt){const Jt=T.getRegularPeriods()[0],pn=ct.toString(),Tn=pn.indexOf("posix:")!==-1?pn.substring(6)==="now"?Date.now()/1e3:parseFloat(pn.substring(6)):NaN;return Me&&!isNaN(Tn)?w.calcPresentationTimeFromWallTime(new Date(1e3*Tn),Jt):parseFloat(pn)+Kt}function Ln(Me,ct){try{let Kt=NaN;return ct&&!isNaN(ct.maxFragmentDuration)&&isFinite(ct.maxFragmentDuration)?ct.maxFragmentDuration:isFinite(Kt)?Kt:NaN}catch{return NaN}}function ma(){const Me=c.getValue();S.initialize(Me)}function ha(Me){if(Me.error)I=!0,aa();else{r.info("Manifest updated... updating data system wide.");const ct=Me.manifest;T.updatePeriods(ct),l.filterUnsupportedFeatures(ct).then((()=>{S.initialize(ct);let Kt=T.getUTCTimingSources();!T.getIsDynamic()||Kt&&Kt.length!==0||e.trigger(P.default.CONFORMANCE_VIOLATION,{level:Wa.LEVELS.WARNING,event:Wa.EVENTS.NO_UTC_TIMING_ELEMENT});let Jt=T.getIsDynamic()?Kt.concat(O.getUTCTimingSources()):Kt;h.attemptSync(Jt,T.getIsDynamic()),ne.createFinalQueryStrings(ct)}))}}function Ta(){return!!C&&C.getHasVideoTrack()}function qa(){return!!C&&C.getHasAudioTrack()}function Pa(Me,ct){ct=ct||new Date,Dt().forEach((Kt=>{Kt.finalisePlayList(ct,Me)})),_.addPlayList()}function oa(Me){_.createPlaylistMetrics(1e3*G.getTime(),Me)}function Oa(Me){W.updateKeyStatusesMap(Me),(function(){const ct=Dt();let Kt=!1;ct.forEach((Jt=>{const pn=Jt.getMediaInfo();!pn||i.areKeyIdsUsable(pn)?pn&&i.areKeyIdsExpired(pn)&&(function(Tn){const Pn=$a(Tn.getStreamId());Pn&&Pn.triggerProtectionError({error:new Ft.default(ko.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,ko.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)})})(Jt):(Kt=!0,(function(Tn){const Pn=Tn.getAllMediaInfos().filter((ba=>i.areKeyIdsUsable(ba)));if(Pn&&Pn.length!==0)K.setTrack(Pn[0],{replaceBuffer:!0});else{const ba=Tn.getType();k.error(new Ft.default(qt.NO_SUPPORTED_KEY_IDS,`Type: ${ba}: ${qt.NO_SUPPORTED_KEY_IDS_MESSAGE}`))}})(Jt))})),Kt&&(G.getTime()===0?e.once(P.default.FRAGMENT_LOADING_COMPLETED,(()=>{sa()}),n):G.isProgressing(500).then((Jt=>{Jt||sa()})))})()}function sa(){const Me=G.getTime();G.seek(Me+.01,!1,!1)}function pa(Me){if(!Me.error)return;let ct;switch(Me.error.code){case 1:ct="MEDIA_ERR_ABORTED";break;case 2:ct="MEDIA_ERR_NETWORK";break;case 3:ct="MEDIA_ERR_DECODE",Ut.counts.mediaErrorDecode+=1;break;case 4:ct="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:ct="MEDIA_ERR_ENCRYPTED";break;default:ct="UNKNOWN"}ct==="MEDIA_ERR_DECODE"&&xe.get().errors.recoverAttempts.mediaErrorDecode>=Ut.counts.mediaErrorDecode?(function(){r.error("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");const Kt=G.getTime();C.deactivate(!1),r.info(`MediaSource has been resetted. Resuming playback from time ${Kt}`),Ce({seekTime:Kt,keepBuffers:!1,streamActivated:!1})})():(ce=!0,Me.error.message&&(ct+=" ("+Me.error.message+")"),Me.error.msExtendedCode&&(ct+=" (0x"+(Me.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),r.fatal("Video Element Error: "+ct),Me.error&&r.fatal(Me.error),k.error(new Ft.default(Me.error.code,ct)),aa())}function ua(){return C?C.getStreamInfo():null}function $a(Me){for(let ct=0,Kt=d.length;ct<Kt;ct++)if(d[ct].getId()===Me)return d[ct];return null}function zr(Me){isNaN(Me.newDuration)||en(Me.newDuration)}function Lr(){d=[],ut=NaN,W=null,pe=!1,C=null,ce=!1,I=!1,J=!0,le=!0,te=!1,de=!0,he=null,We=!1,me=[],nt=null,Ut={counts:{mediaErrorDecode:0}}}function aa(){Qe(),h.reset(),Pa(ce||I?Jn.FAILURE_STOP_REASON:Jn.USER_REQUEST_STOP_REASON);for(let Me=0,ct=d?d.length:0;Me<ct;Me++)d[Me].reset(ce);e.off(P.default.PLAYBACK_TIME_UPDATED,fe,n),e.off(P.default.PLAYBACK_SEEKING,zt,n),e.off(P.default.PLAYBACK_ERROR,pa,n),e.off(P.default.PLAYBACK_STARTED,qe,n),e.off(P.default.PLAYBACK_PAUSED,bt,n),e.off(P.default.PLAYBACK_ENDED,nn,n),e.off(P.default.METRIC_ADDED,Qa,n),e.off(P.default.MANIFEST_VALIDITY_CHANGED,zr,n),e.off(P.default.BUFFER_LEVEL_UPDATED,Le,n),e.off(P.default.QUALITY_CHANGE_REQUESTED,dt,n),e.off(P.default.CONTENT_STEERING_REQUEST_COMPLETED,ma,n),p.default.KEY_SESSION_UPDATED&&e.off(p.default.KEY_SESSION_UPDATED,Qt,n),e.off(p.default.MANIFEST_UPDATED,ha,n),e.off(p.default.STREAM_BUFFERING_COMPLETED,It,n),e.off(p.default.TIME_SYNCHRONIZATION_COMPLETED,wt,n),e.off(p.default.CURRENT_TRACK_CHANGED,it,n),e.off(p.default.SETTING_UPDATED_LIVE_DELAY,ht,n),e.off(p.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,ht,n),e.off(Io.default.INTERNAL_KEY_STATUSES_CHANGED,Oa,n),S.reset(),m.reset(),V.reset(),_.clearAllCurrentMetrics(),c.setValue(null),g.reset(),w.reset(),X.reset(),F&&(u.detachMediaSource(Q),F=null),Q=null,W&&(W=null,ae=null,c.getValue()&&e.trigger(p.default.PROTECTION_DESTROYED,{data:c.getValue().url})),$e(),e.trigger(p.default.STREAM_TEARDOWN_COMPLETE),Lr()}function Qa(Me){if(Me.metric===y.DVR_INFO){const ct=qa()?o.default.AUDIO:o.default.VIDEO;Me.mediaType===ct&&u.setSeekable(Me.value.range.start,Me.value.range.end)}}function Ba(){return d}return n={addDVRMetric:at,getActiveStream:function(){return C},getActiveStreamInfo:ua,getActiveStreamProcessors:Dt,getAutoPlay:function(){return de},getHasMediaOrInitialisationError:function(){return ce||I},getInitialPlayback:function(){return J},getIsStreamSwitchInProgress:function(){return pe},getStreamById:$a,getStreamForTime:Be,getStreams:Ba,getTimeRelativeToStreamId:function(Me,ct){let Kt=null,Jt=0,pn=0,Tn=null;for(let Pn=0;Pn<d.length;Pn++){if(Kt=d[Pn],pn=Kt.getStartTime(),Tn=Kt.getDuration(),Number.isFinite(pn)&&(Jt=pn),Kt.getId()===ct)return Me-Jt;Number.isFinite(Tn)&&(Jt+=Tn)}return null},hasAudioTrack:qa,hasVideoTrack:Ta,initialize:function(Me,ct){Qe(),de=Me,ae=ct,w.initialize(),m=xl(t).create(),m.setConfig({manifestModel:c,adapter:T,manifestLoader:g,errHandler:k,settings:xe,contentSteeringController:b}),m.initialize(),V=rd(t).getInstance(),V.setConfig({manifestUpdater:m,playbackController:G,settings:xe}),V.start(),ne=Bi(t).getInstance(),h.setConfig({dashMetrics:_,baseURLController:S,errHandler:k,settings:xe}),h.initialize(),u.setConfig({settings:xe}),W&&(e.trigger(p.default.PROTECTION_CREATED,{controller:W}),W.setMediaElement(Q.getElement()),ae&&W.setProtectionData(ae)),e.on(P.default.PLAYBACK_TIME_UPDATED,fe,n),e.on(P.default.PLAYBACK_SEEKING,zt,n),e.on(P.default.PLAYBACK_ERROR,pa,n),e.on(P.default.PLAYBACK_STARTED,qe,n),e.on(P.default.PLAYBACK_PAUSED,bt,n),e.on(P.default.PLAYBACK_ENDED,nn,n),e.on(P.default.METRIC_ADDED,Qa,n),e.on(P.default.MANIFEST_VALIDITY_CHANGED,zr,n),e.on(P.default.BUFFER_LEVEL_UPDATED,Le,n),e.on(P.default.QUALITY_CHANGE_REQUESTED,dt,n),e.on(P.default.CONTENT_STEERING_REQUEST_COMPLETED,ma,n),p.default.KEY_SESSION_UPDATED&&e.on(p.default.KEY_SESSION_UPDATED,Qt,n),e.on(p.default.MANIFEST_UPDATED,ha,n),e.on(p.default.STREAM_BUFFERING_COMPLETED,It,n),e.on(p.default.TIME_SYNCHRONIZATION_COMPLETED,wt,n),e.on(p.default.CURRENT_TRACK_CHANGED,it,n),e.on(p.default.SETTING_UPDATED_LIVE_DELAY,ht,n),e.on(p.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,ht,n),e.on(Io.default.INTERNAL_KEY_STATUSES_CHANGED,Oa,n)},load:function(Me,ct=NaN){Qe(),ut=ct,g.load(Me)},loadWithManifest:function(Me,ct=NaN){(function(){if(!m||!m.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")})(),ut=ct,m.setManifest(Me)},refreshManifest:function(){m.getIsUpdating()||m.refreshManifest()},reset:aa,setConfig:function(Me){Me&&(Me.capabilities&&(i=Me.capabilities),Me.capabilitiesFilter&&(l=Me.capabilitiesFilter),Me.manifestLoader&&(g=Me.manifestLoader),Me.manifestModel&&(c=Me.manifestModel),Me.mediaPlayerModel&&(B=Me.mediaPlayerModel),Me.customParametersModel&&(O=Me.customParametersModel),Me.protectionController&&(W=Me.protectionController),Me.adapter&&(T=Me.adapter),Me.dashMetrics&&(_=Me.dashMetrics),Me.errHandler&&(k=Me.errHandler),Me.timelineConverter&&(w=Me.timelineConverter),Me.videoModel&&(Q=Me.videoModel),Me.playbackController&&(G=Me.playbackController),Me.throughputController&&(H=Me.throughputController),Me.serviceDescriptionController&&(v=Me.serviceDescriptionController),Me.contentSteeringController&&(b=Me.contentSteeringController),Me.textController&&(j=Me.textController),Me.abrController&&(D=Me.abrController),Me.mediaController&&(K=Me.mediaController),Me.settings&&(xe=Me.settings),Me.baseURLController&&(S=Me.baseURLController),Me.uriFragmentModel&&(x=Me.uriFragmentModel),Me.segmentBaseController&&(A=Me.segmentBaseController),Me.manifestUpdater&&(m=Me.manifestUpdater))},setProtectionData:function(Me){ae=Me,W&&W.setProtectionData(ae)},switchToVideoElement:function(Me){C&&(G.initialize(ua()),Ce({seekTime:Me,keepBuffers:!1,streamActivated:!0}))}},r=(0,R.default)(t).getInstance().getLogger(n),h=nd(t).getInstance(),u=ad(t).getInstance(),X=li(t).getInstance(),Lr(),n}Ao.__dashjs_factory_name="StreamController";var Ro=ie.default.getSingletonFactory(Ao),id=class extends Ar{constructor(){super(),this.captionData=null,this.label=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1,this.isTTML=null}},ld=oe(7377);function No(){let t,e=0;function n(c){let T="";for(let _=0;_<c.length;++_)T+=c[_].uchar;return T.length-T.replace(/^\s+/,"").length}function r(c){return"left: "+3.125*c.x+"%; top: "+6.66*c.y1+"%; width: "+(100-3.125*c.x)+"%; height: "+6.66*Math.max(c.y2-1-c.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function i(c){return c==="red"?"rgb(255, 0, 0)":c==="green"?"rgb(0, 255, 0)":c==="blue"?"rgb(0, 0, 255)":c==="cyan"?"rgb(0, 255, 255)":c==="magenta"?"rgb(255, 0, 255)":c==="yellow"?"rgb(255, 255, 0)":c==="white"?"rgb(255, 255, 255)":c==="black"?"rgb(0, 0, 0)":c}function l(c,T){const _=c.videoHeight/15;return T?"font-size: "+_+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(T.foreground?i(T.foreground):"rgb(255, 255, 255)")+"; font-style: "+(T.italics?"italic":"normal")+"; text-decoration: "+(T.underline?"underline":"none")+"; white-space: pre; background-color: "+(T.background?i(T.background):"transparent")+";":"font-size: "+_+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function m(c){return c.replace(/^\s+/g,"")}function g(c){return c.replace(/\s+$/g,"")}return t={createHTMLCaptionsFromScreen:function(c,T,_,u){let h=null,b=null,S=!1,A=-1,x={start:T,end:_,spans:[]},D="style_cea608_white_black";const H={},K={},V=[];let X,k;for(X=0;X<15;++X){const d=u.rows[X];let C="",W=null;if(d.isEmpty()===!1){const j=n(d.chars);h===null&&(h={x:j,y1:X,y2:X+1,p:[]}),j!==A&&S&&(h.p.push(x),x={start:T,end:_,spans:[]},h.y2=X,h.name="region_"+h.x+"_"+h.y1+"_"+h.y2,H.hasOwnProperty(h.name)===!1?(V.push(h),H[h.name]=h):(b=H[h.name],b.p.contat(h.p)),h={x:j,y1:X,y2:X+1,p:[]});for(let ae=0;ae<d.chars.length;++ae){const ne=d.chars[ae],de=ne.penState;if(W===null||!de.equals(W)){C.trim().length>0&&(x.spans.push({name:D,line:C,row:X}),C="");let pe="style_cea608_"+de.foreground+"_"+de.background;de.underline&&(pe+="_underline"),de.italics&&(pe+="_italics"),K.hasOwnProperty(pe)||(K[pe]=JSON.parse(JSON.stringify(de))),W=de,D=pe}C+=ne.uchar}C.trim().length>0&&x.spans.push({name:D,line:C,row:X}),S=!0,A=j}else S=!1,A=-1,h&&(h.p.push(x),x={start:T,end:_,spans:[]},h.y2=X,h.name="region_"+h.x+"_"+h.y1+"_"+h.y2,H.hasOwnProperty(h.name)===!1?(V.push(h),H[h.name]=h):(b=H[h.name],b.p.contat(h.p)),h=null)}h&&(h.p.push(x),h.y2=X+1,h.name="region_"+h.x+"_"+h.y1+"_"+h.y2,H.hasOwnProperty(h.name)===!1?(V.push(h),H[h.name]=h):(b=H[h.name],b.p.contat(h.p)),h=null);const w=[];for(X=0;X<V.length;++X){const d=V[X],C="sub_cea608_"+e++,W=document.createElement("div");W.id=C;const j=r(d);W.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+j;const ae=document.createElement("div");ae.className="paragraph bodyStyle",ae.style.cssText=l(c);const ne=document.createElement("div");ne.className="cueUniWrapper",ne.style.cssText="unicode-bidi: normal; direction: ltr;";for(let pe=0;pe<d.p.length;++pe){const ce=d.p[pe];let I=0;for(k=0;k<ce.spans.length;++k){let F=ce.spans[k];if(F.line.length>0){if(k!==0&&I!=F.row){const B=document.createElement("br");B.className="lineBreak",ne.appendChild(B)}let Q=!1;I===F.row&&(Q=!0),I=F.row;const G=K[F.name],v=document.createElement("span");v.className="spanPadding "+F.name+" customSpanColor",v.style.cssText=l(c,G),k!==0&&Q?k===ce.spans.length-1?v.textContent=g(F.line):v.textContent=F.line:ce.spans.length>1&&k<ce.spans.length-1&&F.row===ce.spans[k+1].row?v.textContent=m(F.line):v.textContent=F.line.trim(),ne.appendChild(v)}}}ae.appendChild(ne),W.appendChild(ae);const de={bodyStyle:["%",90]};for(const pe in K)K.hasOwnProperty(pe)&&(de[pe]=["%",90]);w.push({type:"html",start:T,end:_,cueHTMLElement:W,cueID:C,cellResolution:[32,15],isFromCEA608:!0,fontSize:de,lineHeight:{},linePadding:{}})}return w}},t}No.__dashjs_factory_name="EmbeddedTextHtmlRender";var od=ie.default.getSingletonFactory(No);class Mr{constructor(){this.time=null,this.verboseLevel=0}log(e,n){if(this.verboseLevel>=e){const r=typeof n=="function"?n():n;console.log(`${this.time} [${e}] ${r}`)}}}class Co{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const n=["foreground","underline","italics","background","flash"];for(let r=0;r<n.length;r++){const i=n[r];Object.prototype.hasOwnProperty.call(e,i)&&(this[i]=e[i])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}}class sd{constructor(){this.uchar=" ",this.penState=new Co}reset(){this.uchar=" ",this.penState.reset()}setChar(e,n){this.uchar=e,this.penState.copy(n)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}const Ia=100,ud={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499};function xo(t){return String.fromCharCode(ud[t]||t)}class dd{constructor(e=new Mr){this.chars=[],this.cueStartTime=null,this.pos=0,this.currPenState=new Co;for(let n=0;n<Ia;n++)this.chars.push(new sd);this.logger=e}equals(e){for(let n=0;n<Ia;n++)if(!this.chars[n].equals(e.chars[n]))return!1;return!0}copy(e){for(let n=0;n<Ia;n++)this.chars[n].copy(e.chars[n])}isEmpty(){let e=!0;for(let n=0;n<Ia;n++)if(!this.chars[n].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ia&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ia)}moveCursor(e){const n=this.pos+e;if(e>1)for(let r=this.pos+1;r<n+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(n)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const n=xo(e);this.pos>=Ia?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+n+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))}clearFromPos(e){let n;for(n=e;n<Ia;n++)this.chars[n].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let n=!0;for(let r=0;r<Ia;r++){const i=this.chars[r].uchar;i!==" "&&(n=!1),e.push(i)}return n?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}const Ua=15;class fi{constructor(e=new Mr){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null;for(let n=0;n<Ua;n++)this.rows.push(new dd(e));this.logger=e}reset(){for(let e=0;e<Ua;e++)this.rows[e].clear();this.currRow=14}equals(e){let n=!0;for(let r=0;r<Ua;r++)if(!this.rows[r].equals(e.rows[r])){n=!1;break}return n}copy(e){for(let n=0;n<Ua;n++)this.rows[n].copy(e.rows[n])}isEmpty(){let e=!0;for(let n=0;n<Ua;n++)if(!this.rows[n].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+JSON.stringify(e)));let n=e.row-1;if(this.nrRollUpRows&&n<this.nrRollUpRows-1&&(n=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==n){for(let g=0;g<Ua;g++)this.rows[g].clear();const l=this.currRow+1-this.nrRollUpRows,m=this.lastOutputScreen;if(m){const g=m.rows[l].cueStartTime,c=this.logger.time;if(g!==null&&c!==null&&g<c)for(let T=0;T<this.nrRollUpRows;T++)this.rows[n-this.nrRollUpRows+T+1].copy(m.rows[l+T])}}this.currRow=n;const r=this.rows[this.currRow];if(e.indent!==null){const l=e.indent,m=Math.max(l-1,0);r.setCursor(e.indent),e.color=r.chars[m].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(e,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const n=[];let r="",i=-1;for(let l=0;l<Ua;l++){const m=this.rows[l].getTextString();m&&(i=l+1,e?n.push("Row "+i+": '"+m+"'"):n.push(m.trim()))}return n.length>0&&(r=e?"["+n.join(" | ")+"]":n.join(`
|
|
20
20
|
`)),r}getTextAndFormat(){return this.rows}}class Do{constructor(e,n,r=new Mr){this.chNr=e,this.outputFilter=n,this.mode=null,this.displayedMemory=new fi(r),this.nonDisplayedMemory=new fi(r),this.lastOutputScreen=new fi(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r,this.logger.log(2,"new Cea608Channel("+this.chNr+")")}reset(){var e,n;this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),(n=(e=this.outputFilter)===null||e===void 0?void 0:e.reset)===null||n===void 0||n.call(e),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.setRollUpRows(null),this.nonDisplayedMemory.setRollUpRows(null)),this.mode=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>n+": "+this.writeScreen.getDisplayText(!0))),this.mode!=="MODE_PAINT-ON"&&this.mode!=="MODE_ROLL-UP"||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const n={flash:!1};if(n.underline=e%2==1,n.italics=e>=46,n.italics)n.foreground="white";else{const r=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];n.foreground=i[r]}this.logger.log(2,"MIDROW: "+JSON.stringify(n)),this.writeScreen.setPen(n)}outputDataUpdate(e=!1){const n=this.logger.time;n!==null&&this.outputFilter&&(this.cueStartTime!==null||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,n,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:n):this.cueStartTime=n,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}const cd=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];function fd(t,e,n){return n.a===t&&n.b===e}function ja(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].toString(16));return e}const gd={17:2,18:4,21:6,22:8,23:10,19:13,20:15},md={25:2,26:4,29:6,30:8,31:10,27:13,28:15},hd={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},pd={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14};function Pr(t,e,n){n.a=t,n.b=e}class Mo{constructor(e,n,r){this.currentChannel=0,this.cmdHistory={a:null,b:null},this.lastTime=null;const i=this.logger=new Mr;this.channels=[null,new Do(e,n,i),new Do(e+1,r,i)]}addData(e,n){this.lastTime=e,this.logger.time=e;for(let r=0;r<n.length;r+=2){const i=127&n[r],l=127&n[r+1];let m=!1,g=null;if(this.lastTime!==null&&(e=this.lastTime+.5*r*1001/3e4,this.logger.time=e),i===0&&l===0)continue;this.logger.log(3,(()=>"["+ja([n[r],n[r+1]])+"] -> ("+ja([i,l])+")"));const c=this.cmdHistory;if(i>=16&&i<=31){if(fd(i,l,c)){Pr(null,null,c),this.logger.log(3,(()=>"Repeated command ("+ja([i,l])+") is dropped"));continue}Pr(i,l,this.cmdHistory),m=this.parseCmd(i,l),m||(m=this.parseMidrow(i,l)),m||(m=this.parsePAC(i,l)),m||(m=this.parseBackgroundAttributes(i,l))}else Pr(null,null,c);if(!m&&(g=this.parseChars(i,l),g.length)){const T=this.currentChannel;T&&T>0?this.channels[T].insertChars(g):this.logger.log(2,"No channel found yet. TEXT-MODE?")}m||g||this.logger.log(2,(()=>"Couldn't parse cleaned data "+ja([i,l])+" orig: "+ja([n[r],n[r+1]])))}}parseCmd(e,n){if(!((e===20||e===28||e===21||e===29)&&n>=32&&n<=47||(e===23||e===31)&&n>=33&&n<=35))return!1;const r=e===20||e===21||e===23?1:2,i=this.channels[r];return e===20||e===21||e===28||e===29?n===32?i.ccRCL():n===33?i.ccBS():n===34?i.ccAOF():n===35?i.ccAON():n===36?i.ccDER():n===37?i.ccRU(2):n===38?i.ccRU(3):n===39?i.ccRU(4):n===40?i.ccFON():n===41?i.ccRDC():n===42?i.ccTR():n===43?i.ccRTD():n===44?i.ccEDM():n===45?i.ccCR():n===46?i.ccENM():n===47&&i.ccEOC():i.ccTO(n-32),this.currentChannel=r,!0}parseMidrow(e,n){let r=0;if((e===17||e===25)&&n>=32&&n<=47){if(r=e===17?1:2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[r];return!!i&&(i.ccMIDROW(n),this.logger.log(3,(()=>"MIDROW ("+ja([e,n])+")")),!0)}return!1}parsePAC(e,n){let r;if(!((e>=17&&e<=23||e>=25&&e<=31)&&n>=64&&n<=127||(e===16||e===24)&&n>=64&&n<=95))return!1;const i=e<=23?1:2;r=n>=64&&n<=95?i===1?hd[e]:pd[e]:i===1?gd[e]:md[e];const l=this.channels[i];return!!l&&(l.setPAC(this.interpretPAC(r,n)),this.currentChannel=i,!0)}interpretPAC(e,n){let r;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=n>95?n-96:n-64,i.underline=!(1&~r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i}parseChars(e,n){let r,i=[],l=null;if(e>=25?(r=2,l=e-8):(r=1,l=e),l>=17&&l<=19){let m;m=l===17?n+80:l===18?n+112:n+144,this.logger.log(2,(()=>"Special char '"+xo(m)+"' in channel "+r)),i=[m]}else e>=32&&e<=127&&(i=n===0?[e]:[e,n]);return i&&this.logger.log(3,(()=>"Char codes = "+ja(i).join(","))),i}parseBackgroundAttributes(e,n){if(!((e===16||e===24)&&n>=32&&n<=47||(e===23||e===31)&&n>=45&&n<=47))return!1;let r;const i={};e===16||e===24?(r=Math.floor((n-32)/2),i.background=cd[r],n%2==1&&(i.background=i.background+"_semi")):n===45?i.background="transparent":(i.foreground="black",n===47&&(i.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(i),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const n=this.channels[e];n&&n.reset()}Pr(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let n=0;n<this.channels.length;n++){const r=this.channels[n];r&&r.cueSplitAtTime(e)}}}function bd(t,e,n){const r=[];for(let i=e;i<n;i++)i+2<n&&t.getUint8(i)===0&&t.getUint8(i+1)===0&&t.getUint8(i+2)===3?(r.push(0),r.push(0),i+=2):r.push(t.getUint8(i));return new DataView(new Uint8Array(r).buffer)}function yd(t,e,n,r){return!(t!==4||e<8)&&n.getUint8(r)===181&&n.getUint16(r+1)===49&&n.getUint32(r+3)===1195456820&&n.getUint8(r+7)===3}function Ed(t,e){return(127&t)>0||(127&e)>0}function Td(t,e){let n=0;for(;n<t.byteLength;){let i,l=0,m=0;do l+=i=t.getUint8(n++);while(i===255);do m+=i=t.getUint8(n++);while(i===255);if(yd(l,m,t,n)){const g=n+10,c=g+3*(31&t.getUint8(g-2));for(let T=g;T<c;T+=3){const _=t.getUint8(T);if(4&_){const u=3&_;if((r=u)===0||r===1){const h=t.getUint8(T+1),b=t.getUint8(T+2);Ed(h,b)&&e[u].push(h,b)}}}}n+=m}var r}function _d(t,e,n){let r=0,i=0;const l=[[],[]];for(let m=e;m<e+n-5&&(r=t.getUint32(m),i=31&t.getUint8(m+4),!(m+5+r>e+n));m++)i===6&&m+5+r<=t.byteLength&&Td(bd(t,m+5,m+5+r),l),m+=r+3;return l}function Po(t){const e=t.errHandler,n=t.manifestModel,r=t.mediaController,i=t.videoModel,l=t.textTracks,m=t.vttParser,g=t.vttCustomRenderingParser,c=t.ttmlParser,T=t.streamInfo,_=t.settings,u=this.context,h=(0,ee.default)(u).getInstance();let b,S,A,x,D,H,K,V,X,k,w,d,C,W,j,ae,ne,de=!1;function pe(){H=null,V=NaN,X=[],k=null,K=!1,D=[],x=null}function ce(J){const le={};le[re.default.SUBTITLE]="subtitles",le[re.default.CAPTION]="captions",le[re.default.FORCED_SUBTITLE]="subtitles";const he=new id;for(let me in J)he[me]=J[me];he.defaultTrack=(function(me){let xe=!1;return d.length>1&&me.isEmbedded?xe=me.id&&me.id===o.default.CC1:d.length===1?me.id&&typeof me.id=="string"&&me.id.substring(0,2)==="CC"&&(xe=!0):d.length===0&&(xe=me.index===D[0].index),xe})(J),he.isTTML=(function(me){return me.codec&&me.codec.search(o.default.STPP)>=0||me.mimeType&&me.mimeType.search(o.default.TTML)>=0})(J),he.kind=(function(me,xe){let We=me.roles&&me.roles.length>0?xe[me.roles[0].value]:xe.caption;return We=Object.values(xe).includes(We)?We:xe.caption,We})(J,le),l.addTextTrackInfo(he)}function I(J){const le=J.chunk;le.representation.mediaInfo.embeddedCaptions&&Q(le.bytes,le)}function F(J){w=J}function Q(J,le){const he=le.representation.mediaInfo,me=he.type,xe=he.mimeType,We=he.codec||xe;We?he.codec.indexOf("application/mp4")!==-1?(function(nt,ut,Ut){let Qe,wt;if(ut.segmentType==="InitializationSegment")K=!0,V=A.getMediaTimescaleFromMoov(nt);else{if(!K)return;wt=A.getSamplesInfo(nt),Qe=wt.sampleList,Qe.length>0&&(k=Qe[0].cts-ut.start*V),Ut.search(o.default.STPP)>=0?(function(Qt,yn,hn){let tn,sn;for(x=x!==null?x:B(hn),tn=0;tn<yn.length;tn++){const Ce=yn[tn],tt=Ce.cts,Xe=v(),ot=Xe+tt/V,zt=ot+Ce.duration/V;b.buffered.add(ot,zt);const Ye=new DataView(Qt,Ce.offset,Ce.subSizes[0]);let ft=sr.Utils.dataViewToString(Ye,o.default.UTF8);const it=[];let vt=Ce.offset+Ce.subSizes[0];for(sn=1;sn<Ce.subSizes.length;sn++){const _e=new Uint8Array(Qt,vt,Ce.subSizes[sn]),Be=String.fromCharCode.apply(null,_e);it.push(Be),vt+=Ce.subSizes[sn]}try{const _e=n.getValue().ttmlTimeIsRelative?tt/V:0,Be=x.parse(ft,_e,tt/V,(tt+Ce.duration)/V,it);l.addCaptions(w,Xe,Be)}catch(_e){H.removeExecutedRequestsBeforeTime(),O(),S.error("TTML parser error: "+_e)}}})(nt,Qe,Ut):(function(Qt,yn){let hn,tn,sn;const Ce=[];for(hn=0;hn<yn.length;hn++){const tt=yn[hn];tt.cts-=k;const Xe=v()+tt.cts/V,ot=Xe+tt.duration/V;b.buffered.add(Xe,ot);const zt=Qt.slice(tt.offset,tt.offset+tt.size),Ye=sr.parseBuffer(zt);for(tn=0;tn<Ye.boxes.length;tn++){const ft=Ye.boxes[tn];if(S.debug("VTT box1: "+ft.type),ft.type!=="vtte"&&ft.type==="vttc"){S.debug("VTT vttc boxes.length = "+ft.boxes.length);let it={styles:{}};for(sn=0;sn<ft.boxes.length;sn++){const vt=ft.boxes[sn];if(S.debug("VTT box2: "+vt.type),vt.type==="payl")it.start=tt.cts/V,it.end=(tt.cts+tt.duration)/V,it.data=vt.cue_text;else if(vt.type==="sttg"&&vt.settings&&vt.settings!=="")try{const _e=vt.settings.split(" ");it.styles=m.getCaptionStyles(_e)}catch{}}it&&it.data&&(Ce.push(it),S.debug(`VTT ${it.start} - ${it.end} : ${it.data}`))}}}Ce.length>0&&l.addCaptions(w,0,Ce)})(nt,Qe)}})(J,le,We):me===o.default.VIDEO?(function(nt,ut){let Ut,Qe;if(ut.segmentType===Ae.HTTPRequest.INIT_SEGMENT_TYPE)C===0&&(C=A.getMediaTimescaleFromMoov(nt));else if(ut.segmentType===Ae.HTTPRequest.MEDIA_SEGMENT_TYPE){if(C===0)return void S.warn("CEA-608: No timescale for embeddedTextTrack yet");Qe=A.getSamplesInfo(nt);const wt=Qe.lastSequenceNumber,Qt=Math.trunc(ut.start),yn=Math.trunc(ut.end);if(ae[0]||ae[1]||(function(){let hn;for(let tn=0;tn<d.length;tn++){if(hn=l.getTrackIdxForId(d[tn].id),hn===-1)return void S.warn("CEA-608: data before track is ready.");const sn=G(hn);ae[tn]=new Mo(tn+1,{newCue:sn},null)}})(),C){if((function(tn,sn,Ce,tt,Xe){return tn!==null&&sn!==null&&tt!==null&&Xe!==null&&(sn===tn?tt!==Xe:sn!==tn+Ce)})(W,wt,Qe.numSequences,j,Qt))for(Ut=0;Ut<ae.length;Ut++)ae[Ut]&&ae[Ut].reset();const hn=(function(tn,sn){if(sn.length===0)return null;const Ce={splits:[],fields:[[],[]]},tt=new DataView(tn);for(let Xe=0;Xe<sn.length;Xe++){const ot=sn[Xe],zt=_d(tt,ot.offset,ot.size);let Ye=null,ft=0;for(let it=0;it<2;it++)if(zt[it].length>0){ot.cts!==Ye?ft=0:ft+=1;const vt=v();Ce.fields[it].push([ot.cts+vt*C,zt[it],ft]),Ye=ot.cts}}return Ce.fields.forEach((function(Xe){Xe.sort((function(ot,zt){return ot[0]===zt[0]?ot[2]-zt[2]:ot[0]-zt[0]}))})),Ce})(nt,Qe.sampleList);for(let tn=0;tn<ae.length;tn++){const sn=hn.fields[tn],Ce=ae[tn];if(Ce)for(Ut=0;Ut<sn.length;Ut++)Ce.addData(sn[Ut][0]/C,sn[Ut][1])}W=wt,j=yn}}})(J,le):(function(nt,ut,Ut){let Qe,wt;const Qt=new DataView(nt,0,nt.byteLength);wt=sr.Utils.dataViewToString(Qt,o.default.UTF8);try{Qe=B(Ut).parse(wt,0),l.addCaptions(l.getCurrentTrackIdx(),0,Qe),b.buffered&&b.buffered.add(ut.start,ut.end)}catch(yn){e.error(new Ft.default(qt.TIMED_TEXT_ERROR_ID_PARSE_CODE,qt.TIMED_TEXT_ERROR_MESSAGE_PARSE+yn.message,wt))}})(J,le,We):S.error("No text type defined")}function G(J){return function(le,he,me){let xe;xe=i.getTTMLRenderingDiv()?ne.createHTMLCaptionsFromScreen(i.getElement(),le,he,me):[{start:le,end:he,data:me.getDisplayText(),styles:{}}],xe&&l.addCaptions(J,0,xe)}}function v(){return isNaN(b.timestampOffset)?0:b.timestampOffset}function B(J){let le;return J.search(o.default.VTT)>=0?le=_.get().streaming.text.webvtt.customRenderingEnabled&&g?g:m:(J.search(o.default.TTML)>=0||J.search(o.default.STPP)>=0)&&(le=c),le}function O(J,le){J===void 0&&J===le&&(J=b.buffered.start(0),le=b.buffered.end(b.buffered.length-1)),b.buffered.remove(J,le),l.deleteCuesFromTrackIdx(w,J,le)}function te(J){d.forEach((function(le){const he=l.getTrackIdxForId(le.id);he>=0&&l.deleteCuesFromTrackIdx(he,J.from,J.to)}))}return b={initialize:function(){de||(d=[],w=null,C=0,ae=[],W=null,j=null,de=!0,ne=od(u).getInstance(),h.on(p.default.VIDEO_CHUNK_RECEIVED,I,b),h.on(p.default.BUFFER_CLEARED,te,b))},addMediaInfos:function(J,le,he){if(D=D.concat(le),J===o.default.TEXT&&le[0].isFragmented&&!le[0].isEmbedded){H=he,b.buffered=(0,ld.default)(u).create(),X=r.getTracksFor(o.default.TEXT,T.id).filter((xe=>xe.isFragmented));const me=r.getCurrentTrackFor(o.default.TEXT,T.id);for(let xe=0;xe<X.length;xe++)if(X[xe]===me){F(xe);break}}for(let me=0;me<le.length;me++)ce(le[me])},resetMediaInfos:function(){D=[]},getStreamId:function(){return T.id},append:Q,abort:function(){},addEmbeddedTrack:function(J){if(de&&J)if(J.id===o.default.CC1||J.id===o.default.CC3){for(let le=0;le<d.length;le++)if(d[le].id===J.id)return;d.push(J)}else S.warn("Embedded track "+J.id+" not supported!")},resetEmbedded:function(){h.off(p.default.VIDEO_CHUNK_RECEIVED,I,b),h.off(p.default.BUFFER_CLEARED,te,b),l&&l.deleteAllTextTracks(),de=!1,d=[],ae=[null,null],W=null,j=null},getConfig:function(){return{fragmentModel:H,fragmentedTracks:X,videoModel:i}},setCurrentFragmentedTrackIdx:F,remove:O,reset:function(){pe(),D=[],A=null}},S=(0,R.default)(u).getInstance().getLogger(b),A=kr(u).getInstance(),pe(),b}Po.__dashjs_factory_name="TextSourceBuffer";var vd=ie.default.getClassFactory(Po);class Sd{constructor(){this.root=null,this.size=0}addCue(e){const n={start:e.startTime,end:e.endTime,cue:e,maxEnd:e.endTime,left:null,right:null,height:1},[r,i]=this._insert(n,this.root);this.root=r,i&&this.size++}removeCue(e){const[n,r]=this._remove(e,this.root);return this.root=n,r&&this.size--,r}findCuesInRange(e,n){const r=[];return this._searchRange(this.root,e,n,r),r}findCuesAtTime(e){return this.findCuesInRange(e,e)}getAllCues(){const e=[];return this._inorderTraversal(this.root,e),e}getSize(){return this.size}clear(){this.root=null,this.size=0}_compareCues(e,n){return e.startTime!==n.startTime?e.startTime-n.startTime:e.endTime!==n.endTime?e.endTime-n.endTime:typeof VTTCue<"u"&&e instanceof VTTCue&&n instanceof VTTCue||e.text&&n.text?e.text.localeCompare(n.text):0}_compareIntervals(e,n){return this._compareCues(e.cue,n.cue)}_insert(e,n){if(!n)return[e,!0];const r=this._compareIntervals(e,n);if(r<0){const[l]=this._insert(e,n.left);n.left=l}else{if(!(r>0))return[n,!1];{const[l]=this._insert(e,n.right);n.right=l}}n.height=1+Math.max(this._getHeight(n.left),this._getHeight(n.right)),n.maxEnd=Math.max(n.maxEnd,e.maxEnd);const i=this._getBalance(n);return i>1?(this._compareIntervals(e,n.left)<0||(n.left=this._leftRotate(n.left)),[this._rightRotate(n),!0]):i<-1?(this._compareIntervals(e,n.right)>0||(n.right=this._rightRotate(n.right)),[this._leftRotate(n),!0]):[n,!0]}_searchRange(e,n,r,i){e&&(this._overlaps(e,n,r)&&i.push(e.cue),e.left&&e.left.maxEnd>=n&&this._searchRange(e.left,n,r,i),e.right&&e.start<=r&&this._searchRange(e.right,n,r,i))}_inorderTraversal(e,n){e&&(this._inorderTraversal(e.left,n),n.push(e.cue),this._inorderTraversal(e.right,n))}_overlaps(e,n,r){if(r===n){const i=n;return e.start<=i&&i<e.end}return e.start<r&&n<e.end}_getHeight(e){return e?e.height:0}_getBalance(e){return e?this._getHeight(e.left)-this._getHeight(e.right):0}_leftRotate(e){const n=e.right,r=n.left;return n.left=e,e.right=r,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),n.height=1+Math.max(this._getHeight(n.left),this._getHeight(n.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),n.maxEnd=Math.max(n.end,n.left?n.left.maxEnd:0,n.right?n.right.maxEnd:0),n}_rightRotate(e){const n=e.left,r=n.right;return n.right=e,e.left=r,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),n.height=1+Math.max(this._getHeight(n.left),this._getHeight(n.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),n.maxEnd=Math.max(n.end,n.left?n.left.maxEnd:0,n.right?n.right.maxEnd:0),n}_remove(e,n){if(!n)return[null,!1];const r=this._compareCues(e,n.cue);if(r<0){const[i,l]=this._remove(e,n.left);return n.left=i,l&&this._updateNode(n),[n,l]}if(r>0){const[i,l]=this._remove(e,n.right);return n.right=i,l&&this._updateNode(n),[n,l]}if(n.left||n.right){if(n.left){if(n.right){const i=this._findMin(n.right);n.cue=i.cue,n.start=i.start,n.end=i.end;const[l]=this._remove(i.cue,n.right);return n.right=l,this._updateNode(n),[n,!0]}return[n.left,!0]}return[n.right,!0]}return[null,!0]}_findMin(e){for(;e.left;)e=e.left;return e}_updateNode(e){e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0)}}var gi=oe(7640);const Oo=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function zo(t){const e=this.context,n=(0,ee.default)(e).getInstance(),r=t.videoModel,i=t.streamInfo,l=t.settings;let m,g,c,T,_,u,h,b,S,A,x,D,H,K,V,X,k,w,d,C;const W=new Map;function j(Ce){const tt=Ce.kind,Xe=Ce.id!==void 0?Ce.id:Ce.lang,ot=Ce.lang,zt=Ce.isTTML,Ye=Ce.isEmbedded;return r.addTextTrack(tt,Xe,ot,zt,Ye)}function ae(Ce,tt,Xe,ot,zt,Ye){let ft=0,it=0;Ce/tt>Xe/ot?(it=tt,ft=it/ot*Xe):(ft=Ce,it=ft/Xe*ot);let vt=0,_e=0,Be=0,at=0;return ft/it>zt?(at=it,Be=it*zt):(Be=ft,at=ft/zt),vt=(Ce-Be)/2,_e=(tt-at)/2,Ye?{x:vt+.1*Be,y:_e+.1*at,w:.8*Be,h:.8*at}:{x:vt,y:_e,w:Be,h:at}}function ne(Ce,tt){const Xe=r.getClientWidth(),ot=r.getClientHeight(),zt=r.getVideoWidth(),Ye=r.getVideoHeight(),ft=r.getVideoRelativeOffsetTop(),it=r.getVideoRelativeOffsetLeft();if(zt!==0&&Ye!==0){let vt=zt/Ye,_e=!1;Ce.isFromCEA608&&(vt=3.5/3,_e=!0);const Be=ae.call(this,Xe,ot,zt,Ye,vt,_e),at=Be.w,Le=Be.h,dt=Be.x,ht=Be.y;if(at!=S||Le!=A||dt!=h||ht!=b||tt){if(h=dt+it,b=ht+ft,S=at,A=Le,x){const qe=x.style;qe&&(qe.left=h+"px",qe.top=b+"px",qe.width=S+"px",qe.height=A+"px",qe.zIndex=K&&document[K]||V?k:null,n.trigger(P.default.CAPTION_CONTAINER_RESIZE))}const fe=Ce.activeCues;if(fe){const qe=fe.length;for(let bt=0;bt<qe;++bt){const It=fe[bt];It.scaleCue(It)}}}}}function de(Ce){const tt=S,Xe=A;let ot,zt,Ye,ft,it;if(Ce.cellResolution){const vt=[tt/Ce.cellResolution[0],Xe/Ce.cellResolution[1]];if(Ce.linePadding){for(ot in Ce.linePadding)if(Ce.linePadding.hasOwnProperty(ot)){zt=(Ce.linePadding[ot]*vt[0]).toString();const _e=document.getElementsByClassName("spanPadding");for(let Be=0;Be<_e.length;Be++)_e[Be].style.cssText=_e[Be].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+zt),_e[Be].style.cssText=_e[Be].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+zt)}}if(Ce.fontSize){for(ot in Ce.fontSize)if(Ce.fontSize.hasOwnProperty(ot)){Ce.fontSize[ot][0]==="%"?Ye=Ce.fontSize[ot][1]/100:Ce.fontSize[ot][0]==="c"&&(Ye=Ce.fontSize[ot][1]),zt=(Ye*vt[1]).toString(),it=ot!=="defaultFontSize"?document.getElementsByClassName(ot):document.getElementsByClassName("paragraph");for(let _e=0;_e<it.length;_e++)it[_e].style.cssText=it[_e].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+zt)}if(Ce.lineHeight){for(ot in Ce.lineHeight)if(Ce.lineHeight.hasOwnProperty(ot)){Ce.lineHeight[ot][0]==="%"?ft=Ce.lineHeight[ot][1]/100:Ce.fontSize[ot][0]==="c"&&(ft=Ce.lineHeight[ot][1]),zt=(ft*vt[1]).toString(),it=document.getElementsByClassName(ot);for(let _e=0;_e<it.length;_e++)it[_e].style.cssText=it[_e].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+zt)}}}}if(Ce.isd){let vt=document.getElementById(Ce.cueID);vt&&x.removeChild(vt),ce(Ce)}}function pe(Ce,tt){const Xe=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,ot=/^#(.*)$/;if(Xe.test(tt)){const zt=Xe.exec(tt),Ye=parseInt(zt[4],10)-1;return"data:image/png;base64,"+btoa(Ce.images[Ye])}if(ot.test(tt)){const zt=ot.exec(tt)[1];return"data:image/png;base64,"+Ce.embeddedImages[zt]}return tt}function ce(Ce){if(x){tn.call(this);const tt=document.createElement("div");x.appendChild(tt),X=(0,gi.renderHTML)(Ce.isd,tt,(function(Xe){return pe(Ce,Xe)}),x.clientHeight,x.clientWidth,l.get().streaming.text.imsc.displayForcedOnlyMode,(function(Xe){g.info("renderCaption :",Xe)}),X,l.get().streaming.text.imsc.enableRollUp),tt.id=Ce.cueID,n.trigger(P.default.CAPTION_RENDERED,{captionDiv:tt,currentTrackIdx:u})}}function I(Ce,tt){const Xe=tt.findCuesInRange(Ce.startTime-.1,Ce.endTime+.1);for(const ot of Xe)if(F(Ce,ot)&&Q(Ce,ot,Oo)||F(ot,Ce)&&Q(Ce,ot,Oo))return ot;return null}function F(Ce,tt){return!!tt&&tt.endTime>=Ce.startTime}function Q(Ce,tt,Xe){for(let ot=0;ot<Xe.length;ot++){const zt=Xe[ot];if(JSON.stringify(Ce[zt])!==JSON.stringify(tt[zt]))return!1}return!0}function G(Ce,tt){tt&&tt.forEach((Xe=>{Xe.kind&&Xe.kind==="image"&&(Xe.src=pe(Ce,Xe.src)),G(Ce,Xe.contents)}))}function v(Ce,tt,Xe){const ot=nt(Ce),zt=W.get(ot),Ye=l.get().streaming.text.dispatchForManualRendering;if(ot&&zt&&Array.isArray(Xe)&&Xe.length!==0){for(let vt=0;vt<Xe.length;vt++){let _e=null;const Be=Xe[vt];if(ot.cellResolution=Be.cellResolution,ot.isFromCEA608=Be.isFromCEA608,isNaN(Be.start)||isNaN(Be.end)||(Ye?_e=B(Be,tt):he(Be)&&x?_e=J(Be,tt,ot):Be.data&&(_e=le(Be,tt,ot))),_e){if(l.get().streaming.text.extendSegmentedCues){const at=I(_e,zt.allCues);at&&(zt.allCues.removeCue(at),it=_e,(ft=at).startTime=Math.min(ft.startTime,it.startTime),ft.endTime=Math.max(ft.endTime,it.endTime),_e=ft)}zt.allCues.addCue(_e)}else g.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}var ft,it;Qt()}}function B(Ce,tt){let Xe=me(Ce,tt);return Xe.onenter=function(){he(Ce)&&C&&C.cueID!==Xe.cueID&&te(C),delete Xe.type,C=Xe,O(Xe)},Xe.onexit=function(){te(Xe),C=null},Xe}function O(Ce){n.trigger(P.default.CUE_ENTER,Ce)}function te(Ce){n.trigger(P.default.CUE_EXIT,{cueID:Ce.cueID})}function J(Ce,tt,Xe){const ot=this;let zt=me(Ce,tt);return x.style.left=h+"px",x.style.top=b+"px",x.style.width=S+"px",x.style.height=A+"px",zt.onenter=function(){Xe.mode===o.default.TEXT_SHOWING&&(this.isd?(d?requestAnimationFrame((()=>ce(this))):ce(this),g.debug("Cue enter id:"+this.cueID)):(x.appendChild(this.cueHTMLElement),de.call(ot,this),n.trigger(P.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:u})))},zt.onexit=function(){if(x){const Ye=x.childNodes;for(let ft=0;ft<Ye.length;++ft)Ye[ft].id===this.cueID&&(g.debug("Cue exit id:"+Ye[ft].id),x.removeChild(Ye[ft]),--ft)}},zt}function le(Ce,tt,Xe){let ot=me(Ce,tt);if(Ce.styles)try{Ce.styles.align!==void 0&&"align"in ot&&(ot.align=Ce.styles.align),Ce.styles.line!==void 0&&"line"in ot&&(ot.line=Ce.styles.line),Ce.styles.lineAlign!==void 0&&(ot.lineAlign=Ce.styles.lineAlign),Ce.styles.snapToLines!==void 0&&"snapToLines"in ot&&(ot.snapToLines=Ce.styles.snapToLines),Ce.styles.position!==void 0&&"position"in ot&&(ot.position=Ce.styles.position),Ce.styles.positionAlign!==void 0&&(ot.positionAlign=Ce.styles.positionAlign),Ce.styles.size!==void 0&&"size"in ot&&(ot.size=Ce.styles.size)}catch(zt){g.error(zt)}return ot.onenter=function(){Xe.mode===o.default.TEXT_SHOWING&&n.trigger(P.default.CAPTION_RENDERED,{currentTrackIdx:u})},ot}function he(Ce){return Ce.type==="html"}function me(Ce,tt){return he(Ce)?(function(Xe,ot){let zt=new c(Xe.start+ot,Xe.end+ot,"");return zt.cueHTMLElement=Xe.cueHTMLElement,zt.isd=Xe.isd,zt.images=Xe.images,zt.embeddedImages=Xe.embeddedImages,zt.cueID=Xe.cueID,zt.scaleCue=de.bind(self),zt.cellResolution=Xe.cellResolution,zt.lineHeight=Xe.lineHeight,zt.linePadding=Xe.linePadding,zt.fontSize=Xe.fontSize,zt.isd&&G(zt,zt.isd.contents),zt})(Ce,tt):(function(Xe,ot){let zt=new c(Xe.start-ot,Xe.end-ot,Xe.data);return zt.cueID=je.default.generateUuid(),zt})(Ce,tt)}function xe(Ce){if(D){const tt=D.childNodes;for(let Xe=0;Xe<tt.length;++Xe)tt[Xe].id===Ce.cueID&&(D.removeChild(tt[Xe]),--Xe)}}function We(){const Ce=r.getTextTracks(),tt=[];for(const Xe of Ce)Xe.manualMode===o.default.TEXT_SHOWING&&tt.push(Xe);return tt}function nt(Ce){return Ce>=0&&T[Ce]?r.getTextTrack(T[Ce].kind,T[Ce].id,T[Ce].lang,T[Ce].isTTML,T[Ce].isEmbedded):null}function ut(Ce){if(Ce===u)return;u=Ce;const tt=nt(u);Ut.call(this,tt),H&&(clearInterval(H),H=null),tt&&tt.renderingType==="html"&&(ne.call(this,tt,!0),window.ResizeObserver?(w=new window.ResizeObserver((()=>{ne.call(this,tt,!0)})),w.observe(r.getElement())):H=setInterval(ne.bind(this,tt),500))}function Ut(Ce){tn.call(this),Ce&&Ce.renderingType==="html"?yn.call(this):hn.call(this)}function Qe(Ce,tt,Xe,ot=!0){return!!Ce&&(isNaN(tt)||(ot?Ce.startTime:Ce.endTime)>=tt)&&(isNaN(Xe)||(ot?Ce.endTime:Ce.startTime)<=Xe)}function wt(Ce,tt,Xe,ot=!0){if(!Ce)return;if(Ce.cues&&Ce.cues.length>0)for(let Ye=Ce.cues.length-1;Ye>=0;Ye--)Qe(Ce.cues[Ye],tt,Xe,ot)&&(Ce.cues[Ye].onexit&&Ce.cues[Ye].onexit(),Ce.removeCue(Ce.cues[Ye]));const zt=W.get(Ce);if(zt){const Ye=zt.activeCues,ft=Ye.filter((it=>it.startTime>=tt&&it.endTime<=Xe));ft.forEach((it=>{l.get().streaming.text.dispatchForManualRendering?te(it):xe(it)})),zt.activeCues=Ye.filter((it=>!ft.includes(it)))}}function Qt(){for(const Ce of W.values())Ce.lastCueWindowUpdate=-1/0}function yn(){let Ce=document.getElementById("native-cue-style");if(Ce)return;Ce=document.createElement("style"),Ce.id="native-cue-style",document.head.appendChild(Ce);const tt=Ce.sheet,Xe=r.getElement();try{Xe&&(Xe.id?tt.insertRule("#"+Xe.id+"::cue {background: transparent}",0):Xe.classList.length!==0?tt.insertRule("."+Xe.className+"::cue {background: transparent}",0):tt.insertRule("video::cue {background: transparent}",0))}catch(ot){g.info(""+ot.message)}}function hn(){const Ce=document.getElementById("native-cue-style");Ce&&document.head.removeChild(Ce)}function tn(){if(x)for(;x.firstChild;)x.removeChild(x.firstChild)}function sn(){return T}return m={addCaptions:v,addTextTrackInfo:function(Ce){T.push(Ce)},createTracks:function(){T.sort((function(tt,Xe){return tt.index-Xe.index})),x=r.getTTMLRenderingDiv(),D=r.getVttRenderingDiv();let Ce=-1;for(let tt=0;tt<T.length;tt++){const Xe=j(T[tt]);_.push(Xe),T[tt].defaultTrack&&(Xe.default=!0,Ce=tt);const ot=nt(tt);ot&&(ot.mode=o.default.TEXT_SHOWING,x&&(T[tt].isTTML||T[tt].isEmbedded)?ot.renderingType="html":ot.renderingType="default",W.set(ot,{allCues:new Sd,lastCueWindowUpdate:-1/0,activeCues:[]})),v(tt,0,T[tt].captionData),n.trigger(P.default.TEXT_TRACK_ADDED)}if(ut.call(this,Ce),Ce>=0){let tt=function(){const Xe=nt(Ce);Xe&&Xe.renderingType==="html"&&ne.call(this,Xe,!0),n.off(P.default.PLAYBACK_METADATA_LOADED,tt,this)};n.on(P.default.PLAYBACK_METADATA_LOADED,tt,this);for(let Xe=0;Xe<T.length;Xe++){const ot=nt(Xe);if(ot){const zt=l.get().streaming.text.dispatchForManualRendering;ot.mode=Xe!==Ce||zt?o.default.TEXT_HIDDEN:o.default.TEXT_SHOWING,ot.manualMode=Xe===Ce?o.default.TEXT_SHOWING:o.default.TEXT_HIDDEN}}}n.trigger(p.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:u,tracks:T,streamId:i.id})},deleteAllTextTracks:function(){const Ce=_?_.length:0;for(let tt=0;tt<Ce;tt++){const Xe=nt(tt);Xe&&wt.call(this,Xe,i.start,i.start+i.duration,!1)}_=[],T=[],H&&(clearInterval(H),H=null),w&&r&&(w.unobserve(r.getElement()),w=null),u=-1,tn.call(this),W.clear()},deleteCuesFromTrackIdx:function(Ce,tt,Xe){const ot=nt(Ce);ot&&wt(ot,tt,Xe)},disableManualTracks:function(){const Ce=We();if(Ce&&Ce.length>0){const tt=Ce[0],Xe=W.get(tt);if(!Xe)return;Xe.activeCues.forEach((ot=>{l.get().streaming.text.dispatchForManualRendering?te(ot):xe(ot)})),Xe.activeCues=[]}},getCurrentTrackIdx:function(){return u},getCurrentTextTrackInfo:function(){return T[u]},getStreamId:function(){return i.id},getTextTrackInfos:sn,getTrackIdxForId:function(Ce){let tt=-1;for(let Xe=0;Xe<T.length;Xe++)if(T[Xe].id===Ce){tt=Xe;break}return tt},initialize:function(){typeof window<"u"&&typeof navigator<"u"&&(c=window.VTTCue||window.TextTrackCue,T=[],_=[],u=-1,h=0,b=0,S=0,A=0,x=null,D=null,H=null,V=!1,k=2147483647,X=null,d="requestAnimationFrame"in window,W.clear(),document.fullscreenElement!==void 0?K="fullscreenElement":document.webkitIsFullScreen!==void 0?K="webkitIsFullScreen":document.msFullscreenElement?K="msFullscreenElement":document.mozFullScreen&&(K="mozFullScreen"))},manualCueProcessing:function(Ce){const tt=We();if(tt&&tt.length>0){const Xe=tt[0],ot=W.get(Xe);if(!ot)return;const zt=ot.activeCues,Ye=ot.allCues.findCuesAtTime(Ce),ft=zt.filter((vt=>!Ye.includes(vt))),it=Ye.filter((vt=>!zt.includes(vt)));ft.forEach((vt=>{l.get().streaming.text.dispatchForManualRendering?te(vt):xe(vt)})),it.forEach((vt=>{l.get().streaming.text.dispatchForManualRendering?O(vt):WebVTT.processCues(window,[vt],D,vt.cueID)})),ot.activeCues=Ye}},setCurrentTrackIdx:ut,setModeForTrackIdx:function(Ce,tt){const Xe=nt(Ce);Xe&&Xe.mode!==tt&&(Xe.mode=tt),Xe&&Xe.manualMode!==tt&&(Xe.manualMode=tt)},updateTextTrackWindow:function(Ce,tt=!1){const Xe=sn(),ot=l.get().streaming.text.webvtt.customRenderingEnabled;for(let zt=0;zt<Xe.length;zt++){const Ye=Xe[zt],ft=nt(zt),it=W.get(ft);if(!ft||!it||!Ye.isEmbedded&&ot)continue;const{bufferToKeep:vt,bufferPruningInterval:_e}=l.get().streaming.buffer,Be=Date.now();if((Be-it.lastCueWindowUpdate)/1e3<_e&&!tt)continue;const at=r.getPlaybackRate()||1,Le=Math.max(0,Ce-vt/at),dt=Ce+2*_e/at;if(ft.cues)for(;ft.cues.length>0;)ft.removeCue(ft.cues[0]);ft.mode!==o.default.TEXT_DISABLED&&it.allCues.findCuesInRange(Le,dt).forEach((ht=>{ft.addCue(ht)})),it.lastCueWindowUpdate=Be}},invalidateCueWindow:Qt},g=(0,R.default)(e).getInstance().getLogger(m),m}zo.__dashjs_factory_name="TextTracks";var wd=ie.default.getClassFactory(zo);function Lo(){const t=this.context;let e,n,r,i,l,m;function g(u){const h=u.split(":"),b=h.length-1;return u=60*parseInt(h[b-1],10)+parseFloat(h[b]),b===2&&(u+=3600*parseInt(h[0],10)),u}function c(u){const h=u.split(i),b=h[1].split(m);return b.shift(),h[1]=b[0],b.shift(),{cuePoints:h,styles:T(b)}}function T(u){const h={};return u.forEach((function(b){const S=b.split(":");if(S.length>1){const[A,x]=S;switch(A){case"align":case"A":h.align=x;break;case"line":case"L":const[D,H]=x.split(","),K=D.endsWith("%");h.line=D==="auto"?D:parseInt(D,10),K&&(h.snapToLines=!1),H&&(h.lineAlign=H);break;case"position":case"P":const[V,X]=x.split(",");h.position=parseInt(V,10),X&&(h.positionAlign=X);break;case"size":case"S":h.size=parseInt(x,10)}}})),h}function _(u,h){let b,S=h,A="",x="";for(;u[S]!==""&&S<u.length;)S++;if(b=S-h,b>1)for(let D=0;D<b;D++){if(x=u[h+D],x.match(i)){A="";break}A+=x,D!==b-1&&(A+=`
|
|
21
|
-
`)}else x=u[h],x.match(i)||(A=x);return A}return e={parse:function(u){const h=[];let b,S;if(!u)return h;b=(u=u.split(r)).length,S=-1;for(let A=0;A<b;A++){let x=u[A];if(x.length>0&&x!=="WEBVTT"&&x.match(i)){const D=c(x),H=D.cuePoints,K=D.styles,V=_(u,A+1),X=g(H[0].replace(l,"")),k=g(H[1].replace(l,""));!isNaN(X)&&!isNaN(k)&&X>=S&&k>X?V!==""?(S=X,h.push({start:X,end:k,data:V,styles:K})):n.error("Skipping cue due to empty/malformed cue text"):n.error("Skipping cue due to incorrect cue timing")}}return h},getCaptionStyles:T},n=(0,R.default)(t).getInstance().getLogger(e),r=/(?:\r\n|\r|\n)/gm,i=/-->/,l=/(^[\s]+|[\s]+$)/g,m=/\s\b/g,e}Lo.__dashjs_factory_name="VTTParser";var Id=ie.default.getSingletonFactory(Lo);function Fo(){let t,e;return t={parse:function(n){let r=[];return e.oncue=function(i){i.start=i.startTime,i.end=i.endTime,i.data=i.text,i.styles={align:i.align,line:i.line,position:i.position,size:i.size},r.push(i)},e.parse(n),r}},(function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}})(),t}Fo.__dashjs_factory_name="VttCustomRenderingParser";var kd=ie.default.getSingletonFactory(Fo);function Uo(){const t=this.context,e=(0,ee.default)(t).getInstance();let n,r,i=0;function l(){const m="cue_TTML_"+i;return i++,m}return n={parse:function(m,g,c,T,_){let u="";const h=[];let b,S,A;const x={},D={};let H="",K="",V={onOpenTag:function(w,d,C){if(C[" imagetype"]&&!C[" imageType"]&&(e.trigger(P.default.CONFORMANCE_VIOLATION,{level:Wa.LEVELS.ERROR,event:Wa.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),C[" imageType"]=C[" imagetype"]),d==="image"&&(w==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||w==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!C[" imageType"]||C[" imageType"].value!=="PNG")return void r.warn("smpte-tt imageType != PNG. Discarded");H=C["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){H&&(D[H]=K.trim()),K="",H=""},onText:function(w){H&&(K+=w)}};if(!m)throw u="no ttml data to parse",new Error(u);x.data=m,e.trigger(p.default.TTML_TO_PARSE,x);let X=(0,gi.fromXML)(x.data,(function(w){u=w}),V);e.trigger(p.default.TTML_PARSED,{ttmlString:x.data,ttmlDoc:X});const k=X.getMediaTimeEvents();for(A=0;A<k.length;A++){let w=(0,gi.generateISD)(X,k[A],(function(d){u=d}));w.contents.some((d=>d.contents.length))&&(b=k[A]+g,S=k[A+1]+g,b<S&&h.push({start:b,end:S,type:"html",cueID:l(),isd:w,images:_,embeddedImages:D}))}if(u!=="")throw r.error(u),new Error(u);return h}},r=(0,R.default)(t).getInstance().getLogger(n),n}Uo.__dashjs_factory_name="TTMLParser";var Ad=ie.default.getSingletonFactory(Uo);function jo(t){let e=this.context;const n=(0,ee.default)(e).getInstance(),r=xn(e).getInstance(),i=t.adapter,l=t.baseURLController,m="error",g="loaded",c="unloaded";let T,_,u;function h(A,x){let D,H,K=!1;if(l.resolve()){const k=i.getVoRepresentations(A);k&&k.length>0&&(D=l.resolve(k[0].path).url)}const V=A.essentialProperties.filter((k=>k.schemeIdUri&&k.schemeIdUri===o.default.FONT_DOWNLOAD_DVB_SCHEME)),X=A.supplementalProperties.filter((k=>k.schemeIdUri&&k.schemeIdUri===o.default.FONT_DOWNLOAD_DVB_SCHEME));V.length>0?(K=!0,H=V):H=X,H.forEach((k=>{if((function(C){return!(!(C.value&&parseInt(C.value)===1&&C.dvbUrl&&C.dvbUrl.length>0&&C.dvbFontFamily&&C.dvbFontFamily.length>0&&C.dvbMimeType)||C.dvbMimeType!==o.default.OFF_MIMETYPE&&C.dvbMimeType!==o.default.WOFF_MIMETYPE)})(k)){let C=(w=k.dvbUrl,d=D,r.isPathAbsolute(w)?w:r.isRelative(w)?d?r.resolve(w,d):r.resolve(w):w);u.push({fontFamily:k.dvbFontFamily,url:C,mimeType:k.dvbMimeType,trackId:A.id,streamId:x,isEssential:K,status:c,fontFace:new FontFace(k.dvbFontFamily,`url(${C})`,{display:"swap"})})}var w,d}))}function b(A,x){const D=u[A];u[A]={...D,status:x}}function S(){u=[]}return T={addFontsFromTracks:function(A,x){if(A&&Array.isArray(A)&&x)for(let D=0;D<A.length;D++)h(A[D],x)},downloadFonts:function(){for(let A=0;A<u.length;A++){let x=u[A];document.fonts.add(x.fontFace),n.trigger(P.default.DVB_FONT_DOWNLOAD_ADDED,x),x.fontFace.load().then((()=>{b(A,g),n.trigger(P.default.DVB_FONT_DOWNLOAD_COMPLETE,x)}),(D=>{b(A,m),_.debug("Font download error: ",D),n.trigger(P.default.DVB_FONT_DOWNLOAD_FAILED,x)}))}},getFonts:function(){return u},getFontsForTrackId:function(A){return u.filter((x=>x.trackId&&x.trackId===A))},reset:function(){(function(){for(const A of u){let x=document.fonts.delete(A.fontFace);_.debug(`Removal of fontFamily: ${A.fontFamily} was ${x?"successful":"unsuccessful"}`)}})(),S()}},_=(0,R.default)(e).getInstance().getLogger(T),S(),T}jo.__dashjs_factory_name="DVBFonts";var Rd=ie.default.getClassFactory(jo);function qo(t){let e=this.context;const n=t.adapter,r=t.errHandler,i=t.manifestModel,l=t.mediaController,m=t.baseURLController,g=t.videoModel,c=t.settings;let T,_,u,h,b,S,A,x,D,H,K,V,X,k;function w(G){if(k.error(`Could not download ${G.isEssential?"an essential":"a"} font - fontFamily: ${G.fontFamily}, url: ${G.url}`),G.isEssential){let v=h[G.streamId].getTrackIdxForId(G.trackId);h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_DISABLED)}}function d(G){if(k.debug(`Successfully downloaded ${G.isEssential?"an essential":"a"} font - fontFamily: ${G.fontFamily}, url: ${G.url}`),G.isEssential){let v=h[G.streamId].getTrackIdxForId(G.trackId);v===h[G.streamId].getCurrentTrackIdx()?h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_SHOWING):h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_HIDDEN)}}function C(G){let v=G.tracks,B=G.index;const O=G.streamId;if(c.get().streaming.text.defaultEnabled===!1&&!de()||V)pe(O,-1);else{const te=l.getCurrentTrackFor(o.default.TEXT,O);if(te){const J={lang:te.lang,role:te.roles[0],index:te.index,codec:te.codec,accessibility:te.accessibility[0]};v.some(((le,he)=>{if(l.matchSettings(J,le))return pe(O,he),B=he,!0}))}D=!1}_[O].lastEnabledIndex=B,x.trigger(P.default.TEXT_TRACKS_ADDED,{enabled:de(),index:B,tracks:v,streamId:O}),K=!0,X.addFontsFromTracks(v,O),X.getFonts().forEach((te=>{if(te.isEssential){let J=h[te.streamId].getTrackIdxForId(te.trackId);h[te.streamId].setModeForTrackIdx(J,o.default.TEXT_DISABLED)}})),X.downloadFonts()}function W(G){try{const v=G.streamId,B=h[v];if(!B||isNaN(G.time))return;B.updateTextTrackWindow(G.time),c.get().streaming.text.webvtt.customRenderingEnabled&&B.manualCueProcessing(G.time)}catch{}}function j(G){try{const v=G.streamId;if(!h[v])return;h[v].disableManualTracks()}catch{}}function ae(G){try{const v=h[G.streamId];if(!v)return;const B=g.getTime()||0;v.updateTextTrackWindow(B,!0)}catch(v){k.error(v)}}function ne(G){try{if(!G||!G.mediaType||G.mediaType!==o.default.AUDIO||!G.currentMediaInfo)return;const v=h[G.streamId].getCurrentTextTrackInfo();let B=NaN;D?B=ce(G.streamId):I(v)&&G.currentMediaInfo.lang&&G.currentMediaInfo.lang!==v.lang&&(B=ce(G.streamId),isNaN(B)&&(B=-1)),isNaN(B)||pe(G.streamId,B)}catch(v){k.error(v)}}function de(){let G=!0;return D&&!H&&(G=!1),G}function pe(G,v){D=v===-1,D&&l&&l.saveTextSettingsDisabled();let B=F(G);if(B===v||!h[G])return;h[G].disableManualTracks(),h[G].invalidateCueWindow();let O=h[G].getCurrentTextTrackInfo(),te=O?g.getTextTrack(O.kind,O.id,O.lang,O.isTTML,O.isEmbedded):null;te&&te.mode!==o.default.TEXT_DISABLED&&h[G].setModeForTrackIdx(B,o.default.TEXT_HIDDEN),h[G].setCurrentTrackIdx(v),O=h[G].getCurrentTextTrackInfo();const J=c.get().streaming.text.dispatchForManualRendering;if(O&&!J&&O.mode!==o.default.TEXT_DISABLED&&h[G].setModeForTrackIdx(v,o.default.TEXT_SHOWING),O&&O.isFragmented&&!O.isEmbedded)(function(le,he,me){if(!u[le])return;let xe=u[le].getConfig().fragmentedTracks;for(let We=0;We<xe.length;We++){let nt=xe[We];if(he.lang===nt.lang&&(nt.id?he.id===nt.id:he.index===nt.index)){let ut=l.getCurrentTrackFor(o.default.TEXT,le);(nt.id?ut.id!==nt.id:ut.index!==nt.index)?(h[le].deleteCuesFromTrackIdx(me),u[le].setCurrentFragmentedTrackIdx(We)):me===-1&&x.trigger(p.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:le,mediaType:o.default.TEXT})}}})(G,O,B);else if(O&&!O.isFragmented)(function(le,he){x.trigger(p.default.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:he},{streamId:le,mediaType:o.default.TEXT})})(G,O);else if(!O&&D){const le=ce(G);return void(isNaN(le)||pe(G,le))}l.setTrack(O)}function ce(G){const v=(function(te){return h[te].getTextTrackInfos().filter(((J,le)=>(J._indexToSelect=le,!!(J&&J.roles&&J.roles.length>0)&&I(J))))})(G);if(!v||v.length<=0)return NaN;const B=l.getCurrentTrackFor(o.default.AUDIO,G);if(!B)return NaN;const O=v.find((te=>B.lang===te.lang));return O?O._indexToSelect:NaN}function I(G){return!(!G||!G.roles||G.roles.length===0)&&G.roles.some((v=>v.schemeIdUri===o.default.DASH_ROLE_SCHEME_ID&&v.value===re.default.FORCED_SUBTITLE))}function F(G){return h[G].getCurrentTrackIdx()}function Q(){u={},h={},_={},D=!0,K=!1,V=!1}return T={addEmbeddedTrack:function(G,v){const B=G.id;u[B]&&u[B].addEmbeddedTrack(v)},addMediaInfosToBuffer:function(G,v,B,O=null){const te=G.id;u[te]&&u[te].addMediaInfos(v,B,O)},createTracks:function(G){const v=G.id;h[v]&&h[v].createTracks()},deactivateStream:function(G){if(!G)return;const v=G.id;u[v]&&u[v].resetMediaInfos(),h[v]&&h[v].deleteAllTextTracks()},enableForcedTextStreaming:function(G){return(0,et.checkParameterType)(G,"boolean"),H=G,!0},enableText:function(G,v){return(0,et.checkParameterType)(v,"boolean"),de()!==v&&(v&&pe(G,_[G].lastEnabledIndex),v||(_[G].lastEnabledIndex=F(G),K?pe(G,-1):V=!0)),!0},getAllTracksAreDisabled:function(){return D},getCurrentTrackIdx:F,getTextSourceBuffer:function(G){const v=G.id;if(u&&u[v])return u[v]},initialize:function(){X=Rd(e).create({adapter:n,baseURLController:m}),x.on(p.default.TEXT_TRACKS_QUEUE_INITIALIZED,C,T),x.on(p.default.DVB_FONT_DOWNLOAD_FAILED,w,T),x.on(p.default.DVB_FONT_DOWNLOAD_COMPLETE,d,T),x.on(p.default.MEDIAINFO_UPDATED,ne,T),x.on(p.default.PLAYBACK_TIME_UPDATED,W,T),c.get().streaming.text.webvtt.customRenderingEnabled&&x.on(p.default.PLAYBACK_SEEKING,j,T),x.on(p.default.PLAYBACK_SEEKED,ae,T)},initializeForStream:function(G){const v=G.id,B=wd(e).create({videoModel:g,settings:c,streamInfo:G});B.initialize(),h[v]=B;const O=vd(e).create({errHandler:r,adapter:n,dvbFonts:X,manifestModel:i,mediaController:l,videoModel:g,textTracks:B,vttParser:b,vttCustomRenderingParser:S,ttmlParser:A,streamInfo:G,settings:c});O.initialize(),u[v]=O,_[v]={},_[v].lastEnabledIndex=-1},isTextEnabled:de,reset:function(){Object.keys(u).forEach((G=>{u[G].resetEmbedded(),u[G].reset()})),X.reset(),Q(),x.off(p.default.TEXT_TRACKS_QUEUE_INITIALIZED,C,T),x.off(p.default.DVB_FONT_DOWNLOAD_FAILED,w,T),x.off(p.default.DVB_FONT_DOWNLOAD_COMPLETE,d,T),x.off(p.default.MEDIAINFO_UPDATED,ne,T),x.off(p.default.PLAYBACK_TIME_UPDATED,W,T),c.get().streaming.text.webvtt.customRenderingEnabled&&x.off(p.default.PLAYBACK_SEEKING,j,T),x.off(p.default.PLAYBACK_SEEKED,ae,T)},setTextTrack:pe,clearDataForStream:function(G){u[G]&&(u[G].resetEmbedded(),u[G].reset(),delete u[G]),h[G]&&(h[G].deleteAllTextTracks(),delete h[G]),_[G]&&delete _[G]}},H=!1,K=!1,V=!1,b=Id(e).getInstance(),S=kd(e).getInstance(),A=Ad(e).getInstance(),x=(0,ee.default)(e).getInstance(),k=(0,R.default)(e).getInstance().getLogger(T),Q(),T}qo.__dashjs_factory_name="TextController";var Nd=ie.default.getClassFactory(qo);function Bo(t){t=t||{};const e=this.context,n=(0,R.default)(e).getInstance(),r=t.settings,i=(0,ee.default)(e).getInstance();let l,m,g,c,T,_;function u(){return navigator&&navigator.connection&&!isNaN(navigator.connection.downlink)&&navigator.connection.downlink>0?1e3*navigator.connection.downlink:NaN}function h(A,x,D,H){const K=Math.pow(.5,D/H.fast);A.fastEstimate=(1-K)*x+K*A.fastEstimate;const V=Math.pow(.5,D/H.slow);A.slowEstimate=(1-V)*x+V*A.slowEstimate,A.totalWeight+=D}function b(){l={},m={},g={},c={}}const S={addEntry:function(A,x){try{if(!(A&&x&&x.trace&&x.trace.length))return;(function(K){l[K]=l[K]||[],m[K]=m[K]||[],g[K]=g[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0},c[K]=c[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0}})(A);const D=x.tresponse.getTime()-x.trequest.getTime()||1;let H=(function(K,V){return K._fileLoaderType&&K._fileLoaderType===o.default.FILE_LOADER_TYPES.FETCH?(function(X){const k=X.trace.reduce(((C,W)=>C+W.b[0]),0),w=X.trace.reduce(((C,W)=>C+W.d),0);let d=NaN;return r.get().streaming.abr.throughput.useNetworkInformationApi.fetch&&(d=u()),isNaN(d)&&(d=Math.round(8*k/w)),{downloadedBytes:k,value:d,downloadTimeInMs:w}})(K):(function(X,k){let w=NaN,d=NaN,C=!1;if(r.get().streaming.abr.throughput.useResourceTimingApi&&X._resourceTimingValues)w=X._resourceTimingValues.transferSize,d=X._resourceTimingValues.responseEnd-X._resourceTimingValues.responseStart,C=!0;else{if(X.trace.length<=1)return{throughput:NaN,downloadTimeInMs:NaN};w=X.trace.reduce(((j,ae)=>j+ae.b[0]),0)-X.trace[0].b[0],d=Math.max(X.trace.reduce(((j,ae)=>j+ae.d),0)-X.trace[0].d,1)}let W=NaN;if(!C&&r.get().streaming.abr.throughput.useNetworkInformationApi.xhr&&(W=u()),isNaN(W)){const j=r.get().streaming.abr.throughput.useDeadTimeLatency?d:d+k;W=Math.round(8*w/j)}return{downloadedBytes:w,value:W,downloadTimeInMs:d}})(K,V)})(x,D);if(H.latencyInMs=D,isNaN(H.value)||!isFinite(H.value))return;if(x.cmsd){const K=x.cmsd.dynamic&&x.cmsd.dynamic.etp?x.cmsd.dynamic.etp:null;if(K){const V=r.get().streaming.cmsd.abr.etpWeightRatio;V>0&&V<=1&&(H.value=H.value*(1-V)+K*V)}}if((function(K,V,X){return r.get().streaming.abr.throughput.useResourceTimingApi&&X._resourceTimingValues?X._resourceTimingValues.transferSize===0&&X._resourceTimingValues.decodedBodySize>0:!isNaN(V)&&(K===o.default.VIDEO?V<r.get().streaming.cacheLoadThresholds[o.default.VIDEO]:K===o.default.AUDIO?V<r.get().streaming.cacheLoadThresholds[o.default.AUDIO]:void 0)})(A,x._tfinish.getTime()-x.trequest.getTime(),x))return void _.debug(`${A} Assuming segment ${x.url} came from cache, ignoring it for throughput calculation`);_.debug(`Added throughput entry for ${A}: ${H.value} kbit/s`),H.serviceLocation=x._serviceLocation,l[A].push(H),m[A].push({value:D}),(function(K){l[K].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&l[K].shift(),m[K].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&m[K].shift()})(A),i.trigger(P.default.THROUGHPUT_MEASUREMENT_STORED,{throughputValues:H}),x.type!==Ae.HTTPRequest.MPD_TYPE&&(h(g[A],H.value,r.get().streaming.abr.throughput.ewma.weightDownloadTimeMultiplicationFactor*H.downloadTimeInMs,T.bandwidthHalfLife),h(c[A],D,1,T.latencyHalfLife))}catch(D){_.error(D)}},getThroughputDict:function(A){return A?l[A]:l},getEwmaThroughputDict:function(A){return A?g[A]:g},getEwmaLatencyDict:function(A){return A?c[A]:c},getEwmaHalfLife:function(){return T},getLatencyDict:function(A){return A?m[A]:m},reset:b};return _=n.getLogger(S),T={bandwidthHalfLife:{fast:r.get().streaming.abr.throughput.ewma.throughputFastHalfLifeSeconds,slow:r.get().streaming.abr.throughput.ewma.throughputSlowHalfLifeSeconds},latencyHalfLife:{fast:r.get().streaming.abr.throughput.ewma.latencyFastHalfLifeCount,slow:r.get().streaming.abr.throughput.ewma.latencySlowHalfLifeCount}},b(),S}Bo.__dashjs_factory_name="ThroughputModel";var Cd=ie.default.getClassFactory(Bo);function Go(){const t=this.context,e=(0,ee.default)(t).getInstance();let n,r,i;function l(){performance.clearResourceTimings()}function m(K){K.metric!==y.HTTP_REQUEST||!K.value||K.value.type!==Ae.HTTPRequest.MPD_TYPE&&(K.value.type!==Ae.HTTPRequest.MEDIA_SEGMENT_TYPE||K.mediaType!==o.default.AUDIO&&K.mediaType!==o.default.VIDEO)||n.addEntry(K.mediaType,K.value)}function g(K,V,X=null,k=NaN){let w,d=null,C=n.getEwmaHalfLife(),W=null,j=!0;switch(X||(X=i.get().streaming.abr.throughput.averageCalculationMode),K){case o.default.THROUGHPUT_TYPES.BANDWIDTH:d=X===o.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaThroughputDict(V):n.getThroughputDict(V),W=C.bandwidthHalfLife,j=!0,k=isNaN(k)?r.getIsDynamic()?i.get().streaming.abr.throughput.sampleSettings.live:i.get().streaming.abr.throughput.sampleSettings.vod:k;break;case o.default.THROUGHPUT_TYPES.LATENCY:d=X===o.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaLatencyDict(V):n.getLatencyDict(V),W=C.latencyHalfLife,j=!1,k=isNaN(k)?i.get().streaming.abr.throughput.sampleSettings.averageLatencySampleAmount:k}if(!d||d.length===0)return NaN;switch(X){case o.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:return w=c(d,k,K),T(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:return w=c(d,k,K),_(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_ARITHMETIC_MEAN:return w=c(d,k,K),u(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:return w=c(d,k,K),h(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:return w=c(d,k,K),b(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_HARMONIC_MEAN:return w=c(d,k,K),S(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.EWMA:return A(d,W,j);case o.default.THROUGHPUT_CALCULATION_MODES.ZLEMA:return w=c(d,k,K),x(d,w)}}function c(K,V,X){if(K){if(V>=K.length)V=K.length;else if(X===o.default.THROUGHPUT_TYPES.BANDWIDTH&&i.get().streaming.abr.throughput.sampleSettings.enableSampleSizeAdjustment)for(let k=1;k<V;++k){const w=K[K.length-k].value/K[K.length-k-1].value;if((w>=i.get().streaming.abr.throughput.sampleSettings.increaseScale||w<=i.get().streaming.abr.throughput.sampleSettings.decreaseScale)&&(V+=1)===K.length)break}}else V=0;return V}function T(K,V){let X=K;return V!==0&&X&&X.length!==0?(X=X.slice(-V),X.reduce(((k,w)=>k+w.value),0)/X.length):NaN}function _(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;return X.reduce(((w,d)=>{let C=Math.sqrt(d.downloadedBytes);return k+=C,w+d.value*C}),0)/k}function u(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;return X.reduce(((w,d,C)=>{let W=C+1;return k+=W,w+d.value*W}),0)/k}function h(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);const k=X.reduce(((w,d)=>w+1/d.value),0);return X.length/k}function b(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;const w=X.reduce(((d,C)=>{let W=Math.sqrt(C.downloadedBytes);return k+=W,d+1/C.value*W}),0);return k/w}function S(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;const w=X.reduce(((d,C,W)=>{let j=W+1;return k+=j,d+1/C.value*j}),0);return k/w}function A(K,V,X=!0){if(!K||K.totalWeight<=0)return NaN;const k=K.fastEstimate/(1-Math.pow(.5,K.totalWeight/V.fast)),w=K.slowEstimate/(1-Math.pow(.5,K.totalWeight/V.slow));return X?Math.min(k,w):Math.max(k,w)}function x(K,V){if(V===0||!K||K.length===0)return NaN;let X=K.slice(-V).map((C=>C.value)),k=2/(X.length+1),w=X[X.length-1],d=X[X.length-1];for(let C=0;C<X.length;C++)w=k*X[C]+(1-k)*w,d=k*w+(1-k)*d;return d}function D(K,V=null,X=NaN){const k=g(o.default.THROUGHPUT_TYPES.BANDWIDTH,K,V,X);return Math.round(k)}const H={getArithmeticMean:T,getAverageLatency:function(K,V=null,X=NaN){const k=g(o.default.THROUGHPUT_TYPES.LATENCY,K,V,X);return Math.round(k)},getAverageThroughput:D,getByteSizeWeightedArithmeticMean:_,getByteSizeWeightedHarmonicMean:b,getDateWeightedArithmeticMean:u,getDateWeightedHarmonicMean:S,getEwma:A,getHarmonicMean:h,getRawThroughputData:function(K){return K?n.getThroughputDict(K):[]},getSafeAverageThroughput:function(K,V=null,X=NaN){let k=D(K,V,X);return isNaN(k)||(k*=i.get().streaming.abr.throughput.bandwidthSafetyFactor),k},getZlema:x,initialize:function(){n=Cd(t).create({settings:i}),e.on(P.default.METRIC_ADDED,m,H),window.performance?.addEventListener?.("resourcetimingbufferfull",l)},reset:function(){n.reset(),e.off(P.default.METRIC_ADDED,m,H),window.performance?.removeEventListener?.("resourcetimingbufferfull",l)},setConfig:function(K){K.settings&&(i=K.settings),K.playbackController&&(r=K.playbackController)}};return H}Go.__dashjs_factory_name="ThroughputController";var xd=ie.default.getSingletonFactory(Go);function Ho(){const t=this.context,e=(0,ee.default)(t).getInstance(),n=(0,Z.default)(t).getInstance();let r,i,l,m;function g(D){m=D}function c(D,H,K,V){let X,k=H.adaptation.period.mpd;const w=k.availabilityStartTime;if(V)X=K&&k.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(w.getTime()+1e3*(D+k.timeShiftBufferDepth)):k.availabilityEndTime;else if(K){const d=H.availabilityTimeOffset;X=new Date(w.getTime()+1e3*(D-d))}else X=w;return X}function T(D,H){return(D.getTime()-H.mpd.availabilityStartTime.getTime()+1e3*m)/1e3}function _(D,H){return D+(H.adaptation.period.start-H.presentationTimeOffset)}function u(D){const H={start:NaN,end:NaN},K=D[0].getAdapter().getRegularPeriods()[0],V=T(new Date,K);if(!D||D.length===0)return{range:H,now:V};D.forEach((k=>{let w=k.getCurrentRepresentationForType(o.default.VIDEO);if(w||(w=k.getCurrentRepresentationForType(o.default.AUDIO)),!w){const C=k.getAdapter(),W=C.getMediaInfoForType(k.getStreamInfo(),o.default.VIDEO)||C.getMediaInfoForType(k.getStreamInfo(),o.default.AUDIO);w=C.getVoRepresentations(W)[0]}let d={start:NaN,end:NaN};if(w)if(w.segmentInfoType===re.default.SEGMENT_TIMELINE)d=(function(C){const W=C.adaptation.period.mpd.manifest.Period[C.adaptation.period.index].AdaptationSet[C.adaptation.index],j=i.getRepresentationFor(C.index,W),ae=j.SegmentTemplate||j.SegmentList,ne=ae.SegmentTimeline,de=ae.timescale,pe=ne.S,ce={start:0,end:0},I=pe[0].t,F=!isNaN(I),Q=F?I:0;let G,v,B,O,te=0;for(F&&(ce.start=_(Q/de,C)),B=0,O=pe.length;B<O;B++)G=pe[B],v=0,G.hasOwnProperty("r")&&(v=G.r),te+=G.d*(1+v);return ce.end=_((Q+te)/de,C),ce})(w);else{const C=w.adaptation.period;d.start=C.start,d.end=Math.max(V,C.start+C.duration)}!isNaN(d.start)&&(isNaN(H.start)||H.start>d.start)&&(H.start=d.start),!isNaN(d.end)&&(isNaN(H.end)||H.end<d.end)&&(H.end=d.end)})),H.end=Math.min(V,H.end);const X=b(D,H.end,!0);return H.end=isNaN(X)?H.end:X,H.start=K&&K.mpd&&K.mpd.timeShiftBufferDepth&&!isNaN(K.mpd.timeShiftBufferDepth)&&!isNaN(H.end)?Math.max(H.end-K.mpd.timeShiftBufferDepth,H.start):H.start,H.start=b(D,H.start),{range:H,now:V}}function h(D,H){l=D-H.end}function b(D,H,K=!1){try{let V=0,X=!1,k=NaN;for(;!X&&V<D.length;){const w=D[V].getStreamInfo();w.start<=H&&(!isFinite(w.duration)||w.start+w.duration>=H)?(k=H,X=!0):!K&&w.start>H&&(isNaN(k)||w.start<k)?k=w.start:K&&w.start+w.duration<H&&(isNaN(k)||w.start+w.duration>k)&&(k=w.start+w.duration),V+=1}return k}catch{return H}}function S(D){D.offset===void 0||isNaN(D.offset)||g(D.offset/1e3)}function A(){m=0,l=0}function x(){e.off(p.default.UPDATE_TIME_SYNC_OFFSET,S,this),A()}return r={calcAvailabilityEndTimeFromPresentationTime:function(D,H,K){return c(D,H,K,!0)},calcAvailabilityStartTimeFromPresentationTime:function(D,H,K){return c(D,H,K)},calcMediaTimeFromPresentationTime:function(D,H){return D-H.adaptation.period.start+H.presentationTimeOffset},calcPeriodRelativeTimeFromMpdRelativeTime:function(D,H){return H-D.adaptation.period.start},calcPresentationTimeFromMediaTime:_,calcPresentationTimeFromWallTime:T,calcTimeShiftBufferWindow:function(D,H){if(!H)return(function(K){const V={start:NaN,end:NaN};let X=0,k=NaN;return K.forEach((w=>{const d=w.getStreamInfo();X+=d.duration,(isNaN(k)||d.start<k)&&(k=d.start)})),V.start=k,V.end=k+X,V})(D);if(n.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){const K=u(D);return h(K.now,K.range),K.range}return(function(K){const V={start:NaN,end:NaN};if(!K||K.length===0)return V;const X=K[0].getAdapter().getRegularPeriods()[0],k=T(new Date,X),w=X.mpd.timeShiftBufferDepth,d=isNaN(w)?0:k-w;if(V.start=b(K,d),V.end=!isNaN(V.start)&&k<V.start?k:b(K,k,!0),!isNaN(w)&&V.end<k-w&&(V.end=NaN),n.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){const C=u(K);if(C.range.end<V.start)return e.trigger(P.default.CONFORMANCE_VIOLATION,{level:Wa.LEVELS.WARNING,event:Wa.EVENTS.INVALID_DVR_WINDOW}),h(C.now,C.range),C.range}return V})(D)},calcWallTimeForSegment:function(D,H){let K,V,X;return H&&(K=D.representation.adaptation.period.mpd.suggestedPresentationDelay,V=D.presentationStartTime+K,X=new Date(D.availabilityStartTime.getTime()+1e3*V)),X},getClientReferenceTime:function(){return Date.now()-1e3*l+1e3*m},getClientTimeOffset:function(){return m},initialize:function(){A(),e.on(p.default.UPDATE_TIME_SYNC_OFFSET,S,this)},reset:x,setClientTimeOffset:g,setConfig:function(D){D&&D.dashManifestModel&&(i=D.dashManifestModel)}},i=In(t).getInstance(),x(),r}Ho.__dashjs_factory_name="TimelineConverter";var Dd=ie.default.getSingletonFactory(Ho),Md=class{constructor(){this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}};function Yo(){let t,e;return t={initialize:function(n){if(e=new Md,!n)return null;const r=n.indexOf("#");if(r!==-1){const i=n.substr(r+1).split("&");for(let l=0,m=i.length;l<m;++l){const g=i[l],c=g.indexOf("=");if(c!==-1){const T=g.substring(0,c);e.hasOwnProperty(T)&&(e[T]=g.substr(c+1))}}}},getURIFragmentData:function(){return e}},t}Yo.__dashjs_factory_name="URIFragmentModel";var Pd=ie.default.getSingletonFactory(Yo);const Od=new Map([[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function Vo(){let t,e,n,r,i,l,m,g,c,T,_;const u=this.context,h=(0,ee.default)(u).getInstance(),b=[];function S(W,j=!1){r&&(j?r.playbackRate=W:C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,(()=>{r.playbackRate=W})))}function A(){return b.length>0}function x(W){let j=b.indexOf(W);if(W!==null&&(j!==-1&&b.splice(j,1),n.get().streaming.buffer.syntheticStallEvents.enabled&&r&&!A())){const ae=()=>{if(S(T||1,n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState),!r.paused){const ne=document.createEvent("Event");ne.initEvent("playing",!0,!1),r.dispatchEvent(ne)}};n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState?ae():(m&&m.func&&m.event&&K(m.event,m.func),m=C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,ae))}}function D(){if(r&&A()&&r.playbackRate===0){const W=document.createEvent("Event");W.initEvent("waiting",!0,!1),r.dispatchEvent(W)}}function H(W,j){r&&r.addEventListener(W,j)}function K(W,j){r&&r.removeEventListener(W,j)}function V(){return r?r.readyState:NaN}function X(){return r?r.buffered:null}function k(){return r?r.clientWidth:NaN}function w(){return r?r.clientHeight:NaN}function d(W,j,ae,ne,de){if(r){for(let pe=0;pe<r.textTracks.length;pe++)if(r.textTracks[pe].kind===W&&(!j||r.textTracks[pe].label==j)&&r.textTracks[pe].language===ae&&r.textTracks[pe].isTTML===ne&&r.textTracks[pe].isEmbedded===de)return r.textTracks[pe]}return null}function C(W,j){return W===o.default.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||V()>=W?(j(),null):(function(ae,ne){const de=()=>{K(ae,de),ne(ae)};return H(ae,de),{func:de,event:ae}})(Od.get(W),j)}return t={addEventListener:H,addTextTrack:function(W,j,ae,ne,de){if(!r)return null;let pe=d(W,j,ae,ne,de);return pe||(pe=r.addTextTrack(W,j,ae),pe.isEmbedded=de,pe.isTTML=ne),pe},appendChild:function(W){r&&(r.appendChild(W),W.isTTML!==void 0&&(r.textTracks[r.textTracks.length-1].isTTML=W.isTTML,r.textTracks[r.textTracks.length-1].isEmbedded=W.isEmbedded))},getBufferRange:X,getClientHeight:w,getClientWidth:k,getElement:function(){return r},getEnded:function(){return r?r.ended:null},getPlaybackQuality:function(){if(!r)return null;let W="webkitDroppedFrameCount"in r&&"webkitDecodedFrameCount"in r,j=null;return"getVideoPlaybackQuality"in r?j=r.getVideoPlaybackQuality():W&&(j={droppedVideoFrames:r.webkitDroppedFrameCount,totalVideoFrames:r.webkitDroppedFrameCount+r.webkitDecodedFrameCount,creationTime:new Date}),j},getPlaybackRate:function(){return r?r.playbackRate:null},getPlayedRanges:function(){return r?r.played:null},getReadyState:V,getSource:function(){return r?r.src:null},getTTMLRenderingDiv:function(){return g},getTextTrack:d,getTextTracks:function(){return r?r.textTracks:[]},getTime:function(){return r?isNaN(i)?r.currentTime:i:null},getVideoElementSize:function(){const W=n.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;return{elementWidth:k()*W,elementHeight:w()*W}},getVideoHeight:function(){return r?r.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(r){const W=r.parentNode.host||r.parentNode;return W?r.getBoundingClientRect().left-W.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(r){const W=r.parentNode.host||r.parentNode;return W?r.getBoundingClientRect().top-W.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return r?r.videoWidth:NaN},getVttRenderingDiv:function(){return c},initialize:function(){h.on(p.default.PLAYBACK_PLAYING,D,this)},isPaused:function(){return r?r.paused:null},isSeeking:function(){return r?r.seeking||!isNaN(i):null},isStalled:A,pause:function(){r&&(r.pause(),r.autoplay=!1)},play:function(){if(r){r.autoplay=!0;const W=r.play();W&&W.catch&&typeof Promise<"u"&&W.catch((j=>{j.name==="NotAllowedError"&&h.trigger(p.default.PLAYBACK_NOT_ALLOWED),e.warn(`Caught pending play exception - continuing (${j})`)}))}},removeChild:function(W){r&&r.removeChild(W)},removeEventListener:K,reset:function(){clearTimeout(_),h.off(p.default.PLAYBACK_PLAYING,D,this),b.length=0},setConfig:function(W){W&&W.settings&&(n=W.settings)},setCurrentTime:function(W,j){r&&(l&&l.func&&l.event&&K(l.event,l.func),i=W,l=C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(()=>{if(r)if(r.currentTime!==i)try{i=j?(function(ae){const ne=X();let de=ae,pe=9999999999;if(ne)for(let ce=0;ce<ne.length;ce++){const I=ne.start(ce),F=ne.end(ce),Q=Math.abs(I-ae),G=Math.abs(F-ae);if(ae>=I&&ae<=F)return ae;Q<pe&&(pe=Q,de=I),G<pe&&(pe=G,de=F)}return de})(i):i,isNaN(i)||(r.currentTime=i),i=NaN}catch(ae){r.readyState===0&&ae.code===ae.INVALID_STATE_ERR&&(_=setTimeout((function(){r.currentTime=i,i=NaN}),400))}else i=NaN})))},setDisableRemotePlayback:function(W){r&&(r.disableRemotePlayback=W)},setElement:function(W){if(!(W==null||W&&/^(VIDEO|AUDIO)$/i.test(W.nodeName)))throw"element is not video or audio DOM type!";r=W},setPlaybackRate:S,setSource:function(W){r&&(W?r.src=W:(r.removeAttribute("src"),r.load()))},setStallState:function(W,j){(function(ae,ne){ne?(function(de){if(de!==null&&r&&!r.seeking&&b.indexOf(de)===-1&&(b.push(de),n.get().streaming.buffer.syntheticStallEvents.enabled&&r&&b.length===1&&(n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState||V()>=o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA))){T=r.playbackRate,S(0,!0);const pe=document.createEvent("Event");pe.initEvent("waiting",!0,!1),r.dispatchEvent(pe)}})(ae):x(ae)})(W,j)},setTTMLRenderingDiv:function(W){g=W,g.style.position="absolute",g.style.display="flex",g.style.overflow="hidden",g.style.pointerEvents="none",g.style.top=0,g.style.left=0},setVttRenderingDiv:function(W){c=W},waitForReadyState:C},e=(0,R.default)(u).getInstance().getLogger(t),n=(0,Z.default)(u).getInstance(),i=NaN,t}Vo.__dashjs_factory_name="VideoModel";var zd=ie.default.getSingletonFactory(Vo),Ld=oe(8986);function mi(){const t="You must first call initialize() and set a source before calling this method",e="You must first call initialize() and set a valid source and view before calling this method",n="You must first call attachView() to set the video element before calling this method",r="You must first call attachSource() with a valid source before calling this method",i="MediaPlayer not initialized!",l=this.context,m=(0,ee.default)(l).getInstance();let g=(0,Z.default)(l).getInstance();const c=(0,R.default)(l).getInstance({settings:g});let T,_,u,h,b,S,A,x,D,H,K,V,X,k,w,d,C,W,j,ae,ne,de,pe,ce,I,F,Q,G,v,B,O,te,J,le,he,me,xe,We,nt,ut,Ut;function Qe(){it(null),Ye(null),h=null,w&&(w.reset(),w=null),d&&(d.reset(),d=null),ne&&ne.reset(),g.reset(),W&&(W.reset(),W=null)}function wt(){return!!u&&!!xe.getElement()}function Qt(){return(0,Ld.getVersionString)()}function yn(){if(!A)throw e;return v.isPaused()}function hn(){if(!A)throw e;return v.getIsDynamic()}function tn(fe){const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);return bt?sn(bt.range.start+fe,bt):0}function sn(fe,qe){let bt=v.getOriginalLiveDelay();return fe>qe.range.end-bt&&(fe=qe.range.end-bt),fe}function Ce(fe=""){if(!A)throw e;let qe=zt().currentTime;return fe!==""&&(qe=F.getTimeRelativeToStreamId(qe,fe)),qe}function tt(fe){(0,et.checkParameterType)(fe,"boolean"),x=fe}function Xe(){ne.restoreDefaultUTCTimingSources()}function ot(){return J}function zt(){if(!xe.getElement())throw n;return xe.getElement()}function Ye(fe){if(!b)throw i;xe.setElement(fe),fe&&(Le(),(function(){if(d||typeof dashjs>"u")return;let qe=dashjs.MetricsReporting;typeof qe=="function"&&(d=qe(l).create().createMetricsReporting({debug:c,eventBus:m,mediaElement:zt(),adapter:j,dashMetrics:J,mediaPlayerModel:ae,events:p.default,constants:o.default,metricsConstants:y}))})(),(function(){if(C||typeof dashjs>"u")return;let qe=dashjs.MssHandler;typeof qe=="function"&&(qt.extend(qe.errors),C=qe(l).create({eventBus:m,mediaPlayerModel:ae,dashMetrics:J,manifestModel:le,playbackController:v,streamController:F,protectionController:w,baseURLController:pe,errHandler:de,events:p.default,constants:o.default,debug:c,initSegmentType:Ae.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:Je,ISOBoxer:sr,settings:g}))})(),F&&F.switchToVideoElement(D)),A&&(_e(),Be()),ht(D)}function ft(fe){if(!S)throw t;let qe=F.getActiveStreamInfo();return qe?k.getTracksFor(fe,qe.id).filter((bt=>!w||w.areKeyIdsUsable(bt.normalizedKeyIds))):[]}function it(fe,qe=NaN){if(!b)throw i;typeof fe=="string"&&We.initialize(fe),qe==null&&(qe=NaN),isNaN(qe)||(qe=Math.max(0,qe)),D=qe,u=fe,(S||A)&&(_e(),Be()),wt()&&ht(D)}function vt(){if(!S)throw t;let fe=F.getActiveStreamInfo();return fe?F.getStreamById(fe.id):null}function _e(){A=!1,S=!1,j.reset(),F.reset(),G.reset(),te.reset(),v.reset(),B.reset(),O.reset(),H.reset(),K.reset(),k.reset(),ut.reset(),w&&(g.get().streaming.protection.keepProtectionMediaKeys?w.stop():(w.reset(),w=null,Le())),Q.reset(),he.reset(),me.reset()}function Be(){ne.resetPlaybackSessionSpecificSettings()}function at(){return Eu(l).create({debug:c,errHandler:de,dashMetrics:J,mediaPlayerModel:ae,mssHandler:C,settings:g})}function Le(){if(w)return w;if(typeof dashjs>"u")return null;let fe=dashjs.Protection;if(typeof fe=="function"){let qe=fe(l).create();return p.default.extend(fe.events),P.default.extend(fe.events,{publicOnly:!0}),qt.extend(fe.errors),w=qe.createProtectionSystem({debug:c,errHandler:de,videoModel:xe,customParametersModel:ne,capabilities:ce,eventBus:m,events:p.default,BASE64:Je,constants:o.default,cmcdModel:he,settings:g}),ce||(ce=(0,Ji.default)(l).getInstance()),ce.setProtectionController(w),w}return null}function dt(){if(!b)throw i;if(W)return W;if(typeof dashjs>"u")return null;let fe=dashjs.OfflineController;if(typeof fe=="function"){p.default.extend(fe.events),P.default.extend(fe.events,{publicOnly:!0}),qt.extend(fe.errors);const qe=at(),bt=xl(l).create();return bt.setConfig({manifestModel:le,adapter:j,manifestLoader:qe,errHandler:de,contentSteeringController:O}),W=fe(l).create({debug:c,manifestUpdater:bt,baseURLController:pe,manifestLoader:qe,manifestModel:le,mediaPlayerModel:ae,abrController:H,playbackController:v,adapter:j,errHandler:de,dashMetrics:J,timelineConverter:X,segmentBaseController:ut,schemeLoaderFactory:V,eventBus:m,events:p.default,errors:qt,constants:o.default,settings:g,dashConstants:re.default,urlUtils:xn(l).getInstance()}),W}return null}function ht(fe=NaN){W&&W.resetRecords(),!S&&u&&(S=!0,_.info("Streaming Initialized"),(function(){const qe=at();F||(F=Ro(l).getInstance()),Q||(Q=Nd(l).create({errHandler:de,manifestModel:le,adapter:j,mediaController:k,baseURLController:pe,videoModel:xe,settings:g})),I.setConfig({capabilities:ce,customParametersModel:ne,adapter:j,settings:g,protectionController:w,manifestModel:le,errHandler:de}),F.setConfig({capabilities:ce,capabilitiesFilter:I,manifestLoader:qe,manifestModel:le,mediaPlayerModel:ae,customParametersModel:ne,protectionController:w,textController:Q,adapter:j,dashMetrics:J,errHandler:de,timelineConverter:X,videoModel:xe,playbackController:v,serviceDescriptionController:B,contentSteeringController:O,abrController:H,throughputController:K,mediaController:k,settings:g,baseURLController:pe,uriFragmentModel:We,segmentBaseController:ut}),G.setConfig({settings:g,playbackController:v,streamController:F,videoModel:xe,timelineConverter:X,adapter:j}),v.setConfig({streamController:F,serviceDescriptionController:B,dashMetrics:J,adapter:j,videoModel:xe,timelineConverter:X,settings:g}),te.setConfig({streamController:F,playbackController:v,mediaPlayerModel:ae,videoModel:xe,settings:g}),K.setConfig({settings:g,playbackController:v}),H.setConfig({streamController:F,capabilities:ce,domStorage:nt,mediaPlayerModel:ae,customParametersModel:ne,throughputController:K,cmsdModel:me,dashMetrics:J,adapter:j,videoModel:xe,settings:g}),he.setConfig({abrController:H,dashMetrics:J,playbackController:v,serviceDescriptionController:B,throughputController:K}),Ut.setConfig({serviceDescriptionController:B}),me.setConfig({}),k.initialize(),K.initialize(),H.initialize(),F.initialize(x,h),Q.initialize(),G.initialize(),te.initialize(),he.initialize(x),me.initialize(),O.initialize(),ut.initialize()})(),typeof u=="string"?F.load(u,fe):F.loadWithManifest(u,fe)),!A&&wt()&&(A=!0,m.trigger(P.default.PLAYBACK_INITIALIZED),_.info("Playback Initialized"))}return T={addABRCustomRule:function(fe,qe,bt){ne.addAbrCustomRule(fe,qe,bt)},addExternalSubtitle:function(fe){fe instanceof nu.default||_.error("Invalid external subtitle object. Must be an instance of dashjs.ExternalSubtitle"),ne.addExternalSubtitle(fe)},addRequestInterceptor:function(fe){ne.addRequestInterceptor(fe)},addResponseInterceptor:function(fe){ne.addResponseInterceptor(fe)},addUTCTimingSource:function(fe,qe){ne.addUTCTimingSource(fe,qe)},attachProtectionController:function(fe){w=fe},attachSource:it,attachTTMLRenderingDiv:function(fe){if(!xe.getElement())throw n;xe.setTTMLRenderingDiv(fe)},attachView:Ye,attachVttRenderingDiv:function(fe){if(!xe.getElement())throw n;xe.setVttRenderingDiv(fe)},clearDefaultUTCTimingSources:function(){ne.clearDefaultUTCTimingSources()},convertToTimeCode:function(fe){fe=Math.max(fe,0);let qe=Math.floor(fe/3600),bt=Math.floor(fe%3600/60),It=Math.floor(fe%3600%60);return(qe===0?"":qe<10?"0"+qe.toString()+":":qe.toString()+":")+(bt<10?"0"+bt.toString():bt.toString())+":"+(It<10?"0"+It.toString():It.toString())},destroy:function(){Qe(),ie.default.deleteSingletonInstances(l)},duration:function(){if(!A)throw e;let fe=zt().duration;if(v.getIsDynamic()){const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);fe=bt?bt.range.end-bt.range.start:0}return fe},enableForcedTextStreaming:function(fe){return!(!F.getActiveStreamInfo()||!Q)&&Q.enableForcedTextStreaming(fe)},enableText:function(fe){const qe=F.getActiveStreamInfo();return!(!qe||!Q)&&Q.enableText(qe.id,fe)},extend:function(fe,qe,bt){ie.default.extend(fe,qe,bt,l)},formatUTC:function(fe,qe,bt,It=!1){const dn=new Date(1e3*fe),$e=dn.toLocaleDateString(qe),Dt=dn.toLocaleTimeString(qe,{hour12:bt});return It?Dt+" "+$e:Dt},getABRCustomRules:function(){return ne.getAbrCustomRules()},getActiveStream:vt,getAutoPlay:function(){return x},getAvailableBaseUrls:function(){const fe=le.getValue();return fe?pe.getBaseUrls(fe):[]},getAvailableLocations:function(){const fe=le.getValue();if(!fe)return[];const qe=j.getLocation(fe),bt=O.getSynthesizedLocationElements(qe);return qe.concat(bt)},getAverageLatency:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getAverageLatency(fe,qe,bt):0},getAverageThroughput:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getAverageThroughput(fe,qe,bt):0},getBufferLength:function(fe){const qe=[o.default.VIDEO,o.default.AUDIO,o.default.TEXT];if(fe)return qe.indexOf(fe)!==-1?ot().getCurrentBufferLevel(fe)||NaN:(_.warn("getBufferLength requested for invalid type"),NaN);{const bt=qe.map((It=>ft(It).length>0?ot().getCurrentBufferLevel(It):Number.MAX_VALUE)).reduce(((It,dn)=>Math.min(It,dn)));return bt===Number.MAX_VALUE?NaN:bt}},getCurrentLiveLatency:function(){if(!b)throw i;return A?v.getCurrentLiveLatency():NaN},getCurrentRepresentationForType:function(fe){if(!S)throw t;if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return null;const qe=vt();if(!qe)return null;if(fe===o.default.IMAGE){const bt=qe.getThumbnailController();return bt?bt.getCurrentTrack():-1}return qe.getCurrentRepresentationForType(fe)},getCurrentSteeringResponseData:function(){if(O)return O.getCurrentSteeringResponseData()},getCurrentTextTrackIndex:function(){let fe=NaN;const qe=F.getActiveStreamInfo();if(qe&&Q)return fe=Q.getCurrentTrackIdx(qe.id),fe},getCurrentTrackFor:function(fe){if(!S)throw t;let qe=F.getActiveStreamInfo();return qe?k.getCurrentTrackFor(fe,qe.id):null},getDashAdapter:function(){return j},getDashMetrics:ot,getDebug:function(){return c},getDvrSeekOffset:tn,getDvrWindow:function(){if(!A)throw e;const fe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let qe=J.getCurrentDVRInfo(fe);if(!qe)return{};let bt=0;const It=v.getIsDynamic();return It&&(bt=qe.manifestInfo.availableFrom.getTime()/1e3),{start:qe.range.start,end:qe.range.end,startAsUtc:It?bt+qe.range.start:NaN,endAsUtc:It?bt+qe.range.end:NaN,size:qe.range.end-qe.range.start}},getExternalSubtitles:function(){ne.getExternalSubtitles()},getInitialMediaSettingsFor:function(fe){if(!b)throw i;return k.getInitialSettings(fe)},getLowLatencyModeEnabled:function(){if(!A)throw e;return v.getLowLatencyModeEnabled()},getManifest:function(){return le.getValue()},getOfflineController:function(){return dt()},getPlaybackRate:function(){return zt().playbackRate},getProtectionController:function(){return Le()},getRawThroughputData:function(fe=o.default.VIDEO){return K?K.getRawThroughputData(fe):[]},getRepresentationsByType:function(fe,qe=null){if(!S)throw t;let bt=qe?F.getStreamById(qe):vt();return bt?bt.getRepresentationsByType(fe):[]},getSafeAverageThroughput:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getSafeAverageThroughput(fe,qe,bt):0},getSettings:function(){return g.get()},getSource:function(){if(!u)throw r;return u},getStreamsFromManifest:function(fe){if(!S)throw t;return j.getStreamsInfo(fe)},getTTMLRenderingDiv:function(){return xe?xe.getTTMLRenderingDiv():null},getTargetLiveDelay:function(){if(!A)throw e;return v.getOriginalLiveDelay()},getTracksFor:ft,getTracksForTypeFromManifest:function(fe,qe,bt){if(!S)throw t;return(bt=bt||j.getStreamsInfo(qe,1)[0])?j.getAllMediaInfoForType(bt,fe,qe):[]},getVersion:Qt,getVideoElement:zt,getVolume:function(){return zt().volume},getXHRWithCredentialsForType:function(fe){return ne.getXHRWithCredentialsForType(fe)},initialize:function(fe,qe,bt,It=NaN){ce||(ce=(0,Ji.default)(l).getInstance(),ce.setConfig({settings:g,protectionController:w})),de||(de=tu(l).getInstance()),ce.supportsMediaSource()?(b||(b=!0,X=Dd(l).getInstance(),K||(K=xd(l).getInstance()),H||(H=Yn(l).getInstance()),V||(V=Yi(l).getInstance()),v||(v=Iu(l).getInstance()),k||(k=Su(l).getInstance()),F||(F=Ro(l).getInstance()),G||(G=au(l).getInstance()),te||(te=ws(l).getInstance()),B||(B=Cu(l).getInstance()),O||(O=Qr(l).getInstance()),I||(I=Ss(l).getInstance()),j=js(l).getInstance(),le=Tu(l).getInstance(),he=Ai(l).getInstance(),me=Li(l).getInstance(),Ut=ji(l).getInstance(),J=eu(l).getInstance({settings:g}),nt=ks(l).getInstance({settings:g}),j.setConfig({constants:o.default,cea608parser:new Mo,errHandler:de,BASE64:Je}),pe||(pe=Ts(l).create()),pe.setConfig({adapter:j,contentSteeringController:O}),B.setConfig({adapter:j}),ut||(ut=Ru(l).getInstance({dashMetrics:J,mediaPlayerModel:ae,errHandler:de,baseURLController:pe,events:p.default,eventBus:m,debug:c,boxParser:kr(l).getInstance(),errors:qt})),k.setConfig({domStorage:nt,settings:g,mediaPlayerModel:ae,customParametersModel:ne,videoModel:xe}),ae.setConfig({playbackController:v,serviceDescriptionController:B}),O.setConfig({adapter:j,errHandler:de,dashMetrics:J,mediaPlayerModel:ae,manifestModel:le,serviceDescriptionController:B,throughputController:K,eventBus:m}),Xe(),tt(bt===void 0||bt),dt()),fe&&Ye(fe),qe&&it(qe,It),_.info("[dash.js "+Qt()+"] MediaPlayer has been initialized")):de.error(new Ft.default(qt.CAPABILITY_MEDIASOURCE_ERROR_CODE,qt.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},isDynamic:hn,isMuted:function(){return zt().muted},isPaused:yn,isReady:wt,isSeeking:function(){if(!A)throw e;return v.isSeeking()},isTextEnabled:function(){const fe=F.getActiveStreamInfo();return!(!fe||!Q)&&Q.isTextEnabled(fe)},off:function(fe,qe,bt){m.off(fe,qe,bt)},on:function(fe,qe,bt,It){m.on(fe,qe,bt,It)},pause:function(){if(!A)throw e;v.pause()},play:function(){if(!A)throw e;(!x||yn()&&A)&&v.play(!0)},preload:function(){if(!xe.getElement()&&!S){if(!u)throw r;ht(D)}},provideThumbnail:function(fe,qe){if(typeof qe!="function")return;if(fe<0)return void qe(null);const bt=v.getIsDynamic()?tn(fe):fe,It=F.getStreamForTime(bt);if(It===null)return void qe(null);const dn=It.getThumbnailController();if(dn)return dn.provide(bt,qe);qe(null)},refreshManifest:function(fe){if(!b)throw i;if(!wt())return fe(null,r);let qe=this;if(typeof fe=="function"){const bt=function(It){m.off(p.default.INTERNAL_MANIFEST_LOADED,bt,qe),It.error?fe(null,It.error):fe(It.manifest)};m.on(p.default.INTERNAL_MANIFEST_LOADED,bt,qe)}F.refreshManifest()},registerCustomCapabilitiesFilter:function(fe){ne.registerCustomCapabilitiesFilter(fe)},registerLicenseRequestFilter:function(fe){ne.registerLicenseRequestFilter(fe)},registerLicenseResponseFilter:function(fe){ne.registerLicenseResponseFilter(fe)},removeABRCustomRule:function(fe){ne.removeAbrCustomRule(fe)},removeAllABRCustomRule:function(){ne.removeAllAbrCustomRule()},removeExternalSubtitleById:function(fe){ne.removeExternalSubtitleById(fe)},removeExternalSubtitleByUrl:function(fe){ne.removeExternalSubtitleByUrl(fe)},removeRequestInterceptor:function(fe){ne.removeRequestInterceptor(fe)},removeResponseInterceptor:function(fe){ne.removeResponseInterceptor(fe)},removeUTCTimingSource:function(fe,qe){ne.removeUTCTimingSource(fe,qe)},reset:Qe,resetCustomInitialTrackSelectionFunction:function(){ne.resetCustomInitialTrackSelectionFunction(null)},resetSettings:function(){g.reset()},restoreDefaultUTCTimingSources:Xe,retrieveManifest:function(fe,qe){let bt=at(),It=this;const dn=function($e){$e.error?qe(null,$e.error):qe($e.manifest),m.off(p.default.INTERNAL_MANIFEST_LOADED,dn,It),bt.reset()};m.on(p.default.INTERNAL_MANIFEST_LOADED,dn,It),We.initialize(fe),bt.load(fe)},seek:function(fe){if(!A)throw e;if((0,et.checkParameterType)(fe,"number"),isNaN(fe))throw o.default.BAD_ARGUMENT_ERROR;fe<0&&(fe=0);let qe=v.getIsDynamic()?tn(fe):fe;const bt=zt();!v.getIsDynamic()&&bt.duration&&(qe=Math.min(bt.duration,qe)),v.seek(qe,!1,!1,!0)},seekToOriginalLive:function(){A&&hn()&&v.seekToOriginalLive()},seekToPresentationTime:function(fe){if(!A)throw e;if((0,et.checkParameterType)(fe,"number"),isNaN(fe))throw o.default.BAD_ARGUMENT_ERROR;fe<0&&(fe=0);const qe=zt();if(!v.getIsDynamic()&&qe.duration&&(fe=Math.min(qe.duration,fe)),v.getIsDynamic()){const bt=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let It=J.getCurrentDVRInfo(bt);if(!It)return;(fe=sn(fe,It))<It.range.start&&(fe=It.range.start)}v.seek(fe,!1,!1,!0)},setAutoPlay:tt,setConfig:function(fe){fe&&(fe.capabilities&&(ce=fe.capabilities),fe.capabilitiesFilter&&(I=fe.capabilitiesFilter),fe.streamController&&(F=fe.streamController),fe.textController&&(Q=fe.textController),fe.gapController&&(G=fe.gapController),fe.throughputController&&(K=fe.throughputController),fe.playbackController&&(v=fe.playbackController),fe.serviceDescriptionController&&(B=fe.serviceDescriptionController),fe.contentSteeringController&&(O=fe.contentSteeringController),fe.clientDataReportingController&&(Ut=fe.clientDataReportingController),fe.catchupController&&(te=fe.catchupController),fe.mediaPlayerModel&&(ae=fe.mediaPlayerModel),fe.customParametersModel&&(ne=fe.customParametersModel),fe.abrController&&(H=fe.abrController),fe.schemeLoaderFactory&&(V=fe.schemeLoaderFactory),fe.mediaController&&(k=fe.mediaController),fe.settings&&(g=fe.settings),fe.dashMetrics&&(J=fe.dashMetrics))},setCurrentTrack:function(fe,qe=!1){if(!S)throw t;!w||w.areKeyIdsUsable(fe.normalizedKeyIds)?k.setTrack(fe,{noSettingsSave:qe}):_.error(`Can not switch to track with index ${fe.index} because key is not usable`)},setCustomInitialTrackSelectionFunction:function(fe){ne.setCustomInitialTrackSelectionFunction(fe)},setInitialMediaSettingsFor:function(fe,qe){if(!b)throw i;let bt=(function(It){const dn=g.get().streaming.defaultSchemeIdUri;let $e={};function Dt(nn,en,mn){let rn={};if(en){if(en instanceof Array)throw"Array type not supported for settings!";return en instanceof Object?(rn.schemeIdUri=en.schemeIdUri?en.schemeIdUri:"",rn.value=en.value?en.value:""):(rn.schemeIdUri=mn,rn.value=en,_.warn("No schemeIdUri provided for "+nn+', using default "'+mn+'"')),rn}return null}return It.id!==void 0&&($e.id=It.id),It.lang!==void 0&&($e.lang=It.lang),isNaN(It.index)||($e.index=It.index),It.viewpoint!==void 0&&($e.viewpoint=Dt("viewpoint",It.viewpoint,dn.viewpoint)),It.audioChannelConfiguration!==void 0&&($e.audioChannelConfiguration=Dt("audioChannelConfiguration",It.audioChannelConfiguration,dn.audioChannelConfiguration)),It.role!==void 0&&It.role!==null&&($e.role=Dt("role",It.role,dn.role),$e.role.schemeIdUri===o.default.DASH_ROLE_SCHEME_ID&&$e.role.value==="Main"&&($e.role.value=re.default.MAIN)),It.accessibility!==void 0&&($e.accessibility=Dt("accessibility",It.accessibility,dn.accessibility)),$e})(qe);k.setInitialSettings(fe,bt)},setMute:function(fe){(0,et.checkParameterType)(fe,"boolean"),zt().muted=fe},setPlaybackRate:function(fe){zt().playbackRate=fe},setProtectionData:function(fe){h=fe,F&&F.setProtectionData(h)},setRepresentationForTypeById:function(fe,qe,bt=!1){if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return;if(!S)throw t;const It=vt();if(It)if(fe===o.default.IMAGE){const dn=It.getThumbnailController();dn&&dn.setTrackById(qe)}else{const dn=It.getRepresentationForTypeById(fe,qe);dn&&H.manuallySetPlaybackQuality(fe,F.getActiveStreamInfo(),dn,{forceReplace:bt})}},setRepresentationForTypeByIndex:function(fe,qe,bt=!1){if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return;if(!S)throw t;const It=vt();if(It)if(fe===o.default.IMAGE){const dn=It.getThumbnailController();dn&&dn.setTrackByIndex(qe)}else{const dn=It.getRepresentationForTypeByIndex(fe,qe);dn&&H.manuallySetPlaybackQuality(fe,F.getActiveStreamInfo(),dn,{forceReplace:bt})}},setTextTrack:function(fe){if(!A)throw e;const qe=F.getActiveStreamInfo();qe&&Q&&Q.setTextTrack(qe.id,fe)},setVolume:function(fe){if(typeof fe!="number"||isNaN(fe)||fe<0||fe>1)throw o.default.BAD_ARGUMENT_ERROR;zt().volume=fe},setXHRWithCredentialsForType:function(fe,qe){ne.setXHRWithCredentialsForType(fe,qe)},time:Ce,timeAsUTC:function(){if(!A)throw e;if(!v.getIsDynamic()||Ce()<0)return NaN;const fe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let qe,bt,It=J.getCurrentDVRInfo(fe);return It?(qe=It.manifestInfo.availableFrom.getTime()/1e3,bt=qe+Ce(),bt):0},timeInDvrWindow:function(){if(!A)throw e;if(!v.getIsDynamic())return Ce();let fe=zt().currentTime;const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);return fe=bt===null||fe===0?0:Math.max(0,fe-bt.range.start),fe},trigger:function(fe,qe,bt){m.trigger(fe,qe,bt)},triggerSteeringRequest:function(){if(O)return O.loadSteeringData()},unregisterCustomCapabilitiesFilter:function(fe){ne.unregisterCustomCapabilitiesFilter(fe)},unregisterLicenseRequestFilter:function(fe){ne.unregisterLicenseRequestFilter(fe)},unregisterLicenseResponseFilter:function(fe){ne.unregisterLicenseResponseFilter(fe)},updateSettings:function(fe){g.update(fe)},updateSource:function(fe){u=fe,F.load(u)}},_=c.getLogger(T),b=!1,A=!1,S=!1,x=!0,D=NaN,w=null,W=null,h=null,j=null,ut=null,p.default.extend(P.default),ae=wu(l).getInstance(),ne=(0,Kr.default)(l).getInstance(),xe=zd(l).getInstance(),We=Pd(l).getInstance(),T}mi.__dashjs_factory_name="MediaPlayer";const Or=ie.default.getClassFactory(mi);Or.events=P.default,Or.errors=qt,ie.default.updateClassFactory(mi.__dashjs_factory_name,Or);var Fd=Or},1191:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.AST_IN_FUTURE="astInFuture",this.BASE_URLS_UPDATED="baseUrlsUpdated",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",this.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",this.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",this.DYNAMIC_TO_STATIC="dynamicToStatic",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADING_STARTED="manifestLoadingStarted",this.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.NEW_TRACK_SELECTED="newTrackSelected",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_UPDATED="streamUpdated",this.STREAM_ACTIVATED="streamActivated",this.STREAM_DEACTIVATED="streamDeactivated",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.CUE_ENTER="cueEnter",this.CUE_EXIT="cueExit",this.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.CAN_PLAY_THROUGH="canPlayThrough",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_INITIALIZED="playbackInitialized",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_LOADED_DATA="playbackLoadedData",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",this.EVENT_MODE_ON_START="eventModeOnStart",this.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",this.CONFORMANCE_VIOLATION="conformanceViolation",this.REPRESENTATION_SWITCH="representationSwitch",this.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",this.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",this.INBAND_PRFT="inbandPrft",this.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",this.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming"}}let y=new N;Oe.default=y},5212:function(kt,Oe,oe){oe.r(Oe),Oe.default={STREAM:"stream",VIDEO:"video",ENHANCEMENT:"enhancement",AUDIO:"audio",TEXT:"text",MUXED:"muxed",IMAGE:"image",STPP:"stpp",TTML:"ttml",VTT:"vtt",WVTT:"wvtt",CONTENT_STEERING:"contentSteering",LIVE_CATCHUP_MODE_DEFAULT:"liveCatchupModeDefault",LIVE_CATCHUP_MODE_LOLP:"liveCatchupModeLoLP",MOVING_AVERAGE_SLIDING_WINDOW:"slidingWindow",MOVING_AVERAGE_EWMA:"ewma",BAD_ARGUMENT_ERROR:"Invalid Arguments",MISSING_CONFIG_ERROR:"Missing config parameter(s)",TRACK_SWITCH_MODE_ALWAYS_REPLACE:"alwaysReplace",TRACK_SWITCH_MODE_NEVER_REPLACE:"neverReplace",TRACK_SELECTION_MODE_FIRST_TRACK:"firstTrack",TRACK_SELECTION_MODE_HIGHEST_BITRATE:"highestBitrate",TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:"highestEfficiency",TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:"lowestStartupDelay",TRACK_SELECTION_MODE_WIDEST_RANGE:"widestRange",CMCD_QUERY_KEY:"CMCD",CMCD_MODE_QUERY:"query",CMCD_MODE_HEADER:"header",CMCD_AVAILABLE_KEYS:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"],CMCD_V2_AVAILABLE_KEYS:["msd","ltc"],CMCD_AVAILABLE_REQUESTS:["segment","mpd","xlink","steering","other"],INITIALIZE:"initialize",TEXT_SHOWING:"showing",TEXT_HIDDEN:"hidden",TEXT_DISABLED:"disabled",ACCESSIBILITY_CEA608_SCHEME:"urn:scte:dash:cc:cea-608:2015",CC1:"CC1",CC3:"CC3",UTF8:"utf-8",SCHEME_ID_URI:"schemeIdUri",START_TIME:"starttime",SERVICE_DESCRIPTION_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:scope:2019",SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:critical:2019",CTA_5004_2023_SCHEME:"urn:mpeg:dash:cta-5004:2023",THUMBNAILS_SCHEME_ID_URIS:["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"],FONT_DOWNLOAD_DVB_SCHEME:"urn:dvb:dash:fontdownload:2014",COLOUR_PRIMARIES_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:ColourPrimaries",URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2014",EXT_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2016",MATRIX_COEFFICIENTS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:MatrixCoefficients",TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:TransferCharacteristics",SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI:"urn:mpeg:dash:ssr:2023",HDR_METADATA_FORMAT_SCHEME_ID_URI:"urn:dvb:dash:hdr-dmi",HDR_METADATA_FORMAT_VALUES:{ST2094_10:"ST2094-10",SL_HDR2:"SL-HDR2",ST2094_40:"ST2094-40"},MEDIA_CAPABILITIES_API:{COLORGAMUT:{SRGB:"srgb",P3:"p3",REC2020:"rec2020"},TRANSFERFUNCTION:{SRGB:"srgb",PQ:"pq",HLG:"hlg"},HDR_METADATATYPE:{SMPTE_ST_2094_10:"smpteSt2094-10",SLHDR2:"slhdr2",SMPTE_ST_2094_40:"smpteSt2094-40"}},XML:"XML",ARRAY_BUFFER:"ArrayBuffer",DVB_REPORTING_URL:"dvb:reportingUrl",DVB_PROBABILITY:"dvb:probability",OFF_MIMETYPE:"application/font-sfnt",WOFF_MIMETYPE:"application/font-woff",VIDEO_ELEMENT_READY_STATES:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},FILE_LOADER_TYPES:{FETCH:"fetch_loader",XHR:"xhr_loader"},THROUGHPUT_TYPES:{LATENCY:"throughput_type_latency",BANDWIDTH:"throughput_type_bandwidth"},THROUGHPUT_CALCULATION_MODES:{EWMA:"throughputCalculationModeEwma",ZLEMA:"throughputCalculationModeZlema",ARITHMETIC_MEAN:"throughputCalculationModeArithmeticMean",BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeByteSizeWeightedArithmeticMean",DATE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeDateWeightedArithmeticMean",HARMONIC_MEAN:"throughputCalculationModeHarmonicMean",BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeByteSizeWeightedHarmonicMean",DATE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeDateWeightedHarmonicMean"},LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE:{MOOF_PARSING:"lowLatencyDownloadTimeCalculationModeMoofParsing",DOWNLOADED_DATA:"lowLatencyDownloadTimeCalculationModeDownloadedData",AAST:"lowLatencyDownloadTimeCalculationModeAast"},RULES_TYPES:{QUALITY_SWITCH_RULES:"qualitySwitchRules",ABANDON_FRAGMENT_RULES:"abandonFragmentRules"},QUALITY_SWITCH_RULES:{BOLA_RULE:"BolaRule",THROUGHPUT_RULE:"ThroughputRule",INSUFFICIENT_BUFFER_RULE:"InsufficientBufferRule",SWITCH_HISTORY_RULE:"SwitchHistoryRule",DROPPED_FRAMES_RULE:"DroppedFramesRule",LEARN_TO_ADAPT_RULE:"L2ARule",LOL_PLUS_RULE:"LoLPRule"},ABANDON_FRAGMENT_RULES:{ABANDON_REQUEST_RULE:"AbandonRequestsRule"},ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",COMMON_ACCESS_TOKEN_HEADER:"common-access-token",DASH_ROLE_SCHEME_ID:"urn:mpeg:dash:role:2011",CODEC_FAMILIES:{MP3:"mp3",AAC:"aac",AC3:"ac3",EC3:"ec3",DTSX:"dtsx",DTSC:"dtsc",AVC:"avc",HEVC:"hevc"}}},2861:function(kt,Oe,oe){oe.r(Oe),Oe.default={CLEARKEY_KEYSTEM_STRING:"org.w3.clearkey",WIDEVINE_KEYSTEM_STRING:"com.widevine.alpha",PLAYREADY_KEYSTEM_STRING:"com.microsoft.playready",PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:"com.microsoft.playready.recommendation",WIDEVINE_UUID:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",PLAYREADY_UUID:"9a04f079-9840-4286-ab92-e65be0885f95",CLEARKEY_UUID:"e2719d58-a985-b3c9-781a-b030af78d30e",W3C_CLEARKEY_UUID:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",INITIALIZATION_DATA_TYPE_CENC:"cenc",INITIALIZATION_DATA_TYPE_KEYIDS:"keyids",INITIALIZATION_DATA_TYPE_WEBM:"webm",ENCRYPTION_SCHEME_CENC:"cenc",ENCRYPTION_SCHEME_CBCS:"cbcs",MEDIA_KEY_MESSAGE_TYPES:{LICENSE_REQUEST:"license-request",LICENSE_RENEWAL:"license-renewal",LICENSE_RELEASE:"license-release",INDIVIDUALIZATION_REQUEST:"individualization-request"},ROBUSTNESS_STRINGS:{WIDEVINE:{SW_SECURE_CRYPTO:"SW_SECURE_CRYPTO",SW_SECURE_DECODE:"SW_SECURE_DECODE",HW_SECURE_CRYPTO:"HW_SECURE_CRYPTO",HW_SECURE_DECODE:"HW_SECURE_DECODE",HW_SECURE_ALL:"HW_SECURE_ALL"}},MEDIA_KEY_STATUSES:{USABLE:"usable",EXPIRED:"expired",RELEASED:"released",OUTPUT_RESTRICTED:"output-restricted",OUTPUT_DOWNSCALED:"output-downscaled",STATUS_PENDING:"status-pending",INTERNAL_ERROR:"internal-error"}}},4469:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{default:function(){return E}});class ie{constructor(){this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}}ie.SSL_CONNECTION_FAILED_PREFIX="SSL",ie.DNS_RESOLUTION_FAILED="C00",ie.HOST_UNREACHABLE="C01",ie.CONNECTION_REFUSED="C02",ie.CONNECTION_ERROR="C03",ie.CORRUPT_MEDIA_ISOBMFF="M00",ie.CORRUPT_MEDIA_OTHER="M01",ie.BASE_URL_CHANGED="F00",ie.BECAME_REPORTER="S00";var N=ie,y=oe(913),R=oe(138);function Z($){let z,Te;const Fe=($=$||{}).eventBus,Re=$.dashMetrics,De=$.metricsConstants,Se=$.events;function ze(Lt){let _t=new N;if(Te){for(const fn in Lt)Lt.hasOwnProperty(fn)&&(_t[fn]=Lt[fn]);_t.mpdurl||(_t.mpdurl=Te.originalUrl||Te.url),_t.terror||(_t.terror=new Date),Re.addDVBErrors(_t)}}function Ze(Lt){Lt.error||(Te=Lt.manifest)}function Ke(Lt){ze({errorcode:N.BASE_URL_CHANGED,servicelocation:Lt.entry})}function lt(){ze({errorcode:N.BECAME_REPORTER})}function Yt(Lt){var _t;Lt.metric===De.HTTP_REQUEST&&((_t=Lt.value).responsecode===0||_t.responsecode==null||_t.responsecode>=400||_t.responsecode<100||_t.responsecode>=600)&&ze({errorcode:_t.responsecode||N.CONNECTION_ERROR,url:_t.url,terror:_t.tresponse,servicelocation:_t._serviceLocation})}function xt(Lt){let _t;switch(Lt.error?Lt.error.code:0){case MediaError.MEDIA_ERR_NETWORK:_t=N.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:_t=N.CORRUPT_MEDIA_OTHER;break;default:return}ze({errorcode:_t})}return z={initialize:function(){Fe.on(Se.MANIFEST_UPDATED,Ze,z),Fe.on(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,Ke,z),Fe.on(Se.METRIC_ADDED,Yt,z),Fe.on(Se.METRIC_UPDATED,Yt,z),Fe.on(Se.PLAYBACK_ERROR,xt,z),Fe.on(y.default.BECAME_REPORTING_PLAYER,lt,z)},reset:function(){Fe.off(Se.MANIFEST_UPDATED,Ze,z),Fe.off(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,Ke,z),Fe.off(Se.METRIC_ADDED,Yt,z),Fe.off(Se.METRIC_UPDATED,Yt,z),Fe.off(Se.PLAYBACK_ERROR,xt,z),Fe.off(y.default.BECAME_REPORTING_PLAYER,lt,z)}},z}Z.__dashjs_factory_name="DVBErrorsTranslator";var q=R.default.getSingletonFactory(Z),Y=oe(7377);function ee($){$=$||{};let z,Te,Fe=!1,Re=this.context,De=$.mediaElement;return z={initialize:function(Se){Se&&Se.length&&(Se.forEach((ze=>{let Ze=ze.starttime,Ke=Ze+ze.duration;Te.add(Ze,Ke)})),Fe=!!Se[0]._useWallClockTime)},reset:function(){Te.clear()},isEnabled:function(){let Se,ze=Te.length;if(!ze)return!0;Se=Fe?new Date().getTime()/1e3:De.currentTime;for(let Ze=0;Ze<ze;Ze+=1){let Ke=Te.start(Ze),lt=Te.end(Ze);if(Ke<=Se&&Se<lt)return!0}return!1}},Te=(0,Y.default)(Re).create(),z}ee.__dashjs_factory_name="RangeController";var p=R.default.getClassFactory(ee);function o(){return{serialise:function $(z){let Te,Fe,Re=[],De=[];for(Te in z)if(z.hasOwnProperty(Te)&&Te.indexOf("_")!==0){if(Fe=z[Te],Fe==null&&(Fe=""),Array.isArray(Fe)){if(!Fe.length)continue;De=[],Fe.forEach((function(Se){let ze=Object.prototype.toString.call(Se).slice(8,-1)!=="Object";De.push(ze?Se:$(Se))})),Fe=De.map(encodeURIComponent).join(",")}else typeof Fe=="string"?Fe=encodeURIComponent(Fe):Fe instanceof Date?Fe=Fe.toISOString():typeof Fe=="number"&&(Fe=Math.round(Fe));Re.push(Te+"="+Fe)}return Re.join("&")}}}o.__dashjs_factory_name="MetricSerialiser";var P=R.default.getSingletonFactory(o);function U(){let $,z,Te,Fe=window.crypto||window.msCrypto,Re=Uint32Array,De=Math.pow(2,8*Re.BYTES_PER_ELEMENT)-1;function Se(){Fe&&($||($=new Re(10)),Fe.getRandomValues($),z=0)}return Te={random:function(ze,Ze){let Ke;return ze||(ze=0),Ze||(Ze=1),Fe?(z===$.length&&Se(),Ke=$[z]/De,z+=1):Ke=Math.random(),Ke*(Ze-ze)+ze}},Se(),Te}U.__dashjs_factory_name="RNG";var se=R.default.getSingletonFactory(U),ye=oe(1926);function ke($){let z;$=$||{};let Te,Fe,Re,De,Se,ze,Ze,Ke=this.context,lt=[];const Yt=$.metricsConstants;function xt(){De=!1,Se=!1,ze=null,Ze=null}return z={report:function(Lt,_t){Array.isArray(_t)||(_t=[_t]),Se&&Ze.isEnabled()&&_t.forEach((function(fn){let An=Te.serialise(fn);Lt!==Yt.DVB_ERRORS&&(An=`metricname=${Lt}&${An}`),An=`${ze}?${An}`,(function(jn,$n,ea){let Yn=new XMLHttpRequest;Yn.withCredentials=Fe.getXHRWithCredentialsForType(Yt.HTTP_REQUEST_DVB_REPORTING_TYPE);const Nt=function(){let St=lt.indexOf(Yn);St!==-1&&(lt.splice(St,1),!(Yn.status>=200&&Yn.status<300)&&ea&&ea())};lt.push(Yn);try{Yn.open("GET",jn),Yn.onloadend=Nt,Yn.onerror=Nt,Yn.send()}catch{Yn.onerror()}})(An,0,(function(){Se=!1}))}))},initialize:function(Lt,_t){let fn;if(Ze=_t,ze=Lt.dvbReportingUrl,!ze)throw new Error("required parameter missing (dvb:reportingUrl)");De||(fn=Lt.dvbProbability,fn&&(fn===1e3||fn/1e3>=Re.random())&&(Se=!0),De=!0)},reset:function(){xt()}},Te=P(Ke).getInstance(),Re=se(Ke).getInstance(),Fe=(0,ye.default)(Ke).getInstance(),xt(),z}ke.__dashjs_factory_name="DVBReporting";var Ie=R.default.getClassFactory(ke);function Pe($){$=$||{};const z={"urn:dvb:dash:reporting:2014":Ie},Te=this.context;let Fe;const Re=$.debug?$.debug.getLogger(Fe):{},De=$.metricsConstants,Se=$.mediaPlayerModel||{};return Fe={create:function(ze,Ze){let Ke;try{Ke=z[ze.schemeIdUri](Te).create({metricsConstants:De,mediaPlayerModel:Se}),Ke.initialize(ze,Ze)}catch(lt){Ke=null,Re.error(`ReportingFactory: could not create Reporting with schemeIdUri ${ze.schemeIdUri} (${lt.message})`)}return Ke},register:function(ze,Ze){z[ze]=Ze},unregister:function(ze){delete z[ze]}},Fe}Pe.__dashjs_factory_name="ReportingFactory";var Ge=R.default.getSingletonFactory(Pe);function yt($){let z,Te=[];const Fe=Ge(this.context).getInstance($);return z={initialize:function(Re,De){Re.some((Se=>{let ze=Fe.create(Se,De);if(ze)return Te.push(ze),!0}))},reset:function(){Te.forEach((Re=>Re.reset())),Te=[]},report:function(Re,De){Te.forEach((Se=>Se.report(Re,De)))}},z}yt.__dashjs_factory_name="ReportingController";var Ae=R.default.getClassFactory(yt);function ge(){return{reconstructFullMetricName:function($,z,Te){let Fe=$;return z&&(Fe+="("+z,Te&&Te.length&&(Fe+=","+Te),Fe+=")"),Fe},validateN:function($){if(!$)throw new Error("missing n");if(isNaN($))throw new Error("n is NaN");if($<0)throw new Error("n must be positive");return $}}}ge.__dashjs_factory_name="HandlerHelpers";var ue=R.default.getSingletonFactory(ge);function we($){let z,Te,Fe,Re,De,Se;$=$||{};let ze=this.context,Ze=ue(ze).getInstance(),Ke=[];const lt=$.metricsConstants;function Yt(){let xt=(function(){try{return Object.keys(Ke).map((Lt=>Ke[Lt])).reduce(((Lt,_t)=>Lt.level<_t.level?Lt:_t))}catch{return}})();xt&&Se!==xt.t&&(Se=xt.t,Te.report(Re,xt))}return z={initialize:function(xt,Lt,_t){Lt&&(Fe=Ze.validateN(_t),Te=Lt,Re=Ze.reconstructFullMetricName(xt,_t),De=setInterval(Yt,Fe))},reset:function(){clearInterval(De),De=null,Fe=0,Te=null,Se=null},handleNewMetric:function(xt,Lt,_t){xt===lt.BUFFER_LEVEL&&(Ke[_t]=Lt)}},z}we.__dashjs_factory_name="BufferLevelHandler";var Ne=R.default.getClassFactory(we),He=R.default.getClassFactory((function($){let z,Te,Fe=($=$||{}).eventBus;const Re=$.metricsConstants;function De(){Fe.off(y.default.METRICS_INITIALISATION_COMPLETE,De,this),Fe.trigger(y.default.BECAME_REPORTING_PLAYER)}return z={initialize:function(Se,ze){ze&&(Te=ze,Fe.on(y.default.METRICS_INITIALISATION_COMPLETE,De,this))},reset:function(){Te=null},handleNewMetric:function(Se,ze){Se===Re.DVB_ERRORS&&Te&&Te.report(Se,ze)}},z}));function Ht($){let z,Te,Fe,Re,De,Se;$=$||{};let ze=[],Ze=ue(this.context).getInstance();const Ke=$.metricsConstants;function lt(){var Yt=ze;Yt.length&&Te&&Te.report(De,Yt),ze=[]}return z={initialize:function(Yt,xt,Lt,_t){xt&&(Fe=Ze.validateN(Lt),Te=xt,_t&&_t.length&&(Re=_t),De=Ze.reconstructFullMetricName(Yt,Lt,_t),Se=setInterval(lt,Fe))},reset:function(){clearInterval(Se),Se=null,Fe=null,Re=null,ze=[],Te=null},handleNewMetric:function(Yt,xt){Yt===Ke.HTTP_REQUEST&&(Re&&Re!==xt.type||ze.push(xt))}},z}Ht.__dashjs_factory_name="HttpListHandler";var be=R.default.getClassFactory(Ht);function mt(){let $,z,Te;return $={initialize:function(Fe,Re){z=Fe,Te=Re},reset:function(){Te=null,z=void 0},handleNewMetric:function(Fe,Re){Fe===z&&Te&&Te.report(z,Re)}},$}mt.__dashjs_factory_name="GenericMetricHandler";var Ve=R.default.getClassFactory(mt);function Ue($){let z;const Te=($=$||{}).debug?$.debug.getLogger(z):{};let Fe=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/;const Re=this.context;let De={BufferLevel:Ne,DVBErrors:He,HttpList:be,PlayList:Ve,RepSwitchList:Ve,TcpList:Ve};return z={create:function(Se,ze){var Ze,Ke=Se.match(Fe);if(Ke){try{(Ze=De[Ke[1]](Re).create({eventBus:$.eventBus,metricsConstants:$.metricsConstants})).initialize(Ke[1],ze,Ke[3],Ke[5])}catch(lt){Ze=null,Te.error(`MetricsHandlerFactory: Could not create handler for type ${Ke[1]} with args ${Ke[3]}, ${Ke[5]} (${lt.message})`)}return Ze}},register:function(Se,ze){De[Se]=ze},unregister:function(Se){delete De[Se]}},z}Ue.__dashjs_factory_name="MetricsHandlerFactory";var Rt=R.default.getSingletonFactory(Ue);function Zt($){$=$||{};let z,Te=[];const Fe=this.context,Re=$.eventBus,De=$.events;let Se=Rt(Fe).getInstance({debug:$.debug,eventBus:$.eventBus,metricsConstants:$.metricsConstants});function ze(Ze){Te.forEach((Ke=>{Ke.handleNewMetric(Ze.metric,Ze.value,Ze.mediaType)}))}return z={initialize:function(Ze,Ke){Ze.split(",").forEach(((lt,Yt,xt)=>{let Lt;if(lt.indexOf("(")!==-1&<.indexOf(")")===-1){let _t=xt[Yt+1];_t&&_t.indexOf("(")===-1&&_t.indexOf(")")!==-1&&(lt+=","+_t,delete xt[Yt+1])}Lt=Se.create(lt,Ke),Lt&&Te.push(Lt)})),Re.on(De.METRIC_ADDED,ze,z),Re.on(De.METRIC_UPDATED,ze,z)},reset:function(){Re.off(De.METRIC_ADDED,ze,z),Re.off(De.METRIC_UPDATED,ze,z),Te.forEach((Ze=>Ze.reset())),Te=[]}},z}Zt.__dashjs_factory_name="MetricsHandlersController";var jt=R.default.getClassFactory(Zt);function Wt($){let z,Te,Fe,Re;$=$||{};let De=this.context;function Se(){z&&z.reset(),Te&&Te.reset(),Fe&&Fe.reset()}return Re={initialize:function(ze){try{Fe=p(De).create({mediaElement:$.mediaElement}),Fe.initialize(ze.Range),Te=Ae(De).create({debug:$.debug,metricsConstants:$.metricsConstants,mediaPlayerModel:$.mediaPlayerModel}),Te.initialize(ze.Reporting,Fe),z=jt(De).create({debug:$.debug,eventBus:$.eventBus,metricsConstants:$.metricsConstants,events:$.events}),z.initialize(ze.metrics,Te)}catch(Ze){throw Se(),Ze}},reset:Se},Re}Wt.__dashjs_factory_name="MetricsController";var $t=R.default.getClassFactory(Wt),cn=class{constructor(){this.metrics="",this.Range=[],this.Reporting=[]}},bn=class{constructor(){this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},En=class{constructor(){this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}};function ve($){let z,Te=($=$||{}).adapter;const Fe=$.constants;return z={getMetrics:function(Re){let De=[];return Re&&Re.Metrics&&Re.Metrics.forEach((Se=>{var ze=new cn,Ze=Te.getIsDynamic(Re);Se.hasOwnProperty("metrics")&&(ze.metrics=Se.metrics,Se.Range&&Se.Range.forEach((Ke=>{var lt=new bn;lt.starttime=(function(Yt,xt,Lt){let _t,fn,An=0;return xt?An=Te.getAvailabilityStartTime(Yt)/1e3:(_t=Te.getRegularPeriods(Yt),_t.length&&(An=_t[0].start)),fn=An,Lt&&Lt.hasOwnProperty(Fe.START_TIME)&&(fn+=Lt.starttime),fn})(Re,Ze,Ke),Ke.hasOwnProperty("duration")?lt.duration=Ke.duration:lt.duration=Te.getDuration(Re),lt._useWallClockTime=Ze,ze.Range.push(lt)})),Se.Reporting&&(Se.Reporting.forEach((Ke=>{var lt=new En;Ke.hasOwnProperty(Fe.SCHEME_ID_URI)&&(lt.schemeIdUri=Ke.schemeIdUri,Ke.hasOwnProperty("value")&&(lt.value=Ke.value),Ke.hasOwnProperty(Fe.DVB_REPORTING_URL)&&(lt.dvbReportingUrl=Ke[Fe.DVB_REPORTING_URL]),Ke.hasOwnProperty(Fe.DVB_PROBABILITY)&&(lt.dvbProbability=Ke[Fe.DVB_PROBABILITY]),ze.Reporting.push(lt))})),De.push(ze)))})),De}},z}ve.__dashjs_factory_name="ManifestParsing";var Ee=R.default.getSingletonFactory(ve);function st($){let z;$=$||{};let Te={},Fe=this.context,Re=$.eventBus;const De=$.events;function Se(Ze){if(Ze.error)return;let Ke=Object.keys(Te);Ee(Fe).getInstance({adapter:$.adapter,constants:$.constants}).getMetrics(Ze.manifest).forEach((lt=>{const Yt=JSON.stringify(lt);if(Te.hasOwnProperty(Yt))Ke.splice(Yt,1);else try{let xt=$t(Fe).create($);xt.initialize(lt),Te[Yt]=xt}catch{}})),Ke.forEach((lt=>{Te[lt].reset(),delete Te[lt]})),Re.trigger(y.default.METRICS_INITIALISATION_COMPLETE)}function ze(){Object.keys(Te).forEach((Ze=>{Te[Ze].reset()})),Te={}}return z={reset:function(){Re.off(De.MANIFEST_UPDATED,Se,z),Re.off(De.STREAM_TEARDOWN_COMPLETE,ze,z)}},Re.on(De.MANIFEST_UPDATED,Se,z),Re.on(De.STREAM_TEARDOWN_COMPLETE,ze,z),z}st.__dashjs_factory_name="MetricsCollectionController";var L=R.default.getClassFactory(st);function M(){let $,z,Te=this.context;return $={createMetricsReporting:function(Fe){return z=q(Te).getInstance({eventBus:Fe.eventBus,dashMetrics:Fe.dashMetrics,metricsConstants:Fe.metricsConstants,events:Fe.events}),z.initialize(),L(Te).create(Fe)},getReportingFactory:function(){return Ge(Te).getInstance()},getMetricsHandlerFactory:function(){return Rt(Te).getInstance()}},$}M.__dashjs_factory_name="MetricsReporting";const f=R.default.getClassFactory(M);f.events=y.default,R.default.updateClassFactory(M.__dashjs_factory_name,f);var E=f},913:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",this.CMCD_DATA_GENERATED="cmcdDataGenerated"}}let y=new N;Oe.default=y},1926:function(kt,Oe,oe){oe.r(Oe);var ie=oe(5717),N=oe(138),y=oe(8261),R=oe(656),Z=oe(5212),q=oe(5560);function Y(){let ee,p,o,P,U,se,ye,ke,Ie,Pe,Ge;const yt=this.context,Ae=(0,y.default)(yt).getInstance();function ge(){P=[],U=[],se=[],ye=[],ke=[],Ge=[],Ie=null,p=[],Pe=new Set}function ue(be,mt){let Ve=-1;be.some(((Ue,Rt)=>{if(Ue===mt)return Ve=Rt,!0})),Ve<0||be.splice(Ve,1)}function we(be){let mt;for(mt=0;mt<Ge.length;mt++)if(Ge[mt].rulename===be)return mt;return-1}function Ne(be,mt){let Ve=!1;return Pe.forEach((Ue=>{Ue[be]===mt&&(Ve=!0)})),Ve}function He(be,mt){Ht(be,mt);let Ve=new ie.default;Ve.schemeIdUri=be,Ve.value=mt,p.push(Ve)}function Ht(be,mt){(0,R.checkParameterType)(be,"string"),(0,R.checkParameterType)(mt,"string"),p.forEach((function(Ve,Ue){Ve.schemeIdUri===be&&Ve.value===mt&&p.splice(Ue,1)}))}return ee={addAbrCustomRule:function(be,mt,Ve){if(typeof be!="string"||be!==Z.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&be!==Z.default.RULES_TYPES.QUALITY_SWITCH_RULES||typeof mt!="string")throw Z.default.BAD_ARGUMENT_ERROR;let Ue=we(mt);Ue===-1?Ge.push({type:be,rulename:mt,rule:Ve}):(Ge[Ue].type=be,Ge[Ue].rule=Ve)},addExternalSubtitle:function(be){if(!(be&&be.id!==void 0&&be.url&&be.language&&be.mimeType&&be.bandwidth!==void 0))return;const mt=new q.default(be);Ne("url",mt.url)||Ne("id",mt.id)||Pe.add(mt)},addRequestInterceptor:function(be){P.push(be)},addResponseInterceptor:function(be){U.push(be)},addUTCTimingSource:He,clearDefaultUTCTimingSources:function(){p=[]},getAbrCustomRules:function(){return Ge},getCustomCapabilitiesFilters:function(){return ke},getCustomInitialTrackSelectionFunction:function(){return Ie},getExternalSubtitles:function(){return Pe},getLicenseRequestFilters:function(){return se},getLicenseResponseFilters:function(){return ye},getRequestInterceptors:function(){return P},getResponseInterceptors:function(){return U},getUTCTimingSources:function(){return p},getXHRWithCredentialsForType:function(be){const mt=o[be];return mt===void 0?o.default:mt},registerCustomCapabilitiesFilter:function(be){ke.push(be)},registerLicenseRequestFilter:function(be){se.push(be)},registerLicenseResponseFilter:function(be){ye.push(be)},removeAbrCustomRule:function(be){if(be){let mt=we(be);mt!==-1&&Ge.splice(mt,1)}else Ge=[]},removeAllAbrCustomRule:function(){Ge=[]},removeExternalSubtitleById:function(be){Pe.forEach((mt=>{mt.id===be&&Pe.delete(mt)}))},removeExternalSubtitleByUrl:function(be){Pe.forEach((mt=>{mt.url===be&&Pe.delete(mt)}))},removeRequestInterceptor:function(be){ue(P,be)},removeResponseInterceptor:function(be){ue(U,be)},removeUTCTimingSource:Ht,reset:function(){ge()},resetCustomInitialTrackSelectionFunction:function(){Ie=null},resetPlaybackSessionSpecificSettings:function(){Pe=new Set},restoreDefaultUTCTimingSources:function(){let be=Ae.get().streaming.utcSynchronization.defaultTimingSource;He(be.scheme,be.value)},setConfig:function(){},setCustomInitialTrackSelectionFunction:function(be){Ie=be},setXHRWithCredentialsForType:function be(mt,Ve){mt?o[mt]=!!Ve:Object.keys(o).forEach((Ue=>{be(Ue,Ve)}))},unregisterCustomCapabilitiesFilter:function(be){ue(ke,be)},unregisterLicenseRequestFilter:function(be){ue(se,be)},unregisterLicenseResponseFilter:function(be){ue(ye,be)}},o={default:!1},ge(),ee}Y.__dashjs_factory_name="CustomParametersModel",Oe.default=N.default.getSingletonFactory(Y)},3888:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{default:function(){return Yn}});var ie=oe(8854),N=oe(2861);const y={prefixes:["clearkey","dashif","ck"]};class R{static findMp4ProtectionElement(St){let rt=null;for(let Je=0;Je<St.length;++Je){let Ct=St[Je];Ct.schemeIdUri&&Ct.schemeIdUri.toLowerCase()===ie.default.MP4_PROTECTION_SCHEME&&Ct.value&&(Ct.value.toLowerCase()===N.default.ENCRYPTION_SCHEME_CENC||Ct.value.toLowerCase()===N.default.ENCRYPTION_SCHEME_CBCS)&&(rt=Ct)}return rt}static getPSSHData(St){let rt=8,Je=new DataView(St),Ct=Je.getUint8(rt);return rt+=20,Ct>0&&(rt+=4+16*Je.getUint32(rt)),rt+=4,St.slice(rt)}static getPSSHForKeySystem(St,rt){let Je=R.parsePSSHList(rt);return St&&Je.hasOwnProperty(St.uuid.toLowerCase())?Je[St.uuid.toLowerCase()]:null}static parseInitDataFromContentProtection(St,rt){return"pssh"in St&&St.pssh?(St.pssh.__text=St.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),rt.decodeArray(St.pssh.__text).buffer):null}static parsePSSHList(St){if(St==null)return[];let rt=new DataView(St.buffer||St),Je={},Ct=0;for(;;){let At,Pt,Bt,gt,pt,Ot,qt=Ct;if(Ct>=rt.buffer.byteLength)break;if(At=rt.getUint32(Ct),Pt=Ct+At,Ct+=4,rt.getUint32(Ct)===1886614376)if(Ct+=4,Bt=rt.getUint8(Ct),Bt===0||Bt===1){for(Ct++,Ct+=3,gt="",pt=0;pt<4;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=4,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<6;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;Ct+=6,gt=gt.toLowerCase(),Ct+=4,Je[gt]=rt.buffer.slice(qt,Pt),Ct=Pt}else Ct=Pt;else Ct=Pt}return Je}static getLicenseServerUrlFromMediaInfo(St,rt){try{if(!St||St.length===0)return null;let Je=0,Ct=null;for(;Je<St.length&&!Ct;){const At=St[Je];if(At&&At.contentProtection&&At.contentProtection.length>0){const Pt=At.contentProtection.filter((Bt=>Bt.schemeIdUri&&Bt.schemeIdUri===rt));if(Pt&&Pt.length>0){let Bt=0;for(;Bt<Pt.length&&!Ct;){const gt=Pt[Bt];gt.laUrl&>.laUrl.__prefix&&y.prefixes.includes(gt.laUrl.__prefix)&>.laUrl.__text&&(Ct=gt.laUrl.__text),Bt+=1}}}Je+=1}return Ct}catch{return null}}static hexKidToBufferSource(St){const rt=St.replace(/-/g,"");return new Uint8Array(rt.match(/[\da-f]{2}/gi).map((function(Je){return parseInt(Je,16)}))).buffer}}var Z=R,q=class{constructor(Nt,St){this.contentType=Nt,this.robustness=St}},Y=class{constructor(Nt,St,rt,Je,Ct,At){this.initDataTypes=At&&At.length>0?At:[N.default.INITIALIZATION_DATA_TYPE_CENC],Nt&&Nt.length&&(this.audioCapabilities=Nt),St&&St.length&&(this.videoCapabilities=St),this.distinctiveIdentifier=rt,this.persistentState=Je,this.sessionTypes=Ct}},ee=oe(1923),p=oe(1944),o=class{constructor(Nt,St,rt,Je,Ct,At,Pt,Bt){this.url=Nt,this.method=St,this.responseType=rt,this.headers=Je,this.withCredentials=Ct,this.messageType=At,this.sessionId=Pt,this.data=Bt}},P=class{constructor(Nt,St,rt){this.url=Nt,this.headers=St,this.data=rt}},U=oe(7568),se=oe(7263),ye=oe(5212),ke=oe(138);function Ie(Nt){const St=(Nt=Nt||{}).BASE64,rt=Nt.cmcdModel,Je=Nt.constants,Ct=Nt.customParametersModel,At=Nt.debug,Pt=Nt.eventBus,Bt=Nt.events,gt=Nt.protectionKeyController,pt=Nt.settings;let Ot,qt,Et,Xt,gn,an,ln,Sn,Ft,et,je,Mt,Gt=Nt.protectionModel,un=[];function wn(){if(!(Pt&&Pt.hasOwnProperty("on")&>&>.hasOwnProperty("getSupportedKeySystemMetadataFromContentProtection")))throw new Error("Missing config parameter(s)")}function Cn(Tt,Vt){je||Xt?je&&Gn():(function(on,vn){if(Xt)return;var _n;Xt=!0;const xn=(function(Rn){const kn=[];for(let In=0;In<Rn.length;In++){const Dn=Mn(Rn[In]);kn.push({ks:Rn[In].ks,configs:[Dn],protData:Rn[In].protData})}return kn})(on=(_n=on).sort(((Rn,kn)=>(Ot&&Ot[Rn.ks.systemString]&&Ot[Rn.ks.systemString].priority>=0?Ot[Rn.ks.systemString].priority:_n.length)-(Ot&&Ot[kn.ks.systemString]&&Ot[kn.ks.systemString].priority>=0?Ot[kn.ks.systemString].priority:_n.length))));let On;Gt.requestKeySystemAccess(xn).then((Rn=>(On=Rn.data,(function(kn){let In=kn&&kn.selectedSystemString?kn.selectedSystemString:kn.keySystem.systemString;return ln.info("DRM: KeySystem Access Granted for system string ("+In+")! Selecting key system..."),Gt.selectKeySystem(kn)})(On)))).then((Rn=>{(function(kn,In){try{je=kn,Xt=!1,Pt.trigger(Bt.KEY_SYSTEM_SELECTED,{data:In});const Dn=Hn(je);Dn&&Dn.serverCertificate&&Dn.serverCertificate.length>0&&Gt.setServerCertificate(St.decodeArray(Dn.serverCertificate).buffer),Gn()}catch(Dn){ln.error(Dn)}})(Rn,On)})).catch((Rn=>{(function(kn,In){je=null,Xt=!1,In||Pt.trigger(Bt.KEY_SYSTEM_SELECTED,{data:null,error:new p.default(ee.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,ee.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+kn.error)})})(Rn,vn)}))})(Tt,Vt)}function Gn(){let Tt;for(let on=0;on<Ft.length;on++)for(Tt=0;Tt<Ft[on].length;Tt++)if(je===Ft[on][Tt].ks){Vt=Ft[on][Tt],gt.isClearKey(je)&&(function(vn){if(vn.protData&&vn.protData.hasOwnProperty("clearkeys")&&Object.keys(vn.protData.clearkeys).length!==0){const _n={kids:Object.keys(vn.protData.clearkeys)};vn.initData=new TextEncoder().encode(JSON.stringify(_n))}})(Vt),Vt.sessionId?qn(Vt):Vt.initData!==null&&re(Vt);break}var Vt;Ft=[]}function Mn(Tt){const Vt=Tt.protData,on=[],vn=[],_n=Vt&&Vt.initDataTypes&&Vt.initDataTypes.length>0?Vt.initDataTypes:[N.default.INITIALIZATION_DATA_TYPE_CENC],xn=Vt&&Vt.audioRobustness&&Vt.audioRobustness.length>0?Vt.audioRobustness:et,On=Vt&&Vt.videoRobustness&&Vt.videoRobustness.length>0?Vt.videoRobustness:et,Rn=Tt.sessionType,kn=Vt&&Vt.distinctiveIdentifier?Vt.distinctiveIdentifier:"optional",In=Vt&&Vt.persistentState?Vt.persistentState:Rn==="temporary"?"optional":"required";return Sn.forEach((Dn=>{Dn.type===Je.AUDIO?on.push(new q(Dn.codec,xn)):Dn.type===Je.VIDEO&&vn.push(new q(Dn.codec,On))})),new Y(on,vn,kn,In,[Rn],_n)}function qn(Tt){wn(),Gt.loadKeySession(Tt)}function re(Tt){if(Tt&&(function(on){if(!on)return!1;try{const vn=Gt.getSessionTokens();for(let _n=0;_n<vn.length;_n++)if(vn[_n].getKeyId()===on)return!0;return!1}catch{return!1}})(Tt.keyId))return;(function(){if(!pt)return;const on=pt.get().streaming.protection.keepProtectionMediaKeys,vn=pt.get().streaming.protection.keepProtectionMediaKeysMaximumOpenSessions;if(typeof vn!="number"||vn<=0)return;if(!on)return void ln.warn("DRM: keepProtectionMediaKeysMaximumOpenSessions is set to "+vn+", but keepProtectionMediaKeys is not enabled. Therefore, keepProtectionMediaKeysMaximumOpenSessions will be ignored.");if(!Gt||typeof Gt.getSessionTokens!="function")return;const _n=Gt.getSessionTokens()||[];if(_n.length<vn)return;const xn=_n[0];xn&&(ln.info("DRM: Maximum number of open MediaKeySessions reached ("+vn+"), closing oldest session."),_a(xn))})();const Vt=Z.getPSSHForKeySystem(je,Tt?Tt.initData:null);if(Vt){if(ra(Vt))return;try{Tt.initData=Vt,Gt.createKeySession(Tt)}catch(on){Pt.trigger(Bt.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+on.message)})}}else Tt&&Tt.initData?Gt.createKeySession(Tt):Pt.trigger(Bt.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(je?je.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function Hn(Tt){if(Tt){const Vt=Tt.systemString;if(Ot)return Vt in Ot?Ot[Vt]:null}return null}function ra(Tt){if(!Tt)return!1;try{const Vt=Gt.getAllInitData();for(let on=0;on<Vt.length;on++)if(gt.initDataEquals(Tt,Vt[on]))return ln.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function _a(Tt){wn(),Gt.closeKeySession(Tt)}function Qn(Tt){wn(),Tt?(Gt.setMediaElement(Tt),Pt.on(Bt.NEED_KEY,ka,qt)):Tt===null&&(Gt.setMediaElement(Tt),Pt.off(Bt.NEED_KEY,ka,qt))}function za(Tt){ln.debug("DRM: onKeyMessage");const Vt=Tt.data;Pt.trigger(Bt.KEY_MESSAGE,{data:Vt});const on=Vt.messageType?Vt.messageType:N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,vn=Vt.message,_n=Vt.sessionToken,xn=Hn(je),On=gt.getLicenseServerModelInstance(je,xn,on),Rn={sessionToken:_n,messageType:on};if(vn&&vn.byteLength!==0){if(!On)return ln.debug("DRM: License server request not required for this message (type = "+Tt.data.messageType+"). Session ID = "+_n.getSessionId()),void Xn(Rn);if(gt.isClearKey(je)){const kn=gt.processClearKeyLicenseRequest(je,xn,vn);if(kn&&kn.keyPairs&&kn.keyPairs.length>0)return ln.debug("DRM: ClearKey license request handled by application!"),Xn(Rn),void Gt.updateKeySession(_n,kn)}(function(kn,In,Dn){const Vn=kn.sessionToken,ya=kn.messageType?kn.messageType:N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,Aa={sessionToken:Vn,messageType:ya},Ra=je?je.systemString:null;let mr=(function(zn,la,La,Na,Tr){let ta=null;const lr=Na.message;if(zn&&zn.serverURL){const fa=zn.serverURL;typeof fa=="string"&&fa!==""?ta=fa:typeof fa=="object"&&fa.hasOwnProperty(la)&&(ta=fa[la])}else if(zn&&zn.laURL&&zn.laURL!=="")ta=zn.laURL;else if(ta=Z.getLicenseServerUrlFromMediaInfo(Sn,je.schemeIdURI),!ta&&!gt.isClearKey(je)){const fa=Z.getPSSHData(La.initData);ta=je.getLicenseServerURLFromInitData(fa),ta||(ta=Na.laURL)}return ta=Tr.getServerURLFromMessage(ta,lr,la),ta})(Dn,ya,Vn,kn,In);if(!mr)return void Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));const Kn={};let va=!1;Dn&&Ja(Kn,Dn.httpRequestHeaders);const tr=kn.message;Ja(Kn,je.getRequestHeadersFromMessage(tr)),Object.keys(Kn).forEach((zn=>{zn.toLowerCase()==="authorization"&&(va=!0)})),Dn&&typeof Dn.withCredentials=="boolean"&&(va=Dn.withCredentials);const ia=function(zn){if(Gt)if(zn.status>=200&&zn.status<=299){const la=se.default.parseHttpHeaders(zn.getAllResponseHeaders?zn.getAllResponseHeaders():null);let La=new P(zn.responseURL,la,zn.response);er(Ct.getLicenseResponseFilters(),La).then((()=>{const Na=In.getLicenseMessage(La.data,Ra,ya);Na!==null?(Xn(Aa),Gt.updateKeySession(Vn,Na)):fr(zn,Aa,Ra,ya,In)}))}else fr(zn,Aa,Ra,ya,In)},hr=function(zn){Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Ra+' update, XHR aborted. status is "'+zn.statusText+'" ('+zn.status+"), readyState is "+zn.readyState))},nr=function(zn){Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Ra+' update, XHR error. status is "'+zn.statusText+'" ('+zn.status+"), readyState is "+zn.readyState))},ar=je.getLicenseRequestFromMessage(tr),rr=In.getHTTPMethod(ya),pr=In.getResponseType(Ra,ya),br=Dn&&!isNaN(Dn.httpTimeout)?Dn.httpTimeout:8e3,yr=Vn.getSessionId()||null;let ir=new o(mr,rr,pr,Kn,va,ya,yr,ar);const Er=isNaN(pt.get().streaming.retryAttempts[U.HTTPRequest.LICENSE])?3:pt.get().streaming.retryAttempts[U.HTTPRequest.LICENSE];er(Ct.getLicenseRequestFilters(),ir).then((()=>{Za(ir,Er,br,ia,hr,nr)}))})(Vt,On,xn)}else Xn(Rn,new p.default(ee.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Xn(Tt,Vt=null){Pt.trigger(Bt.LICENSE_REQUEST_COMPLETE,{data:Tt,error:Vt})}function Za(Tt,Vt,on,vn,_n,xn){const On=new XMLHttpRequest,Rn=rt.getCmcdParametersFromManifest();if(rt.isCmcdEnabled()&&(Rn.mode?Rn.mode:pt.get().streaming.cmcd.mode)===ye.default.CMCD_MODE_QUERY){const In=rt.getQueryParameter({url:Tt.url,type:U.HTTPRequest.LICENSE});In&&(Tt.url=se.default.addAdditionalQueryParameterToUrl(Tt.url,[In]))}On.open(Tt.method,Tt.url,!0),On.responseType=Tt.responseType,On.withCredentials=Tt.withCredentials,on>0&&(On.timeout=on);for(const In in Tt.headers)On.setRequestHeader(In,Tt.headers[In]);if(rt.isCmcdEnabled()&&(Rn.mode?Rn.mode:pt.get().streaming.cmcd.mode)===ye.default.CMCD_MODE_HEADER){const In=rt.getHeaderParameters({url:Tt.url,type:U.HTTPRequest.LICENSE});if(In)for(const Dn in In){let Vn=In[Dn];Vn&&On.setRequestHeader(Dn,Vn)}}const kn=function(){Vt--;const In=isNaN(pt.get().streaming.retryIntervals[U.HTTPRequest.LICENSE])?1e3:pt.get().streaming.retryIntervals[U.HTTPRequest.LICENSE];gn=setTimeout((function(){Za(Tt,Vt,on,vn,_n,xn)}),In)};On.onload=function(){an=null,this.status>=200&&this.status<=299||Vt<=0?vn(this):(ln.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+Vt),kn())},On.ontimeout=On.onerror=function(){an=null,Vt<=0?xn(this):(ln.warn("License request network request failed . Retrying it... Pending retries: "+Vt),kn())},On.onabort=function(){_n(this)},Pt.trigger(Bt.LICENSE_REQUEST_SENDING,{url:Tt.url,headers:Tt.headers,payload:Tt.data,sessionId:Tt.sessionId}),an=On,On.send(Tt.data)}function cr(){an&&(an.onloadend=an.onerror=an.onprogress=void 0,an.abort(),an=null),gn&&(clearTimeout(gn),gn=null)}function Ja(Tt,Vt){if(Vt)for(const on in Vt)Tt[on]=Vt[on]}function fr(Tt,Vt,on,vn,_n){let xn="NONE",On=null;Tt.response&&(xn=_n.getErrorResponse(Tt.response,on,vn),On={serverResponse:Tt.response||null,responseCode:Tt.status||null,responseText:Tt.statusText||null}),Xn(Vt,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+on+' update, XHR complete. status is "'+Tt.statusText+'" ('+Tt.status+"), readyState is "+Tt.readyState+". Response is "+xn,On))}function er(Tt,Vt){return Tt?Tt.reduce(((on,vn)=>on.then((()=>vn(Vt)))),Promise.resolve()):Promise.resolve()}function ka(Tt,Vt){if(pt.get().streaming.protection.ignoreEmeEncryptedEvent)return;if(ln.debug("DRM: onNeedKey"),Tt.key.initDataType!==N.default.INITIALIZATION_DATA_TYPE_CENC)return void ln.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+Tt.key.initDataType);if(Sn.length===0&&(ln.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(Vt=Vt===void 0?1:Vt+1)<5))return void un.push(setTimeout((()=>{ka(Tt,Vt)}),500));let on=Tt.key.initData;if(ArrayBuffer.isView(on)&&(on=on.buffer),je){const _n=Z.getPSSHForKeySystem(je,on);if(_n&&ra(_n))return}ln.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(on)));const vn=gt.getSupportedKeySystemMetadataFromSegmentPssh(on,Ot,Mt);vn.length!==0?(function(_n){Ft.push(_n),Cn(_n,!1)})(vn):ln.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}function gr(Tt,Vt){if(Tt.size<=0)return!1;if(Vt.size>0&&[...Tt].every((vn=>{const _n=Vt.get(vn);return _n!==void 0&&_n!==""})))return!0;const on=Gt.getSessionTokens();if(on&&on.length>0){const vn=on.filter((_n=>[...Tt].includes(_n.normalizedKeyId)));if(vn.some((_n=>!_n.hasTriggeredKeyStatusMapUpdate))||vn.length===0)return!1}return!pt.get().streaming.protection.ignoreKeyStatuses&&Tt&&Tt.size>0&&Vt&&Vt.size>0}return qt={areKeyIdsExpired:function(Tt){try{return!!gr(Tt,Et)&&[...Tt].every((Vt=>Et.get(Vt)===N.default.MEDIA_KEY_STATUSES.EXPIRED))}catch(Vt){return ln.error(Vt),!1}},areKeyIdsUsable:function(Tt){try{return!gr(Tt,Et)||[...Tt].some((Vt=>{const on=Et.get(Vt);return on&&on!==N.default.MEDIA_KEY_STATUSES.INTERNAL_ERROR&&on!==N.default.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED}))}catch(Vt){return ln.error(Vt),!0}},clearMediaInfoArray:function(){Sn=[]},closeKeySession:_a,createKeySession:re,getKeySystems:function(){return gt?gt.getKeySystems():[]},getSupportedKeySystemMetadataFromContentProtection:function(Tt){return wn(),gt.getSupportedKeySystemMetadataFromContentProtection(Tt,Ot,Mt)},handleKeySystemFromManifest:function(){if(!Sn||Sn.length===0)return;let Tt=[];Sn.forEach((Vt=>{const on=gt.getSupportedKeySystemMetadataFromContentProtection(Vt.contentProtection,Ot,Mt);on.length>0&&(Tt.length===0&&(Tt=on),Ft.push(on))})),Tt&&Tt.length>0&&Cn(Tt,!0)},initializeForMedia:function(Tt){if(!Tt)throw new Error("mediaInfo can not be null or undefined");wn(),Sn.push(Tt)},loadKeySession:qn,removeKeySession:function(Tt){wn(),Gt.removeKeySession(Tt)},reset:function(){Pt.off(Bt.INTERNAL_KEY_MESSAGE,za,qt),wn(),cr(),Qn(null),je=null,Xt=!1,Et=new Map,Gt&&(Gt.reset(),Gt=null),un.forEach((Tt=>clearTimeout(Tt))),un=[],Sn=[],Ft=[]},setKeySystems:function(Tt){gt&>.setKeySystems(Tt)},setMediaElement:Qn,setProtectionData:function(Tt){Ot=Tt,gt.setProtectionData(Tt)},setRobustnessLevel:function(Tt){et=Tt},setServerCertificate:function(Tt){return wn(),Gt.setServerCertificate(Tt)},setSessionType:function(Tt){Mt=Tt},stop:function(){cr(),Gt&&Gt.stop()},updateKeyStatusesMap:function(Tt){try{if(!Tt||!Tt.sessionToken||!Tt.parsedKeyStatuses)return;Tt.sessionToken.hasTriggeredKeyStatusMapUpdate=!0;const Vt=Tt.parsedKeyStatuses,on=se.default.parseUserAgent(),vn=on&&on.browser&&on.browser.name&&on.browser.name.toLowerCase()==="edge";Vt.forEach((_n=>{vn&&je.uuid===N.default.PLAYREADY_UUID&&_n.keyId&&_n.keyId.byteLength===16&&(function(On){const Rn=se.default.bufferSourceToDataView(On),kn=Rn.getUint32(0,!0),In=Rn.getUint16(4,!0),Dn=Rn.getUint16(6,!0);Rn.setUint32(0,kn,!1),Rn.setUint16(4,In,!1),Rn.setUint16(6,Dn,!1)})(_n.keyId);const xn=se.default.bufferSourceToHex(_n.keyId).slice(0,32);xn&&xn!==""&&Et.set(xn,_n.status)})),Pt.trigger(Bt.KEY_STATUSES_MAP_UPDATED,{keyStatusMap:Et})}catch(Vt){ln.error(Vt)}}},ln=At.getLogger(qt),Ft=[],Sn=[],Mt="temporary",et="",an=null,gn=null,Et=new Map,Pt.on(Bt.INTERNAL_KEY_MESSAGE,za,qt),qt}Ie.__dashjs_factory_name="ProtectionController";var Pe=ke.default.getClassFactory(Ie),Ge=class{constructor(Nt,St){this.keyID=Nt,this.key=St}},yt=class{constructor(Nt,St){if(St&&St!=="persistent"&&St!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=Nt,this.type=St}toJWK(){let Nt,St=this.keyPairs.length,rt={keys:[]};for(Nt=0;Nt<St;Nt++){let Bt={kty:"oct",alg:"A128KW",kid:this.keyPairs[Nt].keyID,k:this.keyPairs[Nt].key};rt.keys.push(Bt)}this.type&&(rt.type=this.type);let Je=JSON.stringify(rt);const Ct=Je.length;let At=new ArrayBuffer(Ct),Pt=new Uint8Array(At);for(Nt=0;Nt<Ct;Nt++)Pt[Nt]=Je.charCodeAt(Nt);return At}};const Ae=N.default.CLEARKEY_UUID,ge=N.default.CLEARKEY_KEYSTEM_STRING,ue="urn:uuid:"+Ae;function we(Nt){let St;const rt=(Nt=Nt||{}).BASE64;return St={uuid:Ae,schemeIdURI:ue,systemString:ge,getInitData:function(Je,Ct){try{let At=Z.parseInitDataFromContentProtection(Je,rt);if(!At&&Ct){const Pt={kids:[(function(Bt){try{let gt=Bt.replace(/-/g,"");return gt=btoa(gt.match(/\w{2}/g).map((pt=>String.fromCharCode(parseInt(pt,16)))).join("")),gt.replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}})(Ct.cencDefaultKid)]};At=new TextEncoder().encode(JSON.stringify(Pt))}return At}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(Je){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Je))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Je,Ct){let At=null;if(Je){const Pt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Ct))),Bt=[];for(let gt=0;gt<Pt.kids.length;gt++){const pt=Pt.kids[gt],Ot=Je.clearkeys&&Je.clearkeys.hasOwnProperty(pt)?Je.clearkeys[pt]:null;if(!Ot)throw new Error("DRM: ClearKey keyID ("+pt+") is not known!");Bt.push(new Ge(pt,Ot))}At=new yt(Bt)}return At}},St}we.__dashjs_factory_name="KeySystemClearKey";var Ne=ke.default.getSingletonFactory(we);const He=N.default.W3C_CLEARKEY_UUID,Ht=N.default.CLEARKEY_KEYSTEM_STRING,be="urn:uuid:"+He;function mt(Nt){let St;const rt=Nt.BASE64,Je=Nt.debug.getLogger(St);return St={uuid:He,schemeIdURI:be,systemString:Ht,getInitData:function(Ct){return Z.parseInitDataFromContentProtection(Ct,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Ct){return new Uint8Array(Ct)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Ct,At){let Pt=null;if(Ct){const Bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(At))),gt=[];for(let pt=0;pt<Bt.kids.length;pt++){const Ot=Bt.kids[pt],qt=Ct.clearkeys&&Ct.clearkeys.hasOwnProperty(Ot)?Ct.clearkeys[Ot]:null;if(!qt)throw new Error("DRM: ClearKey keyID ("+Ot+") is not known!");gt.push(new Ge(Ot,qt))}Pt=new yt(gt),Je.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return Pt}},St}mt.__dashjs_factory_name="KeySystemW3CClearKey";var Ve=ke.default.getSingletonFactory(mt);const Ue=N.default.WIDEVINE_UUID,Rt=N.default.WIDEVINE_KEYSTEM_STRING,Zt="urn:uuid:"+Ue;function jt(Nt){let St;const rt=(Nt=Nt||{}).BASE64;return St={uuid:Ue,schemeIdURI:Zt,systemString:Rt,getInitData:function(Je){return Z.parseInitDataFromContentProtection(Je,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Je){return new Uint8Array(Je)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},St}jt.__dashjs_factory_name="KeySystemWidevine";var Wt=ke.default.getSingletonFactory(jt);const $t=N.default.PLAYREADY_UUID,cn=N.default.PLAYREADY_KEYSTEM_STRING,bn="urn:uuid:"+$t;function En(Nt){let St,rt="utf-16";const Je=(Nt=Nt||{}).BASE64,Ct=Nt.settings;function At(){if(!Je||!Je.hasOwnProperty("decodeArray")||!Je.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return St={uuid:$t,schemeIdURI:bn,systemString:cn,getInitData:function(Pt){const Bt=new Uint8Array([112,115,115,104,0,0,0,0]),gt=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);let pt,Ot,qt,Et,Xt,gn=0,an=null;if(At(),!Pt)return null;if("pssh"in Pt&&Pt.pssh)return Z.parseInitDataFromContentProtection(Pt,Je);if("pro"in Pt&&Pt.pro)an=Je.decodeArray(Pt.pro.__text);else{if(!("prheader"in Pt)||!Pt.prheader)return null;an=Je.decodeArray(Pt.prheader.__text)}return pt=an.length,Ot=4+Bt.length+gt.length+4+pt,qt=new ArrayBuffer(Ot),Et=new Uint8Array(qt),Xt=new DataView(qt),Xt.setUint32(gn,Ot),gn+=4,Et.set(Bt,gn),gn+=Bt.length,Et.set(gt,gn),gn+=gt.length,Xt.setUint32(gn,pt),gn+=4,Et.set(an,gn),gn+=pt,Et.buffer},getRequestHeadersFromMessage:function(Pt){let Bt,gt;const pt={},Ot=new DOMParser;if(Ct&&Ct.get().streaming.protection.detectPlayreadyMessageFormat&&rt==="utf-16"&&Pt&&Pt.byteLength%2==1)return pt["Content-Type"]="text/xml; charset=utf-8",pt;const qt=rt==="utf-16"?new Uint16Array(Pt):new Uint8Array(Pt);Bt=String.fromCharCode.apply(null,qt),gt=Ot.parseFromString(Bt,"application/xml");const Et=gt.getElementsByTagName("name"),Xt=gt.getElementsByTagName("value");for(let gn=0;gn<Et.length;gn++)pt[Et[gn].childNodes[0].nodeValue]=Xt[gn].childNodes[0].nodeValue;return pt.hasOwnProperty("Content")&&(pt["Content-Type"]=pt.Content,delete pt.Content),pt.hasOwnProperty("Content-Type")||(pt["Content-Type"]="text/xml; charset=utf-8"),pt},getLicenseRequestFromMessage:function(Pt){let Bt=null;const gt=new DOMParser;if(Ct&&Ct.get().streaming.protection.detectPlayreadyMessageFormat&&rt==="utf-16"&&Pt&&Pt.byteLength%2==1)return Pt;const pt=rt==="utf-16"?new Uint16Array(Pt):new Uint8Array(Pt);At();const Ot=String.fromCharCode.apply(null,pt),qt=gt.parseFromString(Ot,"application/xml");if(!qt.getElementsByTagName("PlayReadyKeyMessage")[0])return Pt;{const Et=qt.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;Et&&(Bt=Je.decode(Et))}return Bt},getLicenseServerURLFromInitData:function(Pt){if(Pt){const Bt=new DataView(Pt),gt=Bt.getUint16(4,!0);let pt=6;const Ot=new DOMParser;for(let qt=0;qt<gt;qt++){const Et=Bt.getUint16(pt,!0);pt+=2;const Xt=Bt.getUint16(pt,!0);if(pt+=2,Et!==1){pt+=Xt;continue}const gn=Pt.slice(pt,pt+Xt),an=String.fromCharCode.apply(null,new Uint16Array(gn)),ln=Ot.parseFromString(an,"application/xml");if(ln.getElementsByTagName("LA_URL")[0]){const Sn=ln.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(Sn)return Sn}if(ln.getElementsByTagName("LUI_URL")[0]){const Sn=ln.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(Sn)return Sn}}}return null},getCDMData:function(Pt){let Bt,gt,pt,Ot;if(At(),!Pt)return null;for(Bt=[],Ot=0;Ot<Pt.length;++Ot)Bt.push(Pt.charCodeAt(Ot)),Bt.push(0);for(Bt=String.fromCharCode.apply(null,Bt),Bt=Je.encode(Bt),gt='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",Bt),pt=[],Ot=0;Ot<gt.length;++Ot)pt.push(gt.charCodeAt(Ot)),pt.push(0);return new Uint8Array(pt).buffer},setPlayReadyMessageFormat:function(Pt){if(Pt!=="utf-8"&&Pt!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');rt=Pt}},St}En.__dashjs_factory_name="KeySystemPlayReady";var ve=ke.default.getSingletonFactory(En);function Ee(Nt){const St=(Nt=Nt||{}).BASE64,rt={};let Je;return rt[N.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(Ct){return St.decodeArray(Ct.license)},getErrorResponse:function(Ct){return Ct}},rt[N.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(Ct){return Ct},getErrorResponse:function(Ct){return String.fromCharCode.apply(null,new Uint8Array(Ct))}},Je={getServerURLFromMessage:function(Ct){return Ct},getHTTPMethod:function(){return"POST"},getResponseType:function(Ct){return rt[Ct].responseType},getLicenseMessage:function(Ct,At){return(function(){if(!St||!St.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")})(),rt[At].getLicenseMessage(Ct)},getErrorResponse:function(Ct,At){return rt[At].getErrorResponse(Ct)}},Je}Ee.__dashjs_factory_name="DRMToday";var st=ke.default.getSingletonFactory(Ee);function L(){let Nt;const St="http://schemas.xmlsoap.org/soap/envelope/";function rt(At){const Pt=String.fromCharCode.apply(null,new Uint8Array(At));return decodeURIComponent(escape(Pt))}function Je(At){if(window.DOMParser){const Pt=rt(At),Bt=new window.DOMParser().parseFromString(Pt,"text/xml"),gt=Bt?Bt.getElementsByTagNameNS(St,"Envelope")[0]:null,pt=gt?gt.getElementsByTagNameNS(St,"Body")[0]:null;if(pt&&pt.getElementsByTagNameNS(St,"Fault")[0])return null}return At}function Ct(At){let Pt="",Bt="",gt="",pt=-1,Ot=-1;if(window.DOMParser){const Et=rt(At),Xt=new window.DOMParser().parseFromString(Et,"text/xml"),gn=Xt?Xt.getElementsByTagNameNS(St,"Envelope")[0]:null,an=gn?gn.getElementsByTagNameNS(St,"Body")[0]:null,ln=an?an.getElementsByTagNameNS(St,"Fault")[0]:null,Sn=ln?ln.getElementsByTagName("detail")[0]:null,Ft=Sn?Sn.getElementsByTagName("Exception")[0]:null;let et=null;if(ln===null)return Et;et=ln.getElementsByTagName("faultstring")[0].firstChild,Pt=et?et.nodeValue:null,Ft!==null&&(et=Ft.getElementsByTagName("StatusCode")[0],Bt=et?et.firstChild.nodeValue:null,et=Ft.getElementsByTagName("Message")[0],gt=et?et.firstChild.nodeValue:null,pt=gt?gt.lastIndexOf("[")+1:-1,Ot=gt?gt.indexOf("]"):-1,gt=gt?gt.substring(pt,Ot):"")}let qt=`code: ${Bt}, name: ${Pt}`;return gt&&(qt+=`, message: ${gt}`),qt}return Nt={getServerURLFromMessage:function(At){return At},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(At){return Je.call(this,At)},getErrorResponse:function(At){return Ct.call(this,At)}},Nt}L.__dashjs_factory_name="PlayReady";var M=ke.default.getSingletonFactory(L);function f(){let Nt;return Nt={getServerURLFromMessage:function(St){return St},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(St){return St},getErrorResponse:function(St){return String.fromCharCode.apply(null,new Uint8Array(St))}},Nt}f.__dashjs_factory_name="Widevine";var E=ke.default.getSingletonFactory(f);function $(){let Nt;return Nt={getServerURLFromMessage:function(St){return St},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(St){if(!St.hasOwnProperty("keys"))return null;let rt=[];for(let Je=0;Je<St.keys.length;Je++){let Ct=St.keys[Je],At=Ct.kid.replace(/=/g,""),Pt=Ct.k.replace(/=/g,"");rt.push(new Ge(At,Pt))}return new yt(rt)},getErrorResponse:function(St){return String.fromCharCode.apply(null,new Uint8Array(St))}},Nt}$.__dashjs_factory_name="ClearKey";var z=ke.default.getSingletonFactory($),Te=class{constructor(Nt){this.ks=Nt.ks,this.keyId=Nt.keyId,this.initData=Nt.initData,this.protData=Nt.protData,this.cdmData=Nt.cdmData,this.sessionId=Nt.sessionId,this.sessionType=Nt.sessionType}};function Fe(){let Nt,St,rt,Je,Ct,At,Pt,Bt,gt=this.context;function pt(Et,Xt){return Xt&&Et in Xt?Xt[Et]:null}function Ot(Et,Xt){return Et&&Et.sessionId?Et.sessionId:Xt&&Xt.sessionId?Xt.sessionId:null}function qt(Et,Xt){return Et&&Et.sessionType?Et.sessionType:Xt}return Nt={getKeySystemBySystemString:function(Et){for(let Xt=0;Xt<Je.length;Xt++)if(Je[Xt].systemString===Et)return Je[Xt];return null},getKeySystems:function(){return Je},getLicenseServerModelInstance:function(Et,Xt,gn){if(gn===N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE||gn===N.default.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST)return null;let an=null;return Xt&&Xt.hasOwnProperty("drmtoday")?an=st(gt).getInstance({BASE64:Ct}):Et.systemString===N.default.WIDEVINE_KEYSTEM_STRING?an=E(gt).getInstance():Et.systemString===N.default.PLAYREADY_KEYSTEM_STRING?an=M(gt).getInstance():Et.systemString===N.default.CLEARKEY_KEYSTEM_STRING&&(an=z(gt).getInstance()),an},getSupportedKeySystemMetadataFromContentProtection:function(Et,Xt,gn){let an,ln,Sn,Ft,et=[];if(!Et||!Et.length)return et;const je=Z.findMp4ProtectionElement(Et);for(Sn=0;Sn<Je.length;Sn++){ln=Je[Sn];const Mt=pt(ln.systemString,Xt);for(Ft=0;Ft<Et.length;Ft++)if(an=Et[Ft],an.schemeIdUri.toLowerCase()===ln.schemeIdURI){let Gt=ln.getInitData(an,je);const un=new Te({ks:Je[Sn],keyId:an.keyId,initData:Gt,protData:Mt,cdmData:ln.getCDMData(Mt?Mt.cdmData:null),sessionId:Ot(Mt,an),sessionType:qt(Mt,gn)});Mt?et.unshift(un):et.push(un)}}return et},getSupportedKeySystemMetadataFromSegmentPssh:function(Et,Xt,gn){let an,ln,Sn=[],Ft=Z.parsePSSHList(Et);for(let et=0;et<Je.length;++et){an=Je[et],ln=an.systemString;const je=pt(ln,Xt);an.uuid in Ft&&Sn.push({ks:an,initData:Ft[an.uuid],protData:je,cdmData:an.getCDMData(je?je.cdmData:null),sessionId:Ot(je),sessionType:qt(je,gn)})}return Sn},initDataEquals:function(Et,Xt){if(Et.byteLength===Xt.byteLength){let gn=new Uint8Array(Et),an=new Uint8Array(Xt);for(let ln=0;ln<gn.length;ln++)if(gn[ln]!==an[ln])return!1;return!0}return!1},initialize:function(){let Et;Je=[],Et=ve(gt).getInstance({BASE64:Ct,settings:At}),Je.push(Et),Et=Wt(gt).getInstance({BASE64:Ct}),Je.push(Et),Et=Ne(gt).getInstance({BASE64:Ct}),Je.push(Et),Pt=Et,Et=Ve(gt).getInstance({BASE64:Ct,debug:St}),Je.push(Et),Bt=Et},isClearKey:function(Et){return Et===Pt||Et===Bt},processClearKeyLicenseRequest:function(Et,Xt,gn){try{return Et.getClearKeysFromProtectionData(Xt,gn)}catch{return rt.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(Et){Et&&(Et.debug&&(St=Et.debug,rt=St.getLogger(Nt)),Et.BASE64&&(Ct=Et.BASE64),Et.settings&&(At=Et.settings))},setKeySystems:function(Et){Je=Et},setProtectionData:function(Et){for(var Xt,gn,an=0;an<Je.length;an++){var ln=Je[an];ln.hasOwnProperty("init")&&ln.init((Xt=ln.systemString,gn=void 0,gn=null,Et&&(gn=Xt in Et?Et[Xt]:null),gn))}}},Nt}Fe.__dashjs_factory_name="ProtectionKeyController";var Re=ke.default.getSingletonFactory(Fe),De=oe(445),Se=class{constructor(Nt,St){this.initData=Nt,this.initDataType=St}},ze=class{constructor(Nt,St,rt,Je){this.sessionToken=Nt,this.message=St,this.defaultURL=rt,this.messageType=Je||N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST}},Ze=class{constructor(Nt,St){this.keySystem=Nt,this.ksConfiguration=St,this.nativeMediaKeySystemAccessObject=null,this.selectedSystemString=null}};const Ke={};function lt(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug;let At,Pt,Bt,gt,pt,Ot,qt,Et;function Xt(et,je,Mt,Gt){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){const Mn="Insecure origins are not allowed";return rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Mn}),void Gt({error:Mn})}const un=et[je].protData&&et[je].protData.systemStringPriority?et[je].protData.systemStringPriority:null,wn=et[je].configs,Cn=et[je].ks;let Gn=Cn.systemString;(function(Mn,qn){return new Promise(((re,Hn)=>{gn(Mn,qn,0,re,Hn)}))})(un||(Ke[Gn]?Ke[Gn]:[Gn]),wn).then((Mn=>{const qn=Mn&&Mn.nativeMediaKeySystemAccessObject&&typeof Mn.nativeMediaKeySystemAccessObject.getConfiguration=="function"?Mn.nativeMediaKeySystemAccessObject.getConfiguration():null,re=new Ze(Cn,qn);re.selectedSystemString=Mn.selectedSystemString,re.nativeMediaKeySystemAccessObject=Mn.nativeMediaKeySystemAccessObject,rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:re}),Mt({data:re})})).catch((Mn=>{if(je+1<et.length)Xt(et,je+1,Mt,Gt);else{const qn="Key system access denied! ";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:qn+Mn.message}),Gt({error:qn+Mn.message})}}))}function gn(et,je,Mt,Gt,un){const wn=et[Mt];Pt.debug(`Requesting key system access for system string ${wn}`),navigator.requestMediaKeySystemAccess(wn,je).then((Cn=>{Gt({nativeMediaKeySystemAccessObject:Cn,selectedSystemString:wn})})).catch((Cn=>{Mt+1<et.length?gn(et,je,Mt+1,Gt,un):un(Cn)}))}function an(et){if(!et||!et.session)return Promise.resolve;const je=et.session;return je.removeEventListener("keystatuseschange",et),je.removeEventListener("message",et),je.close()}function ln(et){for(let je=0;je<Ot.length;je++)if(Ot[je]===et){Ot.splice(je,1);break}}function Sn(et,je){const Mt={session:et,keyId:je.keyId,normalizedKeyId:je&&je.keyId&&typeof je.keyId=="string"?je.keyId.replace(/-/g,"").toLowerCase():"",initData:je.initData,sessionId:je.sessionId,sessionType:je.sessionType,hasTriggeredKeyStatusMapUpdate:!1,handleEvent:function(Gt){switch(Gt.type){case"keystatuseschange":this._onKeyStatusesChange(Gt);break;case"message":this._onKeyMessage(Gt)}},_onKeyStatusesChange:function(Gt){rt.trigger(Je.KEY_STATUSES_CHANGED,{data:this});const un=[];Gt.target.keyStatuses.forEach((function(){un.push(Ft(arguments))})),rt.trigger(Je.INTERNAL_KEY_STATUSES_CHANGED,{parsedKeyStatuses:un,sessionToken:Mt})},_onKeyMessage:function(Gt){let un=ArrayBuffer.isView(Gt.message)?Gt.message.buffer:Gt.message;rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(this,un,void 0,Gt.messageType)})},getKeyId:function(){return this.keyId},getSessionId:function(){return et.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return et.expiration},getKeyStatuses:function(){return et.keyStatuses},getUsable:function(){let Gt=!1;return et.keyStatuses.forEach((function(){Ft(arguments).status===N.default.MEDIA_KEY_STATUSES.USABLE&&(Gt=!0)})),Gt}};return et.addEventListener("keystatuseschange",Mt),et.addEventListener("message",Mt),et.closed.then((()=>{ln(Mt),Pt.debug("DRM: Session closed. SessionID = "+Mt.getSessionId()),rt.trigger(Je.KEY_SESSION_CLOSED,{data:Mt.getSessionId()})})),Ot.push(Mt),Mt}function Ft(et){let je,Mt;return et&&et.length>0&&(et[0]&&(typeof et[0]=="string"?je=et[0]:Mt=et[0]),et[1]&&(typeof et[1]=="string"?je=et[1]:Mt=et[1])),{status:je,keyId:Mt}}return At={closeKeySession:function(et){an(et).catch((function(je){ln(et),rt.trigger(Je.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+et.getSessionId()+") "+je.name})}))},createKeySession:function(et){if(!Bt||!pt)throw new Error("Can not create sessions until you have selected a key system");const je=pt.createSession(et.sessionType),Mt=Sn(je,et),Gt=Bt.systemString===N.default.CLEARKEY_KEYSTEM_STRING&&(et.initData||et.protData&&et.protData.clearkeys)?N.default.INITIALIZATION_DATA_TYPE_KEYIDS:N.default.INITIALIZATION_DATA_TYPE_CENC;je.generateRequest(Gt,et.initData).then((function(){Pt.debug("DRM: Session created. SessionID = "+Mt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Mt})})).catch((function(un){ln(Mt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+un.name)})}))},getAllInitData:function(){const et=[];for(let je=0;je<Ot.length;je++)Ot[je].initData&&et.push(Ot[je].initData);return et},getSessionTokens:function(){return Ot},loadKeySession:function(et){if(!Bt||!pt)throw new Error("Can not load sessions until you have selected a key system");const je=et.sessionId;for(let un=0;un<Ot.length;un++)if(je===Ot[un].sessionId)return void Pt.warn("DRM: Ignoring session ID because we have already seen it!");const Mt=pt.createSession(et.sessionType),Gt=Sn(Mt,et);Gt.hasTriggeredKeyStatusMapUpdate=!0,Mt.load(je).then((function(un){un?(Pt.debug("DRM: Session loaded. SessionID = "+Gt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Gt})):(ln(Gt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+je+")")}))})).catch((function(un){ln(Gt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+je+")! "+un.name)})}))},removeKeySession:function(et){et.session.remove().then((function(){Pt.debug("DRM: Session removed. SessionID = "+et.getSessionId()),rt.trigger(Je.KEY_SESSION_REMOVED,{data:et.getSessionId()})}),(function(je){rt.trigger(Je.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+et.getSessionId()+"). "+je.name})}))},requestKeySystemAccess:function(et){return new Promise(((je,Mt)=>{Xt(et,0,je,Mt)}))},reset:function(){const et=Ot.length;let je;if(et!==0){const Mt=function(Gt){ln(Gt),Ot.length===0&&(gt?(gt.removeEventListener("encrypted",qt),gt.setMediaKeys(null).then((function(){rt.trigger(Je.TEARDOWN_COMPLETE)}))):rt.trigger(Je.TEARDOWN_COMPLETE))};for(let Gt=0;Gt<et;Gt++)je=Ot[Gt],(function(un){an(je),Mt(un)})(je)}else rt.trigger(Je.TEARDOWN_COMPLETE)},selectKeySystem:function(et){return new Promise(((je,Mt)=>{et.nativeMediaKeySystemAccessObject.createMediaKeys().then((Gt=>(Bt=et.keySystem,pt=Gt,gt?gt.setMediaKeys(pt):Promise.resolve()))).then((()=>{je(Bt)})).catch((function(){Mt({error:"Error selecting keys system ("+et.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(et){gt!==et&&(gt&&(gt.removeEventListener("encrypted",qt),gt.setMediaKeys&>.setMediaKeys(null)),gt=et,gt&&(gt.addEventListener("encrypted",qt),gt.setMediaKeys&&pt&>.setMediaKeys(pt)))},setServerCertificate:function(et){return new Promise((je=>{pt.setServerCertificate(et).then((function(){Pt.info("DRM: License server certificate successfully updated."),rt.trigger(Je.SERVER_CERTIFICATE_UPDATED),je()})).catch((Mt=>{rt.trigger(Je.SERVER_CERTIFICATE_UPDATED,{error:new p.default(ee.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,ee.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+Mt.name)}),je()}))}))},stop:function(){let et;for(let je=0;je<Ot.length;je++)et=Ot[je],et.getUsable()||(an(et),ln(et))},updateKeySession:function(et,je){const Mt=et.session;Et.isClearKey(Bt)&&(je=je.toJWK()),Mt.update(je).then((()=>{rt.trigger(Je.KEY_SESSION_UPDATED)})).catch((function(Gt){rt.trigger(Je.KEY_ERROR,{error:new p.default(ee.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+Gt.name,et)})}))}},Pt=Ct.getLogger(At),Bt=null,gt=null,pt=null,Ot=[],Et=Re(St).getInstance(),qt={handleEvent:function(et){if(et.type==="encrypted"&&et.initData){let je=ArrayBuffer.isView(et.initData)?et.initData.buffer:et.initData;rt.trigger(Je.NEED_KEY,{key:new Se(je,et.initDataType)})}}},At}Ke[N.default.PLAYREADY_KEYSTEM_STRING]=[N.default.PLAYREADY_KEYSTEM_STRING,N.default.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],Ke[N.default.WIDEVINE_KEYSTEM_STRING]=[N.default.WIDEVINE_KEYSTEM_STRING],Ke[N.default.CLEARKEY_KEYSTEM_STRING]=[N.default.CLEARKEY_KEYSTEM_STRING],lt.__dashjs_factory_name="DefaultProtectionModel";var Yt=ke.default.getClassFactory(lt);function xt(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug,At=Nt.api;let Pt,Bt,gt,pt,Ot,qt,Et,Xt,gn;function an(){try{for(let Ft=0;Ft<Et.length;Ft++)ln(Et[Ft]);gt&>.removeEventListener(At.needkey,Xt),rt.trigger(Je.TEARDOWN_COMPLETE)}catch(Ft){rt.trigger(Je.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+Ft.message})}}function ln(Ft){const et=Ft.session;et.removeEventListener(At.error,Ft),et.removeEventListener(At.message,Ft),et.removeEventListener(At.ready,Ft),et.removeEventListener(At.close,Ft);for(let je=0;je<Et.length;je++)if(Et[je]===Ft){Et.splice(je,1);break}et[At.release]()}function Sn(){let Ft=null;const et=function(){gt.removeEventListener("loadedmetadata",Ft),gt[At.setMediaKeys](Ot),rt.trigger(Je.VIDEO_ELEMENT_SELECTED)};gt.readyState>=1?et():(Ft=et.bind(this),gt.addEventListener("loadedmetadata",Ft))}return Pt={getAllInitData:function(){const Ft=[];for(let et=0;et<Et.length;et++)Ft.push(Et[et].initData);return Ft},getSessionTokens:function(){return Et},requestKeySystemAccess:function(Ft){return new Promise(((et,je)=>{let Mt=!1;for(let Gt=0;Gt<Ft.length;Gt++){const un=Ft[Gt].ks.systemString,wn=Ft[Gt].configs;let Cn=null,Gn=null;for(let Mn=0;Mn<wn.length;Mn++){const qn=wn[Mn].audioCapabilities,re=wn[Mn].videoCapabilities;if(qn&&qn.length!==0){Cn=[];for(let Qn=0;Qn<qn.length;Qn++)window[At.MediaKeys].isTypeSupported(un,qn[Qn].contentType)&&Cn.push(qn[Qn])}if(re&&re.length!==0){Gn=[];for(let Qn=0;Qn<re.length;Qn++)window[At.MediaKeys].isTypeSupported(un,re[Qn].contentType)&&Gn.push(re[Qn])}if(!Cn&&!Gn||Cn&&Cn.length===0||Gn&&Gn.length===0)continue;Mt=!0;const Hn=new Y(Cn,Gn),ra=gn.getKeySystemBySystemString(un),_a=new Ze(ra,Hn);rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:_a}),et({data:_a});break}}if(!Mt){const Gt="Key system access denied! -- No valid audio/video content configurations detected!";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Gt}),je({error:Gt})}}))},selectKeySystem:function(Ft){return new Promise(((et,je)=>{try{Ot=Ft.mediaKeys=new window[At.MediaKeys](Ft.keySystem.systemString),pt=Ft.keySystem,qt=Ft,gt&&Sn(),et(pt)}catch{je({error:"Error selecting keys system ("+pt.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(Ft){gt!==Ft&&(gt&>.removeEventListener(At.needkey,Xt),gt=Ft,gt&&(gt.addEventListener(At.needkey,Xt),Ot&&Sn()))},createKeySession:function(Ft){if(!pt||!Ot||!qt)throw new Error("Can not create sessions until you have selected a key system");let et=null;if(qt.ksConfiguration.videoCapabilities&&qt.ksConfiguration.videoCapabilities.length>0&&(et=qt.ksConfiguration.videoCapabilities[0]),et===null&&qt.ksConfiguration.audioCapabilities&&qt.ksConfiguration.audioCapabilities.length>0&&(et=qt.ksConfiguration.audioCapabilities[0]),et===null)throw new Error("Can not create sessions for unknown content types.");const je=et.contentType,Mt=Ot.createSession(je,new Uint8Array(Ft.initData),Ft.cdmData?new Uint8Array(Ft.cdmData):null),Gt=(function(un,wn){return{session:un,keyId:wn.keyId,normalizedKeyId:wn&&wn.keyId&&typeof wn.keyId=="string"?wn.keyId.replace(/-/g,"").toLowerCase():"",initData:wn.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}},handleEvent:function(Cn){switch(Cn.type){case At.error:let Gn="KeyError";rt.trigger(Je.KEY_ERROR,{error:new p.default(ee.default.MEDIA_KEYERR_CODE,Gn,this)});break;case At.message:let Mn=ArrayBuffer.isView(Cn.message)?Cn.message.buffer:Cn.message;rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(this,Mn,Cn.destinationURL)});break;case At.ready:Bt.debug("DRM: Key added."),rt.trigger(Je.KEY_ADDED);break;case At.close:Bt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),rt.trigger(Je.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}})(Mt,Ft);Mt.addEventListener(At.error,Gt),Mt.addEventListener(At.message,Gt),Mt.addEventListener(At.ready,Gt),Mt.addEventListener(At.close,Gt),Et.push(Gt),Bt.debug("DRM: Session created. SessionID = "+Gt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Gt})},updateKeySession:function(Ft,et){const je=Ft.session;gn.isClearKey(pt)?je.update(new Uint8Array(et.toJWK())):je.update(new Uint8Array(et)),rt.trigger(Je.KEY_SESSION_UPDATED)},closeKeySession:ln,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:an,reset:an},Bt=Ct.getLogger(Pt),gt=null,pt=null,Ot=null,qt=null,Et=[],gn=Re(St).getInstance(),Xt={handleEvent:function(Ft){if(Ft.type===At.needkey&&Ft.initData){const et=ArrayBuffer.isView(Ft.initData)?Ft.initData.buffer:Ft.initData;rt.trigger(Je.NEED_KEY,{key:new Se(et,N.default.INITIALIZATION_DATA_TYPE_CENC)})}}},Pt}xt.__dashjs_factory_name="ProtectionModel_3Feb2014";var Lt=ke.default.getClassFactory(xt);function _t(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug,At=Nt.api,Pt=Nt.errHandler;let Bt,gt,pt,Ot,qt,Et,Xt,gn,an;function ln(){pt&&et();for(let je=0;je<Xt.length;je++)Sn(Xt[je]);rt.trigger(Je.TEARDOWN_COMPLETE)}function Sn(je){try{pt[At.cancelKeyRequest](Ot.systemString,je.sessionId)}catch(Mt){rt.trigger(Je.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+je.sessionId+") "+Mt.message})}}function Ft(je,Mt){if(Mt&&je){const Gt=je.length;for(let un=0;un<Gt;un++)if(je[un].sessionId==Mt)return je[un];return null}return null}function et(){pt.removeEventListener(At.keyerror,an),pt.removeEventListener(At.needkey,an),pt.removeEventListener(At.keymessage,an),pt.removeEventListener(At.keyadded,an)}return Bt={getAllInitData:function(){const je=[];for(let Mt=0;Mt<Et.length;Mt++)je.push(Et[Mt].initData);for(let Mt=0;Mt<Xt.length;Mt++)je.push(Xt[Mt].initData);return je},getSessionTokens:function(){return Xt.concat(Et)},requestKeySystemAccess:function(je){return new Promise(((Mt,Gt)=>{let un=pt;un||(un=document.createElement("video"));let wn=!1;for(let Cn=0;Cn<je.length;Cn++){const Gn=je[Cn].ks.systemString,Mn=je[Cn].configs;let qn=null,re=null;for(let Hn=0;Hn<Mn.length;Hn++){const ra=Mn[Hn].videoCapabilities;if(ra&&ra.length!==0){re=[];for(let Xn=0;Xn<ra.length;Xn++)un.canPlayType(ra[Xn].contentType,Gn)!==""&&re.push(ra[Xn])}if(!re||qn||re&&re.length===0)continue;wn=!0;const _a=new Y(qn,re),Qn=qt.getKeySystemBySystemString(Gn),za=new Ze(Qn,_a);rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:za}),Mt({data:za});break}}if(!wn){const Cn="Key system access denied! -- No valid audio/video content configurations detected!";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Cn}),Gt({error:Cn})}}))},selectKeySystem:function(je){return Ot=je.keySystem,Promise.resolve(Ot)},setMediaElement:function(je){if(pt!==je){if(pt){et();for(var Mt=0;Mt<Xt.length;Mt++)Sn(Xt[Mt]);Xt=[]}pt=je,pt&&(pt.addEventListener(At.keyerror,an),pt.addEventListener(At.needkey,an),pt.addEventListener(At.keymessage,an),pt.addEventListener(At.keyadded,an),rt.trigger(Je.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(je){if(!Ot)throw new Error("Can not create sessions until you have selected a key system");if(gn||Xt.length===0){const Mt={sessionId:null,keyId:je.keyId,normalizedKeyId:je&&je.keyId&&typeof je.keyId=="string"?je.keyId.replace(/-/g,"").toLowerCase():"",initData:je.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}}};return Et.push(Mt),pt[At.generateKeyRequest](Ot.systemString,new Uint8Array(je.initData)),Mt}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(je,Mt){const Gt=je.sessionId;if(qt.isClearKey(Ot))for(let un=0;un<Mt.keyPairs.length;un++)pt[At.addKey](Ot.systemString,Mt.keyPairs[un].key,Mt.keyPairs[un].keyID,Gt);else pt[At.addKey](Ot.systemString,new Uint8Array(Mt),new Uint8Array(je.initData),Gt);rt.trigger(Je.KEY_SESSION_UPDATED)},closeKeySession:Sn,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:ln,reset:ln},gt=Ct.getLogger(Bt),pt=null,Ot=null,Et=[],Xt=[],qt=Re(St).getInstance(),an={handleEvent:function(je){let Mt=null;switch(je.type){case At.needkey:let Gt=ArrayBuffer.isView(je.initData)?je.initData.buffer:je.initData;rt.trigger(Je.NEED_KEY,{key:new Se(Gt,N.default.INITIALIZATION_DATA_TYPE_CENC)});break;case At.keyerror:if(Mt=Ft(Xt,je.sessionId),Mt||(Mt=Ft(Et,je.sessionId)),Mt){let un=ee.default.MEDIA_KEYERR_CODE,wn="";switch(je.errorCode.code){case 1:un=ee.default.MEDIA_KEYERR_UNKNOWN_CODE,wn+="MEDIA_KEYERR_UNKNOWN - "+ee.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:un=ee.default.MEDIA_KEYERR_CLIENT_CODE,wn+="MEDIA_KEYERR_CLIENT - "+ee.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:un=ee.default.MEDIA_KEYERR_SERVICE_CODE,wn+="MEDIA_KEYERR_SERVICE - "+ee.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:un=ee.default.MEDIA_KEYERR_OUTPUT_CODE,wn+="MEDIA_KEYERR_OUTPUT - "+ee.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:un=ee.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,wn+="MEDIA_KEYERR_HARDWARECHANGE - "+ee.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:un=ee.default.MEDIA_KEYERR_DOMAIN_CODE,wn+="MEDIA_KEYERR_DOMAIN - "+ee.default.MEDIA_KEYERR_DOMAIN_MESSAGE}wn+=" System Code = "+je.systemCode,rt.trigger(Je.KEY_ERROR,{error:new p.default(un,wn,Mt)})}else gt.error("No session token found for key error");break;case At.keyadded:Mt=Ft(Xt,je.sessionId),Mt||(Mt=Ft(Et,je.sessionId)),Mt?(gt.debug("DRM: Key added."),rt.trigger(Je.KEY_ADDED,{data:Mt})):gt.debug("No session token found for key added");break;case At.keymessage:if(gn=je.sessionId!==null&&je.sessionId!==void 0,gn?(Mt=Ft(Xt,je.sessionId),!Mt&&Et.length>0&&(Mt=Et.shift(),Xt.push(Mt),Mt.sessionId=je.sessionId,rt.trigger(Je.KEY_SESSION_CREATED,{data:Mt}))):Et.length>0&&(Mt=Et.shift(),Xt.push(Mt),Et.length!==0&&Pt.error(new p.default(ee.default.MEDIA_KEY_MESSAGE_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Mt){let un=ArrayBuffer.isView(je.message)?je.message.buffer:je.message;Mt.keyMessage=un,rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(Mt,un,je.defaultURL)})}else gt.warn("No session token found for key message")}}},Bt}_t.__dashjs_factory_name="ProtectionModel_01b";var fn=ke.default.getClassFactory(_t);const An=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],jn=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function $n(){let Nt;const St=this.context;function rt(Je,Ct){for(let At=0;At<Ct.length;At++){const Pt=Ct[At];if(typeof Je[Pt[Object.keys(Pt)[0]]]=="function")return Pt}return null}return Nt={createProtectionSystem:function(Je){let Ct=null;const At=Re(St).getInstance();At.setConfig({debug:Je.debug,BASE64:Je.BASE64,settings:Je.settings}),At.initialize();let Pt=(function(Bt){const gt=Bt.debug,pt=gt.getLogger(Nt),Ot=Bt.eventBus,qt=Bt.errHandler,Et=Bt.videoModel?Bt.videoModel.getElement():null;return Et&&Et.onencrypted===void 0||Et&&Et.mediaKeys===void 0?rt(Et,jn)?(pt.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Lt(St).create({debug:gt,eventBus:Ot,events:Bt.events,api:rt(Et,jn)})):rt(Et,An)?(pt.info("EME detected on this user agent! (ProtectionModel_01b)"),fn(St).create({debug:gt,eventBus:Ot,errHandler:qt,events:Bt.events,api:rt(Et,An)})):(pt.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(pt.info("EME detected on this user agent! (DefaultProtectionModel"),Yt(St).create({debug:gt,eventBus:Ot,events:Bt.events}))})(Je);return Pt&&(Ct=Pe(St).create({BASE64:Je.BASE64,cmcdModel:Je.cmcdModel,constants:Je.constants,customParametersModel:Je.customParametersModel,debug:Je.debug,eventBus:Je.eventBus,events:Je.events,protectionKeyController:At,protectionModel:Pt,settings:Je.settings}),Je.capabilities.setEncryptedMediaSupported(!0)),Ct}},Nt}$n.__dashjs_factory_name="Protection";const ea=ke.default.getClassFactory($n);ea.events=De.default,ea.errors=ee.default,ke.default.updateClassFactory($n.__dashjs_factory_name,ea);var Yn=ea},445:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_STATUSES_CHANGED="internalkeyStatusesChanged",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_STATUSES_MAP_UPDATED="keyStatusesMapUpdated",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.LICENSE_REQUEST_SENDING="public_licenseRequestSending",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected",this.KEY_SESSION_UPDATED="public_keySessionUpdated"}}let y=new N;Oe.default=y},1923:function(kt,Oe,oe){oe.r(Oe);var ie=oe(8748);class N extends ie.default{constructor(){super(),this.MEDIA_KEYERR_CODE=100,this.MEDIA_KEYERR_UNKNOWN_CODE=101,this.MEDIA_KEYERR_CLIENT_CODE=102,this.MEDIA_KEYERR_SERVICE_CODE=103,this.MEDIA_KEYERR_OUTPUT_CODE=104,this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,this.MEDIA_KEYERR_DOMAIN_CODE=106,this.MEDIA_KEY_MESSAGE_ERROR_CODE=107,this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,this.KEY_SESSION_CREATED_ERROR_CODE=113,this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,this.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",this.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",this.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",this.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",this.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",this.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --"}}let y=new N;Oe.default=y},4246:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138);const N={DEFAULT:.5,STRONG:1,WEAK:0};function y(Z,q,Y,ee){let p,o,P,U,se;return o=Z===void 0?null:Z,P=(function(ye){let ke=N.DEFAULT;return ye!==N.DEFAULT&&ye!==N.STRONG&&ye!==N.WEAK||(ke=ye),ke})(Y),U=q===void 0?null:q,se=ee===void 0?null:ee,p={representation:o,reason:U,rule:se,priority:P},p}y.__dashjs_factory_name="SwitchRequest";const R=ie.default.getClassFactory(y);R.NO_CHANGE=null,R.PRIORITY=N,ie.default.updateClassFactory(y.__dashjs_factory_name,R),Oe.default=R},559:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{supportsMediaSource:function(){return q}});var ie=oe(138),N=oe(5212),y=oe(2861),R=oe(7393),Z=oe(649);function q(){let ee="ManagedMediaSource"in window,p="WebKitMediaSource"in window,o="MediaSource"in window;return ee||p||o}function Y(){let ee,p,o,P,U,se;const ye=this.context,ke=(0,R.default)(ye).getInstance();function Ie(Ae,ge){let ue;ge===N.default.VIDEO?ue=(function(Ne){const He={video:{}};return Ne&&(Ne.width&&(He.video.width=Ne.width),Ne.height&&(He.video.height=Ne.height),Ne.framerate&&(He.video.framerate=parseFloat(Ne.framerate)),Ne.hdrMetadataType&&(He.video.hdrMetadataType=Ne.hdrMetadataType),Ne.colorGamut&&(He.video.colorGamut=Ne.colorGamut),Ne.transferFunction&&(He.video.transferFunction=Ne.transferFunction)),He})(Ae):ge===N.default.AUDIO&&(ue=(function(Ne){const He={audio:{}};return Ne.samplerate&&(He.audio.samplerate=Ne.samplerate),He})(Ae)),ue[ge].contentType=Ae.codec,ue[ge].bitrate=parseInt(Ae.bitrate),ue.type="media-source";let we=Ae.codec;return Ae.width&&Ae.height&&(we+=';width="'+Ae.width+'";height="'+Ae.height+'"'),ue.mediaSourceCodecString=we,(function(Ne,He,Ht){if(!He||!He.keySystemsMetadata||He.keySystemsMetadata.length===0)return[Ne];const be=[];return He.keySystemsMetadata.forEach((mt=>{if(!mt.ks)return void be.push({...Ne});const Ve=mt.protData&&mt.protData.systemStringPriority?mt.protData.systemStringPriority:null;let Ue=mt.ks.systemString;(Ve||[Ue]).forEach((Rt=>{const Zt={...Ne};Zt.keySystemConfiguration={},Rt&&(Zt.keySystemConfiguration.keySystem=Rt);let jt="";mt.ks.systemString===y.default.WIDEVINE_KEYSTEM_STRING&&(jt=y.default.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);const Wt=mt.protData,$t=Wt&&Wt.audioRobustness&&Wt.audioRobustness.length>0?Wt.audioRobustness:jt,cn=Wt&&Wt.videoRobustness&&Wt.videoRobustness.length>0?Wt.videoRobustness:jt;Ht===N.default.AUDIO?Zt.keySystemConfiguration[Ht]={robustness:$t}:Ht===N.default.VIDEO&&(Zt.keySystemConfiguration[Ht]={robustness:cn}),be.push(Zt)}))})),be})(ue,Ae,ge)}function Pe(Ae){if(P&&P.length!==0&&Ae)return P.find((ge=>{const ue=Ge(Ae,ge,N.default.AUDIO),we=Ge(Ae,ge,N.default.VIDEO),Ne=Ge(Ae,ge,"keySystemConfiguration");return ue&&we&&Ne}))}function Ge(Ae,ge,ue){return!Ae[ue]&&!ge[ue]||!(!Ae[ue]||!ge[ue])&&ke.areEqual(Ae[ue],ge[ue])}function yt(Ae,ge){return(Ae=Ae.filter((ue=>!(ue.schemeIdUri&&ge.some((we=>we.schemeIdUri===ue.schemeIdUri)))))).push(...ge),Ae}return ee={areKeyIdsExpired:function(Ae){return!!(o&&Ae&&Ae.normalizedKeyIds&&Ae.normalizedKeyIds.size!==0)&&o.areKeyIdsExpired(Ae.normalizedKeyIds)},areKeyIdsUsable:function(Ae){return!(o&&Ae&&Ae.normalizedKeyIds&&Ae.normalizedKeyIds.size!==0)||o.areKeyIdsUsable(Ae.normalizedKeyIds)},isCodecSupportedBasedOnTestedConfigurations:function(Ae,ge){if(!Ae||!Ae.codec||Ae.isSupported===!1)return!1;const ue=Ie(Ae,ge).map((we=>Pe(we))).filter((we=>we!=null));return!(ue&&ue.length>0)||(function(we){return we.some((Ne=>Ne&&Ne.decodingInfo&&Ne.decodingInfo.supported))})(ue)},isProtectionCompatible:function(Ae,ge){return!ge||!(!Ae.isEncrypted&&ge.isEncrypted)},runCodecSupportCheck:function(Ae,ge){if(ge!==N.default.AUDIO&&ge!==N.default.VIDEO)return Promise.resolve();const ue=p.get().streaming.enhancement.codecs;if(p.get().streaming.enhancement.enabled&&ue.some((Ne=>Ae.codec.includes(Ne))))return Promise.resolve(!0);const we=Ie(Ae,ge);return(function(Ne,He){return p.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(Ne.codec&&He===N.default.AUDIO||He===N.default.VIDEO&&Ne.codec&&Ne.width&&Ne.height&&Ne.bitrate&&Ne.framerate)})(Ae,ge)?(function(Ne){return new Promise((He=>{if(!Ne||Ne.length===0)return void He();const Ht=Ne.map((be=>(function(mt){return new Promise((Ve=>{Pe(mt)?Ve():navigator.mediaCapabilities.decodingInfo(mt).then((Ue=>{mt.decodingInfo=Ue,P.push(mt),Ve()})).catch((Ue=>{mt.decodingInfo={supported:!1},P.push(mt),se.error(Ue),Ve()}))}))})(be)));Promise.allSettled(Ht).then((()=>{He()})).catch((be=>{se.error(be),He()}))}))})(we):((function(Ne){if(!Ne||!Ne.length)return;const He=Ne[0];if(Pe(He))return;let Ht={supported:!1};("ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(He.mediaSourceCodecString)||"MediaSource"in window&&MediaSource.isTypeSupported(He.mediaSourceCodecString)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(He.mediaSourceCodecString))&&(Ht.supported=!0),He.decodingInfo=Ht,P.push(He)})(we),Promise.resolve())},setConfig:function(Ae){Ae&&(Ae.settings&&(p=Ae.settings),Ae.protectionController&&(o=Ae.protectionController))},setEncryptedMediaSupported:function(Ae){U=Ae},setProtectionController:function(Ae){o=Ae},supportsChangeType:function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType},supportsEncryptedMedia:function(){return U},supportsEssentialProperty:function(Ae){let ge=p.get().streaming.capabilities.supportedEssentialProperties;p.get().streaming.capabilities.useMediaCapabilitiesApi&&p.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(ge=yt(ge,[{schemeIdUri:N.default.COLOUR_PRIMARIES_SCHEME_ID_URI},{schemeIdUri:N.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI},{schemeIdUri:N.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI}])),p.get().streaming.capabilities.useMediaCapabilitiesApi&&p.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(ge=yt(ge,[{schemeIdUri:N.default.HDR_METADATA_FORMAT_SCHEME_ID_URI}]));try{return Ae.inArray(ge)}catch{return!0}},supportsMediaSource:q},U=!1,P=[],se=(0,Z.default)(ye).getInstance().getLogger(ee),ee}Y.__dashjs_factory_name="Capabilities",Oe.default=ie.default.getSingletonFactory(Y)},7377:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138),N=oe(656);function y(){return{customTimeRangeArray:[],length:0,add:function(R,Z){let q;for(q=0;q<this.customTimeRangeArray.length&&R>this.customTimeRangeArray[q].start;q++);for(this.customTimeRangeArray.splice(q,0,{start:R,end:Z}),q=0;q<this.customTimeRangeArray.length-1;q++)this.mergeRanges(q,q+1)&&q--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(R,Z){for(let q=0;q<this.customTimeRangeArray.length;q++)if(R<=this.customTimeRangeArray[q].start&&Z>=this.customTimeRangeArray[q].end)this.customTimeRangeArray.splice(q,1),q--;else{if(R>this.customTimeRangeArray[q].start&&Z<this.customTimeRangeArray[q].end){this.customTimeRangeArray.splice(q+1,0,{start:Z,end:this.customTimeRangeArray[q].end}),this.customTimeRangeArray[q].end=R;break}R>this.customTimeRangeArray[q].start&&R<this.customTimeRangeArray[q].end?this.customTimeRangeArray[q].end=R:Z>this.customTimeRangeArray[q].start&&Z<this.customTimeRangeArray[q].end&&(this.customTimeRangeArray[q].start=Z)}this.length=this.customTimeRangeArray.length},mergeRanges:function(R,Z){let q=this.customTimeRangeArray[R],Y=this.customTimeRangeArray[Z];return q.start<=Y.start&&Y.start<=q.end&&q.end<=Y.end?(q.end=Y.end,this.customTimeRangeArray.splice(Z,1),!0):Y.start<=q.start&&q.start<=Y.end&&Y.end<=q.end?(q.start=Y.start,this.customTimeRangeArray.splice(Z,1),!0):Y.start<=q.start&&q.start<=Y.end&&q.end<=Y.end?(this.customTimeRangeArray.splice(R,1),!0):q.start<=Y.start&&Y.start<=q.end&&Y.end<=q.end&&(this.customTimeRangeArray.splice(Z,1),!0)},start:function(R){return(0,N.checkInteger)(R),R>=this.customTimeRangeArray.length||R<0?NaN:this.customTimeRangeArray[R].start},end:function(R){return(0,N.checkInteger)(R),R>=this.customTimeRangeArray.length||R<0?NaN:this.customTimeRangeArray[R].end}}}y.__dashjs_factory_name="CustomTimeRanges",Oe.default=ie.default.getClassFactory(y)},7393:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138),N=oe(7316);function y(){let R;return R={areEqual:function(Z,q){return N(Z,q)}},R}y.__dashjs_factory_name="ObjectUtils",Oe.default=ie.default.getSingletonFactory(y)},656:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{checkInteger:function(){return y},checkIsVideoOrAudioType:function(){return Z},checkParameterType:function(){return N},checkRange:function(){return R}});var ie=oe(5212);function N(q,Y){if(typeof q!==Y)throw ie.default.BAD_ARGUMENT_ERROR}function y(q){if(q===null||isNaN(q)||q%1!=0)throw ie.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"}function R(q,Y,ee){if(q<Y||q>ee)throw ie.default.BAD_ARGUMENT_ERROR+" : argument out of range"}function Z(q){if(typeof q!="string"||q!==ie.default.AUDIO&&q!==ie.default.VIDEO)throw ie.default.BAD_ARGUMENT_ERROR}},1944:function(kt,Oe,oe){oe.r(Oe),Oe.default=class{constructor(ie,N,y){this.code=ie||null,this.message=N||null,this.data=y||null}}},5560:function(kt,Oe,oe){oe.r(Oe);var ie=oe(8854);Oe.default=class{constructor(N){this.id=N.id,this.url=N.url,this.language=N.language,this.mimeType=N.mimeType,this.bandwidth=N.bandwidth,this.periodId=N.periodId||null}serializeToMpdParserFormat(){return{tagName:ie.default.ADAPTATION_SET,mimeType:this.mimeType,lang:this.language,Representation:[{tagName:ie.default.REPRESENTATION,id:this.id,bandwidth:this.bandwidth,BaseURL:[{tagName:ie.default.BASE_URL,__text:this.url}],mimeType:this.mimeType}]}}}},7568:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{HTTPRequest:function(){return ie},HTTPRequestTrace:function(){return N}});class ie{constructor(){this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null,this._resourceTimingValues=null}}class N{constructor(){this.s=null,this.d=null,this.b=[]}}ie.GET="GET",ie.HEAD="HEAD",ie.MPD_TYPE="MPD",ie.XLINK_EXPANSION_TYPE="XLinkExpansion",ie.INIT_SEGMENT_TYPE="InitializationSegment",ie.INDEX_SEGMENT_TYPE="IndexSegment",ie.MEDIA_SEGMENT_TYPE="MediaSegment",ie.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",ie.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",ie.DVB_REPORTING_TYPE="DVBReporting",ie.LICENSE="license",ie.CONTENT_STEERING_TYPE="ContentSteering",ie.OTHER_TYPE="other"}},Ko={};function Wn(kt){var Oe=Ko[kt];if(Oe!==void 0)return Oe.exports;var oe=Ko[kt]={exports:{}};return Ud[kt].call(oe.exports,oe,oe.exports,Wn),oe.exports}Wn.amdO={},Wn.d=function(kt,Oe){for(var oe in Oe)Wn.o(Oe,oe)&&!Wn.o(kt,oe)&&Object.defineProperty(kt,oe,{enumerable:!0,get:Oe[oe]})},Wn.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Wn.o=function(kt,Oe){return Object.prototype.hasOwnProperty.call(kt,Oe)},Wn.r=function(kt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(kt,"__esModule",{value:!0})};var ca={};Wn.r(ca),Wn.d(ca,{Constants:function(){return Jo.default},Debug:function(){return Zo.default},ExternalSubtitle:function(){return ts.default},MediaPlayer:function(){return jd.MediaPlayer},MediaPlayerFactory:function(){return Xo},MetricsReporting:function(){return $o.default},Protection:function(){return Qo.default},default:function(){return Bd},supportsMediaSource:function(){return es.supportsMediaSource}});var jd=Wn(5393),$o=Wn(4469),Qo=Wn(3888),qd=Wn(1152);let Wo,Fr=(function(){const kt="application/dash+xml";let Oe;function oe(N,y,R){if(!N||!/^VIDEO$/i.test(N.nodeName))return null;if(N._dashjs_player)return N._dashjs_player;let Z,q=N.id||N.name||"video element";if(!(y=y||[].slice.call(N.querySelectorAll("source")).filter((function(Y){return Y.type==kt}))[0])&&N.src)(y=document.createElement("source")).src=N.src;else if(!y&&!N.src)return null;return R=R||{},Z=(0,qd.default)(R).create(),Z.initialize(N,y.src,N.autoplay),Oe||(Oe=Z.getDebug().getLogger()),Oe.debug("Converted "+q+" to dash.js player and added content: "+y.src),N._dashjs_player=Z,Z}function ie(N){return/^VIDEO$/i.test(N.nodeName)?N:ie(N.parentNode)}return{create:oe,createAll:function(N,y){let R=[];N=N||"[data-dashjs-player]";let Z=(y=y||document).querySelectorAll(N);for(let Y=0;Y<Z.length;Y++){let ee=oe(Z[Y],null);R.push(ee)}let q=y.querySelectorAll('source[type="'+kt+'"]');for(let Y=0;Y<q.length;Y++){let ee=oe(ie(q[Y]),null);R.push(ee)}return R}}})();!(typeof window<"u"&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&typeof window<"u"&&window&&window.addEventListener&&(window.document.readyState==="complete"?window.dashjs?Fr.createAll():Wo=window.setInterval((function(){window.dashjs&&(window.clearInterval(Wo),Fr.createAll())}),500):window.addEventListener("load",(function kt(){window.removeEventListener("load",kt),Fr.createAll()})));var Xo=Fr,Zo=Wn(649),Jo=Wn(5212),es=Wn(559),ts=Wn(5560);dashjs.Protection=Qo.default,dashjs.MetricsReporting=$o.default,dashjs.MediaPlayerFactory=Xo,dashjs.Debug=Zo.default,dashjs.supportsMediaSource=es.supportsMediaSource,dashjs.Constants=Jo.default,dashjs.ExternalSubtitle=ts.default;var Bd=dashjs,$d=(ca=ca.default).Constants,Qd=ca.Debug,Xd=ca.ExternalSubtitle,Zd=ca.MediaPlayer,Jd=ca.MediaPlayerFactory,ec=ca.MetricsReporting,tc=ca.Protection,nc=ca.default,ac=ca.supportsMediaSource;export{$d as Constants,Qd as Debug,Xd as ExternalSubtitle,Zd as MediaPlayer,Jd as MediaPlayerFactory,ec as MetricsReporting,tc as Protection,nc as default,ac as supportsMediaSource};
|
|
21
|
+
`)}else x=u[h],x.match(i)||(A=x);return A}return e={parse:function(u){const h=[];let b,S;if(!u)return h;b=(u=u.split(r)).length,S=-1;for(let A=0;A<b;A++){let x=u[A];if(x.length>0&&x!=="WEBVTT"&&x.match(i)){const D=c(x),H=D.cuePoints,K=D.styles,V=_(u,A+1),X=g(H[0].replace(l,"")),k=g(H[1].replace(l,""));!isNaN(X)&&!isNaN(k)&&X>=S&&k>X?V!==""?(S=X,h.push({start:X,end:k,data:V,styles:K})):n.error("Skipping cue due to empty/malformed cue text"):n.error("Skipping cue due to incorrect cue timing")}}return h},getCaptionStyles:T},n=(0,R.default)(t).getInstance().getLogger(e),r=/(?:\r\n|\r|\n)/gm,i=/-->/,l=/(^[\s]+|[\s]+$)/g,m=/\s\b/g,e}Lo.__dashjs_factory_name="VTTParser";var Id=ie.default.getSingletonFactory(Lo);function Fo(){let t,e;return t={parse:function(n){let r=[];return e.oncue=function(i){i.start=i.startTime,i.end=i.endTime,i.data=i.text,i.styles={align:i.align,line:i.line,position:i.position,size:i.size},r.push(i)},e.parse(n),r}},(function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}})(),t}Fo.__dashjs_factory_name="VttCustomRenderingParser";var kd=ie.default.getSingletonFactory(Fo);function Uo(){const t=this.context,e=(0,ee.default)(t).getInstance();let n,r,i=0;function l(){const m="cue_TTML_"+i;return i++,m}return n={parse:function(m,g,c,T,_){let u="";const h=[];let b,S,A;const x={},D={};let H="",K="",V={onOpenTag:function(w,d,C){if(C[" imagetype"]&&!C[" imageType"]&&(e.trigger(P.default.CONFORMANCE_VIOLATION,{level:Wa.LEVELS.ERROR,event:Wa.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),C[" imageType"]=C[" imagetype"]),d==="image"&&(w==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||w==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!C[" imageType"]||C[" imageType"].value!=="PNG")return void r.warn("smpte-tt imageType != PNG. Discarded");H=C["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){H&&(D[H]=K.trim()),K="",H=""},onText:function(w){H&&(K+=w)}};if(!m)throw u="no ttml data to parse",new Error(u);x.data=m,e.trigger(p.default.TTML_TO_PARSE,x);let X=(0,gi.fromXML)(x.data,(function(w){u=w}),V);e.trigger(p.default.TTML_PARSED,{ttmlString:x.data,ttmlDoc:X});const k=X.getMediaTimeEvents();for(A=0;A<k.length;A++){let w=(0,gi.generateISD)(X,k[A],(function(d){u=d}));w.contents.some((d=>d.contents.length))&&(b=k[A]+g,S=k[A+1]+g,b<S&&h.push({start:b,end:S,type:"html",cueID:l(),isd:w,images:_,embeddedImages:D}))}if(u!=="")throw r.error(u),new Error(u);return h}},r=(0,R.default)(t).getInstance().getLogger(n),n}Uo.__dashjs_factory_name="TTMLParser";var Ad=ie.default.getSingletonFactory(Uo);function jo(t){let e=this.context;const n=(0,ee.default)(e).getInstance(),r=xn(e).getInstance(),i=t.adapter,l=t.baseURLController,m="error",g="loaded",c="unloaded";let T,_,u;function h(A,x){let D,H,K=!1;if(l.resolve()){const k=i.getVoRepresentations(A);k&&k.length>0&&(D=l.resolve(k[0].path).url)}const V=A.essentialProperties.filter((k=>k.schemeIdUri&&k.schemeIdUri===o.default.FONT_DOWNLOAD_DVB_SCHEME)),X=A.supplementalProperties.filter((k=>k.schemeIdUri&&k.schemeIdUri===o.default.FONT_DOWNLOAD_DVB_SCHEME));V.length>0?(K=!0,H=V):H=X,H.forEach((k=>{if((function(C){return!(!(C.value&&parseInt(C.value)===1&&C.dvbUrl&&C.dvbUrl.length>0&&C.dvbFontFamily&&C.dvbFontFamily.length>0&&C.dvbMimeType)||C.dvbMimeType!==o.default.OFF_MIMETYPE&&C.dvbMimeType!==o.default.WOFF_MIMETYPE)})(k)){let C=(w=k.dvbUrl,d=D,r.isPathAbsolute(w)?w:r.isRelative(w)?d?r.resolve(w,d):r.resolve(w):w);u.push({fontFamily:k.dvbFontFamily,url:C,mimeType:k.dvbMimeType,trackId:A.id,streamId:x,isEssential:K,status:c,fontFace:new FontFace(k.dvbFontFamily,`url(${C})`,{display:"swap"})})}var w,d}))}function b(A,x){const D=u[A];u[A]={...D,status:x}}function S(){u=[]}return T={addFontsFromTracks:function(A,x){if(A&&Array.isArray(A)&&x)for(let D=0;D<A.length;D++)h(A[D],x)},downloadFonts:function(){for(let A=0;A<u.length;A++){let x=u[A];document.fonts.add(x.fontFace),n.trigger(P.default.DVB_FONT_DOWNLOAD_ADDED,x),x.fontFace.load().then((()=>{b(A,g),n.trigger(P.default.DVB_FONT_DOWNLOAD_COMPLETE,x)}),(D=>{b(A,m),_.debug("Font download error: ",D),n.trigger(P.default.DVB_FONT_DOWNLOAD_FAILED,x)}))}},getFonts:function(){return u},getFontsForTrackId:function(A){return u.filter((x=>x.trackId&&x.trackId===A))},reset:function(){(function(){for(const A of u){let x=document.fonts.delete(A.fontFace);_.debug(`Removal of fontFamily: ${A.fontFamily} was ${x?"successful":"unsuccessful"}`)}})(),S()}},_=(0,R.default)(e).getInstance().getLogger(T),S(),T}jo.__dashjs_factory_name="DVBFonts";var Rd=ie.default.getClassFactory(jo);function qo(t){let e=this.context;const n=t.adapter,r=t.errHandler,i=t.manifestModel,l=t.mediaController,m=t.baseURLController,g=t.videoModel,c=t.settings;let T,_,u,h,b,S,A,x,D,H,K,V,X,k;function w(G){if(k.error(`Could not download ${G.isEssential?"an essential":"a"} font - fontFamily: ${G.fontFamily}, url: ${G.url}`),G.isEssential){let v=h[G.streamId].getTrackIdxForId(G.trackId);h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_DISABLED)}}function d(G){if(k.debug(`Successfully downloaded ${G.isEssential?"an essential":"a"} font - fontFamily: ${G.fontFamily}, url: ${G.url}`),G.isEssential){let v=h[G.streamId].getTrackIdxForId(G.trackId);v===h[G.streamId].getCurrentTrackIdx()?h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_SHOWING):h[G.streamId].setModeForTrackIdx(v,o.default.TEXT_HIDDEN)}}function C(G){let v=G.tracks,B=G.index;const O=G.streamId;if(c.get().streaming.text.defaultEnabled===!1&&!de()||V)pe(O,-1);else{const te=l.getCurrentTrackFor(o.default.TEXT,O);if(te){const J={lang:te.lang,role:te.roles[0],index:te.index,codec:te.codec,accessibility:te.accessibility[0]};v.some(((le,he)=>{if(l.matchSettings(J,le))return pe(O,he),B=he,!0}))}D=!1}_[O].lastEnabledIndex=B,x.trigger(P.default.TEXT_TRACKS_ADDED,{enabled:de(),index:B,tracks:v,streamId:O}),K=!0,X.addFontsFromTracks(v,O),X.getFonts().forEach((te=>{if(te.isEssential){let J=h[te.streamId].getTrackIdxForId(te.trackId);h[te.streamId].setModeForTrackIdx(J,o.default.TEXT_DISABLED)}})),X.downloadFonts()}function W(G){try{const v=G.streamId,B=h[v];if(!B||isNaN(G.time))return;B.updateTextTrackWindow(G.time),c.get().streaming.text.webvtt.customRenderingEnabled&&B.manualCueProcessing(G.time)}catch{}}function j(G){try{const v=G.streamId;if(!h[v])return;h[v].disableManualTracks()}catch{}}function ae(G){try{const v=h[G.streamId];if(!v)return;const B=g.getTime()||0;v.updateTextTrackWindow(B,!0)}catch(v){k.error(v)}}function ne(G){try{if(!G||!G.mediaType||G.mediaType!==o.default.AUDIO||!G.currentMediaInfo)return;const v=h[G.streamId].getCurrentTextTrackInfo();let B=NaN;D?B=ce(G.streamId):I(v)&&G.currentMediaInfo.lang&&G.currentMediaInfo.lang!==v.lang&&(B=ce(G.streamId),isNaN(B)&&(B=-1)),isNaN(B)||pe(G.streamId,B)}catch(v){k.error(v)}}function de(){let G=!0;return D&&!H&&(G=!1),G}function pe(G,v){D=v===-1,D&&l&&l.saveTextSettingsDisabled();let B=F(G);if(B===v||!h[G])return;h[G].disableManualTracks(),h[G].invalidateCueWindow();let O=h[G].getCurrentTextTrackInfo(),te=O?g.getTextTrack(O.kind,O.id,O.lang,O.isTTML,O.isEmbedded):null;te&&te.mode!==o.default.TEXT_DISABLED&&h[G].setModeForTrackIdx(B,o.default.TEXT_HIDDEN),h[G].setCurrentTrackIdx(v),O=h[G].getCurrentTextTrackInfo();const J=c.get().streaming.text.dispatchForManualRendering;if(O&&!J&&O.mode!==o.default.TEXT_DISABLED&&h[G].setModeForTrackIdx(v,o.default.TEXT_SHOWING),O&&O.isFragmented&&!O.isEmbedded)(function(le,he,me){if(!u[le])return;let xe=u[le].getConfig().fragmentedTracks;for(let We=0;We<xe.length;We++){let nt=xe[We];if(he.lang===nt.lang&&(nt.id?he.id===nt.id:he.index===nt.index)){let ut=l.getCurrentTrackFor(o.default.TEXT,le);(nt.id?ut.id!==nt.id:ut.index!==nt.index)?(h[le].deleteCuesFromTrackIdx(me),u[le].setCurrentFragmentedTrackIdx(We)):me===-1&&x.trigger(p.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:le,mediaType:o.default.TEXT})}}})(G,O,B);else if(O&&!O.isFragmented)(function(le,he){x.trigger(p.default.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:he},{streamId:le,mediaType:o.default.TEXT})})(G,O);else if(!O&&D){const le=ce(G);return void(isNaN(le)||pe(G,le))}l.setTrack(O)}function ce(G){const v=(function(te){return h[te].getTextTrackInfos().filter(((J,le)=>(J._indexToSelect=le,!!(J&&J.roles&&J.roles.length>0)&&I(J))))})(G);if(!v||v.length<=0)return NaN;const B=l.getCurrentTrackFor(o.default.AUDIO,G);if(!B)return NaN;const O=v.find((te=>B.lang===te.lang));return O?O._indexToSelect:NaN}function I(G){return!(!G||!G.roles||G.roles.length===0)&&G.roles.some((v=>v.schemeIdUri===o.default.DASH_ROLE_SCHEME_ID&&v.value===re.default.FORCED_SUBTITLE))}function F(G){return h[G].getCurrentTrackIdx()}function Q(){u={},h={},_={},D=!0,K=!1,V=!1}return T={addEmbeddedTrack:function(G,v){const B=G.id;u[B]&&u[B].addEmbeddedTrack(v)},addMediaInfosToBuffer:function(G,v,B,O=null){const te=G.id;u[te]&&u[te].addMediaInfos(v,B,O)},createTracks:function(G){const v=G.id;h[v]&&h[v].createTracks()},deactivateStream:function(G){if(!G)return;const v=G.id;u[v]&&u[v].resetMediaInfos(),h[v]&&h[v].deleteAllTextTracks()},enableForcedTextStreaming:function(G){return(0,et.checkParameterType)(G,"boolean"),H=G,!0},enableText:function(G,v){return(0,et.checkParameterType)(v,"boolean"),de()!==v&&(v&&pe(G,_[G].lastEnabledIndex),v||(_[G].lastEnabledIndex=F(G),K?pe(G,-1):V=!0)),!0},getAllTracksAreDisabled:function(){return D},getCurrentTrackIdx:F,getTextSourceBuffer:function(G){const v=G.id;if(u&&u[v])return u[v]},initialize:function(){X=Rd(e).create({adapter:n,baseURLController:m}),x.on(p.default.TEXT_TRACKS_QUEUE_INITIALIZED,C,T),x.on(p.default.DVB_FONT_DOWNLOAD_FAILED,w,T),x.on(p.default.DVB_FONT_DOWNLOAD_COMPLETE,d,T),x.on(p.default.MEDIAINFO_UPDATED,ne,T),x.on(p.default.PLAYBACK_TIME_UPDATED,W,T),c.get().streaming.text.webvtt.customRenderingEnabled&&x.on(p.default.PLAYBACK_SEEKING,j,T),x.on(p.default.PLAYBACK_SEEKED,ae,T)},initializeForStream:function(G){const v=G.id,B=wd(e).create({videoModel:g,settings:c,streamInfo:G});B.initialize(),h[v]=B;const O=vd(e).create({errHandler:r,adapter:n,dvbFonts:X,manifestModel:i,mediaController:l,videoModel:g,textTracks:B,vttParser:b,vttCustomRenderingParser:S,ttmlParser:A,streamInfo:G,settings:c});O.initialize(),u[v]=O,_[v]={},_[v].lastEnabledIndex=-1},isTextEnabled:de,reset:function(){Object.keys(u).forEach((G=>{u[G].resetEmbedded(),u[G].reset()})),X.reset(),Q(),x.off(p.default.TEXT_TRACKS_QUEUE_INITIALIZED,C,T),x.off(p.default.DVB_FONT_DOWNLOAD_FAILED,w,T),x.off(p.default.DVB_FONT_DOWNLOAD_COMPLETE,d,T),x.off(p.default.MEDIAINFO_UPDATED,ne,T),x.off(p.default.PLAYBACK_TIME_UPDATED,W,T),c.get().streaming.text.webvtt.customRenderingEnabled&&x.off(p.default.PLAYBACK_SEEKING,j,T),x.off(p.default.PLAYBACK_SEEKED,ae,T)},setTextTrack:pe,clearDataForStream:function(G){u[G]&&(u[G].resetEmbedded(),u[G].reset(),delete u[G]),h[G]&&(h[G].deleteAllTextTracks(),delete h[G]),_[G]&&delete _[G]}},H=!1,K=!1,V=!1,b=Id(e).getInstance(),S=kd(e).getInstance(),A=Ad(e).getInstance(),x=(0,ee.default)(e).getInstance(),k=(0,R.default)(e).getInstance().getLogger(T),Q(),T}qo.__dashjs_factory_name="TextController";var Nd=ie.default.getClassFactory(qo);function Bo(t){t=t||{};const e=this.context,n=(0,R.default)(e).getInstance(),r=t.settings,i=(0,ee.default)(e).getInstance();let l,m,g,c,T,_;function u(){return navigator&&navigator.connection&&!isNaN(navigator.connection.downlink)&&navigator.connection.downlink>0?1e3*navigator.connection.downlink:NaN}function h(A,x,D,H){const K=Math.pow(.5,D/H.fast);A.fastEstimate=(1-K)*x+K*A.fastEstimate;const V=Math.pow(.5,D/H.slow);A.slowEstimate=(1-V)*x+V*A.slowEstimate,A.totalWeight+=D}function b(){l={},m={},g={},c={}}const S={addEntry:function(A,x){try{if(!(A&&x&&x.trace&&x.trace.length))return;(function(K){l[K]=l[K]||[],m[K]=m[K]||[],g[K]=g[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0},c[K]=c[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0}})(A);const D=x.tresponse.getTime()-x.trequest.getTime()||1;let H=(function(K,V){return K._fileLoaderType&&K._fileLoaderType===o.default.FILE_LOADER_TYPES.FETCH?(function(X){const k=X.trace.reduce(((C,W)=>C+W.b[0]),0),w=X.trace.reduce(((C,W)=>C+W.d),0);let d=NaN;return r.get().streaming.abr.throughput.useNetworkInformationApi.fetch&&(d=u()),isNaN(d)&&(d=Math.round(8*k/w)),{downloadedBytes:k,value:d,downloadTimeInMs:w}})(K):(function(X,k){let w=NaN,d=NaN,C=!1;if(r.get().streaming.abr.throughput.useResourceTimingApi&&X._resourceTimingValues)w=X._resourceTimingValues.transferSize,d=X._resourceTimingValues.responseEnd-X._resourceTimingValues.responseStart,C=!0;else{if(X.trace.length<=1)return{throughput:NaN,downloadTimeInMs:NaN};w=X.trace.reduce(((j,ae)=>j+ae.b[0]),0)-X.trace[0].b[0],d=Math.max(X.trace.reduce(((j,ae)=>j+ae.d),0)-X.trace[0].d,1)}let W=NaN;if(!C&&r.get().streaming.abr.throughput.useNetworkInformationApi.xhr&&(W=u()),isNaN(W)){const j=r.get().streaming.abr.throughput.useDeadTimeLatency?d:d+k;W=Math.round(8*w/j)}return{downloadedBytes:w,value:W,downloadTimeInMs:d}})(K,V)})(x,D);if(H.latencyInMs=D,isNaN(H.value)||!isFinite(H.value))return;if(x.cmsd){const K=x.cmsd.dynamic&&x.cmsd.dynamic.etp?x.cmsd.dynamic.etp:null;if(K){const V=r.get().streaming.cmsd.abr.etpWeightRatio;V>0&&V<=1&&(H.value=H.value*(1-V)+K*V)}}if((function(K,V,X){return r.get().streaming.abr.throughput.useResourceTimingApi&&X._resourceTimingValues?X._resourceTimingValues.transferSize===0&&X._resourceTimingValues.decodedBodySize>0:!isNaN(V)&&(K===o.default.VIDEO?V<r.get().streaming.cacheLoadThresholds[o.default.VIDEO]:K===o.default.AUDIO?V<r.get().streaming.cacheLoadThresholds[o.default.AUDIO]:void 0)})(A,x._tfinish.getTime()-x.trequest.getTime(),x))return void _.debug(`${A} Assuming segment ${x.url} came from cache, ignoring it for throughput calculation`);_.debug(`Added throughput entry for ${A}: ${H.value} kbit/s`),H.serviceLocation=x._serviceLocation,l[A].push(H),m[A].push({value:D}),(function(K){l[K].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&l[K].shift(),m[K].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&m[K].shift()})(A),i.trigger(P.default.THROUGHPUT_MEASUREMENT_STORED,{throughputValues:H}),x.type!==Ae.HTTPRequest.MPD_TYPE&&(h(g[A],H.value,r.get().streaming.abr.throughput.ewma.weightDownloadTimeMultiplicationFactor*H.downloadTimeInMs,T.bandwidthHalfLife),h(c[A],D,1,T.latencyHalfLife))}catch(D){_.error(D)}},getThroughputDict:function(A){return A?l[A]:l},getEwmaThroughputDict:function(A){return A?g[A]:g},getEwmaLatencyDict:function(A){return A?c[A]:c},getEwmaHalfLife:function(){return T},getLatencyDict:function(A){return A?m[A]:m},reset:b};return _=n.getLogger(S),T={bandwidthHalfLife:{fast:r.get().streaming.abr.throughput.ewma.throughputFastHalfLifeSeconds,slow:r.get().streaming.abr.throughput.ewma.throughputSlowHalfLifeSeconds},latencyHalfLife:{fast:r.get().streaming.abr.throughput.ewma.latencyFastHalfLifeCount,slow:r.get().streaming.abr.throughput.ewma.latencySlowHalfLifeCount}},b(),S}Bo.__dashjs_factory_name="ThroughputModel";var Cd=ie.default.getClassFactory(Bo);function Go(){const t=this.context,e=(0,ee.default)(t).getInstance();let n,r,i;function l(){performance.clearResourceTimings()}function m(K){K.metric!==y.HTTP_REQUEST||!K.value||K.value.type!==Ae.HTTPRequest.MPD_TYPE&&(K.value.type!==Ae.HTTPRequest.MEDIA_SEGMENT_TYPE||K.mediaType!==o.default.AUDIO&&K.mediaType!==o.default.VIDEO)||n.addEntry(K.mediaType,K.value)}function g(K,V,X=null,k=NaN){let w,d=null,C=n.getEwmaHalfLife(),W=null,j=!0;switch(X||(X=i.get().streaming.abr.throughput.averageCalculationMode),K){case o.default.THROUGHPUT_TYPES.BANDWIDTH:d=X===o.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaThroughputDict(V):n.getThroughputDict(V),W=C.bandwidthHalfLife,j=!0,k=isNaN(k)?r.getIsDynamic()?i.get().streaming.abr.throughput.sampleSettings.live:i.get().streaming.abr.throughput.sampleSettings.vod:k;break;case o.default.THROUGHPUT_TYPES.LATENCY:d=X===o.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaLatencyDict(V):n.getLatencyDict(V),W=C.latencyHalfLife,j=!1,k=isNaN(k)?i.get().streaming.abr.throughput.sampleSettings.averageLatencySampleAmount:k}if(!d||d.length===0)return NaN;switch(X){case o.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:return w=c(d,k,K),T(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:return w=c(d,k,K),_(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_ARITHMETIC_MEAN:return w=c(d,k,K),u(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:return w=c(d,k,K),h(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:return w=c(d,k,K),b(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_HARMONIC_MEAN:return w=c(d,k,K),S(d,w);case o.default.THROUGHPUT_CALCULATION_MODES.EWMA:return A(d,W,j);case o.default.THROUGHPUT_CALCULATION_MODES.ZLEMA:return w=c(d,k,K),x(d,w)}}function c(K,V,X){if(K){if(V>=K.length)V=K.length;else if(X===o.default.THROUGHPUT_TYPES.BANDWIDTH&&i.get().streaming.abr.throughput.sampleSettings.enableSampleSizeAdjustment)for(let k=1;k<V;++k){const w=K[K.length-k].value/K[K.length-k-1].value;if((w>=i.get().streaming.abr.throughput.sampleSettings.increaseScale||w<=i.get().streaming.abr.throughput.sampleSettings.decreaseScale)&&(V+=1)===K.length)break}}else V=0;return V}function T(K,V){let X=K;return V!==0&&X&&X.length!==0?(X=X.slice(-V),X.reduce(((k,w)=>k+w.value),0)/X.length):NaN}function _(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;return X.reduce(((w,d)=>{let C=Math.sqrt(d.downloadedBytes);return k+=C,w+d.value*C}),0)/k}function u(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;return X.reduce(((w,d,C)=>{let W=C+1;return k+=W,w+d.value*W}),0)/k}function h(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);const k=X.reduce(((w,d)=>w+1/d.value),0);return X.length/k}function b(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;const w=X.reduce(((d,C)=>{let W=Math.sqrt(C.downloadedBytes);return k+=W,d+1/C.value*W}),0);return k/w}function S(K,V){let X=K;if(V===0||!X||X.length===0)return NaN;X=X.slice(-V);let k=0;const w=X.reduce(((d,C,W)=>{let j=W+1;return k+=j,d+1/C.value*j}),0);return k/w}function A(K,V,X=!0){if(!K||K.totalWeight<=0)return NaN;const k=K.fastEstimate/(1-Math.pow(.5,K.totalWeight/V.fast)),w=K.slowEstimate/(1-Math.pow(.5,K.totalWeight/V.slow));return X?Math.min(k,w):Math.max(k,w)}function x(K,V){if(V===0||!K||K.length===0)return NaN;let X=K.slice(-V).map((C=>C.value)),k=2/(X.length+1),w=X[X.length-1],d=X[X.length-1];for(let C=0;C<X.length;C++)w=k*X[C]+(1-k)*w,d=k*w+(1-k)*d;return d}function D(K,V=null,X=NaN){const k=g(o.default.THROUGHPUT_TYPES.BANDWIDTH,K,V,X);return Math.round(k)}const H={getArithmeticMean:T,getAverageLatency:function(K,V=null,X=NaN){const k=g(o.default.THROUGHPUT_TYPES.LATENCY,K,V,X);return Math.round(k)},getAverageThroughput:D,getByteSizeWeightedArithmeticMean:_,getByteSizeWeightedHarmonicMean:b,getDateWeightedArithmeticMean:u,getDateWeightedHarmonicMean:S,getEwma:A,getHarmonicMean:h,getRawThroughputData:function(K){return K?n.getThroughputDict(K):[]},getSafeAverageThroughput:function(K,V=null,X=NaN){let k=D(K,V,X);return isNaN(k)||(k*=i.get().streaming.abr.throughput.bandwidthSafetyFactor),k},getZlema:x,initialize:function(){n=Cd(t).create({settings:i}),e.on(P.default.METRIC_ADDED,m,H),window.performance?.addEventListener?.("resourcetimingbufferfull",l)},reset:function(){n.reset(),e.off(P.default.METRIC_ADDED,m,H),window.performance?.removeEventListener?.("resourcetimingbufferfull",l)},setConfig:function(K){K.settings&&(i=K.settings),K.playbackController&&(r=K.playbackController)}};return H}Go.__dashjs_factory_name="ThroughputController";var xd=ie.default.getSingletonFactory(Go);function Ho(){const t=this.context,e=(0,ee.default)(t).getInstance(),n=(0,Z.default)(t).getInstance();let r,i,l,m;function g(D){m=D}function c(D,H,K,V){let X,k=H.adaptation.period.mpd;const w=k.availabilityStartTime;if(V)X=K&&k.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(w.getTime()+1e3*(D+k.timeShiftBufferDepth)):k.availabilityEndTime;else if(K){const d=H.availabilityTimeOffset;X=new Date(w.getTime()+1e3*(D-d))}else X=w;return X}function T(D,H){return(D.getTime()-H.mpd.availabilityStartTime.getTime()+1e3*m)/1e3}function _(D,H){return D+(H.adaptation.period.start-H.presentationTimeOffset)}function u(D){const H={start:NaN,end:NaN},K=D[0].getAdapter().getRegularPeriods()[0],V=T(new Date,K);if(!D||D.length===0)return{range:H,now:V};D.forEach((k=>{let w=k.getCurrentRepresentationForType(o.default.VIDEO);if(w||(w=k.getCurrentRepresentationForType(o.default.AUDIO)),!w){const C=k.getAdapter(),W=C.getMediaInfoForType(k.getStreamInfo(),o.default.VIDEO)||C.getMediaInfoForType(k.getStreamInfo(),o.default.AUDIO);w=C.getVoRepresentations(W)[0]}let d={start:NaN,end:NaN};if(w)if(w.segmentInfoType===re.default.SEGMENT_TIMELINE)d=(function(C){const W=C.adaptation.period.mpd.manifest.Period[C.adaptation.period.index].AdaptationSet[C.adaptation.index],j=i.getRepresentationFor(C.index,W),ae=j.SegmentTemplate||j.SegmentList,ne=ae.SegmentTimeline,de=ae.timescale,pe=ne.S,ce={start:0,end:0},I=pe[0].t,F=!isNaN(I),Q=F?I:0;let G,v,B,O,te=0;for(F&&(ce.start=_(Q/de,C)),B=0,O=pe.length;B<O;B++)G=pe[B],v=0,G.hasOwnProperty("r")&&(v=G.r),te+=G.d*(1+v);return ce.end=_((Q+te)/de,C),ce})(w);else{const C=w.adaptation.period;d.start=C.start,d.end=Math.max(V,C.start+C.duration)}!isNaN(d.start)&&(isNaN(H.start)||H.start>d.start)&&(H.start=d.start),!isNaN(d.end)&&(isNaN(H.end)||H.end<d.end)&&(H.end=d.end)})),H.end=Math.min(V,H.end);const X=b(D,H.end,!0);return H.end=isNaN(X)?H.end:X,H.start=K&&K.mpd&&K.mpd.timeShiftBufferDepth&&!isNaN(K.mpd.timeShiftBufferDepth)&&!isNaN(H.end)?Math.max(H.end-K.mpd.timeShiftBufferDepth,H.start):H.start,H.start=b(D,H.start),{range:H,now:V}}function h(D,H){l=D-H.end}function b(D,H,K=!1){try{let V=0,X=!1,k=NaN;for(;!X&&V<D.length;){const w=D[V].getStreamInfo();w.start<=H&&(!isFinite(w.duration)||w.start+w.duration>=H)?(k=H,X=!0):!K&&w.start>H&&(isNaN(k)||w.start<k)?k=w.start:K&&w.start+w.duration<H&&(isNaN(k)||w.start+w.duration>k)&&(k=w.start+w.duration),V+=1}return k}catch{return H}}function S(D){D.offset===void 0||isNaN(D.offset)||g(D.offset/1e3)}function A(){m=0,l=0}function x(){e.off(p.default.UPDATE_TIME_SYNC_OFFSET,S,this),A()}return r={calcAvailabilityEndTimeFromPresentationTime:function(D,H,K){return c(D,H,K,!0)},calcAvailabilityStartTimeFromPresentationTime:function(D,H,K){return c(D,H,K)},calcMediaTimeFromPresentationTime:function(D,H){return D-H.adaptation.period.start+H.presentationTimeOffset},calcPeriodRelativeTimeFromMpdRelativeTime:function(D,H){return H-D.adaptation.period.start},calcPresentationTimeFromMediaTime:_,calcPresentationTimeFromWallTime:T,calcTimeShiftBufferWindow:function(D,H){if(!H)return(function(K){const V={start:NaN,end:NaN};let X=0,k=NaN;return K.forEach((w=>{const d=w.getStreamInfo();X+=d.duration,(isNaN(k)||d.start<k)&&(k=d.start)})),V.start=k,V.end=k+X,V})(D);if(n.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){const K=u(D);return h(K.now,K.range),K.range}return(function(K){const V={start:NaN,end:NaN};if(!K||K.length===0)return V;const X=K[0].getAdapter().getRegularPeriods()[0],k=T(new Date,X),w=X.mpd.timeShiftBufferDepth,d=isNaN(w)?0:k-w;if(V.start=b(K,d),V.end=!isNaN(V.start)&&k<V.start?k:b(K,k,!0),!isNaN(w)&&V.end<k-w&&(V.end=NaN),n.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){const C=u(K);if(C.range.end<V.start)return e.trigger(P.default.CONFORMANCE_VIOLATION,{level:Wa.LEVELS.WARNING,event:Wa.EVENTS.INVALID_DVR_WINDOW}),h(C.now,C.range),C.range}return V})(D)},calcWallTimeForSegment:function(D,H){let K,V,X;return H&&(K=D.representation.adaptation.period.mpd.suggestedPresentationDelay,V=D.presentationStartTime+K,X=new Date(D.availabilityStartTime.getTime()+1e3*V)),X},getClientReferenceTime:function(){return Date.now()-1e3*l+1e3*m},getClientTimeOffset:function(){return m},initialize:function(){A(),e.on(p.default.UPDATE_TIME_SYNC_OFFSET,S,this)},reset:x,setClientTimeOffset:g,setConfig:function(D){D&&D.dashManifestModel&&(i=D.dashManifestModel)}},i=In(t).getInstance(),x(),r}Ho.__dashjs_factory_name="TimelineConverter";var Dd=ie.default.getSingletonFactory(Ho),Md=class{constructor(){this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}};function Yo(){let t,e;return t={initialize:function(n){if(e=new Md,!n)return null;const r=n.indexOf("#");if(r!==-1){const i=n.substr(r+1).split("&");for(let l=0,m=i.length;l<m;++l){const g=i[l],c=g.indexOf("=");if(c!==-1){const T=g.substring(0,c);e.hasOwnProperty(T)&&(e[T]=g.substr(c+1))}}}},getURIFragmentData:function(){return e}},t}Yo.__dashjs_factory_name="URIFragmentModel";var Pd=ie.default.getSingletonFactory(Yo);const Od=new Map([[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[o.default.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function Vo(){let t,e,n,r,i,l,m,g,c,T,_;const u=this.context,h=(0,ee.default)(u).getInstance(),b=[];function S(W,j=!1){r&&(j?r.playbackRate=W:C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,(()=>{r.playbackRate=W})))}function A(){return b.length>0}function x(W){let j=b.indexOf(W);if(W!==null&&(j!==-1&&b.splice(j,1),n.get().streaming.buffer.syntheticStallEvents.enabled&&r&&!A())){const ae=()=>{if(S(T||1,n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState),!r.paused){const ne=document.createEvent("Event");ne.initEvent("playing",!0,!1),r.dispatchEvent(ne)}};n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState?ae():(m&&m.func&&m.event&&K(m.event,m.func),m=C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,ae))}}function D(){if(r&&A()&&r.playbackRate===0){const W=document.createEvent("Event");W.initEvent("waiting",!0,!1),r.dispatchEvent(W)}}function H(W,j){r&&r.addEventListener(W,j)}function K(W,j){r&&r.removeEventListener(W,j)}function V(){return r?r.readyState:NaN}function X(){return r?r.buffered:null}function k(){return r?r.clientWidth:NaN}function w(){return r?r.clientHeight:NaN}function d(W,j,ae,ne,de){if(r){for(let pe=0;pe<r.textTracks.length;pe++)if(r.textTracks[pe].kind===W&&(!j||r.textTracks[pe].label==j)&&r.textTracks[pe].language===ae&&r.textTracks[pe].isTTML===ne&&r.textTracks[pe].isEmbedded===de)return r.textTracks[pe]}return null}function C(W,j){return W===o.default.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||V()>=W?(j(),null):(function(ae,ne){const de=()=>{K(ae,de),ne(ae)};return H(ae,de),{func:de,event:ae}})(Od.get(W),j)}return t={addEventListener:H,addTextTrack:function(W,j,ae,ne,de){if(!r)return null;let pe=d(W,j,ae,ne,de);return pe||(pe=r.addTextTrack(W,j,ae),pe.isEmbedded=de,pe.isTTML=ne),pe},appendChild:function(W){r&&(r.appendChild(W),W.isTTML!==void 0&&(r.textTracks[r.textTracks.length-1].isTTML=W.isTTML,r.textTracks[r.textTracks.length-1].isEmbedded=W.isEmbedded))},getBufferRange:X,getClientHeight:w,getClientWidth:k,getElement:function(){return r},getEnded:function(){return r?r.ended:null},getPlaybackQuality:function(){if(!r)return null;let W="webkitDroppedFrameCount"in r&&"webkitDecodedFrameCount"in r,j=null;return"getVideoPlaybackQuality"in r?j=r.getVideoPlaybackQuality():W&&(j={droppedVideoFrames:r.webkitDroppedFrameCount,totalVideoFrames:r.webkitDroppedFrameCount+r.webkitDecodedFrameCount,creationTime:new Date}),j},getPlaybackRate:function(){return r?r.playbackRate:null},getPlayedRanges:function(){return r?r.played:null},getReadyState:V,getSource:function(){return r?r.src:null},getTTMLRenderingDiv:function(){return g},getTextTrack:d,getTextTracks:function(){return r?r.textTracks:[]},getTime:function(){return r?isNaN(i)?r.currentTime:i:null},getVideoElementSize:function(){const W=n.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;return{elementWidth:k()*W,elementHeight:w()*W}},getVideoHeight:function(){return r?r.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(r){const W=r.parentNode.host||r.parentNode;return W?r.getBoundingClientRect().left-W.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(r){const W=r.parentNode.host||r.parentNode;return W?r.getBoundingClientRect().top-W.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return r?r.videoWidth:NaN},getVttRenderingDiv:function(){return c},initialize:function(){h.on(p.default.PLAYBACK_PLAYING,D,this)},isPaused:function(){return r?r.paused:null},isSeeking:function(){return r?r.seeking||!isNaN(i):null},isStalled:A,pause:function(){r&&(r.pause(),r.autoplay=!1)},play:function(){if(r){r.autoplay=!0;const W=r.play();W&&W.catch&&typeof Promise<"u"&&W.catch((j=>{j.name==="NotAllowedError"&&h.trigger(p.default.PLAYBACK_NOT_ALLOWED),e.warn(`Caught pending play exception - continuing (${j})`)}))}},removeChild:function(W){r&&r.removeChild(W)},removeEventListener:K,reset:function(){clearTimeout(_),h.off(p.default.PLAYBACK_PLAYING,D,this),b.length=0},setConfig:function(W){W&&W.settings&&(n=W.settings)},setCurrentTime:function(W,j){r&&(l&&l.func&&l.event&&K(l.event,l.func),i=W,l=C(o.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(()=>{if(r)if(r.currentTime!==i)try{i=j?(function(ae){const ne=X();let de=ae,pe=9999999999;if(ne)for(let ce=0;ce<ne.length;ce++){const I=ne.start(ce),F=ne.end(ce),Q=Math.abs(I-ae),G=Math.abs(F-ae);if(ae>=I&&ae<=F)return ae;Q<pe&&(pe=Q,de=I),G<pe&&(pe=G,de=F)}return de})(i):i,isNaN(i)||(r.currentTime=i),i=NaN}catch(ae){r.readyState===0&&ae.code===ae.INVALID_STATE_ERR&&(_=setTimeout((function(){r.currentTime=i,i=NaN}),400))}else i=NaN})))},setDisableRemotePlayback:function(W){r&&(r.disableRemotePlayback=W)},setElement:function(W){if(!(W==null||W&&/^(VIDEO|AUDIO)$/i.test(W.nodeName)))throw"element is not video or audio DOM type!";r=W},setPlaybackRate:S,setSource:function(W){r&&(W?r.src=W:(r.removeAttribute("src"),r.load()))},setStallState:function(W,j){(function(ae,ne){ne?(function(de){if(de!==null&&r&&!r.seeking&&b.indexOf(de)===-1&&(b.push(de),n.get().streaming.buffer.syntheticStallEvents.enabled&&r&&b.length===1&&(n.get().streaming.buffer.syntheticStallEvents.ignoreReadyState||V()>=o.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA))){T=r.playbackRate,S(0,!0);const pe=document.createEvent("Event");pe.initEvent("waiting",!0,!1),r.dispatchEvent(pe)}})(ae):x(ae)})(W,j)},setTTMLRenderingDiv:function(W){g=W,g.style.position="absolute",g.style.display="flex",g.style.overflow="hidden",g.style.pointerEvents="none",g.style.top=0,g.style.left=0},setVttRenderingDiv:function(W){c=W},waitForReadyState:C},e=(0,R.default)(u).getInstance().getLogger(t),n=(0,Z.default)(u).getInstance(),i=NaN,t}Vo.__dashjs_factory_name="VideoModel";var zd=ie.default.getSingletonFactory(Vo),Ld=oe(8986);function mi(){const t="You must first call initialize() and set a source before calling this method",e="You must first call initialize() and set a valid source and view before calling this method",n="You must first call attachView() to set the video element before calling this method",r="You must first call attachSource() with a valid source before calling this method",i="MediaPlayer not initialized!",l=this.context,m=(0,ee.default)(l).getInstance();let g=(0,Z.default)(l).getInstance();const c=(0,R.default)(l).getInstance({settings:g});let T,_,u,h,b,S,A,x,D,H,K,V,X,k,w,d,C,W,j,ae,ne,de,pe,ce,I,F,Q,G,v,B,O,te,J,le,he,me,xe,We,nt,ut,Ut;function Qe(){it(null),Ye(null),h=null,w&&(w.reset(),w=null),d&&(d.reset(),d=null),ne&&ne.reset(),g.reset(),W&&(W.reset(),W=null)}function wt(){return!!u&&!!xe.getElement()}function Qt(){return(0,Ld.getVersionString)()}function yn(){if(!A)throw e;return v.isPaused()}function hn(){if(!A)throw e;return v.getIsDynamic()}function tn(fe){const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);return bt?sn(bt.range.start+fe,bt):0}function sn(fe,qe){let bt=v.getOriginalLiveDelay();return fe>qe.range.end-bt&&(fe=qe.range.end-bt),fe}function Ce(fe=""){if(!A)throw e;let qe=zt().currentTime;return fe!==""&&(qe=F.getTimeRelativeToStreamId(qe,fe)),qe}function tt(fe){(0,et.checkParameterType)(fe,"boolean"),x=fe}function Xe(){ne.restoreDefaultUTCTimingSources()}function ot(){return J}function zt(){if(!xe.getElement())throw n;return xe.getElement()}function Ye(fe){if(!b)throw i;xe.setElement(fe),fe&&(Le(),(function(){if(d||typeof dashjs>"u")return;let qe=dashjs.MetricsReporting;typeof qe=="function"&&(d=qe(l).create().createMetricsReporting({debug:c,eventBus:m,mediaElement:zt(),adapter:j,dashMetrics:J,mediaPlayerModel:ae,events:p.default,constants:o.default,metricsConstants:y}))})(),(function(){if(C||typeof dashjs>"u")return;let qe=dashjs.MssHandler;typeof qe=="function"&&(qt.extend(qe.errors),C=qe(l).create({eventBus:m,mediaPlayerModel:ae,dashMetrics:J,manifestModel:le,playbackController:v,streamController:F,protectionController:w,baseURLController:pe,errHandler:de,events:p.default,constants:o.default,debug:c,initSegmentType:Ae.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:Je,ISOBoxer:sr,settings:g}))})(),F&&F.switchToVideoElement(D)),A&&(_e(),Be()),ht(D)}function ft(fe){if(!S)throw t;let qe=F.getActiveStreamInfo();return qe?k.getTracksFor(fe,qe.id).filter((bt=>!w||w.areKeyIdsUsable(bt.normalizedKeyIds))):[]}function it(fe,qe=NaN){if(!b)throw i;typeof fe=="string"&&We.initialize(fe),qe==null&&(qe=NaN),isNaN(qe)||(qe=Math.max(0,qe)),D=qe,u=fe,(S||A)&&(_e(),Be()),wt()&&ht(D)}function vt(){if(!S)throw t;let fe=F.getActiveStreamInfo();return fe?F.getStreamById(fe.id):null}function _e(){A=!1,S=!1,j.reset(),F.reset(),G.reset(),te.reset(),v.reset(),B.reset(),O.reset(),H.reset(),K.reset(),k.reset(),ut.reset(),w&&(g.get().streaming.protection.keepProtectionMediaKeys?w.stop():(w.reset(),w=null,Le())),Q.reset(),he.reset(),me.reset()}function Be(){ne.resetPlaybackSessionSpecificSettings()}function at(){return Eu(l).create({debug:c,errHandler:de,dashMetrics:J,mediaPlayerModel:ae,mssHandler:C,settings:g})}function Le(){if(w)return w;if(typeof dashjs>"u")return null;let fe=dashjs.Protection;if(typeof fe=="function"){let qe=fe(l).create();return p.default.extend(fe.events),P.default.extend(fe.events,{publicOnly:!0}),qt.extend(fe.errors),w=qe.createProtectionSystem({debug:c,errHandler:de,videoModel:xe,customParametersModel:ne,capabilities:ce,eventBus:m,events:p.default,BASE64:Je,constants:o.default,cmcdModel:he,settings:g}),ce||(ce=(0,Ji.default)(l).getInstance()),ce.setProtectionController(w),w}return null}function dt(){if(!b)throw i;if(W)return W;if(typeof dashjs>"u")return null;let fe=dashjs.OfflineController;if(typeof fe=="function"){p.default.extend(fe.events),P.default.extend(fe.events,{publicOnly:!0}),qt.extend(fe.errors);const qe=at(),bt=xl(l).create();return bt.setConfig({manifestModel:le,adapter:j,manifestLoader:qe,errHandler:de,contentSteeringController:O}),W=fe(l).create({debug:c,manifestUpdater:bt,baseURLController:pe,manifestLoader:qe,manifestModel:le,mediaPlayerModel:ae,abrController:H,playbackController:v,adapter:j,errHandler:de,dashMetrics:J,timelineConverter:X,segmentBaseController:ut,schemeLoaderFactory:V,eventBus:m,events:p.default,errors:qt,constants:o.default,settings:g,dashConstants:re.default,urlUtils:xn(l).getInstance()}),W}return null}function ht(fe=NaN){W&&W.resetRecords(),!S&&u&&(S=!0,_.info("Streaming Initialized"),(function(){const qe=at();F||(F=Ro(l).getInstance()),Q||(Q=Nd(l).create({errHandler:de,manifestModel:le,adapter:j,mediaController:k,baseURLController:pe,videoModel:xe,settings:g})),I.setConfig({capabilities:ce,customParametersModel:ne,adapter:j,settings:g,protectionController:w,manifestModel:le,errHandler:de}),F.setConfig({capabilities:ce,capabilitiesFilter:I,manifestLoader:qe,manifestModel:le,mediaPlayerModel:ae,customParametersModel:ne,protectionController:w,textController:Q,adapter:j,dashMetrics:J,errHandler:de,timelineConverter:X,videoModel:xe,playbackController:v,serviceDescriptionController:B,contentSteeringController:O,abrController:H,throughputController:K,mediaController:k,settings:g,baseURLController:pe,uriFragmentModel:We,segmentBaseController:ut}),G.setConfig({settings:g,playbackController:v,streamController:F,videoModel:xe,timelineConverter:X,adapter:j}),v.setConfig({streamController:F,serviceDescriptionController:B,dashMetrics:J,adapter:j,videoModel:xe,timelineConverter:X,settings:g}),te.setConfig({streamController:F,playbackController:v,mediaPlayerModel:ae,videoModel:xe,settings:g}),K.setConfig({settings:g,playbackController:v}),H.setConfig({streamController:F,capabilities:ce,domStorage:nt,mediaPlayerModel:ae,customParametersModel:ne,throughputController:K,cmsdModel:me,dashMetrics:J,adapter:j,videoModel:xe,settings:g}),he.setConfig({abrController:H,dashMetrics:J,playbackController:v,serviceDescriptionController:B,throughputController:K}),Ut.setConfig({serviceDescriptionController:B}),me.setConfig({}),k.initialize(),K.initialize(),H.initialize(),F.initialize(x,h),Q.initialize(),G.initialize(),te.initialize(),he.initialize(x),me.initialize(),O.initialize(),ut.initialize()})(),typeof u=="string"?F.load(u,fe):F.loadWithManifest(u,fe)),!A&&wt()&&(A=!0,m.trigger(P.default.PLAYBACK_INITIALIZED),_.info("Playback Initialized"))}return T={addABRCustomRule:function(fe,qe,bt){ne.addAbrCustomRule(fe,qe,bt)},addExternalSubtitle:function(fe){fe instanceof nu.default||_.error("Invalid external subtitle object. Must be an instance of dashjs.ExternalSubtitle"),ne.addExternalSubtitle(fe)},addRequestInterceptor:function(fe){ne.addRequestInterceptor(fe)},addResponseInterceptor:function(fe){ne.addResponseInterceptor(fe)},addUTCTimingSource:function(fe,qe){ne.addUTCTimingSource(fe,qe)},attachProtectionController:function(fe){w=fe},attachSource:it,attachTTMLRenderingDiv:function(fe){if(!xe.getElement())throw n;xe.setTTMLRenderingDiv(fe)},attachView:Ye,attachVttRenderingDiv:function(fe){if(!xe.getElement())throw n;xe.setVttRenderingDiv(fe)},clearDefaultUTCTimingSources:function(){ne.clearDefaultUTCTimingSources()},convertToTimeCode:function(fe){fe=Math.max(fe,0);let qe=Math.floor(fe/3600),bt=Math.floor(fe%3600/60),It=Math.floor(fe%3600%60);return(qe===0?"":qe<10?"0"+qe.toString()+":":qe.toString()+":")+(bt<10?"0"+bt.toString():bt.toString())+":"+(It<10?"0"+It.toString():It.toString())},destroy:function(){Qe(),ie.default.deleteSingletonInstances(l)},duration:function(){if(!A)throw e;let fe=zt().duration;if(v.getIsDynamic()){const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);fe=bt?bt.range.end-bt.range.start:0}return fe},enableForcedTextStreaming:function(fe){return!(!F.getActiveStreamInfo()||!Q)&&Q.enableForcedTextStreaming(fe)},enableText:function(fe){const qe=F.getActiveStreamInfo();return!(!qe||!Q)&&Q.enableText(qe.id,fe)},extend:function(fe,qe,bt){ie.default.extend(fe,qe,bt,l)},formatUTC:function(fe,qe,bt,It=!1){const dn=new Date(1e3*fe),$e=dn.toLocaleDateString(qe),Dt=dn.toLocaleTimeString(qe,{hour12:bt});return It?Dt+" "+$e:Dt},getABRCustomRules:function(){return ne.getAbrCustomRules()},getActiveStream:vt,getAutoPlay:function(){return x},getAvailableBaseUrls:function(){const fe=le.getValue();return fe?pe.getBaseUrls(fe):[]},getAvailableLocations:function(){const fe=le.getValue();if(!fe)return[];const qe=j.getLocation(fe),bt=O.getSynthesizedLocationElements(qe);return qe.concat(bt)},getAverageLatency:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getAverageLatency(fe,qe,bt):0},getAverageThroughput:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getAverageThroughput(fe,qe,bt):0},getBufferLength:function(fe){const qe=[o.default.VIDEO,o.default.AUDIO,o.default.TEXT];if(fe)return qe.indexOf(fe)!==-1?ot().getCurrentBufferLevel(fe)||NaN:(_.warn("getBufferLength requested for invalid type"),NaN);{const bt=qe.map((It=>ft(It).length>0?ot().getCurrentBufferLevel(It):Number.MAX_VALUE)).reduce(((It,dn)=>Math.min(It,dn)));return bt===Number.MAX_VALUE?NaN:bt}},getCurrentLiveLatency:function(){if(!b)throw i;return A?v.getCurrentLiveLatency():NaN},getCurrentRepresentationForType:function(fe){if(!S)throw t;if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return null;const qe=vt();if(!qe)return null;if(fe===o.default.IMAGE){const bt=qe.getThumbnailController();return bt?bt.getCurrentTrack():-1}return qe.getCurrentRepresentationForType(fe)},getCurrentSteeringResponseData:function(){if(O)return O.getCurrentSteeringResponseData()},getCurrentTextTrackIndex:function(){let fe=NaN;const qe=F.getActiveStreamInfo();if(qe&&Q)return fe=Q.getCurrentTrackIdx(qe.id),fe},getCurrentTrackFor:function(fe){if(!S)throw t;let qe=F.getActiveStreamInfo();return qe?k.getCurrentTrackFor(fe,qe.id):null},getDashAdapter:function(){return j},getDashMetrics:ot,getDebug:function(){return c},getDvrSeekOffset:tn,getDvrWindow:function(){if(!A)throw e;const fe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let qe=J.getCurrentDVRInfo(fe);if(!qe)return{};let bt=0;const It=v.getIsDynamic();return It&&(bt=qe.manifestInfo.availableFrom.getTime()/1e3),{start:qe.range.start,end:qe.range.end,startAsUtc:It?bt+qe.range.start:NaN,endAsUtc:It?bt+qe.range.end:NaN,size:qe.range.end-qe.range.start}},getExternalSubtitles:function(){ne.getExternalSubtitles()},getInitialMediaSettingsFor:function(fe){if(!b)throw i;return k.getInitialSettings(fe)},getLowLatencyModeEnabled:function(){if(!A)throw e;return v.getLowLatencyModeEnabled()},getManifest:function(){return le.getValue()},getOfflineController:function(){return dt()},getPlaybackRate:function(){return zt().playbackRate},getProtectionController:function(){return Le()},getRawThroughputData:function(fe=o.default.VIDEO){return K?K.getRawThroughputData(fe):[]},getRepresentationsByType:function(fe,qe=null){if(!S)throw t;let bt=qe?F.getStreamById(qe):vt();return bt?bt.getRepresentationsByType(fe):[]},getSafeAverageThroughput:function(fe=o.default.VIDEO,qe=null,bt=NaN){return K?K.getSafeAverageThroughput(fe,qe,bt):0},getSettings:function(){return g.get()},getSource:function(){if(!u)throw r;return u},getStreamsFromManifest:function(fe){if(!S)throw t;return j.getStreamsInfo(fe)},getTTMLRenderingDiv:function(){return xe?xe.getTTMLRenderingDiv():null},getTargetLiveDelay:function(){if(!A)throw e;return v.getOriginalLiveDelay()},getTracksFor:ft,getTracksForTypeFromManifest:function(fe,qe,bt){if(!S)throw t;return(bt=bt||j.getStreamsInfo(qe,1)[0])?j.getAllMediaInfoForType(bt,fe,qe):[]},getVersion:Qt,getVideoElement:zt,getVolume:function(){return zt().volume},getXHRWithCredentialsForType:function(fe){return ne.getXHRWithCredentialsForType(fe)},initialize:function(fe,qe,bt,It=NaN){ce||(ce=(0,Ji.default)(l).getInstance(),ce.setConfig({settings:g,protectionController:w})),de||(de=tu(l).getInstance()),ce.supportsMediaSource()?(b||(b=!0,X=Dd(l).getInstance(),K||(K=xd(l).getInstance()),H||(H=Yn(l).getInstance()),V||(V=Yi(l).getInstance()),v||(v=Iu(l).getInstance()),k||(k=Su(l).getInstance()),F||(F=Ro(l).getInstance()),G||(G=au(l).getInstance()),te||(te=ws(l).getInstance()),B||(B=Cu(l).getInstance()),O||(O=Qr(l).getInstance()),I||(I=Ss(l).getInstance()),j=js(l).getInstance(),le=Tu(l).getInstance(),he=Ai(l).getInstance(),me=Li(l).getInstance(),Ut=ji(l).getInstance(),J=eu(l).getInstance({settings:g}),nt=ks(l).getInstance({settings:g}),j.setConfig({constants:o.default,cea608parser:new Mo,errHandler:de,BASE64:Je}),pe||(pe=Ts(l).create()),pe.setConfig({adapter:j,contentSteeringController:O}),B.setConfig({adapter:j}),ut||(ut=Ru(l).getInstance({dashMetrics:J,mediaPlayerModel:ae,errHandler:de,baseURLController:pe,events:p.default,eventBus:m,debug:c,boxParser:kr(l).getInstance(),errors:qt})),k.setConfig({domStorage:nt,settings:g,mediaPlayerModel:ae,customParametersModel:ne,videoModel:xe}),ae.setConfig({playbackController:v,serviceDescriptionController:B}),O.setConfig({adapter:j,errHandler:de,dashMetrics:J,mediaPlayerModel:ae,manifestModel:le,serviceDescriptionController:B,throughputController:K,eventBus:m}),Xe(),tt(bt===void 0||bt),dt()),fe&&Ye(fe),qe&&it(qe,It),_.info("[dash.js "+Qt()+"] MediaPlayer has been initialized")):de.error(new Ft.default(qt.CAPABILITY_MEDIASOURCE_ERROR_CODE,qt.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},isDynamic:hn,isMuted:function(){return zt().muted},isPaused:yn,isReady:wt,isSeeking:function(){if(!A)throw e;return v.isSeeking()},isTextEnabled:function(){const fe=F.getActiveStreamInfo();return!(!fe||!Q)&&Q.isTextEnabled(fe)},off:function(fe,qe,bt){m.off(fe,qe,bt)},on:function(fe,qe,bt,It){m.on(fe,qe,bt,It)},pause:function(){if(!A)throw e;v.pause()},play:function(){if(!A)throw e;(!x||yn()&&A)&&v.play(!0)},preload:function(){if(!xe.getElement()&&!S){if(!u)throw r;ht(D)}},provideThumbnail:function(fe,qe){if(typeof qe!="function")return;if(fe<0)return void qe(null);const bt=v.getIsDynamic()?tn(fe):fe,It=F.getStreamForTime(bt);if(It===null)return void qe(null);const dn=It.getThumbnailController();if(dn)return dn.provide(bt,qe);qe(null)},refreshManifest:function(fe){if(!b)throw i;if(!wt())return fe(null,r);let qe=this;if(typeof fe=="function"){const bt=function(It){m.off(p.default.INTERNAL_MANIFEST_LOADED,bt,qe),It.error?fe(null,It.error):fe(It.manifest)};m.on(p.default.INTERNAL_MANIFEST_LOADED,bt,qe)}F.refreshManifest()},registerCustomCapabilitiesFilter:function(fe){ne.registerCustomCapabilitiesFilter(fe)},registerLicenseRequestFilter:function(fe){ne.registerLicenseRequestFilter(fe)},registerLicenseResponseFilter:function(fe){ne.registerLicenseResponseFilter(fe)},removeABRCustomRule:function(fe){ne.removeAbrCustomRule(fe)},removeAllABRCustomRule:function(){ne.removeAllAbrCustomRule()},removeExternalSubtitleById:function(fe){ne.removeExternalSubtitleById(fe)},removeExternalSubtitleByUrl:function(fe){ne.removeExternalSubtitleByUrl(fe)},removeRequestInterceptor:function(fe){ne.removeRequestInterceptor(fe)},removeResponseInterceptor:function(fe){ne.removeResponseInterceptor(fe)},removeUTCTimingSource:function(fe,qe){ne.removeUTCTimingSource(fe,qe)},reset:Qe,resetCustomInitialTrackSelectionFunction:function(){ne.resetCustomInitialTrackSelectionFunction(null)},resetSettings:function(){g.reset()},restoreDefaultUTCTimingSources:Xe,retrieveManifest:function(fe,qe){let bt=at(),It=this;const dn=function($e){$e.error?qe(null,$e.error):qe($e.manifest),m.off(p.default.INTERNAL_MANIFEST_LOADED,dn,It),bt.reset()};m.on(p.default.INTERNAL_MANIFEST_LOADED,dn,It),We.initialize(fe),bt.load(fe)},seek:function(fe){if(!A)throw e;if((0,et.checkParameterType)(fe,"number"),isNaN(fe))throw o.default.BAD_ARGUMENT_ERROR;fe<0&&(fe=0);let qe=v.getIsDynamic()?tn(fe):fe;const bt=zt();!v.getIsDynamic()&&bt.duration&&(qe=Math.min(bt.duration,qe)),v.seek(qe,!1,!1,!0)},seekToOriginalLive:function(){A&&hn()&&v.seekToOriginalLive()},seekToPresentationTime:function(fe){if(!A)throw e;if((0,et.checkParameterType)(fe,"number"),isNaN(fe))throw o.default.BAD_ARGUMENT_ERROR;fe<0&&(fe=0);const qe=zt();if(!v.getIsDynamic()&&qe.duration&&(fe=Math.min(qe.duration,fe)),v.getIsDynamic()){const bt=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let It=J.getCurrentDVRInfo(bt);if(!It)return;(fe=sn(fe,It))<It.range.start&&(fe=It.range.start)}v.seek(fe,!1,!1,!0)},setAutoPlay:tt,setConfig:function(fe){fe&&(fe.capabilities&&(ce=fe.capabilities),fe.capabilitiesFilter&&(I=fe.capabilitiesFilter),fe.streamController&&(F=fe.streamController),fe.textController&&(Q=fe.textController),fe.gapController&&(G=fe.gapController),fe.throughputController&&(K=fe.throughputController),fe.playbackController&&(v=fe.playbackController),fe.serviceDescriptionController&&(B=fe.serviceDescriptionController),fe.contentSteeringController&&(O=fe.contentSteeringController),fe.clientDataReportingController&&(Ut=fe.clientDataReportingController),fe.catchupController&&(te=fe.catchupController),fe.mediaPlayerModel&&(ae=fe.mediaPlayerModel),fe.customParametersModel&&(ne=fe.customParametersModel),fe.abrController&&(H=fe.abrController),fe.schemeLoaderFactory&&(V=fe.schemeLoaderFactory),fe.mediaController&&(k=fe.mediaController),fe.settings&&(g=fe.settings),fe.dashMetrics&&(J=fe.dashMetrics))},setCurrentTrack:function(fe,qe=!1){if(!S)throw t;!w||w.areKeyIdsUsable(fe.normalizedKeyIds)?k.setTrack(fe,{noSettingsSave:qe}):_.error(`Can not switch to track with index ${fe.index} because key is not usable`)},setCustomInitialTrackSelectionFunction:function(fe){ne.setCustomInitialTrackSelectionFunction(fe)},setInitialMediaSettingsFor:function(fe,qe){if(!b)throw i;let bt=(function(It){const dn=g.get().streaming.defaultSchemeIdUri;let $e={};function Dt(nn,en,mn){let rn={};if(en){if(en instanceof Array)throw"Array type not supported for settings!";return en instanceof Object?(rn.schemeIdUri=en.schemeIdUri?en.schemeIdUri:"",rn.value=en.value?en.value:""):(rn.schemeIdUri=mn,rn.value=en,_.warn("No schemeIdUri provided for "+nn+', using default "'+mn+'"')),rn}return null}return It.id!==void 0&&($e.id=It.id),It.lang!==void 0&&($e.lang=It.lang),isNaN(It.index)||($e.index=It.index),It.viewpoint!==void 0&&($e.viewpoint=Dt("viewpoint",It.viewpoint,dn.viewpoint)),It.audioChannelConfiguration!==void 0&&($e.audioChannelConfiguration=Dt("audioChannelConfiguration",It.audioChannelConfiguration,dn.audioChannelConfiguration)),It.role!==void 0&&It.role!==null&&($e.role=Dt("role",It.role,dn.role),$e.role.schemeIdUri===o.default.DASH_ROLE_SCHEME_ID&&$e.role.value==="Main"&&($e.role.value=re.default.MAIN)),It.accessibility!==void 0&&($e.accessibility=Dt("accessibility",It.accessibility,dn.accessibility)),$e})(qe);k.setInitialSettings(fe,bt)},setMute:function(fe){(0,et.checkParameterType)(fe,"boolean"),zt().muted=fe},setPlaybackRate:function(fe){zt().playbackRate=fe},setProtectionData:function(fe){h=fe,F&&F.setProtectionData(h)},setRepresentationForTypeById:function(fe,qe,bt=!1){if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return;if(!S)throw t;const It=vt();if(It)if(fe===o.default.IMAGE){const dn=It.getThumbnailController();dn&&dn.setTrackById(qe)}else{const dn=It.getRepresentationForTypeById(fe,qe);dn&&H.manuallySetPlaybackQuality(fe,F.getActiveStreamInfo(),dn,{forceReplace:bt})}},setRepresentationForTypeByIndex:function(fe,qe,bt=!1){if(fe!==o.default.IMAGE&&fe!==o.default.VIDEO&&fe!==o.default.AUDIO)return;if(!S)throw t;const It=vt();if(It)if(fe===o.default.IMAGE){const dn=It.getThumbnailController();dn&&dn.setTrackByIndex(qe)}else{const dn=It.getRepresentationForTypeByIndex(fe,qe);dn&&H.manuallySetPlaybackQuality(fe,F.getActiveStreamInfo(),dn,{forceReplace:bt})}},setTextTrack:function(fe){if(!A)throw e;const qe=F.getActiveStreamInfo();qe&&Q&&Q.setTextTrack(qe.id,fe)},setVolume:function(fe){if(typeof fe!="number"||isNaN(fe)||fe<0||fe>1)throw o.default.BAD_ARGUMENT_ERROR;zt().volume=fe},setXHRWithCredentialsForType:function(fe,qe){ne.setXHRWithCredentialsForType(fe,qe)},time:Ce,timeAsUTC:function(){if(!A)throw e;if(!v.getIsDynamic()||Ce()<0)return NaN;const fe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let qe,bt,It=J.getCurrentDVRInfo(fe);return It?(qe=It.manifestInfo.availableFrom.getTime()/1e3,bt=qe+Ce(),bt):0},timeInDvrWindow:function(){if(!A)throw e;if(!v.getIsDynamic())return Ce();let fe=zt().currentTime;const qe=F&&F.hasVideoTrack()?o.default.VIDEO:o.default.AUDIO;let bt=J.getCurrentDVRInfo(qe);return fe=bt===null||fe===0?0:Math.max(0,fe-bt.range.start),fe},trigger:function(fe,qe,bt){m.trigger(fe,qe,bt)},triggerSteeringRequest:function(){if(O)return O.loadSteeringData()},unregisterCustomCapabilitiesFilter:function(fe){ne.unregisterCustomCapabilitiesFilter(fe)},unregisterLicenseRequestFilter:function(fe){ne.unregisterLicenseRequestFilter(fe)},unregisterLicenseResponseFilter:function(fe){ne.unregisterLicenseResponseFilter(fe)},updateSettings:function(fe){g.update(fe)},updateSource:function(fe){u=fe,F.load(u)}},_=c.getLogger(T),b=!1,A=!1,S=!1,x=!0,D=NaN,w=null,W=null,h=null,j=null,ut=null,p.default.extend(P.default),ae=wu(l).getInstance(),ne=(0,Kr.default)(l).getInstance(),xe=zd(l).getInstance(),We=Pd(l).getInstance(),T}mi.__dashjs_factory_name="MediaPlayer";const Or=ie.default.getClassFactory(mi);Or.events=P.default,Or.errors=qt,ie.default.updateClassFactory(mi.__dashjs_factory_name,Or);var Fd=Or},1191:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.AST_IN_FUTURE="astInFuture",this.BASE_URLS_UPDATED="baseUrlsUpdated",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",this.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",this.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",this.DYNAMIC_TO_STATIC="dynamicToStatic",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADING_STARTED="manifestLoadingStarted",this.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.NEW_TRACK_SELECTED="newTrackSelected",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_UPDATED="streamUpdated",this.STREAM_ACTIVATED="streamActivated",this.STREAM_DEACTIVATED="streamDeactivated",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.CUE_ENTER="cueEnter",this.CUE_EXIT="cueExit",this.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.CAN_PLAY_THROUGH="canPlayThrough",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_INITIALIZED="playbackInitialized",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_LOADED_DATA="playbackLoadedData",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",this.EVENT_MODE_ON_START="eventModeOnStart",this.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",this.CONFORMANCE_VIOLATION="conformanceViolation",this.REPRESENTATION_SWITCH="representationSwitch",this.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",this.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",this.INBAND_PRFT="inbandPrft",this.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",this.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming"}}let y=new N;Oe.default=y},5212:function(kt,Oe,oe){oe.r(Oe),Oe.default={STREAM:"stream",VIDEO:"video",ENHANCEMENT:"enhancement",AUDIO:"audio",TEXT:"text",MUXED:"muxed",IMAGE:"image",STPP:"stpp",TTML:"ttml",VTT:"vtt",WVTT:"wvtt",CONTENT_STEERING:"contentSteering",LIVE_CATCHUP_MODE_DEFAULT:"liveCatchupModeDefault",LIVE_CATCHUP_MODE_LOLP:"liveCatchupModeLoLP",MOVING_AVERAGE_SLIDING_WINDOW:"slidingWindow",MOVING_AVERAGE_EWMA:"ewma",BAD_ARGUMENT_ERROR:"Invalid Arguments",MISSING_CONFIG_ERROR:"Missing config parameter(s)",TRACK_SWITCH_MODE_ALWAYS_REPLACE:"alwaysReplace",TRACK_SWITCH_MODE_NEVER_REPLACE:"neverReplace",TRACK_SELECTION_MODE_FIRST_TRACK:"firstTrack",TRACK_SELECTION_MODE_HIGHEST_BITRATE:"highestBitrate",TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:"highestEfficiency",TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:"lowestStartupDelay",TRACK_SELECTION_MODE_WIDEST_RANGE:"widestRange",CMCD_QUERY_KEY:"CMCD",CMCD_MODE_QUERY:"query",CMCD_MODE_HEADER:"header",CMCD_AVAILABLE_KEYS:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"],CMCD_V2_AVAILABLE_KEYS:["msd","ltc"],CMCD_AVAILABLE_REQUESTS:["segment","mpd","xlink","steering","other"],INITIALIZE:"initialize",TEXT_SHOWING:"showing",TEXT_HIDDEN:"hidden",TEXT_DISABLED:"disabled",ACCESSIBILITY_CEA608_SCHEME:"urn:scte:dash:cc:cea-608:2015",CC1:"CC1",CC3:"CC3",UTF8:"utf-8",SCHEME_ID_URI:"schemeIdUri",START_TIME:"starttime",SERVICE_DESCRIPTION_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:scope:2019",SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:critical:2019",CTA_5004_2023_SCHEME:"urn:mpeg:dash:cta-5004:2023",THUMBNAILS_SCHEME_ID_URIS:["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"],FONT_DOWNLOAD_DVB_SCHEME:"urn:dvb:dash:fontdownload:2014",COLOUR_PRIMARIES_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:ColourPrimaries",URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2014",EXT_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2016",MATRIX_COEFFICIENTS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:MatrixCoefficients",TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:TransferCharacteristics",SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI:"urn:mpeg:dash:ssr:2023",HDR_METADATA_FORMAT_SCHEME_ID_URI:"urn:dvb:dash:hdr-dmi",HDR_METADATA_FORMAT_VALUES:{ST2094_10:"ST2094-10",SL_HDR2:"SL-HDR2",ST2094_40:"ST2094-40"},MEDIA_CAPABILITIES_API:{COLORGAMUT:{SRGB:"srgb",P3:"p3",REC2020:"rec2020"},TRANSFERFUNCTION:{SRGB:"srgb",PQ:"pq",HLG:"hlg"},HDR_METADATATYPE:{SMPTE_ST_2094_10:"smpteSt2094-10",SLHDR2:"slhdr2",SMPTE_ST_2094_40:"smpteSt2094-40"}},XML:"XML",ARRAY_BUFFER:"ArrayBuffer",DVB_REPORTING_URL:"dvb:reportingUrl",DVB_PROBABILITY:"dvb:probability",OFF_MIMETYPE:"application/font-sfnt",WOFF_MIMETYPE:"application/font-woff",VIDEO_ELEMENT_READY_STATES:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},FILE_LOADER_TYPES:{FETCH:"fetch_loader",XHR:"xhr_loader"},THROUGHPUT_TYPES:{LATENCY:"throughput_type_latency",BANDWIDTH:"throughput_type_bandwidth"},THROUGHPUT_CALCULATION_MODES:{EWMA:"throughputCalculationModeEwma",ZLEMA:"throughputCalculationModeZlema",ARITHMETIC_MEAN:"throughputCalculationModeArithmeticMean",BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeByteSizeWeightedArithmeticMean",DATE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeDateWeightedArithmeticMean",HARMONIC_MEAN:"throughputCalculationModeHarmonicMean",BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeByteSizeWeightedHarmonicMean",DATE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeDateWeightedHarmonicMean"},LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE:{MOOF_PARSING:"lowLatencyDownloadTimeCalculationModeMoofParsing",DOWNLOADED_DATA:"lowLatencyDownloadTimeCalculationModeDownloadedData",AAST:"lowLatencyDownloadTimeCalculationModeAast"},RULES_TYPES:{QUALITY_SWITCH_RULES:"qualitySwitchRules",ABANDON_FRAGMENT_RULES:"abandonFragmentRules"},QUALITY_SWITCH_RULES:{BOLA_RULE:"BolaRule",THROUGHPUT_RULE:"ThroughputRule",INSUFFICIENT_BUFFER_RULE:"InsufficientBufferRule",SWITCH_HISTORY_RULE:"SwitchHistoryRule",DROPPED_FRAMES_RULE:"DroppedFramesRule",LEARN_TO_ADAPT_RULE:"L2ARule",LOL_PLUS_RULE:"LoLPRule"},ABANDON_FRAGMENT_RULES:{ABANDON_REQUEST_RULE:"AbandonRequestsRule"},ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",COMMON_ACCESS_TOKEN_HEADER:"common-access-token",DASH_ROLE_SCHEME_ID:"urn:mpeg:dash:role:2011",CODEC_FAMILIES:{MP3:"mp3",AAC:"aac",AC3:"ac3",EC3:"ec3",DTSX:"dtsx",DTSC:"dtsc",AVC:"avc",HEVC:"hevc"}}},2861:function(kt,Oe,oe){oe.r(Oe),Oe.default={CLEARKEY_KEYSTEM_STRING:"org.w3.clearkey",WIDEVINE_KEYSTEM_STRING:"com.widevine.alpha",PLAYREADY_KEYSTEM_STRING:"com.microsoft.playready",PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:"com.microsoft.playready.recommendation",WIDEVINE_UUID:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",PLAYREADY_UUID:"9a04f079-9840-4286-ab92-e65be0885f95",CLEARKEY_UUID:"e2719d58-a985-b3c9-781a-b030af78d30e",W3C_CLEARKEY_UUID:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",INITIALIZATION_DATA_TYPE_CENC:"cenc",INITIALIZATION_DATA_TYPE_KEYIDS:"keyids",INITIALIZATION_DATA_TYPE_WEBM:"webm",ENCRYPTION_SCHEME_CENC:"cenc",ENCRYPTION_SCHEME_CBCS:"cbcs",MEDIA_KEY_MESSAGE_TYPES:{LICENSE_REQUEST:"license-request",LICENSE_RENEWAL:"license-renewal",LICENSE_RELEASE:"license-release",INDIVIDUALIZATION_REQUEST:"individualization-request"},ROBUSTNESS_STRINGS:{WIDEVINE:{SW_SECURE_CRYPTO:"SW_SECURE_CRYPTO",SW_SECURE_DECODE:"SW_SECURE_DECODE",HW_SECURE_CRYPTO:"HW_SECURE_CRYPTO",HW_SECURE_DECODE:"HW_SECURE_DECODE",HW_SECURE_ALL:"HW_SECURE_ALL"}},MEDIA_KEY_STATUSES:{USABLE:"usable",EXPIRED:"expired",RELEASED:"released",OUTPUT_RESTRICTED:"output-restricted",OUTPUT_DOWNSCALED:"output-downscaled",STATUS_PENDING:"status-pending",INTERNAL_ERROR:"internal-error"}}},4469:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{default:function(){return E}});class ie{constructor(){this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}}ie.SSL_CONNECTION_FAILED_PREFIX="SSL",ie.DNS_RESOLUTION_FAILED="C00",ie.HOST_UNREACHABLE="C01",ie.CONNECTION_REFUSED="C02",ie.CONNECTION_ERROR="C03",ie.CORRUPT_MEDIA_ISOBMFF="M00",ie.CORRUPT_MEDIA_OTHER="M01",ie.BASE_URL_CHANGED="F00",ie.BECAME_REPORTER="S00";var N=ie,y=oe(913),R=oe(138);function Z($){let z,Te;const Fe=($=$||{}).eventBus,Re=$.dashMetrics,De=$.metricsConstants,Se=$.events;function ze(Lt){let _t=new N;if(Te){for(const fn in Lt)Lt.hasOwnProperty(fn)&&(_t[fn]=Lt[fn]);_t.mpdurl||(_t.mpdurl=Te.originalUrl||Te.url),_t.terror||(_t.terror=new Date),Re.addDVBErrors(_t)}}function Ze(Lt){Lt.error||(Te=Lt.manifest)}function Ke(Lt){ze({errorcode:N.BASE_URL_CHANGED,servicelocation:Lt.entry})}function lt(){ze({errorcode:N.BECAME_REPORTER})}function Yt(Lt){var _t;Lt.metric===De.HTTP_REQUEST&&((_t=Lt.value).responsecode===0||_t.responsecode==null||_t.responsecode>=400||_t.responsecode<100||_t.responsecode>=600)&&ze({errorcode:_t.responsecode||N.CONNECTION_ERROR,url:_t.url,terror:_t.tresponse,servicelocation:_t._serviceLocation})}function xt(Lt){let _t;switch(Lt.error?Lt.error.code:0){case MediaError.MEDIA_ERR_NETWORK:_t=N.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:_t=N.CORRUPT_MEDIA_OTHER;break;default:return}ze({errorcode:_t})}return z={initialize:function(){Fe.on(Se.MANIFEST_UPDATED,Ze,z),Fe.on(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,Ke,z),Fe.on(Se.METRIC_ADDED,Yt,z),Fe.on(Se.METRIC_UPDATED,Yt,z),Fe.on(Se.PLAYBACK_ERROR,xt,z),Fe.on(y.default.BECAME_REPORTING_PLAYER,lt,z)},reset:function(){Fe.off(Se.MANIFEST_UPDATED,Ze,z),Fe.off(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,Ke,z),Fe.off(Se.METRIC_ADDED,Yt,z),Fe.off(Se.METRIC_UPDATED,Yt,z),Fe.off(Se.PLAYBACK_ERROR,xt,z),Fe.off(y.default.BECAME_REPORTING_PLAYER,lt,z)}},z}Z.__dashjs_factory_name="DVBErrorsTranslator";var q=R.default.getSingletonFactory(Z),Y=oe(7377);function ee($){$=$||{};let z,Te,Fe=!1,Re=this.context,De=$.mediaElement;return z={initialize:function(Se){Se&&Se.length&&(Se.forEach((ze=>{let Ze=ze.starttime,Ke=Ze+ze.duration;Te.add(Ze,Ke)})),Fe=!!Se[0]._useWallClockTime)},reset:function(){Te.clear()},isEnabled:function(){let Se,ze=Te.length;if(!ze)return!0;Se=Fe?new Date().getTime()/1e3:De.currentTime;for(let Ze=0;Ze<ze;Ze+=1){let Ke=Te.start(Ze),lt=Te.end(Ze);if(Ke<=Se&&Se<lt)return!0}return!1}},Te=(0,Y.default)(Re).create(),z}ee.__dashjs_factory_name="RangeController";var p=R.default.getClassFactory(ee);function o(){return{serialise:function $(z){let Te,Fe,Re=[],De=[];for(Te in z)if(z.hasOwnProperty(Te)&&Te.indexOf("_")!==0){if(Fe=z[Te],Fe==null&&(Fe=""),Array.isArray(Fe)){if(!Fe.length)continue;De=[],Fe.forEach((function(Se){let ze=Object.prototype.toString.call(Se).slice(8,-1)!=="Object";De.push(ze?Se:$(Se))})),Fe=De.map(encodeURIComponent).join(",")}else typeof Fe=="string"?Fe=encodeURIComponent(Fe):Fe instanceof Date?Fe=Fe.toISOString():typeof Fe=="number"&&(Fe=Math.round(Fe));Re.push(Te+"="+Fe)}return Re.join("&")}}}o.__dashjs_factory_name="MetricSerialiser";var P=R.default.getSingletonFactory(o);function U(){let $,z,Te,Fe=window.crypto||window.msCrypto,Re=Uint32Array,De=Math.pow(2,8*Re.BYTES_PER_ELEMENT)-1;function Se(){Fe&&($||($=new Re(10)),Fe.getRandomValues($),z=0)}return Te={random:function(ze,Ze){let Ke;return ze||(ze=0),Ze||(Ze=1),Fe?(z===$.length&&Se(),Ke=$[z]/De,z+=1):Ke=Math.random(),Ke*(Ze-ze)+ze}},Se(),Te}U.__dashjs_factory_name="RNG";var se=R.default.getSingletonFactory(U),ye=oe(1926);function ke($){let z;$=$||{};let Te,Fe,Re,De,Se,ze,Ze,Ke=this.context,lt=[];const Yt=$.metricsConstants;function xt(){De=!1,Se=!1,ze=null,Ze=null}return z={report:function(Lt,_t){Array.isArray(_t)||(_t=[_t]),Se&&Ze.isEnabled()&&_t.forEach((function(fn){let An=Te.serialise(fn);Lt!==Yt.DVB_ERRORS&&(An=`metricname=${Lt}&${An}`),An=`${ze}?${An}`,(function(jn,$n,ea){let Yn=new XMLHttpRequest;Yn.withCredentials=Fe.getXHRWithCredentialsForType(Yt.HTTP_REQUEST_DVB_REPORTING_TYPE);const Nt=function(){let St=lt.indexOf(Yn);St!==-1&&(lt.splice(St,1),!(Yn.status>=200&&Yn.status<300)&&ea&&ea())};lt.push(Yn);try{Yn.open("GET",jn),Yn.onloadend=Nt,Yn.onerror=Nt,Yn.send()}catch{Yn.onerror()}})(An,0,(function(){Se=!1}))}))},initialize:function(Lt,_t){let fn;if(Ze=_t,ze=Lt.dvbReportingUrl,!ze)throw new Error("required parameter missing (dvb:reportingUrl)");De||(fn=Lt.dvbProbability,fn&&(fn===1e3||fn/1e3>=Re.random())&&(Se=!0),De=!0)},reset:function(){xt()}},Te=P(Ke).getInstance(),Re=se(Ke).getInstance(),Fe=(0,ye.default)(Ke).getInstance(),xt(),z}ke.__dashjs_factory_name="DVBReporting";var Ie=R.default.getClassFactory(ke);function Pe($){$=$||{};const z={"urn:dvb:dash:reporting:2014":Ie},Te=this.context;let Fe;const Re=$.debug?$.debug.getLogger(Fe):{},De=$.metricsConstants,Se=$.mediaPlayerModel||{};return Fe={create:function(ze,Ze){let Ke;try{Ke=z[ze.schemeIdUri](Te).create({metricsConstants:De,mediaPlayerModel:Se}),Ke.initialize(ze,Ze)}catch(lt){Ke=null,Re.error(`ReportingFactory: could not create Reporting with schemeIdUri ${ze.schemeIdUri} (${lt.message})`)}return Ke},register:function(ze,Ze){z[ze]=Ze},unregister:function(ze){delete z[ze]}},Fe}Pe.__dashjs_factory_name="ReportingFactory";var Ge=R.default.getSingletonFactory(Pe);function yt($){let z,Te=[];const Fe=Ge(this.context).getInstance($);return z={initialize:function(Re,De){Re.some((Se=>{let ze=Fe.create(Se,De);if(ze)return Te.push(ze),!0}))},reset:function(){Te.forEach((Re=>Re.reset())),Te=[]},report:function(Re,De){Te.forEach((Se=>Se.report(Re,De)))}},z}yt.__dashjs_factory_name="ReportingController";var Ae=R.default.getClassFactory(yt);function ge(){return{reconstructFullMetricName:function($,z,Te){let Fe=$;return z&&(Fe+="("+z,Te&&Te.length&&(Fe+=","+Te),Fe+=")"),Fe},validateN:function($){if(!$)throw new Error("missing n");if(isNaN($))throw new Error("n is NaN");if($<0)throw new Error("n must be positive");return $}}}ge.__dashjs_factory_name="HandlerHelpers";var ue=R.default.getSingletonFactory(ge);function we($){let z,Te,Fe,Re,De,Se;$=$||{};let ze=this.context,Ze=ue(ze).getInstance(),Ke=[];const lt=$.metricsConstants;function Yt(){let xt=(function(){try{return Object.keys(Ke).map((Lt=>Ke[Lt])).reduce(((Lt,_t)=>Lt.level<_t.level?Lt:_t))}catch{return}})();xt&&Se!==xt.t&&(Se=xt.t,Te.report(Re,xt))}return z={initialize:function(xt,Lt,_t){Lt&&(Fe=Ze.validateN(_t),Te=Lt,Re=Ze.reconstructFullMetricName(xt,_t),De=setInterval(Yt,Fe))},reset:function(){clearInterval(De),De=null,Fe=0,Te=null,Se=null},handleNewMetric:function(xt,Lt,_t){xt===lt.BUFFER_LEVEL&&(Ke[_t]=Lt)}},z}we.__dashjs_factory_name="BufferLevelHandler";var Ne=R.default.getClassFactory(we),He=R.default.getClassFactory((function($){let z,Te,Fe=($=$||{}).eventBus;const Re=$.metricsConstants;function De(){Fe.off(y.default.METRICS_INITIALISATION_COMPLETE,De,this),Fe.trigger(y.default.BECAME_REPORTING_PLAYER)}return z={initialize:function(Se,ze){ze&&(Te=ze,Fe.on(y.default.METRICS_INITIALISATION_COMPLETE,De,this))},reset:function(){Te=null},handleNewMetric:function(Se,ze){Se===Re.DVB_ERRORS&&Te&&Te.report(Se,ze)}},z}));function Ht($){let z,Te,Fe,Re,De,Se;$=$||{};let ze=[],Ze=ue(this.context).getInstance();const Ke=$.metricsConstants;function lt(){var Yt=ze;Yt.length&&Te&&Te.report(De,Yt),ze=[]}return z={initialize:function(Yt,xt,Lt,_t){xt&&(Fe=Ze.validateN(Lt),Te=xt,_t&&_t.length&&(Re=_t),De=Ze.reconstructFullMetricName(Yt,Lt,_t),Se=setInterval(lt,Fe))},reset:function(){clearInterval(Se),Se=null,Fe=null,Re=null,ze=[],Te=null},handleNewMetric:function(Yt,xt){Yt===Ke.HTTP_REQUEST&&(Re&&Re!==xt.type||ze.push(xt))}},z}Ht.__dashjs_factory_name="HttpListHandler";var be=R.default.getClassFactory(Ht);function mt(){let $,z,Te;return $={initialize:function(Fe,Re){z=Fe,Te=Re},reset:function(){Te=null,z=void 0},handleNewMetric:function(Fe,Re){Fe===z&&Te&&Te.report(z,Re)}},$}mt.__dashjs_factory_name="GenericMetricHandler";var Ve=R.default.getClassFactory(mt);function Ue($){let z;const Te=($=$||{}).debug?$.debug.getLogger(z):{};let Fe=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/;const Re=this.context;let De={BufferLevel:Ne,DVBErrors:He,HttpList:be,PlayList:Ve,RepSwitchList:Ve,TcpList:Ve};return z={create:function(Se,ze){var Ze,Ke=Se.match(Fe);if(Ke){try{(Ze=De[Ke[1]](Re).create({eventBus:$.eventBus,metricsConstants:$.metricsConstants})).initialize(Ke[1],ze,Ke[3],Ke[5])}catch(lt){Ze=null,Te.error(`MetricsHandlerFactory: Could not create handler for type ${Ke[1]} with args ${Ke[3]}, ${Ke[5]} (${lt.message})`)}return Ze}},register:function(Se,ze){De[Se]=ze},unregister:function(Se){delete De[Se]}},z}Ue.__dashjs_factory_name="MetricsHandlerFactory";var Rt=R.default.getSingletonFactory(Ue);function Zt($){$=$||{};let z,Te=[];const Fe=this.context,Re=$.eventBus,De=$.events;let Se=Rt(Fe).getInstance({debug:$.debug,eventBus:$.eventBus,metricsConstants:$.metricsConstants});function ze(Ze){Te.forEach((Ke=>{Ke.handleNewMetric(Ze.metric,Ze.value,Ze.mediaType)}))}return z={initialize:function(Ze,Ke){Ze.split(",").forEach(((lt,Yt,xt)=>{let Lt;if(lt.indexOf("(")!==-1&<.indexOf(")")===-1){let _t=xt[Yt+1];_t&&_t.indexOf("(")===-1&&_t.indexOf(")")!==-1&&(lt+=","+_t,delete xt[Yt+1])}Lt=Se.create(lt,Ke),Lt&&Te.push(Lt)})),Re.on(De.METRIC_ADDED,ze,z),Re.on(De.METRIC_UPDATED,ze,z)},reset:function(){Re.off(De.METRIC_ADDED,ze,z),Re.off(De.METRIC_UPDATED,ze,z),Te.forEach((Ze=>Ze.reset())),Te=[]}},z}Zt.__dashjs_factory_name="MetricsHandlersController";var jt=R.default.getClassFactory(Zt);function Wt($){let z,Te,Fe,Re;$=$||{};let De=this.context;function Se(){z&&z.reset(),Te&&Te.reset(),Fe&&Fe.reset()}return Re={initialize:function(ze){try{Fe=p(De).create({mediaElement:$.mediaElement}),Fe.initialize(ze.Range),Te=Ae(De).create({debug:$.debug,metricsConstants:$.metricsConstants,mediaPlayerModel:$.mediaPlayerModel}),Te.initialize(ze.Reporting,Fe),z=jt(De).create({debug:$.debug,eventBus:$.eventBus,metricsConstants:$.metricsConstants,events:$.events}),z.initialize(ze.metrics,Te)}catch(Ze){throw Se(),Ze}},reset:Se},Re}Wt.__dashjs_factory_name="MetricsController";var $t=R.default.getClassFactory(Wt),cn=class{constructor(){this.metrics="",this.Range=[],this.Reporting=[]}},bn=class{constructor(){this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},En=class{constructor(){this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}};function ve($){let z,Te=($=$||{}).adapter;const Fe=$.constants;return z={getMetrics:function(Re){let De=[];return Re&&Re.Metrics&&Re.Metrics.forEach((Se=>{var ze=new cn,Ze=Te.getIsDynamic(Re);Se.hasOwnProperty("metrics")&&(ze.metrics=Se.metrics,Se.Range&&Se.Range.forEach((Ke=>{var lt=new bn;lt.starttime=(function(Yt,xt,Lt){let _t,fn,An=0;return xt?An=Te.getAvailabilityStartTime(Yt)/1e3:(_t=Te.getRegularPeriods(Yt),_t.length&&(An=_t[0].start)),fn=An,Lt&&Lt.hasOwnProperty(Fe.START_TIME)&&(fn+=Lt.starttime),fn})(Re,Ze,Ke),Ke.hasOwnProperty("duration")?lt.duration=Ke.duration:lt.duration=Te.getDuration(Re),lt._useWallClockTime=Ze,ze.Range.push(lt)})),Se.Reporting&&(Se.Reporting.forEach((Ke=>{var lt=new En;Ke.hasOwnProperty(Fe.SCHEME_ID_URI)&&(lt.schemeIdUri=Ke.schemeIdUri,Ke.hasOwnProperty("value")&&(lt.value=Ke.value),Ke.hasOwnProperty(Fe.DVB_REPORTING_URL)&&(lt.dvbReportingUrl=Ke[Fe.DVB_REPORTING_URL]),Ke.hasOwnProperty(Fe.DVB_PROBABILITY)&&(lt.dvbProbability=Ke[Fe.DVB_PROBABILITY]),ze.Reporting.push(lt))})),De.push(ze)))})),De}},z}ve.__dashjs_factory_name="ManifestParsing";var Ee=R.default.getSingletonFactory(ve);function st($){let z;$=$||{};let Te={},Fe=this.context,Re=$.eventBus;const De=$.events;function Se(Ze){if(Ze.error)return;let Ke=Object.keys(Te);Ee(Fe).getInstance({adapter:$.adapter,constants:$.constants}).getMetrics(Ze.manifest).forEach((lt=>{const Yt=JSON.stringify(lt);if(Te.hasOwnProperty(Yt))Ke.splice(Yt,1);else try{let xt=$t(Fe).create($);xt.initialize(lt),Te[Yt]=xt}catch{}})),Ke.forEach((lt=>{Te[lt].reset(),delete Te[lt]})),Re.trigger(y.default.METRICS_INITIALISATION_COMPLETE)}function ze(){Object.keys(Te).forEach((Ze=>{Te[Ze].reset()})),Te={}}return z={reset:function(){Re.off(De.MANIFEST_UPDATED,Se,z),Re.off(De.STREAM_TEARDOWN_COMPLETE,ze,z)}},Re.on(De.MANIFEST_UPDATED,Se,z),Re.on(De.STREAM_TEARDOWN_COMPLETE,ze,z),z}st.__dashjs_factory_name="MetricsCollectionController";var L=R.default.getClassFactory(st);function M(){let $,z,Te=this.context;return $={createMetricsReporting:function(Fe){return z=q(Te).getInstance({eventBus:Fe.eventBus,dashMetrics:Fe.dashMetrics,metricsConstants:Fe.metricsConstants,events:Fe.events}),z.initialize(),L(Te).create(Fe)},getReportingFactory:function(){return Ge(Te).getInstance()},getMetricsHandlerFactory:function(){return Rt(Te).getInstance()}},$}M.__dashjs_factory_name="MetricsReporting";const f=R.default.getClassFactory(M);f.events=y.default,R.default.updateClassFactory(M.__dashjs_factory_name,f);var E=f},913:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",this.CMCD_DATA_GENERATED="cmcdDataGenerated"}}let y=new N;Oe.default=y},1926:function(kt,Oe,oe){oe.r(Oe);var ie=oe(5717),N=oe(138),y=oe(8261),R=oe(656),Z=oe(5212),q=oe(5560);function Y(){let ee,p,o,P,U,se,ye,ke,Ie,Pe,Ge;const yt=this.context,Ae=(0,y.default)(yt).getInstance();function ge(){P=[],U=[],se=[],ye=[],ke=[],Ge=[],Ie=null,p=[],Pe=new Set}function ue(be,mt){let Ve=-1;be.some(((Ue,Rt)=>{if(Ue===mt)return Ve=Rt,!0})),Ve<0||be.splice(Ve,1)}function we(be){let mt;for(mt=0;mt<Ge.length;mt++)if(Ge[mt].rulename===be)return mt;return-1}function Ne(be,mt){let Ve=!1;return Pe.forEach((Ue=>{Ue[be]===mt&&(Ve=!0)})),Ve}function He(be,mt){Ht(be,mt);let Ve=new ie.default;Ve.schemeIdUri=be,Ve.value=mt,p.push(Ve)}function Ht(be,mt){(0,R.checkParameterType)(be,"string"),(0,R.checkParameterType)(mt,"string"),p.forEach((function(Ve,Ue){Ve.schemeIdUri===be&&Ve.value===mt&&p.splice(Ue,1)}))}return ee={addAbrCustomRule:function(be,mt,Ve){if(typeof be!="string"||be!==Z.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&be!==Z.default.RULES_TYPES.QUALITY_SWITCH_RULES||typeof mt!="string")throw Z.default.BAD_ARGUMENT_ERROR;let Ue=we(mt);Ue===-1?Ge.push({type:be,rulename:mt,rule:Ve}):(Ge[Ue].type=be,Ge[Ue].rule=Ve)},addExternalSubtitle:function(be){if(!(be&&be.id!==void 0&&be.url&&be.language&&be.mimeType&&be.bandwidth!==void 0))return;const mt=new q.default(be);Ne("url",mt.url)||Ne("id",mt.id)||Pe.add(mt)},addRequestInterceptor:function(be){P.push(be)},addResponseInterceptor:function(be){U.push(be)},addUTCTimingSource:He,clearDefaultUTCTimingSources:function(){p=[]},getAbrCustomRules:function(){return Ge},getCustomCapabilitiesFilters:function(){return ke},getCustomInitialTrackSelectionFunction:function(){return Ie},getExternalSubtitles:function(){return Pe},getLicenseRequestFilters:function(){return se},getLicenseResponseFilters:function(){return ye},getRequestInterceptors:function(){return P},getResponseInterceptors:function(){return U},getUTCTimingSources:function(){return p},getXHRWithCredentialsForType:function(be){const mt=o[be];return mt===void 0?o.default:mt},registerCustomCapabilitiesFilter:function(be){ke.push(be)},registerLicenseRequestFilter:function(be){se.push(be)},registerLicenseResponseFilter:function(be){ye.push(be)},removeAbrCustomRule:function(be){if(be){let mt=we(be);mt!==-1&&Ge.splice(mt,1)}else Ge=[]},removeAllAbrCustomRule:function(){Ge=[]},removeExternalSubtitleById:function(be){Pe.forEach((mt=>{mt.id===be&&Pe.delete(mt)}))},removeExternalSubtitleByUrl:function(be){Pe.forEach((mt=>{mt.url===be&&Pe.delete(mt)}))},removeRequestInterceptor:function(be){ue(P,be)},removeResponseInterceptor:function(be){ue(U,be)},removeUTCTimingSource:Ht,reset:function(){ge()},resetCustomInitialTrackSelectionFunction:function(){Ie=null},resetPlaybackSessionSpecificSettings:function(){Pe=new Set},restoreDefaultUTCTimingSources:function(){let be=Ae.get().streaming.utcSynchronization.defaultTimingSource;He(be.scheme,be.value)},setConfig:function(){},setCustomInitialTrackSelectionFunction:function(be){Ie=be},setXHRWithCredentialsForType:function be(mt,Ve){mt?o[mt]=!!Ve:Object.keys(o).forEach((Ue=>{be(Ue,Ve)}))},unregisterCustomCapabilitiesFilter:function(be){ue(ke,be)},unregisterLicenseRequestFilter:function(be){ue(se,be)},unregisterLicenseResponseFilter:function(be){ue(ye,be)}},o={default:!1},ge(),ee}Y.__dashjs_factory_name="CustomParametersModel",Oe.default=N.default.getSingletonFactory(Y)},3888:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{default:function(){return Yn}});var ie=oe(8854),N=oe(2861);const y={prefixes:["clearkey","dashif","ck"]};class R{static findMp4ProtectionElement(St){let rt=null;for(let Je=0;Je<St.length;++Je){let Ct=St[Je];Ct.schemeIdUri&&Ct.schemeIdUri.toLowerCase()===ie.default.MP4_PROTECTION_SCHEME&&Ct.value&&(Ct.value.toLowerCase()===N.default.ENCRYPTION_SCHEME_CENC||Ct.value.toLowerCase()===N.default.ENCRYPTION_SCHEME_CBCS)&&(rt=Ct)}return rt}static getPSSHData(St){let rt=8,Je=new DataView(St),Ct=Je.getUint8(rt);return rt+=20,Ct>0&&(rt+=4+16*Je.getUint32(rt)),rt+=4,St.slice(rt)}static getPSSHForKeySystem(St,rt){let Je=R.parsePSSHList(rt);return St&&Je.hasOwnProperty(St.uuid.toLowerCase())?Je[St.uuid.toLowerCase()]:null}static parseInitDataFromContentProtection(St,rt){return"pssh"in St&&St.pssh?(St.pssh.__text=St.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),rt.decodeArray(St.pssh.__text).buffer):null}static parsePSSHList(St){if(St==null)return[];let rt=new DataView(St.buffer||St),Je={},Ct=0;for(;;){let At,Pt,Bt,gt,pt,Ot,qt=Ct;if(Ct>=rt.buffer.byteLength)break;if(At=rt.getUint32(Ct),Pt=Ct+At,Ct+=4,rt.getUint32(Ct)===1886614376)if(Ct+=4,Bt=rt.getUint8(Ct),Bt===0||Bt===1){for(Ct++,Ct+=3,gt="",pt=0;pt<4;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=4,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<2;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;for(Ct+=2,gt+="-",pt=0;pt<6;pt++)Ot=rt.getUint8(Ct+pt).toString(16),gt+=Ot.length===1?"0"+Ot:Ot;Ct+=6,gt=gt.toLowerCase(),Ct+=4,Je[gt]=rt.buffer.slice(qt,Pt),Ct=Pt}else Ct=Pt;else Ct=Pt}return Je}static getLicenseServerUrlFromMediaInfo(St,rt){try{if(!St||St.length===0)return null;let Je=0,Ct=null;for(;Je<St.length&&!Ct;){const At=St[Je];if(At&&At.contentProtection&&At.contentProtection.length>0){const Pt=At.contentProtection.filter((Bt=>Bt.schemeIdUri&&Bt.schemeIdUri===rt));if(Pt&&Pt.length>0){let Bt=0;for(;Bt<Pt.length&&!Ct;){const gt=Pt[Bt];gt.laUrl&>.laUrl.__prefix&&y.prefixes.includes(gt.laUrl.__prefix)&>.laUrl.__text&&(Ct=gt.laUrl.__text),Bt+=1}}}Je+=1}return Ct}catch{return null}}static hexKidToBufferSource(St){const rt=St.replace(/-/g,"");return new Uint8Array(rt.match(/[\da-f]{2}/gi).map((function(Je){return parseInt(Je,16)}))).buffer}}var Z=R,q=class{constructor(Nt,St){this.contentType=Nt,this.robustness=St}},Y=class{constructor(Nt,St,rt,Je,Ct,At){this.initDataTypes=At&&At.length>0?At:[N.default.INITIALIZATION_DATA_TYPE_CENC],Nt&&Nt.length&&(this.audioCapabilities=Nt),St&&St.length&&(this.videoCapabilities=St),this.distinctiveIdentifier=rt,this.persistentState=Je,this.sessionTypes=Ct}},ee=oe(1923),p=oe(1944),o=class{constructor(Nt,St,rt,Je,Ct,At,Pt,Bt){this.url=Nt,this.method=St,this.responseType=rt,this.headers=Je,this.withCredentials=Ct,this.messageType=At,this.sessionId=Pt,this.data=Bt}},P=class{constructor(Nt,St,rt){this.url=Nt,this.headers=St,this.data=rt}},U=oe(7568),se=oe(7263),ye=oe(5212),ke=oe(138);function Ie(Nt){const St=(Nt=Nt||{}).BASE64,rt=Nt.cmcdModel,Je=Nt.constants,Ct=Nt.customParametersModel,At=Nt.debug,Pt=Nt.eventBus,Bt=Nt.events,gt=Nt.protectionKeyController,pt=Nt.settings;let Ot,qt,Et,Xt,gn,an,ln,Sn,Ft,et,je,Mt,Gt=Nt.protectionModel,un=[];function wn(){if(!(Pt&&Pt.hasOwnProperty("on")&>&>.hasOwnProperty("getSupportedKeySystemMetadataFromContentProtection")))throw new Error("Missing config parameter(s)")}function Cn(Tt,Vt){je||Xt?je&&Gn():(function(on,vn){if(Xt)return;var _n;Xt=!0;const xn=(function(Rn){const kn=[];for(let In=0;In<Rn.length;In++){const Dn=Mn(Rn[In]);kn.push({ks:Rn[In].ks,configs:[Dn],protData:Rn[In].protData})}return kn})(on=(_n=on).sort(((Rn,kn)=>(Ot&&Ot[Rn.ks.systemString]&&Ot[Rn.ks.systemString].priority>=0?Ot[Rn.ks.systemString].priority:_n.length)-(Ot&&Ot[kn.ks.systemString]&&Ot[kn.ks.systemString].priority>=0?Ot[kn.ks.systemString].priority:_n.length))));let On;Gt.requestKeySystemAccess(xn).then((Rn=>(On=Rn.data,(function(kn){let In=kn&&kn.selectedSystemString?kn.selectedSystemString:kn.keySystem.systemString;return ln.info("DRM: KeySystem Access Granted for system string ("+In+")! Selecting key system..."),Gt.selectKeySystem(kn)})(On)))).then((Rn=>{(function(kn,In){try{je=kn,Xt=!1,Pt.trigger(Bt.KEY_SYSTEM_SELECTED,{data:In});const Dn=Hn(je);Dn&&Dn.serverCertificate&&Dn.serverCertificate.length>0&&Gt.setServerCertificate(St.decodeArray(Dn.serverCertificate).buffer),Gn()}catch(Dn){ln.error(Dn)}})(Rn,On)})).catch((Rn=>{(function(kn,In){je=null,Xt=!1,In||Pt.trigger(Bt.KEY_SYSTEM_SELECTED,{data:null,error:new p.default(ee.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,ee.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+kn.error)})})(Rn,vn)}))})(Tt,Vt)}function Gn(){let Tt;for(let on=0;on<Ft.length;on++)for(Tt=0;Tt<Ft[on].length;Tt++)if(je===Ft[on][Tt].ks){Vt=Ft[on][Tt],gt.isClearKey(je)&&(function(vn){if(vn.protData&&vn.protData.hasOwnProperty("clearkeys")&&Object.keys(vn.protData.clearkeys).length!==0){const _n={kids:Object.keys(vn.protData.clearkeys)};vn.initData=new TextEncoder().encode(JSON.stringify(_n))}})(Vt),Vt.sessionId?qn(Vt):Vt.initData!==null&&re(Vt);break}var Vt;Ft=[]}function Mn(Tt){const Vt=Tt.protData,on=[],vn=[],_n=Vt&&Vt.initDataTypes&&Vt.initDataTypes.length>0?Vt.initDataTypes:[N.default.INITIALIZATION_DATA_TYPE_CENC],xn=Vt&&Vt.audioRobustness&&Vt.audioRobustness.length>0?Vt.audioRobustness:et,On=Vt&&Vt.videoRobustness&&Vt.videoRobustness.length>0?Vt.videoRobustness:et,Rn=Tt.sessionType,kn=Vt&&Vt.distinctiveIdentifier?Vt.distinctiveIdentifier:"optional",In=Vt&&Vt.persistentState?Vt.persistentState:Rn==="temporary"?"optional":"required";return Sn.forEach((Dn=>{Dn.type===Je.AUDIO?on.push(new q(Dn.codec,xn)):Dn.type===Je.VIDEO&&vn.push(new q(Dn.codec,On))})),new Y(on,vn,kn,In,[Rn],_n)}function qn(Tt){wn(),Gt.loadKeySession(Tt)}function re(Tt){if(Tt&&(function(on){if(!on)return!1;try{const vn=Gt.getSessionTokens();for(let _n=0;_n<vn.length;_n++)if(vn[_n].getKeyId()===on)return!0;return!1}catch{return!1}})(Tt.keyId))return;(function(){if(!pt)return;const on=pt.get().streaming.protection.keepProtectionMediaKeys,vn=pt.get().streaming.protection.keepProtectionMediaKeysMaximumOpenSessions;if(typeof vn!="number"||vn<=0)return;if(!on)return void ln.warn("DRM: keepProtectionMediaKeysMaximumOpenSessions is set to "+vn+", but keepProtectionMediaKeys is not enabled. Therefore, keepProtectionMediaKeysMaximumOpenSessions will be ignored.");if(!Gt||typeof Gt.getSessionTokens!="function")return;const _n=Gt.getSessionTokens()||[];if(_n.length<vn)return;const xn=_n[0];xn&&(ln.info("DRM: Maximum number of open MediaKeySessions reached ("+vn+"), closing oldest session."),_a(xn))})();const Vt=Z.getPSSHForKeySystem(je,Tt?Tt.initData:null);if(Vt){if(ra(Vt))return;try{Tt.initData=Vt,Gt.createKeySession(Tt)}catch(on){Pt.trigger(Bt.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+on.message)})}}else Tt&&Tt.initData?Gt.createKeySession(Tt):Pt.trigger(Bt.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(je?je.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function Hn(Tt){if(Tt){const Vt=Tt.systemString;if(Ot)return Vt in Ot?Ot[Vt]:null}return null}function ra(Tt){if(!Tt)return!1;try{const Vt=Gt.getAllInitData();for(let on=0;on<Vt.length;on++)if(gt.initDataEquals(Tt,Vt[on]))return ln.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function _a(Tt){wn(),Gt.closeKeySession(Tt)}function Qn(Tt){wn(),Tt?(Gt.setMediaElement(Tt),Pt.on(Bt.NEED_KEY,ka,qt)):Tt===null&&(Gt.setMediaElement(Tt),Pt.off(Bt.NEED_KEY,ka,qt))}function za(Tt){ln.debug("DRM: onKeyMessage");const Vt=Tt.data;Pt.trigger(Bt.KEY_MESSAGE,{data:Vt});const on=Vt.messageType?Vt.messageType:N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,vn=Vt.message,_n=Vt.sessionToken,xn=Hn(je),On=gt.getLicenseServerModelInstance(je,xn,on),Rn={sessionToken:_n,messageType:on};if(vn&&vn.byteLength!==0){if(!On)return ln.debug("DRM: License server request not required for this message (type = "+Tt.data.messageType+"). Session ID = "+_n.getSessionId()),void Xn(Rn);if(gt.isClearKey(je)){const kn=gt.processClearKeyLicenseRequest(je,xn,vn);if(kn&&kn.keyPairs&&kn.keyPairs.length>0)return ln.debug("DRM: ClearKey license request handled by application!"),Xn(Rn),void Gt.updateKeySession(_n,kn)}(function(kn,In,Dn){const Vn=kn.sessionToken,ya=kn.messageType?kn.messageType:N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,Aa={sessionToken:Vn,messageType:ya},Ra=je?je.systemString:null;let mr=(function(zn,la,La,Na,Tr){let ta=null;const lr=Na.message;if(zn&&zn.serverURL){const fa=zn.serverURL;typeof fa=="string"&&fa!==""?ta=fa:typeof fa=="object"&&fa.hasOwnProperty(la)&&(ta=fa[la])}else if(zn&&zn.laURL&&zn.laURL!=="")ta=zn.laURL;else if(ta=Z.getLicenseServerUrlFromMediaInfo(Sn,je.schemeIdURI),!ta&&!gt.isClearKey(je)){const fa=Z.getPSSHData(La.initData);ta=je.getLicenseServerURLFromInitData(fa),ta||(ta=Na.laURL)}return ta=Tr.getServerURLFromMessage(ta,lr,la),ta})(Dn,ya,Vn,kn,In);if(!mr)return void Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));const Kn={};let va=!1;Dn&&Ja(Kn,Dn.httpRequestHeaders);const tr=kn.message;Ja(Kn,je.getRequestHeadersFromMessage(tr)),Object.keys(Kn).forEach((zn=>{zn.toLowerCase()==="authorization"&&(va=!0)})),Dn&&typeof Dn.withCredentials=="boolean"&&(va=Dn.withCredentials);const ia=function(zn){if(Gt)if(zn.status>=200&&zn.status<=299){const la=se.default.parseHttpHeaders(zn.getAllResponseHeaders?zn.getAllResponseHeaders():null);let La=new P(zn.responseURL,la,zn.response);er(Ct.getLicenseResponseFilters(),La).then((()=>{const Na=In.getLicenseMessage(La.data,Ra,ya);Na!==null?(Xn(Aa),Gt.updateKeySession(Vn,Na)):fr(zn,Aa,Ra,ya,In)}))}else fr(zn,Aa,Ra,ya,In)},hr=function(zn){Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Ra+' update, XHR aborted. status is "'+zn.statusText+'" ('+zn.status+"), readyState is "+zn.readyState))},nr=function(zn){Xn(Aa,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+Ra+' update, XHR error. status is "'+zn.statusText+'" ('+zn.status+"), readyState is "+zn.readyState))},ar=je.getLicenseRequestFromMessage(tr),rr=In.getHTTPMethod(ya),pr=In.getResponseType(Ra,ya),br=Dn&&!isNaN(Dn.httpTimeout)?Dn.httpTimeout:8e3,yr=Vn.getSessionId()||null;let ir=new o(mr,rr,pr,Kn,va,ya,yr,ar);const Er=isNaN(pt.get().streaming.retryAttempts[U.HTTPRequest.LICENSE])?3:pt.get().streaming.retryAttempts[U.HTTPRequest.LICENSE];er(Ct.getLicenseRequestFilters(),ir).then((()=>{Za(ir,Er,br,ia,hr,nr)}))})(Vt,On,xn)}else Xn(Rn,new p.default(ee.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Xn(Tt,Vt=null){Pt.trigger(Bt.LICENSE_REQUEST_COMPLETE,{data:Tt,error:Vt})}function Za(Tt,Vt,on,vn,_n,xn){const On=new XMLHttpRequest,Rn=rt.getCmcdParametersFromManifest();if(rt.isCmcdEnabled()&&(Rn.mode?Rn.mode:pt.get().streaming.cmcd.mode)===ye.default.CMCD_MODE_QUERY){const In=rt.getQueryParameter({url:Tt.url,type:U.HTTPRequest.LICENSE});In&&(Tt.url=se.default.addAdditionalQueryParameterToUrl(Tt.url,[In]))}On.open(Tt.method,Tt.url,!0),On.responseType=Tt.responseType,On.withCredentials=Tt.withCredentials,on>0&&(On.timeout=on);for(const In in Tt.headers)On.setRequestHeader(In,Tt.headers[In]);if(rt.isCmcdEnabled()&&(Rn.mode?Rn.mode:pt.get().streaming.cmcd.mode)===ye.default.CMCD_MODE_HEADER){const In=rt.getHeaderParameters({url:Tt.url,type:U.HTTPRequest.LICENSE});if(In)for(const Dn in In){let Vn=In[Dn];Vn&&On.setRequestHeader(Dn,Vn)}}const kn=function(){Vt--;const In=isNaN(pt.get().streaming.retryIntervals[U.HTTPRequest.LICENSE])?1e3:pt.get().streaming.retryIntervals[U.HTTPRequest.LICENSE];gn=setTimeout((function(){Za(Tt,Vt,on,vn,_n,xn)}),In)};On.onload=function(){an=null,this.status>=200&&this.status<=299||Vt<=0?vn(this):(ln.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+Vt),kn())},On.ontimeout=On.onerror=function(){an=null,Vt<=0?xn(this):(ln.warn("License request network request failed . Retrying it... Pending retries: "+Vt),kn())},On.onabort=function(){_n(this)},Pt.trigger(Bt.LICENSE_REQUEST_SENDING,{url:Tt.url,headers:Tt.headers,payload:Tt.data,sessionId:Tt.sessionId}),an=On,On.send(Tt.data)}function cr(){an&&(an.onloadend=an.onerror=an.onprogress=void 0,an.abort(),an=null),gn&&(clearTimeout(gn),gn=null)}function Ja(Tt,Vt){if(Vt)for(const on in Vt)Tt[on]=Vt[on]}function fr(Tt,Vt,on,vn,_n){let xn="NONE",On=null;Tt.response&&(xn=_n.getErrorResponse(Tt.response,on,vn),On={serverResponse:Tt.response||null,responseCode:Tt.status||null,responseText:Tt.statusText||null}),Xn(Vt,new p.default(ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+on+' update, XHR complete. status is "'+Tt.statusText+'" ('+Tt.status+"), readyState is "+Tt.readyState+". Response is "+xn,On))}function er(Tt,Vt){return Tt?Tt.reduce(((on,vn)=>on.then((()=>vn(Vt)))),Promise.resolve()):Promise.resolve()}function ka(Tt,Vt){if(pt.get().streaming.protection.ignoreEmeEncryptedEvent)return;if(ln.debug("DRM: onNeedKey"),Tt.key.initDataType!==N.default.INITIALIZATION_DATA_TYPE_CENC)return void ln.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+Tt.key.initDataType);if(Sn.length===0&&(ln.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(Vt=Vt===void 0?1:Vt+1)<5))return void un.push(setTimeout((()=>{ka(Tt,Vt)}),500));let on=Tt.key.initData;if(ArrayBuffer.isView(on)&&(on=on.buffer),je){const _n=Z.getPSSHForKeySystem(je,on);if(_n&&ra(_n))return}ln.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(on)));const vn=gt.getSupportedKeySystemMetadataFromSegmentPssh(on,Ot,Mt);vn.length!==0?(function(_n){Ft.push(_n),Cn(_n,!1)})(vn):ln.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}function gr(Tt,Vt){if(Tt.size<=0)return!1;if(Vt.size>0&&[...Tt].every((vn=>{const _n=Vt.get(vn);return _n!==void 0&&_n!==""})))return!0;const on=Gt.getSessionTokens();if(on&&on.length>0){const vn=on.filter((_n=>[...Tt].includes(_n.normalizedKeyId)));if(vn.some((_n=>!_n.hasTriggeredKeyStatusMapUpdate))||vn.length===0)return!1}return!pt.get().streaming.protection.ignoreKeyStatuses&&Tt&&Tt.size>0&&Vt&&Vt.size>0}return qt={areKeyIdsExpired:function(Tt){try{return!!gr(Tt,Et)&&[...Tt].every((Vt=>Et.get(Vt)===N.default.MEDIA_KEY_STATUSES.EXPIRED))}catch(Vt){return ln.error(Vt),!1}},areKeyIdsUsable:function(Tt){try{return!gr(Tt,Et)||[...Tt].some((Vt=>{const on=Et.get(Vt);return on&&on!==N.default.MEDIA_KEY_STATUSES.INTERNAL_ERROR&&on!==N.default.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED}))}catch(Vt){return ln.error(Vt),!0}},clearMediaInfoArray:function(){Sn=[]},closeKeySession:_a,createKeySession:re,getKeySystems:function(){return gt?gt.getKeySystems():[]},getSupportedKeySystemMetadataFromContentProtection:function(Tt){return wn(),gt.getSupportedKeySystemMetadataFromContentProtection(Tt,Ot,Mt)},handleKeySystemFromManifest:function(){if(!Sn||Sn.length===0)return;let Tt=[];Sn.forEach((Vt=>{const on=gt.getSupportedKeySystemMetadataFromContentProtection(Vt.contentProtection,Ot,Mt);on.length>0&&(Tt.length===0&&(Tt=on),Ft.push(on))})),Tt&&Tt.length>0&&Cn(Tt,!0)},initializeForMedia:function(Tt){if(!Tt)throw new Error("mediaInfo can not be null or undefined");wn(),Sn.push(Tt)},loadKeySession:qn,removeKeySession:function(Tt){wn(),Gt.removeKeySession(Tt)},reset:function(){Pt.off(Bt.INTERNAL_KEY_MESSAGE,za,qt),wn(),cr(),Qn(null),je=null,Xt=!1,Et=new Map,Gt&&(Gt.reset(),Gt=null),un.forEach((Tt=>clearTimeout(Tt))),un=[],Sn=[],Ft=[]},setKeySystems:function(Tt){gt&>.setKeySystems(Tt)},setMediaElement:Qn,setProtectionData:function(Tt){Ot=Tt,gt.setProtectionData(Tt)},setRobustnessLevel:function(Tt){et=Tt},setServerCertificate:function(Tt){return wn(),Gt.setServerCertificate(Tt)},setSessionType:function(Tt){Mt=Tt},stop:function(){cr(),Gt&&Gt.stop()},updateKeyStatusesMap:function(Tt){try{if(!Tt||!Tt.sessionToken||!Tt.parsedKeyStatuses)return;Tt.sessionToken.hasTriggeredKeyStatusMapUpdate=!0;const Vt=Tt.parsedKeyStatuses,on=se.default.parseUserAgent(),vn=on&&on.browser&&on.browser.name&&on.browser.name.toLowerCase()==="edge";Vt.forEach((_n=>{vn&&je.uuid===N.default.PLAYREADY_UUID&&_n.keyId&&_n.keyId.byteLength===16&&(function(On){const Rn=se.default.bufferSourceToDataView(On),kn=Rn.getUint32(0,!0),In=Rn.getUint16(4,!0),Dn=Rn.getUint16(6,!0);Rn.setUint32(0,kn,!1),Rn.setUint16(4,In,!1),Rn.setUint16(6,Dn,!1)})(_n.keyId);const xn=se.default.bufferSourceToHex(_n.keyId).slice(0,32);xn&&xn!==""&&Et.set(xn,_n.status)})),Pt.trigger(Bt.KEY_STATUSES_MAP_UPDATED,{keyStatusMap:Et})}catch(Vt){ln.error(Vt)}}},ln=At.getLogger(qt),Ft=[],Sn=[],Mt="temporary",et="",an=null,gn=null,Et=new Map,Pt.on(Bt.INTERNAL_KEY_MESSAGE,za,qt),qt}Ie.__dashjs_factory_name="ProtectionController";var Pe=ke.default.getClassFactory(Ie),Ge=class{constructor(Nt,St){this.keyID=Nt,this.key=St}},yt=class{constructor(Nt,St){if(St&&St!=="persistent"&&St!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=Nt,this.type=St}toJWK(){let Nt,St=this.keyPairs.length,rt={keys:[]};for(Nt=0;Nt<St;Nt++){let Bt={kty:"oct",alg:"A128KW",kid:this.keyPairs[Nt].keyID,k:this.keyPairs[Nt].key};rt.keys.push(Bt)}this.type&&(rt.type=this.type);let Je=JSON.stringify(rt);const Ct=Je.length;let At=new ArrayBuffer(Ct),Pt=new Uint8Array(At);for(Nt=0;Nt<Ct;Nt++)Pt[Nt]=Je.charCodeAt(Nt);return At}};const Ae=N.default.CLEARKEY_UUID,ge=N.default.CLEARKEY_KEYSTEM_STRING,ue="urn:uuid:"+Ae;function we(Nt){let St;const rt=(Nt=Nt||{}).BASE64;return St={uuid:Ae,schemeIdURI:ue,systemString:ge,getInitData:function(Je,Ct){try{let At=Z.parseInitDataFromContentProtection(Je,rt);if(!At&&Ct){const Pt={kids:[(function(Bt){try{let gt=Bt.replace(/-/g,"");return gt=btoa(gt.match(/\w{2}/g).map((pt=>String.fromCharCode(parseInt(pt,16)))).join("")),gt.replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}})(Ct.cencDefaultKid)]};At=new TextEncoder().encode(JSON.stringify(Pt))}return At}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(Je){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Je))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Je,Ct){let At=null;if(Je){const Pt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(Ct))),Bt=[];for(let gt=0;gt<Pt.kids.length;gt++){const pt=Pt.kids[gt],Ot=Je.clearkeys&&Je.clearkeys.hasOwnProperty(pt)?Je.clearkeys[pt]:null;if(!Ot)throw new Error("DRM: ClearKey keyID ("+pt+") is not known!");Bt.push(new Ge(pt,Ot))}At=new yt(Bt)}return At}},St}we.__dashjs_factory_name="KeySystemClearKey";var Ne=ke.default.getSingletonFactory(we);const He=N.default.W3C_CLEARKEY_UUID,Ht=N.default.CLEARKEY_KEYSTEM_STRING,be="urn:uuid:"+He;function mt(Nt){let St;const rt=Nt.BASE64,Je=Nt.debug.getLogger(St);return St={uuid:He,schemeIdURI:be,systemString:Ht,getInitData:function(Ct){return Z.parseInitDataFromContentProtection(Ct,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Ct){return new Uint8Array(Ct)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Ct,At){let Pt=null;if(Ct){const Bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(At))),gt=[];for(let pt=0;pt<Bt.kids.length;pt++){const Ot=Bt.kids[pt],qt=Ct.clearkeys&&Ct.clearkeys.hasOwnProperty(Ot)?Ct.clearkeys[Ot]:null;if(!qt)throw new Error("DRM: ClearKey keyID ("+Ot+") is not known!");gt.push(new Ge(Ot,qt))}Pt=new yt(gt),Je.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return Pt}},St}mt.__dashjs_factory_name="KeySystemW3CClearKey";var Ve=ke.default.getSingletonFactory(mt);const Ue=N.default.WIDEVINE_UUID,Rt=N.default.WIDEVINE_KEYSTEM_STRING,Zt="urn:uuid:"+Ue;function jt(Nt){let St;const rt=(Nt=Nt||{}).BASE64;return St={uuid:Ue,schemeIdURI:Zt,systemString:Rt,getInitData:function(Je){return Z.parseInitDataFromContentProtection(Je,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Je){return new Uint8Array(Je)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},St}jt.__dashjs_factory_name="KeySystemWidevine";var Wt=ke.default.getSingletonFactory(jt);const $t=N.default.PLAYREADY_UUID,cn=N.default.PLAYREADY_KEYSTEM_STRING,bn="urn:uuid:"+$t;function En(Nt){let St,rt="utf-16";const Je=(Nt=Nt||{}).BASE64,Ct=Nt.settings;function At(){if(!Je||!Je.hasOwnProperty("decodeArray")||!Je.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return St={uuid:$t,schemeIdURI:bn,systemString:cn,getInitData:function(Pt){const Bt=new Uint8Array([112,115,115,104,0,0,0,0]),gt=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);let pt,Ot,qt,Et,Xt,gn=0,an=null;if(At(),!Pt)return null;if("pssh"in Pt&&Pt.pssh)return Z.parseInitDataFromContentProtection(Pt,Je);if("pro"in Pt&&Pt.pro)an=Je.decodeArray(Pt.pro.__text);else{if(!("prheader"in Pt)||!Pt.prheader)return null;an=Je.decodeArray(Pt.prheader.__text)}return pt=an.length,Ot=4+Bt.length+gt.length+4+pt,qt=new ArrayBuffer(Ot),Et=new Uint8Array(qt),Xt=new DataView(qt),Xt.setUint32(gn,Ot),gn+=4,Et.set(Bt,gn),gn+=Bt.length,Et.set(gt,gn),gn+=gt.length,Xt.setUint32(gn,pt),gn+=4,Et.set(an,gn),gn+=pt,Et.buffer},getRequestHeadersFromMessage:function(Pt){let Bt,gt;const pt={},Ot=new DOMParser;if(Ct&&Ct.get().streaming.protection.detectPlayreadyMessageFormat&&rt==="utf-16"&&Pt&&Pt.byteLength%2==1)return pt["Content-Type"]="text/xml; charset=utf-8",pt;const qt=rt==="utf-16"?new Uint16Array(Pt):new Uint8Array(Pt);Bt=String.fromCharCode.apply(null,qt),gt=Ot.parseFromString(Bt,"application/xml");const Et=gt.getElementsByTagName("name"),Xt=gt.getElementsByTagName("value");for(let gn=0;gn<Et.length;gn++)pt[Et[gn].childNodes[0].nodeValue]=Xt[gn].childNodes[0].nodeValue;return pt.hasOwnProperty("Content")&&(pt["Content-Type"]=pt.Content,delete pt.Content),pt.hasOwnProperty("Content-Type")||(pt["Content-Type"]="text/xml; charset=utf-8"),pt},getLicenseRequestFromMessage:function(Pt){let Bt=null;const gt=new DOMParser;if(Ct&&Ct.get().streaming.protection.detectPlayreadyMessageFormat&&rt==="utf-16"&&Pt&&Pt.byteLength%2==1)return Pt;const pt=rt==="utf-16"?new Uint16Array(Pt):new Uint8Array(Pt);At();const Ot=String.fromCharCode.apply(null,pt),qt=gt.parseFromString(Ot,"application/xml");if(!qt.getElementsByTagName("PlayReadyKeyMessage")[0])return Pt;{const Et=qt.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;Et&&(Bt=Je.decode(Et))}return Bt},getLicenseServerURLFromInitData:function(Pt){if(Pt){const Bt=new DataView(Pt),gt=Bt.getUint16(4,!0);let pt=6;const Ot=new DOMParser;for(let qt=0;qt<gt;qt++){const Et=Bt.getUint16(pt,!0);pt+=2;const Xt=Bt.getUint16(pt,!0);if(pt+=2,Et!==1){pt+=Xt;continue}const gn=Pt.slice(pt,pt+Xt),an=String.fromCharCode.apply(null,new Uint16Array(gn)),ln=Ot.parseFromString(an,"application/xml");if(ln.getElementsByTagName("LA_URL")[0]){const Sn=ln.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(Sn)return Sn}if(ln.getElementsByTagName("LUI_URL")[0]){const Sn=ln.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(Sn)return Sn}}}return null},getCDMData:function(Pt){let Bt,gt,pt,Ot;if(At(),!Pt)return null;for(Bt=[],Ot=0;Ot<Pt.length;++Ot)Bt.push(Pt.charCodeAt(Ot)),Bt.push(0);for(Bt=String.fromCharCode.apply(null,Bt),Bt=Je.encode(Bt),gt='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",Bt),pt=[],Ot=0;Ot<gt.length;++Ot)pt.push(gt.charCodeAt(Ot)),pt.push(0);return new Uint8Array(pt).buffer},setPlayReadyMessageFormat:function(Pt){if(Pt!=="utf-8"&&Pt!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');rt=Pt}},St}En.__dashjs_factory_name="KeySystemPlayReady";var ve=ke.default.getSingletonFactory(En);function Ee(Nt){const St=(Nt=Nt||{}).BASE64,rt={};let Je;return rt[N.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(Ct){return St.decodeArray(Ct.license)},getErrorResponse:function(Ct){return Ct}},rt[N.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(Ct){return Ct},getErrorResponse:function(Ct){return String.fromCharCode.apply(null,new Uint8Array(Ct))}},Je={getServerURLFromMessage:function(Ct){return Ct},getHTTPMethod:function(){return"POST"},getResponseType:function(Ct){return rt[Ct].responseType},getLicenseMessage:function(Ct,At){return(function(){if(!St||!St.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")})(),rt[At].getLicenseMessage(Ct)},getErrorResponse:function(Ct,At){return rt[At].getErrorResponse(Ct)}},Je}Ee.__dashjs_factory_name="DRMToday";var st=ke.default.getSingletonFactory(Ee);function L(){let Nt;const St="http://schemas.xmlsoap.org/soap/envelope/";function rt(At){const Pt=String.fromCharCode.apply(null,new Uint8Array(At));return decodeURIComponent(escape(Pt))}function Je(At){if(window.DOMParser){const Pt=rt(At),Bt=new window.DOMParser().parseFromString(Pt,"text/xml"),gt=Bt?Bt.getElementsByTagNameNS(St,"Envelope")[0]:null,pt=gt?gt.getElementsByTagNameNS(St,"Body")[0]:null;if(pt&&pt.getElementsByTagNameNS(St,"Fault")[0])return null}return At}function Ct(At){let Pt="",Bt="",gt="",pt=-1,Ot=-1;if(window.DOMParser){const Et=rt(At),Xt=new window.DOMParser().parseFromString(Et,"text/xml"),gn=Xt?Xt.getElementsByTagNameNS(St,"Envelope")[0]:null,an=gn?gn.getElementsByTagNameNS(St,"Body")[0]:null,ln=an?an.getElementsByTagNameNS(St,"Fault")[0]:null,Sn=ln?ln.getElementsByTagName("detail")[0]:null,Ft=Sn?Sn.getElementsByTagName("Exception")[0]:null;let et=null;if(ln===null)return Et;et=ln.getElementsByTagName("faultstring")[0].firstChild,Pt=et?et.nodeValue:null,Ft!==null&&(et=Ft.getElementsByTagName("StatusCode")[0],Bt=et?et.firstChild.nodeValue:null,et=Ft.getElementsByTagName("Message")[0],gt=et?et.firstChild.nodeValue:null,pt=gt?gt.lastIndexOf("[")+1:-1,Ot=gt?gt.indexOf("]"):-1,gt=gt?gt.substring(pt,Ot):"")}let qt=`code: ${Bt}, name: ${Pt}`;return gt&&(qt+=`, message: ${gt}`),qt}return Nt={getServerURLFromMessage:function(At){return At},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(At){return Je.call(this,At)},getErrorResponse:function(At){return Ct.call(this,At)}},Nt}L.__dashjs_factory_name="PlayReady";var M=ke.default.getSingletonFactory(L);function f(){let Nt;return Nt={getServerURLFromMessage:function(St){return St},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(St){return St},getErrorResponse:function(St){return String.fromCharCode.apply(null,new Uint8Array(St))}},Nt}f.__dashjs_factory_name="Widevine";var E=ke.default.getSingletonFactory(f);function $(){let Nt;return Nt={getServerURLFromMessage:function(St){return St},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(St){if(!St.hasOwnProperty("keys"))return null;let rt=[];for(let Je=0;Je<St.keys.length;Je++){let Ct=St.keys[Je],At=Ct.kid.replace(/=/g,""),Pt=Ct.k.replace(/=/g,"");rt.push(new Ge(At,Pt))}return new yt(rt)},getErrorResponse:function(St){return String.fromCharCode.apply(null,new Uint8Array(St))}},Nt}$.__dashjs_factory_name="ClearKey";var z=ke.default.getSingletonFactory($),Te=class{constructor(Nt){this.ks=Nt.ks,this.keyId=Nt.keyId,this.initData=Nt.initData,this.protData=Nt.protData,this.cdmData=Nt.cdmData,this.sessionId=Nt.sessionId,this.sessionType=Nt.sessionType}};function Fe(){let Nt,St,rt,Je,Ct,At,Pt,Bt,gt=this.context;function pt(Et,Xt){return Xt&&Et in Xt?Xt[Et]:null}function Ot(Et,Xt){return Et&&Et.sessionId?Et.sessionId:Xt&&Xt.sessionId?Xt.sessionId:null}function qt(Et,Xt){return Et&&Et.sessionType?Et.sessionType:Xt}return Nt={getKeySystemBySystemString:function(Et){for(let Xt=0;Xt<Je.length;Xt++)if(Je[Xt].systemString===Et)return Je[Xt];return null},getKeySystems:function(){return Je},getLicenseServerModelInstance:function(Et,Xt,gn){if(gn===N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE||gn===N.default.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST)return null;let an=null;return Xt&&Xt.hasOwnProperty("drmtoday")?an=st(gt).getInstance({BASE64:Ct}):Et.systemString===N.default.WIDEVINE_KEYSTEM_STRING?an=E(gt).getInstance():Et.systemString===N.default.PLAYREADY_KEYSTEM_STRING?an=M(gt).getInstance():Et.systemString===N.default.CLEARKEY_KEYSTEM_STRING&&(an=z(gt).getInstance()),an},getSupportedKeySystemMetadataFromContentProtection:function(Et,Xt,gn){let an,ln,Sn,Ft,et=[];if(!Et||!Et.length)return et;const je=Z.findMp4ProtectionElement(Et);for(Sn=0;Sn<Je.length;Sn++){ln=Je[Sn];const Mt=pt(ln.systemString,Xt);for(Ft=0;Ft<Et.length;Ft++)if(an=Et[Ft],an.schemeIdUri.toLowerCase()===ln.schemeIdURI){let Gt=ln.getInitData(an,je);const un=new Te({ks:Je[Sn],keyId:an.keyId,initData:Gt,protData:Mt,cdmData:ln.getCDMData(Mt?Mt.cdmData:null),sessionId:Ot(Mt,an),sessionType:qt(Mt,gn)});Mt?et.unshift(un):et.push(un)}}return et},getSupportedKeySystemMetadataFromSegmentPssh:function(Et,Xt,gn){let an,ln,Sn=[],Ft=Z.parsePSSHList(Et);for(let et=0;et<Je.length;++et){an=Je[et],ln=an.systemString;const je=pt(ln,Xt);an.uuid in Ft&&Sn.push({ks:an,initData:Ft[an.uuid],protData:je,cdmData:an.getCDMData(je?je.cdmData:null),sessionId:Ot(je),sessionType:qt(je,gn)})}return Sn},initDataEquals:function(Et,Xt){if(Et.byteLength===Xt.byteLength){let gn=new Uint8Array(Et),an=new Uint8Array(Xt);for(let ln=0;ln<gn.length;ln++)if(gn[ln]!==an[ln])return!1;return!0}return!1},initialize:function(){let Et;Je=[],Et=ve(gt).getInstance({BASE64:Ct,settings:At}),Je.push(Et),Et=Wt(gt).getInstance({BASE64:Ct}),Je.push(Et),Et=Ne(gt).getInstance({BASE64:Ct}),Je.push(Et),Pt=Et,Et=Ve(gt).getInstance({BASE64:Ct,debug:St}),Je.push(Et),Bt=Et},isClearKey:function(Et){return Et===Pt||Et===Bt},processClearKeyLicenseRequest:function(Et,Xt,gn){try{return Et.getClearKeysFromProtectionData(Xt,gn)}catch{return rt.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(Et){Et&&(Et.debug&&(St=Et.debug,rt=St.getLogger(Nt)),Et.BASE64&&(Ct=Et.BASE64),Et.settings&&(At=Et.settings))},setKeySystems:function(Et){Je=Et},setProtectionData:function(Et){for(var Xt,gn,an=0;an<Je.length;an++){var ln=Je[an];ln.hasOwnProperty("init")&&ln.init((Xt=ln.systemString,gn=void 0,gn=null,Et&&(gn=Xt in Et?Et[Xt]:null),gn))}}},Nt}Fe.__dashjs_factory_name="ProtectionKeyController";var Re=ke.default.getSingletonFactory(Fe),De=oe(445),Se=class{constructor(Nt,St){this.initData=Nt,this.initDataType=St}},ze=class{constructor(Nt,St,rt,Je){this.sessionToken=Nt,this.message=St,this.defaultURL=rt,this.messageType=Je||N.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST}},Ze=class{constructor(Nt,St){this.keySystem=Nt,this.ksConfiguration=St,this.nativeMediaKeySystemAccessObject=null,this.selectedSystemString=null}};const Ke={};function lt(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug;let At,Pt,Bt,gt,pt,Ot,qt,Et;function Xt(et,je,Mt,Gt){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){const Mn="Insecure origins are not allowed";return rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Mn}),void Gt({error:Mn})}const un=et[je].protData&&et[je].protData.systemStringPriority?et[je].protData.systemStringPriority:null,wn=et[je].configs,Cn=et[je].ks;let Gn=Cn.systemString;(function(Mn,qn){return new Promise(((re,Hn)=>{gn(Mn,qn,0,re,Hn)}))})(un||(Ke[Gn]?Ke[Gn]:[Gn]),wn).then((Mn=>{const qn=Mn&&Mn.nativeMediaKeySystemAccessObject&&typeof Mn.nativeMediaKeySystemAccessObject.getConfiguration=="function"?Mn.nativeMediaKeySystemAccessObject.getConfiguration():null,re=new Ze(Cn,qn);re.selectedSystemString=Mn.selectedSystemString,re.nativeMediaKeySystemAccessObject=Mn.nativeMediaKeySystemAccessObject,rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:re}),Mt({data:re})})).catch((Mn=>{if(je+1<et.length)Xt(et,je+1,Mt,Gt);else{const qn="Key system access denied! ";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:qn+Mn.message}),Gt({error:qn+Mn.message})}}))}function gn(et,je,Mt,Gt,un){const wn=et[Mt];Pt.debug(`Requesting key system access for system string ${wn}`),navigator.requestMediaKeySystemAccess(wn,je).then((Cn=>{Gt({nativeMediaKeySystemAccessObject:Cn,selectedSystemString:wn})})).catch((Cn=>{Mt+1<et.length?gn(et,je,Mt+1,Gt,un):un(Cn)}))}function an(et){if(!et||!et.session)return Promise.resolve;const je=et.session;return je.removeEventListener("keystatuseschange",et),je.removeEventListener("message",et),je.close()}function ln(et){for(let je=0;je<Ot.length;je++)if(Ot[je]===et){Ot.splice(je,1);break}}function Sn(et,je){const Mt={session:et,keyId:je.keyId,normalizedKeyId:je&&je.keyId&&typeof je.keyId=="string"?je.keyId.replace(/-/g,"").toLowerCase():"",initData:je.initData,sessionId:je.sessionId,sessionType:je.sessionType,hasTriggeredKeyStatusMapUpdate:!1,handleEvent:function(Gt){switch(Gt.type){case"keystatuseschange":this._onKeyStatusesChange(Gt);break;case"message":this._onKeyMessage(Gt)}},_onKeyStatusesChange:function(Gt){rt.trigger(Je.KEY_STATUSES_CHANGED,{data:this});const un=[];Gt.target.keyStatuses.forEach((function(){un.push(Ft(arguments))})),rt.trigger(Je.INTERNAL_KEY_STATUSES_CHANGED,{parsedKeyStatuses:un,sessionToken:Mt})},_onKeyMessage:function(Gt){let un=ArrayBuffer.isView(Gt.message)?Gt.message.buffer:Gt.message;rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(this,un,void 0,Gt.messageType)})},getKeyId:function(){return this.keyId},getSessionId:function(){return et.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return et.expiration},getKeyStatuses:function(){return et.keyStatuses},getUsable:function(){let Gt=!1;return et.keyStatuses.forEach((function(){Ft(arguments).status===N.default.MEDIA_KEY_STATUSES.USABLE&&(Gt=!0)})),Gt}};return et.addEventListener("keystatuseschange",Mt),et.addEventListener("message",Mt),et.closed.then((()=>{ln(Mt),Pt.debug("DRM: Session closed. SessionID = "+Mt.getSessionId()),rt.trigger(Je.KEY_SESSION_CLOSED,{data:Mt.getSessionId()})})),Ot.push(Mt),Mt}function Ft(et){let je,Mt;return et&&et.length>0&&(et[0]&&(typeof et[0]=="string"?je=et[0]:Mt=et[0]),et[1]&&(typeof et[1]=="string"?je=et[1]:Mt=et[1])),{status:je,keyId:Mt}}return At={closeKeySession:function(et){an(et).catch((function(je){ln(et),rt.trigger(Je.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+et.getSessionId()+") "+je.name})}))},createKeySession:function(et){if(!Bt||!pt)throw new Error("Can not create sessions until you have selected a key system");const je=pt.createSession(et.sessionType),Mt=Sn(je,et),Gt=Bt.systemString===N.default.CLEARKEY_KEYSTEM_STRING&&(et.initData||et.protData&&et.protData.clearkeys)?N.default.INITIALIZATION_DATA_TYPE_KEYIDS:N.default.INITIALIZATION_DATA_TYPE_CENC;je.generateRequest(Gt,et.initData).then((function(){Pt.debug("DRM: Session created. SessionID = "+Mt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Mt})})).catch((function(un){ln(Mt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+un.name)})}))},getAllInitData:function(){const et=[];for(let je=0;je<Ot.length;je++)Ot[je].initData&&et.push(Ot[je].initData);return et},getSessionTokens:function(){return Ot},loadKeySession:function(et){if(!Bt||!pt)throw new Error("Can not load sessions until you have selected a key system");const je=et.sessionId;for(let un=0;un<Ot.length;un++)if(je===Ot[un].sessionId)return void Pt.warn("DRM: Ignoring session ID because we have already seen it!");const Mt=pt.createSession(et.sessionType),Gt=Sn(Mt,et);Gt.hasTriggeredKeyStatusMapUpdate=!0,Mt.load(je).then((function(un){un?(Pt.debug("DRM: Session loaded. SessionID = "+Gt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Gt})):(ln(Gt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+je+")")}))})).catch((function(un){ln(Gt),rt.trigger(Je.KEY_SESSION_CREATED,{data:null,error:new p.default(ee.default.KEY_SESSION_CREATED_ERROR_CODE,ee.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+je+")! "+un.name)})}))},removeKeySession:function(et){et.session.remove().then((function(){Pt.debug("DRM: Session removed. SessionID = "+et.getSessionId()),rt.trigger(Je.KEY_SESSION_REMOVED,{data:et.getSessionId()})}),(function(je){rt.trigger(Je.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+et.getSessionId()+"). "+je.name})}))},requestKeySystemAccess:function(et){return new Promise(((je,Mt)=>{Xt(et,0,je,Mt)}))},reset:function(){const et=Ot.length;let je;if(et!==0){const Mt=function(Gt){ln(Gt),Ot.length===0&&(gt?(gt.removeEventListener("encrypted",qt),gt.setMediaKeys(null).then((function(){rt.trigger(Je.TEARDOWN_COMPLETE)}))):rt.trigger(Je.TEARDOWN_COMPLETE))};for(let Gt=0;Gt<et;Gt++)je=Ot[Gt],(function(un){an(je),Mt(un)})(je)}else rt.trigger(Je.TEARDOWN_COMPLETE)},selectKeySystem:function(et){return new Promise(((je,Mt)=>{et.nativeMediaKeySystemAccessObject.createMediaKeys().then((Gt=>(Bt=et.keySystem,pt=Gt,gt?gt.setMediaKeys(pt):Promise.resolve()))).then((()=>{je(Bt)})).catch((function(){Mt({error:"Error selecting keys system ("+et.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(et){gt!==et&&(gt&&(gt.removeEventListener("encrypted",qt),gt.setMediaKeys&>.setMediaKeys(null)),gt=et,gt&&(gt.addEventListener("encrypted",qt),gt.setMediaKeys&&pt&>.setMediaKeys(pt)))},setServerCertificate:function(et){return new Promise((je=>{pt.setServerCertificate(et).then((function(){Pt.info("DRM: License server certificate successfully updated."),rt.trigger(Je.SERVER_CERTIFICATE_UPDATED),je()})).catch((Mt=>{rt.trigger(Je.SERVER_CERTIFICATE_UPDATED,{error:new p.default(ee.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,ee.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+Mt.name)}),je()}))}))},stop:function(){let et;for(let je=0;je<Ot.length;je++)et=Ot[je],et.getUsable()||(an(et),ln(et))},updateKeySession:function(et,je){const Mt=et.session;Et.isClearKey(Bt)&&(je=je.toJWK()),Mt.update(je).then((()=>{rt.trigger(Je.KEY_SESSION_UPDATED)})).catch((function(Gt){rt.trigger(Je.KEY_ERROR,{error:new p.default(ee.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+Gt.name,et)})}))}},Pt=Ct.getLogger(At),Bt=null,gt=null,pt=null,Ot=[],Et=Re(St).getInstance(),qt={handleEvent:function(et){if(et.type==="encrypted"&&et.initData){let je=ArrayBuffer.isView(et.initData)?et.initData.buffer:et.initData;rt.trigger(Je.NEED_KEY,{key:new Se(je,et.initDataType)})}}},At}Ke[N.default.PLAYREADY_KEYSTEM_STRING]=[N.default.PLAYREADY_KEYSTEM_STRING,N.default.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],Ke[N.default.WIDEVINE_KEYSTEM_STRING]=[N.default.WIDEVINE_KEYSTEM_STRING],Ke[N.default.CLEARKEY_KEYSTEM_STRING]=[N.default.CLEARKEY_KEYSTEM_STRING],lt.__dashjs_factory_name="DefaultProtectionModel";var Yt=ke.default.getClassFactory(lt);function xt(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug,At=Nt.api;let Pt,Bt,gt,pt,Ot,qt,Et,Xt,gn;function an(){try{for(let Ft=0;Ft<Et.length;Ft++)ln(Et[Ft]);gt&>.removeEventListener(At.needkey,Xt),rt.trigger(Je.TEARDOWN_COMPLETE)}catch(Ft){rt.trigger(Je.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+Ft.message})}}function ln(Ft){const et=Ft.session;et.removeEventListener(At.error,Ft),et.removeEventListener(At.message,Ft),et.removeEventListener(At.ready,Ft),et.removeEventListener(At.close,Ft);for(let je=0;je<Et.length;je++)if(Et[je]===Ft){Et.splice(je,1);break}et[At.release]()}function Sn(){let Ft=null;const et=function(){gt.removeEventListener("loadedmetadata",Ft),gt[At.setMediaKeys](Ot),rt.trigger(Je.VIDEO_ELEMENT_SELECTED)};gt.readyState>=1?et():(Ft=et.bind(this),gt.addEventListener("loadedmetadata",Ft))}return Pt={getAllInitData:function(){const Ft=[];for(let et=0;et<Et.length;et++)Ft.push(Et[et].initData);return Ft},getSessionTokens:function(){return Et},requestKeySystemAccess:function(Ft){return new Promise(((et,je)=>{let Mt=!1;for(let Gt=0;Gt<Ft.length;Gt++){const un=Ft[Gt].ks.systemString,wn=Ft[Gt].configs;let Cn=null,Gn=null;for(let Mn=0;Mn<wn.length;Mn++){const qn=wn[Mn].audioCapabilities,re=wn[Mn].videoCapabilities;if(qn&&qn.length!==0){Cn=[];for(let Qn=0;Qn<qn.length;Qn++)window[At.MediaKeys].isTypeSupported(un,qn[Qn].contentType)&&Cn.push(qn[Qn])}if(re&&re.length!==0){Gn=[];for(let Qn=0;Qn<re.length;Qn++)window[At.MediaKeys].isTypeSupported(un,re[Qn].contentType)&&Gn.push(re[Qn])}if(!Cn&&!Gn||Cn&&Cn.length===0||Gn&&Gn.length===0)continue;Mt=!0;const Hn=new Y(Cn,Gn),ra=gn.getKeySystemBySystemString(un),_a=new Ze(ra,Hn);rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:_a}),et({data:_a});break}}if(!Mt){const Gt="Key system access denied! -- No valid audio/video content configurations detected!";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Gt}),je({error:Gt})}}))},selectKeySystem:function(Ft){return new Promise(((et,je)=>{try{Ot=Ft.mediaKeys=new window[At.MediaKeys](Ft.keySystem.systemString),pt=Ft.keySystem,qt=Ft,gt&&Sn(),et(pt)}catch{je({error:"Error selecting keys system ("+pt.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(Ft){gt!==Ft&&(gt&>.removeEventListener(At.needkey,Xt),gt=Ft,gt&&(gt.addEventListener(At.needkey,Xt),Ot&&Sn()))},createKeySession:function(Ft){if(!pt||!Ot||!qt)throw new Error("Can not create sessions until you have selected a key system");let et=null;if(qt.ksConfiguration.videoCapabilities&&qt.ksConfiguration.videoCapabilities.length>0&&(et=qt.ksConfiguration.videoCapabilities[0]),et===null&&qt.ksConfiguration.audioCapabilities&&qt.ksConfiguration.audioCapabilities.length>0&&(et=qt.ksConfiguration.audioCapabilities[0]),et===null)throw new Error("Can not create sessions for unknown content types.");const je=et.contentType,Mt=Ot.createSession(je,new Uint8Array(Ft.initData),Ft.cdmData?new Uint8Array(Ft.cdmData):null),Gt=(function(un,wn){return{session:un,keyId:wn.keyId,normalizedKeyId:wn&&wn.keyId&&typeof wn.keyId=="string"?wn.keyId.replace(/-/g,"").toLowerCase():"",initData:wn.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}},handleEvent:function(Cn){switch(Cn.type){case At.error:let Gn="KeyError";rt.trigger(Je.KEY_ERROR,{error:new p.default(ee.default.MEDIA_KEYERR_CODE,Gn,this)});break;case At.message:let Mn=ArrayBuffer.isView(Cn.message)?Cn.message.buffer:Cn.message;rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(this,Mn,Cn.destinationURL)});break;case At.ready:Bt.debug("DRM: Key added."),rt.trigger(Je.KEY_ADDED);break;case At.close:Bt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),rt.trigger(Je.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}})(Mt,Ft);Mt.addEventListener(At.error,Gt),Mt.addEventListener(At.message,Gt),Mt.addEventListener(At.ready,Gt),Mt.addEventListener(At.close,Gt),Et.push(Gt),Bt.debug("DRM: Session created. SessionID = "+Gt.getSessionId()),rt.trigger(Je.KEY_SESSION_CREATED,{data:Gt})},updateKeySession:function(Ft,et){const je=Ft.session;gn.isClearKey(pt)?je.update(new Uint8Array(et.toJWK())):je.update(new Uint8Array(et)),rt.trigger(Je.KEY_SESSION_UPDATED)},closeKeySession:ln,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:an,reset:an},Bt=Ct.getLogger(Pt),gt=null,pt=null,Ot=null,qt=null,Et=[],gn=Re(St).getInstance(),Xt={handleEvent:function(Ft){if(Ft.type===At.needkey&&Ft.initData){const et=ArrayBuffer.isView(Ft.initData)?Ft.initData.buffer:Ft.initData;rt.trigger(Je.NEED_KEY,{key:new Se(et,N.default.INITIALIZATION_DATA_TYPE_CENC)})}}},Pt}xt.__dashjs_factory_name="ProtectionModel_3Feb2014";var Lt=ke.default.getClassFactory(xt);function _t(Nt){Nt=Nt||{};const St=this.context,rt=Nt.eventBus,Je=Nt.events,Ct=Nt.debug,At=Nt.api,Pt=Nt.errHandler;let Bt,gt,pt,Ot,qt,Et,Xt,gn,an;function ln(){pt&&et();for(let je=0;je<Xt.length;je++)Sn(Xt[je]);rt.trigger(Je.TEARDOWN_COMPLETE)}function Sn(je){try{pt[At.cancelKeyRequest](Ot.systemString,je.sessionId)}catch(Mt){rt.trigger(Je.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+je.sessionId+") "+Mt.message})}}function Ft(je,Mt){if(Mt&&je){const Gt=je.length;for(let un=0;un<Gt;un++)if(je[un].sessionId==Mt)return je[un];return null}return null}function et(){pt.removeEventListener(At.keyerror,an),pt.removeEventListener(At.needkey,an),pt.removeEventListener(At.keymessage,an),pt.removeEventListener(At.keyadded,an)}return Bt={getAllInitData:function(){const je=[];for(let Mt=0;Mt<Et.length;Mt++)je.push(Et[Mt].initData);for(let Mt=0;Mt<Xt.length;Mt++)je.push(Xt[Mt].initData);return je},getSessionTokens:function(){return Xt.concat(Et)},requestKeySystemAccess:function(je){return new Promise(((Mt,Gt)=>{let un=pt;un||(un=document.createElement("video"));let wn=!1;for(let Cn=0;Cn<je.length;Cn++){const Gn=je[Cn].ks.systemString,Mn=je[Cn].configs;let qn=null,re=null;for(let Hn=0;Hn<Mn.length;Hn++){const ra=Mn[Hn].videoCapabilities;if(ra&&ra.length!==0){re=[];for(let Xn=0;Xn<ra.length;Xn++)un.canPlayType(ra[Xn].contentType,Gn)!==""&&re.push(ra[Xn])}if(!re||qn||re&&re.length===0)continue;wn=!0;const _a=new Y(qn,re),Qn=qt.getKeySystemBySystemString(Gn),za=new Ze(Qn,_a);rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{data:za}),Mt({data:za});break}}if(!wn){const Cn="Key system access denied! -- No valid audio/video content configurations detected!";rt.trigger(Je.KEY_SYSTEM_ACCESS_COMPLETE,{error:Cn}),Gt({error:Cn})}}))},selectKeySystem:function(je){return Ot=je.keySystem,Promise.resolve(Ot)},setMediaElement:function(je){if(pt!==je){if(pt){et();for(var Mt=0;Mt<Xt.length;Mt++)Sn(Xt[Mt]);Xt=[]}pt=je,pt&&(pt.addEventListener(At.keyerror,an),pt.addEventListener(At.needkey,an),pt.addEventListener(At.keymessage,an),pt.addEventListener(At.keyadded,an),rt.trigger(Je.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(je){if(!Ot)throw new Error("Can not create sessions until you have selected a key system");if(gn||Xt.length===0){const Mt={sessionId:null,keyId:je.keyId,normalizedKeyId:je&&je.keyId&&typeof je.keyId=="string"?je.keyId.replace(/-/g,"").toLowerCase():"",initData:je.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}}};return Et.push(Mt),pt[At.generateKeyRequest](Ot.systemString,new Uint8Array(je.initData)),Mt}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(je,Mt){const Gt=je.sessionId;if(qt.isClearKey(Ot))for(let un=0;un<Mt.keyPairs.length;un++)pt[At.addKey](Ot.systemString,Mt.keyPairs[un].key,Mt.keyPairs[un].keyID,Gt);else pt[At.addKey](Ot.systemString,new Uint8Array(Mt),new Uint8Array(je.initData),Gt);rt.trigger(Je.KEY_SESSION_UPDATED)},closeKeySession:Sn,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:ln,reset:ln},gt=Ct.getLogger(Bt),pt=null,Ot=null,Et=[],Xt=[],qt=Re(St).getInstance(),an={handleEvent:function(je){let Mt=null;switch(je.type){case At.needkey:let Gt=ArrayBuffer.isView(je.initData)?je.initData.buffer:je.initData;rt.trigger(Je.NEED_KEY,{key:new Se(Gt,N.default.INITIALIZATION_DATA_TYPE_CENC)});break;case At.keyerror:if(Mt=Ft(Xt,je.sessionId),Mt||(Mt=Ft(Et,je.sessionId)),Mt){let un=ee.default.MEDIA_KEYERR_CODE,wn="";switch(je.errorCode.code){case 1:un=ee.default.MEDIA_KEYERR_UNKNOWN_CODE,wn+="MEDIA_KEYERR_UNKNOWN - "+ee.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:un=ee.default.MEDIA_KEYERR_CLIENT_CODE,wn+="MEDIA_KEYERR_CLIENT - "+ee.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:un=ee.default.MEDIA_KEYERR_SERVICE_CODE,wn+="MEDIA_KEYERR_SERVICE - "+ee.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:un=ee.default.MEDIA_KEYERR_OUTPUT_CODE,wn+="MEDIA_KEYERR_OUTPUT - "+ee.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:un=ee.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,wn+="MEDIA_KEYERR_HARDWARECHANGE - "+ee.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:un=ee.default.MEDIA_KEYERR_DOMAIN_CODE,wn+="MEDIA_KEYERR_DOMAIN - "+ee.default.MEDIA_KEYERR_DOMAIN_MESSAGE}wn+=" System Code = "+je.systemCode,rt.trigger(Je.KEY_ERROR,{error:new p.default(un,wn,Mt)})}else gt.error("No session token found for key error");break;case At.keyadded:Mt=Ft(Xt,je.sessionId),Mt||(Mt=Ft(Et,je.sessionId)),Mt?(gt.debug("DRM: Key added."),rt.trigger(Je.KEY_ADDED,{data:Mt})):gt.debug("No session token found for key added");break;case At.keymessage:if(gn=je.sessionId!==null&&je.sessionId!==void 0,gn?(Mt=Ft(Xt,je.sessionId),!Mt&&Et.length>0&&(Mt=Et.shift(),Xt.push(Mt),Mt.sessionId=je.sessionId,rt.trigger(Je.KEY_SESSION_CREATED,{data:Mt}))):Et.length>0&&(Mt=Et.shift(),Xt.push(Mt),Et.length!==0&&Pt.error(new p.default(ee.default.MEDIA_KEY_MESSAGE_ERROR_CODE,ee.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Mt){let un=ArrayBuffer.isView(je.message)?je.message.buffer:je.message;Mt.keyMessage=un,rt.trigger(Je.INTERNAL_KEY_MESSAGE,{data:new ze(Mt,un,je.defaultURL)})}else gt.warn("No session token found for key message")}}},Bt}_t.__dashjs_factory_name="ProtectionModel_01b";var fn=ke.default.getClassFactory(_t);const An=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],jn=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function $n(){let Nt;const St=this.context;function rt(Je,Ct){for(let At=0;At<Ct.length;At++){const Pt=Ct[At];if(typeof Je[Pt[Object.keys(Pt)[0]]]=="function")return Pt}return null}return Nt={createProtectionSystem:function(Je){let Ct=null;const At=Re(St).getInstance();At.setConfig({debug:Je.debug,BASE64:Je.BASE64,settings:Je.settings}),At.initialize();let Pt=(function(Bt){const gt=Bt.debug,pt=gt.getLogger(Nt),Ot=Bt.eventBus,qt=Bt.errHandler,Et=Bt.videoModel?Bt.videoModel.getElement():null;return Et&&Et.onencrypted===void 0||Et&&Et.mediaKeys===void 0?rt(Et,jn)?(pt.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Lt(St).create({debug:gt,eventBus:Ot,events:Bt.events,api:rt(Et,jn)})):rt(Et,An)?(pt.info("EME detected on this user agent! (ProtectionModel_01b)"),fn(St).create({debug:gt,eventBus:Ot,errHandler:qt,events:Bt.events,api:rt(Et,An)})):(pt.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(pt.info("EME detected on this user agent! (DefaultProtectionModel"),Yt(St).create({debug:gt,eventBus:Ot,events:Bt.events}))})(Je);return Pt&&(Ct=Pe(St).create({BASE64:Je.BASE64,cmcdModel:Je.cmcdModel,constants:Je.constants,customParametersModel:Je.customParametersModel,debug:Je.debug,eventBus:Je.eventBus,events:Je.events,protectionKeyController:At,protectionModel:Pt,settings:Je.settings}),Je.capabilities.setEncryptedMediaSupported(!0)),Ct}},Nt}$n.__dashjs_factory_name="Protection";const ea=ke.default.getClassFactory($n);ea.events=De.default,ea.errors=ee.default,ke.default.updateClassFactory($n.__dashjs_factory_name,ea);var Yn=ea},445:function(kt,Oe,oe){oe.r(Oe);var ie=oe(7252);class N extends ie.default{constructor(){super(),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_STATUSES_CHANGED="internalkeyStatusesChanged",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_STATUSES_MAP_UPDATED="keyStatusesMapUpdated",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.LICENSE_REQUEST_SENDING="public_licenseRequestSending",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected",this.KEY_SESSION_UPDATED="public_keySessionUpdated"}}let y=new N;Oe.default=y},1923:function(kt,Oe,oe){oe.r(Oe);var ie=oe(8748);class N extends ie.default{constructor(){super(),this.MEDIA_KEYERR_CODE=100,this.MEDIA_KEYERR_UNKNOWN_CODE=101,this.MEDIA_KEYERR_CLIENT_CODE=102,this.MEDIA_KEYERR_SERVICE_CODE=103,this.MEDIA_KEYERR_OUTPUT_CODE=104,this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,this.MEDIA_KEYERR_DOMAIN_CODE=106,this.MEDIA_KEY_MESSAGE_ERROR_CODE=107,this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,this.KEY_SESSION_CREATED_ERROR_CODE=113,this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,this.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",this.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",this.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",this.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",this.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",this.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --"}}let y=new N;Oe.default=y},4246:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138);const N={DEFAULT:.5,STRONG:1,WEAK:0};function y(Z,q,Y,ee){let p,o,P,U,se;return o=Z===void 0?null:Z,P=(function(ye){let ke=N.DEFAULT;return ye!==N.DEFAULT&&ye!==N.STRONG&&ye!==N.WEAK||(ke=ye),ke})(Y),U=q===void 0?null:q,se=ee===void 0?null:ee,p={representation:o,reason:U,rule:se,priority:P},p}y.__dashjs_factory_name="SwitchRequest";const R=ie.default.getClassFactory(y);R.NO_CHANGE=null,R.PRIORITY=N,ie.default.updateClassFactory(y.__dashjs_factory_name,R),Oe.default=R},559:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{supportsMediaSource:function(){return q}});var ie=oe(138),N=oe(5212),y=oe(2861),R=oe(7393),Z=oe(649);function q(){let ee="ManagedMediaSource"in window,p="WebKitMediaSource"in window,o="MediaSource"in window;return ee||p||o}function Y(){let ee,p,o,P,U,se;const ye=this.context,ke=(0,R.default)(ye).getInstance();function Ie(Ae,ge){let ue;ge===N.default.VIDEO?ue=(function(Ne){const He={video:{}};return Ne&&(Ne.width&&(He.video.width=Ne.width),Ne.height&&(He.video.height=Ne.height),Ne.framerate&&(He.video.framerate=parseFloat(Ne.framerate)),Ne.hdrMetadataType&&(He.video.hdrMetadataType=Ne.hdrMetadataType),Ne.colorGamut&&(He.video.colorGamut=Ne.colorGamut),Ne.transferFunction&&(He.video.transferFunction=Ne.transferFunction)),He})(Ae):ge===N.default.AUDIO&&(ue=(function(Ne){const He={audio:{}};return Ne.samplerate&&(He.audio.samplerate=Ne.samplerate),He})(Ae)),ue[ge].contentType=Ae.codec,ue[ge].bitrate=parseInt(Ae.bitrate),ue.type="media-source";let we=Ae.codec;return Ae.width&&Ae.height&&(we+=';width="'+Ae.width+'";height="'+Ae.height+'"'),ue.mediaSourceCodecString=we,(function(Ne,He,Ht){if(!He||!He.keySystemsMetadata||He.keySystemsMetadata.length===0)return[Ne];const be=[];return He.keySystemsMetadata.forEach((mt=>{if(!mt.ks)return void be.push({...Ne});const Ve=mt.protData&&mt.protData.systemStringPriority?mt.protData.systemStringPriority:null;let Ue=mt.ks.systemString;(Ve||[Ue]).forEach((Rt=>{const Zt={...Ne};Zt.keySystemConfiguration={},Rt&&(Zt.keySystemConfiguration.keySystem=Rt);let jt="";mt.ks.systemString===y.default.WIDEVINE_KEYSTEM_STRING&&(jt=y.default.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);const Wt=mt.protData,$t=Wt&&Wt.audioRobustness&&Wt.audioRobustness.length>0?Wt.audioRobustness:jt,cn=Wt&&Wt.videoRobustness&&Wt.videoRobustness.length>0?Wt.videoRobustness:jt;Ht===N.default.AUDIO?Zt.keySystemConfiguration[Ht]={robustness:$t}:Ht===N.default.VIDEO&&(Zt.keySystemConfiguration[Ht]={robustness:cn}),be.push(Zt)}))})),be})(ue,Ae,ge)}function Pe(Ae){if(P&&P.length!==0&&Ae)return P.find((ge=>{const ue=Ge(Ae,ge,N.default.AUDIO),we=Ge(Ae,ge,N.default.VIDEO),Ne=Ge(Ae,ge,"keySystemConfiguration");return ue&&we&&Ne}))}function Ge(Ae,ge,ue){return!Ae[ue]&&!ge[ue]||!(!Ae[ue]||!ge[ue])&&ke.areEqual(Ae[ue],ge[ue])}function yt(Ae,ge){return(Ae=Ae.filter((ue=>!(ue.schemeIdUri&&ge.some((we=>we.schemeIdUri===ue.schemeIdUri)))))).push(...ge),Ae}return ee={areKeyIdsExpired:function(Ae){return!!(o&&Ae&&Ae.normalizedKeyIds&&Ae.normalizedKeyIds.size!==0)&&o.areKeyIdsExpired(Ae.normalizedKeyIds)},areKeyIdsUsable:function(Ae){return!(o&&Ae&&Ae.normalizedKeyIds&&Ae.normalizedKeyIds.size!==0)||o.areKeyIdsUsable(Ae.normalizedKeyIds)},isCodecSupportedBasedOnTestedConfigurations:function(Ae,ge){if(!Ae||!Ae.codec||Ae.isSupported===!1)return!1;const ue=Ie(Ae,ge).map((we=>Pe(we))).filter((we=>we!=null));return!(ue&&ue.length>0)||(function(we){return we.some((Ne=>Ne&&Ne.decodingInfo&&Ne.decodingInfo.supported))})(ue)},isProtectionCompatible:function(Ae,ge){return!ge||!(!Ae.isEncrypted&&ge.isEncrypted)},runCodecSupportCheck:function(Ae,ge){if(ge!==N.default.AUDIO&&ge!==N.default.VIDEO)return Promise.resolve();const ue=p.get().streaming.enhancement.codecs;if(p.get().streaming.enhancement.enabled&&ue.some((Ne=>Ae.codec.includes(Ne))))return Promise.resolve(!0);const we=Ie(Ae,ge);return(function(Ne,He){return p.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(Ne.codec&&He===N.default.AUDIO||He===N.default.VIDEO&&Ne.codec&&Ne.width&&Ne.height&&Ne.bitrate&&Ne.framerate)})(Ae,ge)?(function(Ne){return new Promise((He=>{if(!Ne||Ne.length===0)return void He();const Ht=Ne.map((be=>(function(mt){return new Promise((Ve=>{Pe(mt)?Ve():navigator.mediaCapabilities.decodingInfo(mt).then((Ue=>{mt.decodingInfo=Ue,P.push(mt),Ve()})).catch((Ue=>{mt.decodingInfo={supported:!1},P.push(mt),se.error(Ue),Ve()}))}))})(be)));Promise.allSettled(Ht).then((()=>{He()})).catch((be=>{se.error(be),He()}))}))})(we):((function(Ne){if(!Ne||!Ne.length)return;const He=Ne[0];if(Pe(He))return;let Ht={supported:!1};("ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(He.mediaSourceCodecString)||"MediaSource"in window&&MediaSource.isTypeSupported(He.mediaSourceCodecString)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(He.mediaSourceCodecString))&&(Ht.supported=!0),He.decodingInfo=Ht,P.push(He)})(we),Promise.resolve())},setConfig:function(Ae){Ae&&(Ae.settings&&(p=Ae.settings),Ae.protectionController&&(o=Ae.protectionController))},setEncryptedMediaSupported:function(Ae){U=Ae},setProtectionController:function(Ae){o=Ae},supportsChangeType:function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType},supportsEncryptedMedia:function(){return U},supportsEssentialProperty:function(Ae){let ge=p.get().streaming.capabilities.supportedEssentialProperties;p.get().streaming.capabilities.useMediaCapabilitiesApi&&p.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(ge=yt(ge,[{schemeIdUri:N.default.COLOUR_PRIMARIES_SCHEME_ID_URI},{schemeIdUri:N.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI},{schemeIdUri:N.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI}])),p.get().streaming.capabilities.useMediaCapabilitiesApi&&p.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(ge=yt(ge,[{schemeIdUri:N.default.HDR_METADATA_FORMAT_SCHEME_ID_URI}]));try{return Ae.inArray(ge)}catch{return!0}},supportsMediaSource:q},U=!1,P=[],se=(0,Z.default)(ye).getInstance().getLogger(ee),ee}Y.__dashjs_factory_name="Capabilities",Oe.default=ie.default.getSingletonFactory(Y)},7377:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138),N=oe(656);function y(){return{customTimeRangeArray:[],length:0,add:function(R,Z){let q;for(q=0;q<this.customTimeRangeArray.length&&R>this.customTimeRangeArray[q].start;q++);for(this.customTimeRangeArray.splice(q,0,{start:R,end:Z}),q=0;q<this.customTimeRangeArray.length-1;q++)this.mergeRanges(q,q+1)&&q--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(R,Z){for(let q=0;q<this.customTimeRangeArray.length;q++)if(R<=this.customTimeRangeArray[q].start&&Z>=this.customTimeRangeArray[q].end)this.customTimeRangeArray.splice(q,1),q--;else{if(R>this.customTimeRangeArray[q].start&&Z<this.customTimeRangeArray[q].end){this.customTimeRangeArray.splice(q+1,0,{start:Z,end:this.customTimeRangeArray[q].end}),this.customTimeRangeArray[q].end=R;break}R>this.customTimeRangeArray[q].start&&R<this.customTimeRangeArray[q].end?this.customTimeRangeArray[q].end=R:Z>this.customTimeRangeArray[q].start&&Z<this.customTimeRangeArray[q].end&&(this.customTimeRangeArray[q].start=Z)}this.length=this.customTimeRangeArray.length},mergeRanges:function(R,Z){let q=this.customTimeRangeArray[R],Y=this.customTimeRangeArray[Z];return q.start<=Y.start&&Y.start<=q.end&&q.end<=Y.end?(q.end=Y.end,this.customTimeRangeArray.splice(Z,1),!0):Y.start<=q.start&&q.start<=Y.end&&Y.end<=q.end?(q.start=Y.start,this.customTimeRangeArray.splice(Z,1),!0):Y.start<=q.start&&q.start<=Y.end&&q.end<=Y.end?(this.customTimeRangeArray.splice(R,1),!0):q.start<=Y.start&&Y.start<=q.end&&Y.end<=q.end&&(this.customTimeRangeArray.splice(Z,1),!0)},start:function(R){return(0,N.checkInteger)(R),R>=this.customTimeRangeArray.length||R<0?NaN:this.customTimeRangeArray[R].start},end:function(R){return(0,N.checkInteger)(R),R>=this.customTimeRangeArray.length||R<0?NaN:this.customTimeRangeArray[R].end}}}y.__dashjs_factory_name="CustomTimeRanges",Oe.default=ie.default.getClassFactory(y)},7393:function(kt,Oe,oe){oe.r(Oe);var ie=oe(138),N=oe(7316);function y(){let R;return R={areEqual:function(Z,q){return N(Z,q)}},R}y.__dashjs_factory_name="ObjectUtils",Oe.default=ie.default.getSingletonFactory(y)},656:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{checkInteger:function(){return y},checkIsVideoOrAudioType:function(){return Z},checkParameterType:function(){return N},checkRange:function(){return R}});var ie=oe(5212);function N(q,Y){if(typeof q!==Y)throw ie.default.BAD_ARGUMENT_ERROR}function y(q){if(q===null||isNaN(q)||q%1!=0)throw ie.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"}function R(q,Y,ee){if(q<Y||q>ee)throw ie.default.BAD_ARGUMENT_ERROR+" : argument out of range"}function Z(q){if(typeof q!="string"||q!==ie.default.AUDIO&&q!==ie.default.VIDEO)throw ie.default.BAD_ARGUMENT_ERROR}},1944:function(kt,Oe,oe){oe.r(Oe),Oe.default=class{constructor(ie,N,y){this.code=ie||null,this.message=N||null,this.data=y||null}}},5560:function(kt,Oe,oe){oe.r(Oe);var ie=oe(8854);Oe.default=class{constructor(N){this.id=N.id,this.url=N.url,this.language=N.language,this.mimeType=N.mimeType,this.bandwidth=N.bandwidth,this.periodId=N.periodId||null}serializeToMpdParserFormat(){return{tagName:ie.default.ADAPTATION_SET,mimeType:this.mimeType,lang:this.language,Representation:[{tagName:ie.default.REPRESENTATION,id:this.id,bandwidth:this.bandwidth,BaseURL:[{tagName:ie.default.BASE_URL,__text:this.url}],mimeType:this.mimeType}]}}}},7568:function(kt,Oe,oe){oe.r(Oe),oe.d(Oe,{HTTPRequest:function(){return ie},HTTPRequestTrace:function(){return N}});class ie{constructor(){this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null,this._resourceTimingValues=null}}class N{constructor(){this.s=null,this.d=null,this.b=[]}}ie.GET="GET",ie.HEAD="HEAD",ie.MPD_TYPE="MPD",ie.XLINK_EXPANSION_TYPE="XLinkExpansion",ie.INIT_SEGMENT_TYPE="InitializationSegment",ie.INDEX_SEGMENT_TYPE="IndexSegment",ie.MEDIA_SEGMENT_TYPE="MediaSegment",ie.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",ie.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",ie.DVB_REPORTING_TYPE="DVBReporting",ie.LICENSE="license",ie.CONTENT_STEERING_TYPE="ContentSteering",ie.OTHER_TYPE="other"}},Ko={};function Wn(kt){var Oe=Ko[kt];if(Oe!==void 0)return Oe.exports;var oe=Ko[kt]={exports:{}};return Ud[kt].call(oe.exports,oe,oe.exports,Wn),oe.exports}Wn.amdO={},Wn.d=function(kt,Oe){for(var oe in Oe)Wn.o(Oe,oe)&&!Wn.o(kt,oe)&&Object.defineProperty(kt,oe,{enumerable:!0,get:Oe[oe]})},Wn.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Wn.o=function(kt,Oe){return Object.prototype.hasOwnProperty.call(kt,Oe)},Wn.r=function(kt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(kt,"__esModule",{value:!0})};var ca={};Wn.r(ca),Wn.d(ca,{Constants:function(){return Jo.default},Debug:function(){return Zo.default},ExternalSubtitle:function(){return ts.default},MediaPlayer:function(){return jd.MediaPlayer},MediaPlayerFactory:function(){return Xo},MetricsReporting:function(){return $o.default},Protection:function(){return Qo.default},default:function(){return Bd},supportsMediaSource:function(){return es.supportsMediaSource}});var jd=Wn(5393),$o=Wn(4469),Qo=Wn(3888),qd=Wn(1152);let Wo,Fr=(function(){const kt="application/dash+xml";let Oe;function oe(N,y,R){if(!N||!/^VIDEO$/i.test(N.nodeName))return null;if(N._dashjs_player)return N._dashjs_player;let Z,q=N.id||N.name||"video element";if(!(y=y||[].slice.call(N.querySelectorAll("source")).filter((function(Y){return Y.type==kt}))[0])&&N.src)(y=document.createElement("source")).src=N.src;else if(!y&&!N.src)return null;return R=R||{},Z=(0,qd.default)(R).create(),Z.initialize(N,y.src,N.autoplay),Oe||(Oe=Z.getDebug().getLogger()),Oe.debug("Converted "+q+" to dash.js player and added content: "+y.src),N._dashjs_player=Z,Z}function ie(N){return/^VIDEO$/i.test(N.nodeName)?N:ie(N.parentNode)}return{create:oe,createAll:function(N,y){let R=[];N=N||"[data-dashjs-player]";let Z=(y=y||document).querySelectorAll(N);for(let Y=0;Y<Z.length;Y++){let ee=oe(Z[Y],null);R.push(ee)}let q=y.querySelectorAll('source[type="'+kt+'"]');for(let Y=0;Y<q.length;Y++){let ee=oe(ie(q[Y]),null);R.push(ee)}return R}}})();!(typeof window<"u"&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&typeof window<"u"&&window&&window.addEventListener&&(window.document.readyState==="complete"?window.dashjs?Fr.createAll():Wo=window.setInterval((function(){window.dashjs&&(window.clearInterval(Wo),Fr.createAll())}),500):window.addEventListener("load",(function kt(){window.removeEventListener("load",kt),Fr.createAll()})));var Xo=Fr,Zo=Wn(649),Jo=Wn(5212),es=Wn(559),ts=Wn(5560);dashjs.Protection=Qo.default,dashjs.MetricsReporting=$o.default,dashjs.MediaPlayerFactory=Xo,dashjs.Debug=Zo.default,dashjs.supportsMediaSource=es.supportsMediaSource,dashjs.Constants=Jo.default,dashjs.ExternalSubtitle=ts.default;var Bd=dashjs,Vd=(ca=ca.default).Constants,Kd=ca.Debug,Wd=ca.ExternalSubtitle,$d=ca.MediaPlayer,Qd=ca.MediaPlayerFactory,Xd=ca.MetricsReporting,Zd=ca.Protection,Jd=ca.default,ec=ca.supportsMediaSource;export{Vd as Constants,Kd as Debug,Wd as ExternalSubtitle,$d as MediaPlayer,Qd as MediaPlayerFactory,Xd as MetricsReporting,Zd as Protection,Jd as default,ec as supportsMediaSource};
|