@eluvio/elv-player-js 1.0.110 → 1.0.112

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/5.bundle.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[5],{463:function(et,tt,nt){(function(tt,nt){var rt;self,rt=()=>(()=>{var et={4593:(et,tt)=>{var nt,rt,it,at,ot,st={};nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=function(et){for(var tt=0,rt=[],it=0|et.length/3;0<it--;){var at=(et[tt]<<16)+(et[tt+1]<<8)+et[tt+2];tt+=3,rt.push(nt.charAt(63&at>>18)),rt.push(nt.charAt(63&at>>12)),rt.push(nt.charAt(63&at>>6)),rt.push(nt.charAt(63&at))}return 2==et.length-tt?(at=(et[tt]<<16)+(et[tt+1]<<8),rt.push(nt.charAt(63&at>>18)),rt.push(nt.charAt(63&at>>12)),rt.push(nt.charAt(63&at>>6)),rt.push("=")):1==et.length-tt&&(at=et[tt]<<16,rt.push(nt.charAt(63&at>>18)),rt.push(nt.charAt(63&at>>12)),rt.push("==")),rt.join("")},it=function(){for(var et=[],tt=0;tt<nt.length;++tt)et[nt.charCodeAt(tt)]=tt;return et["=".charCodeAt(0)]=0,et}(),at=function(et){for(var tt=0,nt=[],rt=0|et.length/4;0<rt--;){var at=(it[et.charCodeAt(tt)]<<18)+(it[et.charCodeAt(tt+1)]<<12)+(it[et.charCodeAt(tt+2)]<<6)+it[et.charCodeAt(tt+3)];nt.push(255&at>>16),nt.push(255&at>>8),nt.push(255&at),tt+=4}return nt&&("="==et.charAt(tt-2)?(nt.pop(),nt.pop()):"="==et.charAt(tt-1)&&nt.pop()),nt},ot={encode:function(et){for(var tt=[],nt=0;nt<et.length;++nt)tt.push(et.charCodeAt(nt));return tt},decode:function(et){for(var tt=0;tt<s.length;++tt)a[tt]=String.fromCharCode(a[tt]);return a.join("")}},st.decodeArray=function(et){var tt=at(et);return new Uint8Array(tt)},st.encodeASCII=function(et){var tt=ot.encode(et);return rt(tt)},st.decodeASCII=function(et){var tt=at(et);return ot.decode(tt)},st.encode=function(et){var tt=function(et){for(var tt=[],nt=0;nt<et.length;++nt){var rt=et.charCodeAt(nt);rt<128?tt.push(rt):rt<2048?(tt.push(192|rt>>6),tt.push(128|63&rt)):rt<65536?(tt.push(224|rt>>12),tt.push(128|63&rt>>6),tt.push(128|63&rt)):(tt.push(240|rt>>18),tt.push(128|63&rt>>12),tt.push(128|63&rt>>6),tt.push(128|63&rt))}return tt}(et);return rt(tt)},st.decode=function(et){return function(et){for(var tt=[],nt=0;nt<et.length;){var rt=et[nt++];rt<128||(rt<224?(rt=(31&rt)<<6,rt|=63&et[nt++]):rt<240?(rt=(15&rt)<<12,rt|=(63&et[nt++])<<6,rt|=63&et[nt++]):(rt=(7&rt)<<18,rt|=(63&et[nt++])<<12,rt|=(63&et[nt++])<<6,rt|=63&et[nt++])),tt.push(String.fromCharCode(rt))}return tt.join("")}(at(et))},tt.decode=st.decode,tt.decodeArray=st.decodeArray,tt.encode=st.encode,tt.encodeASCII=st.encodeASCII},452:(et,tt)=>{!function(et){"use strict";var tt={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},n=function(et){var nt=et;return tt.hasOwnProperty(et)&&(nt=tt[et]),String.fromCharCode(nt)},nt=15,rt=32,it={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},at={17:2,18:4,21:6,22:8,23:10,19:13,20:15},ot={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},st={25:2,26:4,29:6,30:8,31:10,27:13,28:15},lt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],ft={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(et){this.time=et},log:function(et,tt){var nt=this.verboseFilter[et];this.verboseLevel>=nt&&console.log(this.time+" ["+et+"] "+tt)}},f=function(et){for(var tt=[],nt=0;nt<et.length;nt++)tt.push(et[nt].toString(16));return tt},d=function(et,tt,nt,rt,it){this.foreground=et||"white",this.underline=tt||!1,this.italics=nt||!1,this.background=rt||"black",this.flash=it||!1};d.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(et){for(var tt=["foreground","underline","italics","background","flash"],nt=0;nt<tt.length;nt++){var rt=tt[nt];et.hasOwnProperty(rt)&&(this[rt]=et[rt])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(et){return this.foreground===et.foreground&&this.underline===et.underline&&this.italics===et.italics&&this.background===et.background&&this.flash===et.flash},copy:function(et){this.foreground=et.foreground,this.underline=et.underline,this.italics=et.italics,this.background=et.background,this.flash=et.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var g=function(et,tt,nt,rt,it,at){this.uchar=et||" ",this.penState=new d(tt,nt,rt,it,at)};g.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(et,tt){this.uchar=et,this.penState.copy(tt)},setPenState:function(et){this.penState.copy(et)},equals:function(et){return this.uchar===et.uchar&&this.penState.equals(et.penState)},copy:function(et){this.uchar=et.uchar,this.penState.copy(et.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var h=function(){this.chars=[];for(var et=0;et<rt;et++)this.chars.push(new g);this.pos=0,this.currPenState=new d};h.prototype={equals:function(et){for(var tt=!0,nt=0;nt<rt;nt++)if(!this.chars[nt].equals(et.chars[nt])){tt=!1;break}return tt},copy:function(et){for(var tt=0;tt<rt;tt++)this.chars[tt].copy(et.chars[tt])},isEmpty:function(){for(var et=!0,tt=0;tt<rt;tt++)if(!this.chars[tt].isEmpty()){et=!1;break}return et},setCursor:function(et){this.pos!==et&&(this.pos=et),this.pos<0?(ft.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>rt&&(ft.log("ERROR","Too large cursor position "+this.pos),this.pos=rt)},moveCursor:function(et){var tt=this.pos+et;if(et>1)for(var nt=this.pos+1;nt<tt+1;nt++)this.chars[nt].setPenState(this.currPenState);this.setCursor(tt)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(et){et>=144&&this.backSpace();var tt=n(et);this.pos>=rt?ft.log("ERROR","Cannot insert "+et.toString(16)+" ("+tt+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(tt,this.currPenState),this.moveCursor(1))},clearFromPos:function(et){var tt;for(tt=et;tt<rt;tt++)this.chars[tt].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var et=[],tt=!0,nt=0;nt<rt;nt++){var it=this.chars[nt].uchar;" "!==it&&(tt=!1),et.push(it)}return tt?"":et.join("")},setPenStyles:function(et){this.currPenState.setStyles(et),this.chars[this.pos].setPenState(this.currPenState)}};var p=function(){this.rows=[];for(var et=0;et<nt;et++)this.rows.push(new h);this.currRow=14,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var et=0;et<nt;et++)this.rows[et].clear();this.currRow=14},equals:function(et){for(var tt=!0,rt=0;rt<nt;rt++)if(!this.rows[rt].equals(et.rows[rt])){tt=!1;break}return tt},copy:function(et){for(var tt=0;tt<nt;tt++)this.rows[tt].copy(et.rows[tt])},isEmpty:function(){for(var et=!0,tt=0;tt<nt;tt++)if(!this.rows[tt].isEmpty()){et=!1;break}return et},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(et){this.rows[this.currRow].insertChar(et)},setPen:function(et){this.rows[this.currRow].setPenStyles(et)},moveCursor:function(et){this.rows[this.currRow].moveCursor(et)},setCursor:function(et){ft.log("INFO","setCursor: "+et),this.rows[this.currRow].setCursor(et)},setPAC:function(et){ft.log("INFO","pacData = "+JSON.stringify(et));var tt=et.row-1;this.nrRollUpRows&&tt<this.nrRollUpRows-1&&(tt=this.nrRollUpRows-1),this.currRow=tt;var nt=this.rows[this.currRow];if(null!==et.indent){var rt=et.indent,it=Math.max(rt-1,0);nt.setCursor(et.indent),et.color=nt.chars[it].penState.foreground}var at={foreground:et.color,underline:et.underline,italics:et.italics,background:"black",flash:!1};this.setPen(at)},setBkgData:function(et){ft.log("INFO","bkgData = "+JSON.stringify(et)),this.backSpace(),this.setPen(et),this.insertChar(32)},setRollUpRows:function(et){this.nrRollUpRows=et},rollUp:function(){if(null!==this.nrRollUpRows){ft.log("TEXT",this.getDisplayText());var et=this.currRow+1-this.nrRollUpRows,tt=this.rows.splice(et,1)[0];tt.clear(),this.rows.splice(this.currRow,0,tt),ft.log("INFO","Rolling up")}else ft.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(et){et=et||!1;for(var tt=[],rt="",it=-1,at=0;at<nt;at++){var ot=this.rows[at].getTextString();ot&&(it=at+1,et?tt.push("Row "+it+': "'+ot+'"'):tt.push(ot.trim()))}return tt.length>0&&(rt=et?"["+tt.join(" | ")+"]":tt.join("\n")),rt},getTextAndFormat:function(){return this.rows}};var m=function(et,tt){this.chNr=et,this.outputFilter=tt,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};m.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(et){this.outputFilter=et},setPAC:function(et){this.writeScreen.setPAC(et)},setBkgData:function(et){this.writeScreen.setBkgData(et)},setMode:function(et){et!==this.mode&&(this.mode=et,ft.log("INFO","MODE="+et),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=et)},insertChars:function(et){for(var tt=0;tt<et.length;tt++)this.writeScreen.insertChar(et[tt]);var nt=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";ft.log("INFO",nt+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(ft.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){ft.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){ft.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){ft.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(et){ft.log("INFO","RU("+et+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(et)},cc_FON:function(){ft.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){ft.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){ft.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){ft.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){ft.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){ft.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){ft.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(ft.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var et=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=et,this.writeScreen=this.nonDisplayedMemory,ft.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(et){ft.log("INFO","TO("+et+") - Tab Offset"),this.writeScreen.moveCursor(et)},cc_MIDROW:function(et){var tt={flash:!1};if(tt.underline=et%2==1,tt.italics=et>=46,tt.italics)tt.foreground="white";else{var nt=Math.floor(et/2)-16;tt.foreground=["white","green","blue","cyan","red","yellow","magenta"][nt]}ft.log("INFO","MIDROW: "+JSON.stringify(tt)),this.writeScreen.setPen(tt)},outputDataUpdate:function(){var et=ft.time;null!==et&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(et,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,et,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:et):this.cueStartTime=et,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(et){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,et,this.displayedMemory),this.cueStartTime=et))}};var y=function(et,tt,nt){this.field=et||1,this.outputs=[tt,nt],this.channels=[new m(1,tt),new m(2,nt)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};y.prototype={getHandler:function(et){return this.channels[et].getHandler()},setHandler:function(et,tt){this.channels[et].setHandler(tt)},addData:function(et,tt){var nt,rt,it,at=!1;this.lastTime=et,ft.setTime(et);for(var ot=0;ot<tt.length;ot+=2)rt=127&tt[ot],it=127&tt[ot+1],rt>=16&&rt<=31&&rt===this.lastCmdA&&it===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,ft.log("DEBUG","Repeated command ("+f([rt,it])+") is dropped")):0!==rt||0!==it?(ft.log("DATA","["+f([tt[ot],tt[ot+1]])+"] -> ("+f([rt,it])+")"),(nt=this.parseCmd(rt,it))||(nt=this.parseMidrow(rt,it)),nt||(nt=this.parsePAC(rt,it)),nt||(nt=this.parseBackgroundAttributes(rt,it)),nt||(at=this.parseChars(rt,it))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(at):ft.log("WARNING","No channel found yet. TEXT-MODE?")),nt?this.dataCounters.cmd+=2:at?this.dataCounters.char+=2:(this.dataCounters.other+=2,ft.log("WARNING","Couldn't parse cleaned data "+f([rt,it])+" orig: "+f([tt[ot],tt[ot+1]])))):this.dataCounters.padding+=2},parseCmd:function(et,tt){var nt;if(!((20===et||21===et||28===et||29===et)&&32<=tt&&tt<=47||(23===et||31===et)&&33<=tt&&tt<=35))return!1;nt=20===et||21===et||23===et?1:2;var rt=this.channels[nt-1];return 20===et||21===et||28===et||29===et?32===tt?rt.cc_RCL():33===tt?rt.cc_BS():34===tt?rt.cc_AOF():35===tt?rt.cc_AON():36===tt?rt.cc_DER():37===tt?rt.cc_RU(2):38===tt?rt.cc_RU(3):39===tt?rt.cc_RU(4):40===tt?rt.cc_FON():41===tt?rt.cc_RDC():42===tt?rt.cc_TR():43===tt?rt.cc_RTD():44===tt?rt.cc_EDM():45===tt?rt.cc_CR():46===tt?rt.cc_ENM():47===tt&&rt.cc_EOC():rt.cc_TO(tt-32),this.lastCmdA=et,this.lastCmdB=tt,this.currChNr=nt,!0},parseMidrow:function(et,tt){var nt=null;if((17===et||25===et)&&32<=tt&&tt<=47){if((nt=17===et?1:2)!==this.currChNr)return ft.log("ERROR","Mismatch channel in midrow parsing"),!1;var rt=this.channels[nt-1];return rt.insertChars([32]),rt.cc_MIDROW(tt),ft.log("DEBUG","MIDROW ("+f([et,tt])+")"),this.lastCmdA=et,this.lastCmdB=tt,!0}return!1},parsePAC:function(et,tt){var nt,rt;if(!((17<=et&&et<=23||25<=et&&et<=31)&&64<=tt&&tt<=127||(16===et||24===et)&&64<=tt&&tt<=95))return!1;nt=et<=23?1:2,rt=64<=tt&&tt<=95?1===nt?it[et]:ot[et]:1===nt?at[et]:st[et];var lt=this.interpretPAC(rt,tt);return this.channels[nt-1].setPAC(lt),this.lastCmdA=et,this.lastCmdB=tt,this.currChNr=nt,!0},interpretPAC:function(et,tt){var nt,rt={color:null,italics:!1,indent:null,underline:!1,row:et};return nt=tt>95?tt-96:tt-64,rt.underline=1==(1&nt),nt<=13?rt.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(nt/2)]:nt<=15?(rt.italics=!0,rt.color="white"):rt.indent=4*Math.floor((nt-16)/2),rt},parseChars:function(et,tt){var nt,rt=null,it=null,at=null;if(et>=25?(rt=2,at=et-8):(rt=1,at=et),17<=at&&at<=19?(nt=17===at?tt+80:18===at?tt+112:tt+144,ft.log("INFO","Special char '"+n(nt)+"' in channel "+rt),it=[nt],this.lastCmdA=et,this.lastCmdB=tt):32<=et&&et<=127&&(it=0===tt?[et]:[et,tt],this.lastCmdA=null,this.lastCmdB=null),it){var ot=f(it);ft.log("DEBUG","Char codes = "+ot.join(","))}return it},parseBackgroundAttributes:function(et,tt){var nt,rt,it;return((16===et||24===et)&&32<=tt&&tt<=47||(23===et||31===et)&&45<=tt&&tt<=47)&&(nt={},16===et||24===et?(rt=Math.floor((tt-32)/2),nt.background=lt[rt],tt%2==1&&(nt.background=nt.background+"_semi")):45===tt?nt.background="transparent":(nt.foreground="black",47===tt&&(nt.underline=!0)),it=et<24?1:2,this.channels[it-1].setBkgData(nt),this.lastCmdA=et,this.lastCmdB=tt,!0)},reset:function(){for(var et=0;et<this.channels.length;et++)this.channels[et]&&this.channels[et].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(et){for(var tt=0;tt<this.channels.length;tt++)this.channels[tt]&&this.channels[tt].cueSplitAtTime(et)}},et.logger=ft,et.PenState=d,et.CaptionScreen=p,et.Cea608Parser=y,et.findCea608Nalus=function(et,tt,nt){for(var rt=0,it=tt,at=[],o=function(et,tt,nt,rt){if(4!==et||tt<8)return null;var it=nt.getUint8(rt),at=nt.getUint16(rt+1),ot=nt.getUint32(rt+3),st=nt.getUint8(rt+7);return 181==it&&49==at&&1195456820==ot&&3==st};it<tt+nt;){if(rt=et.getUint32(it),6==(31&et.getUint8(it+4)))for(var ot=it+5,st=-1;ot<it+4+rt-1;){st=0;for(var lt=255;255===lt;)st+=lt=et.getUint8(ot),ot++;var ft=0;for(lt=255;255===lt;)ft+=lt=et.getUint8(ot),ot++;o(st,ft,et,ot)&&at.push([ot,ft]),ot+=ft}it+=rt+4}return at},et.extractCea608DataFromRange=function(et,tt){var nt=tt[0],rt=[[],[]];nt+=8;var it=31&et.getUint8(nt);nt+=2;for(var at=0;at<it;at++){var ot=et.getUint8(nt),st=4&ot,lt=3&ot;nt++;var ft=et.getUint8(nt);nt++;var dt=et.getUint8(nt);nt++,st&&(127&ft)+(127&dt)!=0&&(0===lt?(rt[0].push(ft),rt[0].push(dt)):1===lt&&(rt[1].push(ft),rt[1].push(dt)))}return rt}}(tt)},8416:(et,tt,nt)=>{"use strict";var rt=nt(7688),it=nt(5448),at=nt(6398),ot=nt(2032),st=(nt(5530),"undefined"!=typeof window&&window||nt.g),lt=st.dashjs;lt||(lt=st.dashjs={}),lt.MediaPlayer=rt.Z,lt.FactoryMaker=it.Z,lt.Debug=at.Z,lt.Version=(0,ot.e)()},6398:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>yt});var rt=nt(5595),it=nt(8512),at=nt(5448),ot=1,st=2,lt=3,ft=4,dt=5;function f(et){et=et||{};var tt,nt,at,pt,yt=this.context,vt=(0,rt.Z)(yt).getInstance(),At=et.settings,Rt=[];function m(et){return et&&et.bind?et.bind(window.console):window.console.log.bind(window.console)}function y(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];S.apply(void 0,[ot,this].concat(tt))}function E(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];S.apply(void 0,[st,this].concat(tt))}function v(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];S.apply(void 0,[lt,this].concat(tt))}function _(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];S.apply(void 0,[ft,this].concat(tt))}function T(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];S.apply(void 0,[dt,this].concat(tt))}function S(et,tt){var rt="",ot=null;nt&&(ot=(new Date).getTime(),rt+="["+(ot-pt)+"]"),at&&tt&&tt.getClassName&&(rt+="["+tt.getClassName()+"]",tt.getType&&(rt+="["+tt.getType()+"]")),rt.length>0&&(rt+=" ");for(var st=arguments.length,lt=new Array(st>2?st-2:0),ft=2;ft<st;ft++)lt[ft-2]=arguments[ft];Array.apply(null,lt).forEach((function(et){rt+=et+" "})),Rt[et]&&At&&At.get().debug.logLevel>=et&&Rt[et](rt),At&&At.get().debug.dispatchEvent&&vt.trigger(it.Z.LOG,{message:rt,level:et})}return tt={getLogger:function(et){return{fatal:y.bind(et),error:E.bind(et),warn:v.bind(et),info:_.bind(et),debug:T.bind(et)}},setLogTimestampVisible:function(et){nt=et},setCalleeNameVisible:function(et){at=et}},nt=!0,at=!0,pt=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(Rt[ot]=m(window.console.error),Rt[st]=m(window.console.error),Rt[lt]=m(window.console.warn),Rt[ft]=m(window.console.info),Rt[dt]=m(window.console.debug)),tt}f.__dashjs_factory_name="Debug";var pt=at.Z.getSingletonFactory(f);pt.LOG_LEVEL_NONE=0,pt.LOG_LEVEL_FATAL=ot,pt.LOG_LEVEL_ERROR=st,pt.LOG_LEVEL_WARNING=lt,pt.LOG_LEVEL_INFO=ft,pt.LOG_LEVEL_DEBUG=dt,at.Z.updateSingletonFactory(f.__dashjs_factory_name,pt);const yt=pt},5595:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(8825);function a(){var et={};function t(tt,nt,rt){var it=-1;return et[tt]?(et[tt].some((function(et,tt){if(et&&et.callback===nt&&(!rt||rt===et.scope))return it=tt,!0})),it):it}return{on:function(tt,nt,rt){var it=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!tt)throw new Error("event type cannot be null or undefined");if(!nt||"function"!=typeof nt)throw new Error("listener must be a function: "+nt);var at=it.priority||0;if(!(t(tt,nt,rt)>=0)){et[tt]=et[tt]||[];var ot={callback:nt,scope:rt,priority:at};rt&&rt.getStreamId&&(ot.streamId=rt.getStreamId()),rt&&rt.getType&&(ot.mediaType=rt.getType()),it&&it.mode&&(ot.mode=it.mode);var st=et[tt].some((function(nt,rt){if(nt&&at>nt.priority)return et[tt].splice(rt,0,ot),!0}));st||et[tt].push(ot)}},off:function(tt,nt,rt){if(tt&&nt&&et[tt]){var it=t(tt,nt,rt);it<0||(et[tt][it]=null)}},trigger:function(tt){var nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},rt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(tt&&et[tt]){if((nt=nt||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");nt.type=tt,rt.streamId&&(nt.streamId=rt.streamId),rt.mediaType&&(nt.mediaType=rt.mediaType),et[tt].filter((function(et){return!(!et||rt.streamId&&et.streamId&&et.streamId!==rt.streamId||rt.mediaType&&et.mediaType&&et.mediaType!==rt.mediaType||rt.mode&&et.mode&&et.mode!==rt.mode||!et.mode&&rt.mode&&rt.mode===it.Z.EVENT_MODE_ON_RECEIVE)})).forEach((function(et){return et&&et.callback.call(et.scope,nt)}))}},reset:function(){et={}}}}a.__dashjs_factory_name="EventBus";var at=rt.Z.getSingletonFactory(a);at.EVENT_PRIORITY_LOW=0,at.EVENT_PRIORITY_HIGH=5e3,rt.Z.updateSingletonFactory(a.__dashjs_factory_name,at);const ot=at},5448:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function(){var et,tt=[],nt={},rt={};function i(et,nt){for(var rt in tt){var it=tt[rt];if(it.context===et&&it.name===nt)return it.instance}return null}function a(et,tt){return tt[et]}function o(et,tt,nt){et in nt&&(nt[et]=tt)}function s(tt,nt,rt){var it,at=tt.__dashjs_factory_name,ot=nt[at];if(ot){var st=ot.instance;if(!ot.override)return st.apply({context:nt,factory:et},rt);for(var lt in it=tt.apply({context:nt},rt),st=st.apply({context:nt,factory:et,parent:it},rt))it.hasOwnProperty(lt)&&(it[lt]=st[lt])}else it=tt.apply({context:nt},rt);return it.getClassName=function(){return at},it}return et={extend:function(et,tt,nt,rt){!rt[et]&&tt&&(rt[et]={instance:tt,override:nt})},getSingletonInstance:i,setSingletonInstance:function(et,nt,rt){for(var it in tt){var at=tt[it];if(at.context===et&&at.name===nt)return void(tt[it].instance=rt)}tt.push({name:nt,context:et,instance:rt})},deleteSingletonInstances:function(et){tt=tt.filter((function(tt){return tt.context!==et}))},getSingletonFactory:function(et){var rt=a(et.__dashjs_factory_name,nt);return rt||(rt=function(nt){var rt;return void 0===nt&&(nt={}),{getInstance:function(){return rt||(rt=i(nt,et.__dashjs_factory_name)),rt||(rt=s(et,nt,arguments),tt.push({name:et.__dashjs_factory_name,context:nt,instance:rt})),rt}}},nt[et.__dashjs_factory_name]=rt),rt},getSingletonFactoryByName:function(et){return a(et,nt)},updateSingletonFactory:function(et,tt){o(et,tt,nt)},getClassFactory:function(et){var tt=a(et.__dashjs_factory_name,rt);return tt||(tt=function(tt){return void 0===tt&&(tt={}),{create:function(){return s(et,tt,arguments)}}},rt[et.__dashjs_factory_name]=tt),tt},getClassFactoryByName:function(et){return a(et,rt)},updateClassFactory:function(et,tt){o(et,tt,rt)}}}()},1264:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>dt});var rt=nt(5448),it=nt(703),at=nt(6398),ot=nt(3393),st=nt(7855),lt=nt(5595),ft=nt(8512);function c(et){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function f(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function d(){var et,tt,nt=this.context,rt=(0,lt.Z)(nt).getInstance(),dt={"streaming.delay.liveDelay":ft.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":ft.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":ft.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},pt={debug:{logLevel:at.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,extendSegmentedCues:!0,webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:ot.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:ot.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:ot.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:ot.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(et={},f(et,st.w.MPD_TYPE,500),f(et,st.w.XLINK_EXPANSION_TYPE,500),f(et,st.w.MEDIA_SEGMENT_TYPE,1e3),f(et,st.w.INIT_SEGMENT_TYPE,1e3),f(et,st.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),f(et,st.w.INDEX_SEGMENT_TYPE,1e3),f(et,st.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),f(et,st.w.LICENSE,1e3),f(et,st.w.OTHER_TYPE,1e3),f(et,"lowLatencyReductionFactor",10),et),retryAttempts:(tt={},f(tt,st.w.MPD_TYPE,3),f(tt,st.w.XLINK_EXPANSION_TYPE,1),f(tt,st.w.MEDIA_SEGMENT_TYPE,3),f(tt,st.w.INIT_SEGMENT_TYPE,3),f(tt,st.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),f(tt,st.w.INDEX_SEGMENT_TYPE,3),f(tt,st.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),f(tt,st.w.LICENSE,3),f(tt,st.w.OTHER_TYPE,3),f(tt,"lowLatencyMultiplyFactor",5),tt),abr:{movingAverageMethod:ot.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:ot.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:ot.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:ot.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},yt=it.Z.clone(pt);return{get:function(){return yt},update:function(et){"object"===c(et)&&function p(et,tt,nt){for(var at in et)et.hasOwnProperty(at)&&(tt.hasOwnProperty(at)?"object"!==c(et[at])||et[at]instanceof Array||null===et[at]?(tt[at]=it.Z.clone(et[at]),dt[nt+at]&&rt.trigger(dt[nt+at])):p(et[at],tt[at],nt.slice()+at+"."):console.error("Settings parameter "+nt+at+" is not supported"))}(et,yt,"")},reset:function(){yt=it.Z.clone(pt)}}}d.__dashjs_factory_name="Settings";const dt=rt.Z.getSingletonFactory(d)},703:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(3875),it=nt.n(rt),at=nt(1067);function o(et){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}const ot=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e)}var et;return(et=[{key:"mixin",value:function(et,tt,nt){var rt,it={};if(et)for(var at in tt)tt.hasOwnProperty(at)&&(rt=tt[at],at in et&&(et[at]===rt||at in it&&it[at]===rt)||("object"===o(et[at])&&null!==et[at]?et[at]=e.mixin(et[at],rt,nt):et[at]=nt(rt)));return et}},{key:"clone",value:function(et){if(!et||"object"!==o(et))return et;var tt;if(et instanceof Array){tt=[];for(var nt=0,rt=et.length;nt<rt;++nt)nt in et&&tt.push(e.clone(et[nt]))}else tt={};return e.mixin(tt,et,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(et,tt){try{if(!tt||0===tt.length)return et;var nt=new URL(et);return tt.forEach((function(et){et.key&&et.value&&nt.searchParams.set(et.key,et.value)})),nt.href}catch(tt){return et}}},{key:"parseHttpHeaders",value:function(et){var tt={};if(!et)return tt;for(var nt=et.trim().split("\r\n"),rt=0,it=nt.length;rt<it;rt++){var at=nt[rt],ot=at.indexOf(": ");ot>0&&(tt[at.substring(0,ot)]=at.substring(ot+2))}return tt}},{key:"generateUuid",value:function(){var et=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(tt){var nt=(et+16*Math.random())%16|0;return et=Math.floor(et/16),("x"==tt?nt:3&nt|8).toString(16)}))}},{key:"generateHashCode",value:function(et){var tt=0;if(0===et.length)return tt;for(var nt=0;nt<et.length;nt++)tt=(tt<<5)-tt+et.charCodeAt(nt),tt|=0;return tt}},{key:"getRelativeUrl",value:function(et,tt){try{var nt=new URL(et),rt=new URL(tt);if(nt.protocol=rt.protocol,nt.origin!==rt.origin)return tt;var at=it().relative(nt.pathname.substr(0,nt.pathname.lastIndexOf("/")),rt.pathname.substr(0,rt.pathname.lastIndexOf("/"))),ot=0===at.length?1:0;return at+=rt.pathname.substr(rt.pathname.lastIndexOf("/")+ot,rt.pathname.length-1),rt.pathname.length<at.length?rt.pathname:at}catch(et){return tt}}},{key:"parseUserAgent",value:function(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var tt=null===et&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,at.UAParser)(tt)}catch(et){return{}}}}])&&function s(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e,et),e}()},2032:(et,tt,nt)=>{"use strict";function r(){return"4.7.0"}nt.d(tt,{e:()=>r})},2230:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e)}var et;return(et=[{key:"extend",value:function(et,tt){if(et){var nt=!!tt&&tt.override,rt=!!tt&&tt.publicOnly;for(var it in et)!et.hasOwnProperty(it)||this[it]&&!nt||rt&&-1===et[it].indexOf("public_")||(this[it]=et[it])}}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}()},4351:(et,tt,nt)=>{"use strict";function r(et){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function i(et,tt){return(i=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function a(et,tt){return!tt||"object"!==r(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function o(et){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}nt.d(tt,{Z:()=>rt});const rt=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&i(et,tt)}(s,et);var tt,nt,rt=(tt=s,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=o(tt);if(nt){var it=o(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return a(this,et)});function s(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,s),(et=rt.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",et.BUFFERING_COMPLETED="bufferingCompleted",et.BUFFER_CLEARED="bufferCleared",et.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",et.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",et.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",et.CMSD_STATIC_HEADER="cmsdStaticHeader",et.CURRENT_TRACK_CHANGED="currentTrackChanged",et.DATA_UPDATE_COMPLETED="dataUpdateCompleted",et.INBAND_EVENTS="inbandEvents",et.INITIAL_STREAM_SWITCH="initialStreamSwitch",et.INIT_FRAGMENT_LOADED="initFragmentLoaded",et.INIT_FRAGMENT_NEEDED="initFragmentNeeded",et.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",et.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",et.LOADING_COMPLETED="loadingCompleted",et.LOADING_PROGRESS="loadingProgress",et.LOADING_DATA_PROGRESS="loadingDataProgress",et.LOADING_ABANDONED="loadingAborted",et.MANIFEST_UPDATED="manifestUpdated",et.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",et.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",et.QUOTA_EXCEEDED="quotaExceeded",et.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",et.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",et.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",et.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",et.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",et.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",et.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",et.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",et.SOURCE_BUFFER_ERROR="sourceBufferError",et.STREAMS_COMPOSED="streamsComposed",et.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",et.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",et.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",et.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",et.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",et.URL_RESOLUTION_FAILED="urlResolutionFailed",et.VIDEO_CHUNK_RECEIVED="videoChunkReceived",et.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",et.XLINK_ELEMENT_LOADED="xlinkElementLoaded",et.XLINK_READY="xlinkReady",et.SEEK_TARGET="seekTarget",et.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",et.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",et.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",et.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",et.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",et}return s}(nt(8342).Z)},8512:(et,tt,nt)=>{"use strict";function r(et){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function i(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}function a(et,tt){return(a=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function o(et,tt){return!tt||"object"!==r(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function s(et){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}nt.d(tt,{Z:()=>rt});const rt=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&a(et,tt)}(u,et);var tt,nt,rt=(tt=u,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=s(tt);if(nt){var it=s(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return o(this,et)});function u(){return i(this,u),rt.apply(this,arguments)}return u}(nt(4351).Z))},8342:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e)}var et;return(et=[{key:"extend",value:function(et,tt){if(et){var nt=!!tt&&tt.override,rt=!!tt&&tt.publicOnly;for(var it in et)!et.hasOwnProperty(it)||this[it]&&!nt||rt&&-1===et[it].indexOf("public_")||(this[it]=et[it])}}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}()},9326:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ft});var rt=nt(3186),it=nt(7855),at=nt(5448),ot=nt(8825),st=nt(7387),lt=nt(1553);function l(et){var tt,nt,at,ft,dt,pt=(et=et||{}).eventBus,yt=et.debug,vt=et.urlUtils,At=et.type,Rt=et.streamInfo,Nt=et.segmentsController,Dt=et.timelineConverter,Ot=et.baseURLController;function v(){return At}function _(){at=null}function T(et,tt,nt){var rt,it,at=Ot.resolve(nt.path),ot={};return at&&tt!==at.url&&vt.isRelative(tt)?(rt=at.url,it=at.serviceLocation,ot=at.queryParams,tt&&(rt=vt.resolve(tt,rt))):rt=tt,!vt.isRelative(rt)&&(et.url=rt,et.serviceLocation=it,et.queryParams=ot,!0)}function S(et,tt){if(null==tt)return null;var nt=new rt.Z,at=tt.representation,ot=at.adaptation.period.mpd.manifest.Period_asArray[at.adaptation.period.index].AdaptationSet_asArray[at.adaptation.index].Representation_asArray[at.index].bandwidth,lt=tt.media;return lt=(0,st.vi)(lt,"Number",tt.replacementNumber),lt=(0,st.vi)(lt,"Time",tt.replacementTime),lt=(0,st.vi)(lt,"Bandwidth",ot),lt=(0,st.Aj)(lt,at.id),lt=(0,st.eR)(lt),nt.mediaType=v(),nt.type=it.w.MEDIA_SEGMENT_TYPE,nt.range=tt.mediaRange,nt.startTime=tt.presentationStartTime,nt.mediaStartTime=tt.mediaStartTime,nt.duration=tt.duration,nt.timescale=at.timescale,nt.availabilityStartTime=tt.availabilityStartTime,nt.availabilityEndTime=tt.availabilityEndTime,nt.availabilityTimeComplete=at.availabilityTimeComplete,nt.wallStartTime=tt.wallStartTime,nt.quality=at.index,nt.index=tt.index,nt.mediaInfo=et,nt.adaptationIndex=at.adaptation.index,nt.representationId=at.id,T(nt,lt,at)?nt:void 0}function b(et,tt,rt){var it=null;if(!tt||!tt.segmentInfoType)return it;var ot=Nt.getSegmentByTime(tt,rt);return ot&&(at=ot,nt.debug("Index for time "+rt+" is "+ot.index),it=S(et,ot)),it}function A(){nt.debug("Dynamic stream complete"),dt=!0}return tt={initialize:function(et){ft=et,dt=!1,Nt.initialize(et)},getStreamId:function(){return Rt.id},getType:v,getStreamInfo:function(){return Rt},getInitRequest:function(et,tt){return tt?function(et,tt,nt){var at=new rt.Z,ot=tt.adaptation.period,lt=ot.start;if(at.mediaType=nt,at.type=it.w.INIT_SEGMENT_TYPE,at.range=tt.range,at.availabilityStartTime=Dt.calcAvailabilityStartTimeFromPresentationTime(lt,tt,ft),at.availabilityEndTime=Dt.calcAvailabilityEndTimeFromPresentationTime(lt+ot.duration,tt,ft),at.quality=tt.index,at.mediaInfo=et,at.representationId=tt.id,T(at,tt.initialization,tt))return at.url=(0,st.vi)(at.url,"Bandwidth",tt.bandwidth),at}(et,tt,v()):null},getSegmentRequestForTime:b,getCurrentIndex:function(){return at?at.index:-1},getNextSegmentRequest:function(et,tt){var rt=null;if(!tt||!tt.segmentInfoType)return null;var it=at?at.index+1:0,ot=Nt.getSegmentByIndex(tt,it,at?at.mediaStartTime:-1);if(ot)rt=S(et,ot),at=ot;else{if(ft&&!dt)return nt.debug(v()+" No segment found at index: "+it+". Wait for next loop"),null;dt=!0}return rt},isLastSegmentRequested:function(et,tt){if(!et||!at)return!1;if(dt)return!0;if(!isFinite(et.adaptation.period.duration))return!1;if(at.presentationStartTime+at.duration>tt)return!1;if(et.mediaFinishedInformation&&!isNaN(et.mediaFinishedInformation.numberOfSegments)&&!isNaN(at.index)&&at.index>=et.mediaFinishedInformation.numberOfSegments-1){if(!ft||et.segmentInfoType===lt.Z.SEGMENT_TEMPLATE)return!0;if(ft&&et.segmentInfoType===lt.Z.SEGMENT_LIST&&et.adaptation.period.nextPeriodId)return!0}return!!(ft&&et.adaptation.period.nextPeriodId&&et.segmentInfoType===lt.Z.SEGMENT_TIMELINE&&et.mediaFinishedInformation&&!isNaN(et.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&at&&!isNaN(at.mediaStartTime)&&!isNaN(at.duration)&&at.mediaStartTime+at.duration>=et.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},reset:function(){_(),pt.off(ot.Z.DYNAMIC_TO_STATIC,A,tt)},getNextSegmentRequestIdempotent:function(et,tt){var nt=at?at.index+1:0,rt=Nt.getSegmentByIndex(tt,nt,at?at.mediaStartTime:-1);return rt?S(et,rt):null},getValidTimeAheadOfTargetTime:function(et,tt,nt,rt){try{if(isNaN(et)||!tt||!nt)return NaN;if(et<0&&(et=0),isNaN(rt)&&(rt=.5),b(tt,nt,et))return et;if(nt.adaptation.period.start+nt.adaptation.period.duration<et)return NaN;for(var it=isFinite(nt.adaptation.period.duration)?nt.adaptation.period.start+nt.adaptation.period.duration:et+30,at=Math.min(et+rt,it),ot=NaN,st=null;at<=it;){var lt=null;if(at<=it&&(lt=b(tt,nt,at)),lt){ot=at,st=lt;break}at+=rt}if(st){var ft=st.startTime+st.duration;return et>st.startTime&&ft-et>rt?et:!isNaN(st.startTime)&&et<st.startTime&&ot>st.startTime?st.startTime+.001:Math.min(ft-rt,ot)}return ot}catch(et){return NaN}}},nt=yt.getLogger(tt),_(),pt.on(ot.Z.DYNAMIC_TO_STATIC,A,tt),tt}l.__dashjs_factory_name="DashHandler";const ft=at.Z.getClassFactory(l)},1553:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=new(function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var et;return(et=[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.SUPPLEMENTAL_PROPERTY_ASARRAY="SupplementalProperty_asArray",this.INBAND_EVENT_STREAM="InbandEventStream",this.PRODUCER_REFERENCE_TIME="ProducerReferenceTime",this.INBAND="inband",this.TYPE="type",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.VIEWPOINT_ASARRAY="Viewpoint_asArray",this.ROLE_ASARRAY="Role_asArray",this.REPRESENTATION_ASARRAY="Representation_asArray",this.PRODUCERREFERENCETIME_ASARRAY="ProducerReferenceTime_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.SERVICE_DESCRIPTION_OPERATING_QUALITY="OperatingQuality",this.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH="OperatingBandwidth",this.PATCH_LOCATION="PatchLocation",this.PATCH_LOCATION_AS_ARRAY="PatchLocation_asArray",this.LOCATION="Location",this.LOCATION_AS_ARRAY="Location_asArray",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId",this.WALL_CLOCK_TIME="wallClockTime",this.PRESENTATION_TIME="presentationTime",this.LABEL="Label",this.GROUP_LABEL="GroupLabel",this.CONTENT_STEERING="ContentSteering",this.CONTENT_STEERING_AS_ARRAY="ContentSteering_asArray",this.DEFAULT_SERVICE_LOCATION="defaultServiceLocation",this.QUERY_BEFORE_START="queryBeforeStart",this.CLIENT_REQUIREMENT="clientRequirement",this.TTL="ttl",this.CONTENT_STEERING_RESPONSE={VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},this.PRODUCER_REFERENCE_TIME_TYPE={ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},this.SEGMENT_ALIGNMENT="segmentAlignment",this.SUB_SEGMENT_ALIGNMENT="subsegmentAlignment"}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}())},7802:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>lt});var rt=nt(5448),it=nt(1724),at=nt(3636),ot=nt(1736),st=nt(5246);function u(et){et=et||{};var tt,nt,rt=this.context,lt=et.dashConstants,ft=et.type,dt=et.segmentBaseController;function f(et){return et?et.segments?nt[lt.SEGMENT_BASE]:nt[et.segmentInfoType]:null}return tt={initialize:function(tt){nt[lt.SEGMENT_TIMELINE]=(0,it.Z)(rt).create(et,tt),nt[lt.SEGMENT_TEMPLATE]=(0,at.Z)(rt).create(et,tt),nt[lt.SEGMENT_LIST]=(0,ot.Z)(rt).create(et,tt),nt[lt.SEGMENT_BASE]=(0,st.Z)(rt).create(et,tt)},updateInitData:function(et,tt){return tt?Promise.resolve():dt.getSegmentBaseInitSegment({representation:et,mediaType:ft})},updateSegmentData:function(et,tt){return tt?Promise.resolve():dt.getSegmentList({mimeType:et.mimeType,representation:et,mediaType:ft})},getSegmentByIndex:function(et,tt,nt){var rt=f(et);return rt?rt.getSegmentByIndex(et,tt,nt):null},getSegmentByTime:function(et,tt){var nt=f(et);return nt?nt.getSegmentByTime(et,tt):null},getMediaFinishedInformation:function(et){var tt=f(et);return tt?tt.getMediaFinishedInformation(et):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},nt={},tt}u.__dashjs_factory_name="SegmentsController";const lt=rt.Z.getClassFactory(u)},1736:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(3393),at=nt(7387);function o(et,tt){var nt=(et=et||{}).timelineConverter;function r(){if(!nt||!nt.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(it.Z.MISSING_CONFIG_ERROR)}function o(et,rt){if(r(),!et)return null;var it=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentList,ot=it.SegmentURL_asArray.length,st=et&&!isNaN(et.startNumber)?et.startNumber:1,lt=Math.max(st-1,0),ft=Math.max(rt-lt,0),dt=null;if(ft<ot){var pt=it.SegmentURL_asArray[ft];(dt=(0,at.NF)(nt,tt,et,rt))&&(dt.replacementTime=(st+rt-1)*et.segmentDuration,dt.media=pt.media?pt.media:"",dt.mediaRange=pt.mediaRange,dt.indexRange=pt.indexRange)}return dt}return{getSegmentByIndex:o,getSegmentByTime:function(et,tt){if(r(),!et)return null;var rt=et.segmentDuration;if(isNaN(rt))return null;var it=nt.calcPeriodRelativeTimeFromMpdRelativeTime(et,tt);return o(et,Math.floor(it/rt))},getMediaFinishedInformation:function(et){var tt={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!et)return tt;var nt=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentList,rt=et&&!isNaN(et.startNumber)?et.startNumber:1,it=Math.max(rt-1,0);return tt.numberOfSegments=it+nt.SegmentURL_asArray.length,tt}}}o.__dashjs_factory_name="ListSegmentsGetter";const ot=rt.Z.getClassFactory(o)},5246:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(3393);function a(et){var tt=(et=et||{}).timelineConverter;function n(){if(!tt||!tt.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(it.Z.MISSING_CONFIG_ERROR)}function r(et,tt){if(n(),!et)return null;var nt,rt=et.segments?et.segments.length:-1;if(tt<rt&&(nt=et.segments[tt])&&nt.index===tt)return nt;for(var it=0;it<rt;it++)if((nt=et.segments[it])&&nt.index===tt)return nt;return null}return{getSegmentByIndex:r,getSegmentByTime:function(et,tt){n();var nt=function(et,tt){if(!et)return-1;var nt,rt,it,at,ot,st=et.segments,lt=st?st.length:null,ft=-1;if(st&&lt>0)for(ot=0;ot<lt;ot++)if(it=(rt=st[ot]).presentationStartTime,tt+(nt=(at=rt.duration)/2)>=it&&tt-nt<it+at){ft=rt.index;break}return ft}(et,tt);return r(et,nt)},getMediaFinishedInformation:function(et){var tt={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return et&&et.segments?(tt.numberOfSegments=et.segments.length,tt):tt}}}a.__dashjs_factory_name="SegmentBaseGetter";const at=rt.Z.getClassFactory(a)},7387:(et,tt,nt)=>{"use strict";nt.d(tt,{Aj:()=>o,NF:()=>c,TJ:()=>f,eR:()=>a,vi:()=>s});var rt=nt(2011);function i(et,tt){for(;et.length<tt;)et="0"+et;return et}function a(et){return et?et.split("$$").join("$"):et}function o(et,tt){if(!tt||!et||-1===et.indexOf("$RepresentationID$"))return et;var nt=tt.toString();return et.split("$RepresentationID$").join(nt)}function s(et,tt,nt){var rt,it,at,ot,st,lt,ft=tt.length,dt="%0".length;if(!et)return et;for(;;){if((rt=et.indexOf("$"+tt))<0)return et;if((it=et.indexOf("$",rt+ft))<0)return et;if((at=et.indexOf("%0",rt+ft))>rt&&at<it)switch(ot=et.charAt(it-1),st=parseInt(et.substring(at+dt,it-1),10),ot){case"d":case"i":case"u":lt=i(nt.toString(),st);break;case"x":lt=i(nt.toString(16),st);break;case"X":lt=i(nt.toString(16),st).toUpperCase();break;case"o":lt=i(nt.toString(8),st);break;default:return et}else lt=nt;et=et.substring(0,rt)+lt+et.substring(it+1)}}function u(et,tt,nt,it,at,ot,st,lt){var ft,dt=new rt.Z;return dt.representation=et,dt.duration=tt,dt.presentationStartTime=nt,dt.mediaStartTime=it,dt.availabilityStartTime=at.calcAvailabilityStartTimeFromPresentationTime(ot,et,st),dt.availabilityEndTime=at.calcAvailabilityEndTimeFromPresentationTime(ot+tt,et,st),dt.wallStartTime=at.calcWallTimeForSegment(dt,st),dt.replacementNumber=(ft=lt,dt.representation.startNumber+ft),dt.index=lt,dt}function l(et,tt,nt,rt){var it=tt.adaptation.period;if(isFinite(it.duration)&&it.start+it.duration<=nt.presentationStartTime)return!1;if(rt){if("INF"===tt.availabilityTimeOffset)return!0;var at=et.getClientReferenceTime();return nt.availabilityStartTime.getTime()<=at&&(!isFinite(nt.availabilityEndTime)||nt.availabilityEndTime.getTime()>=at)}return!0}function c(et,tt,nt,rt){var it,at,ot;it=nt.segmentDuration,isNaN(it)&&(it=nt.adaptation.period.duration),at=parseFloat((nt.adaptation.period.start+rt*it).toFixed(5)),ot=parseFloat((at+it).toFixed(5));var st=u(nt,it,at,et.calcMediaTimeFromPresentationTime(at,nt),et,ot,tt,rt);return l(et,nt,st,tt)?st:null}function f(et,tt,nt,rt,it,at,ot,st,lt,ft){var dt,pt,yt=rt/at,vt=it/at;return dt=et.calcPresentationTimeFromMediaTime(yt,nt),l(et,nt,pt=u(nt,vt,dt,yt,et,dt+vt,tt,lt),tt)?(pt.replacementTime=ft||rt,ot=s(ot,"Number",pt.replacementNumber),ot=s(ot,"Time",pt.replacementTime),pt.media=ot,pt.mediaRange=st,pt):null}},3636:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(3393),at=nt(7387);function o(et,tt){var nt=(et=et||{}).timelineConverter;function r(){if(!nt||!nt.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(it.Z.MISSING_CONFIG_ERROR)}function o(et,rt){if(r(),!et)return null;var it=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentTemplate;rt=Math.max(rt,0);var ot=(0,at.NF)(nt,tt,et,rt);if(ot){ot.replacementTime=Math.round((rt-1)*et.segmentDuration*et.timescale,10);var st=it.media;st=(0,at.vi)(st,"Number",ot.replacementNumber),st=(0,at.vi)(st,"Time",ot.replacementTime),ot.media=st}return ot}return{getSegmentByIndex:o,getSegmentByTime:function(et,tt){if(r(),!et)return null;var rt=et.segmentDuration;if(isNaN(rt))return null;var it=nt.calcPeriodRelativeTimeFromMpdRelativeTime(et,tt);return o(et,Math.floor(it/rt))},getMediaFinishedInformation:function(et){var tt={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!et)return tt;var nt=et.segmentDuration;return isNaN(nt)?tt.numberOfSegments=1:tt.numberOfSegments=Math.ceil(et.adaptation.period.duration/nt),tt}}}o.__dashjs_factory_name="TemplateSegmentsGetter";const ot=rt.Z.getClassFactory(o)},1724:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(3393),at=nt(7387);function o(et,tt){var nt=(et=et||{}).timelineConverter,rt=et.dashMetrics;function o(){if(!nt)throw new Error(it.Z.MISSING_CONFIG_ERROR)}function s(et,tt){var nt,rt,it,at,ot,st,lt,ft=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentTemplate||et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentList,dt=ft.SegmentTimeline,pt=ft.SegmentURL_asArray,yt=0,vt=-1;lt=et.timescale;var At=!1;for(it=0,at=(nt=dt.S_asArray).length;it<at&&!At;it++)for(st=0,(rt=nt[it]).hasOwnProperty("r")&&(st=rt.r),rt.hasOwnProperty("t")&&(yt=rt.t),st<0&&(st=u(et,nt[it+1],rt,lt,yt/lt)),ot=0;ot<=st&&!At;ot++)(At=tt(yt,ft,pt,rt,lt,++vt,it))&&(et.segmentDuration=rt.d/lt),yt+=rt.d}function u(et,tt,it,at,ot){var st;if(tt&&tt.hasOwnProperty("t"))st=tt.t/at;else try{var lt=0;if(isNaN(et.adaptation.period.start)||isNaN(et.adaptation.period.duration)||!isFinite(et.adaptation.period.duration)){var ft=rt.getCurrentDVRInfo();lt=isNaN(ft.end)?0:ft.end}else lt=et.adaptation.period.start+et.adaptation.period.duration;st=nt.calcMediaTimeFromPresentationTime(lt,et),et.segmentDuration=it.d/at}catch(et){st=0}return Math.max(Math.ceil((st-ot)/(it.d/at))-1,0)}return{getSegmentByIndex:function(et,rt,it){if(o(),!et)return null;var ot=null,st=!1;return s(et,(function(rt,lt,ft,dt,pt,yt,vt){if(st||it<0){var At=lt.media,Rt=dt.mediaRange;return ft&&(At=ft[vt].media||"",Rt=ft[vt].mediaRange),ot=(0,at.TJ)(nt,tt,et,rt,dt.d,pt,At,Rt,yt,dt.tManifest),!0}return rt>=it*pt-.5*dt.d&&(st=!0),!1})),ot},getSegmentByTime:function(et,rt){if(o(),!et)return null;void 0===rt&&(rt=null);var it=null,ot=nt.calcMediaTimeFromPresentationTime(rt,et);return s(et,(function(rt,st,lt,ft,dt,pt,yt){var vt=parseFloat((ot*dt).toPrecision(15));if(vt<rt+ft.d&&vt>=rt){var At=st.media,Rt=ft.mediaRange;return lt&&(At=lt[yt].media||"",Rt=lt[yt].mediaRange),it=(0,at.TJ)(nt,tt,et,rt,ft.d,dt,At,Rt,pt,ft.tManifest),!0}return!1})),it},getMediaFinishedInformation:function(et){if(!et)return 0;var tt,nt,rt,it,at,ot,st,lt=(et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentTemplate||et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index].Representation_asArray[et.index].SegmentList).SegmentTimeline,ft=0,dt=0,pt=0;for(st=et.timescale,it=(tt=lt.S_asArray).length,rt=0;rt<it;rt++)for(ot=0,(nt=tt[rt]).hasOwnProperty("r")&&(ot=nt.r),nt.hasOwnProperty("t")&&(dt=(ft=nt.t)/st),ot<0&&(ot=u(et,tt[rt+1],nt,st,dt)),at=0;at<=ot;at++)pt++,dt=(ft+=nt.d)/st;return{numberOfSegments:pt,mediaTimeOfLastSignaledSegment:dt}}}}o.__dashjs_factory_name="TimelineSegmentsGetter";const ot=rt.Z.getClassFactory(o)},2011:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.wallStartTime=NaN,this.representation=null}},2610:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},7688:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>es});var rt=nt(452),it=nt.n(rt),at=nt(3393),ot=nt(1553),st=nt(3860),lt=nt(5595),ft=nt(8512),dt=nt(5448),pt=nt(6398),yt=nt(8825);function g(){var et,tt,nt,rt,it,ot,dt,vt,At,Rt,Nt,Dt,Ot,Mt,Lt,xt,kt,Ut,Bt,Gt,qt,jt,Vt,zt,Xt=this.context,Qt=(0,lt.Z)(Xt).getInstance();function M(){F(),Mt=!1,Rt=0,Nt=0,xt=0,jt=!1,kt=!0,Ut=!1,Vt=!1,Bt=NaN,dt&&(Qt.off(ft.Z.DATA_UPDATE_COMPLETED,Q,et),Qt.off(ft.Z.LOADING_PROGRESS,me,et),Qt.off(ft.Z.MANIFEST_UPDATED,_e,et),Qt.off(ft.Z.STREAMS_COMPOSED,Te,et),Qt.off(yt.Z.PLAYBACK_ENDED,he,et),Qt.off(yt.Z.STREAM_INITIALIZING,Ee,et),Qt.off(yt.Z.REPRESENTATION_SWITCH,ve,et),Qt.off(yt.Z.BUFFER_LEVEL_STATE_CHANGED,ee,et),X(),dt.removeEventListener("canplay",J),dt.removeEventListener("canplaythrough",$),dt.removeEventListener("play",te),dt.removeEventListener("waiting",ne),dt.removeEventListener("playing",re),dt.removeEventListener("pause",ie),dt.removeEventListener("error",pe),dt.removeEventListener("seeking",ae),dt.removeEventListener("seeked",oe),dt.removeEventListener("timeupdate",se),dt.removeEventListener("progress",ue),dt.removeEventListener("ratechange",le),dt.removeEventListener("loadedmetadata",ce),dt.removeEventListener("loadeddata",fe),dt.removeEventListener("stalled",ye),dt.removeEventListener("ended",de),dt.removeEventListener("volumechange",ge)),At=null,dt=null,Dt=null,Ot=null}function P(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return parseFloat((L(et)-B()).toFixed(5))}function L(et){var tt=et||Dt;return tt.start+tt.duration}function x(){var et=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Dt&&dt&&dt.getElement()?(et&&Ot&&Z(B()),dt.play()):Mt=!0}function F(){Dt&&dt&&dt.pause()}function k(et){var nt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],rt=arguments.length>2&&void 0!==arguments[2]&&arguments[2],it=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Dt&&dt&&dt.getElement()){var at=isNaN(Bt)?dt.getTime():Bt;et!==at&&((Gt=!0===rt)||(Bt=et),tt.info("Requesting seek to time: "+et+(Gt?" (internal)":"")),Ot&&it&&Z(et),dt.setCurrentTime(et,nt))}}function U(){if(Dt&&dt&&Ot){var et=nt&&nt.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,tt=it.getCurrentDVRInfo(et);return tt&&tt.range?tt.range.end:0}}function Z(et){var tt=new Date(vt.getClientReferenceTime()),nt=ot.getRegularPeriods()[0],rt=vt.calcPresentationTimeFromWallTime(tt,nt);Rt=rt-et}function B(){return Dt&&dt?dt.getTime():null}function G(){return Dt&&dt?dt.isPaused():null}function q(){return Dt&&dt?dt.isSeeking():null}function Y(){return Dt&&dt?dt.isStalled():null}function j(){return Dt&&dt?dt.getPlaybackRate():null}function H(){return Dt&&dt?dt.getEnded():null}function V(){return Ot}function K(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!G()&&Ot&&0!==dt.getReadyState()&&!q()&&!jt){et||(et=nt.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO);var rt=B(),it=z(rt,et),ot=!isNaN(it)&&it!==rt;ot&&!q()&&(Y()||qt||1===dt.getReadyState())&&(tt.debug("UpdateCurrentTime: Seek to actual time: ".concat(it," from currentTime: ").concat(rt)),k(it,!1,!1))}}function z(et,tt){var nt=it.getCurrentDVRInfo(tt),rt=nt?nt.range:null;return rt?et>rt.end?Math.max(rt.end-Rt,rt.start):et>0&&et+.25<rt.start&&Math.abs(et-rt.start)<31536e4?Ut?Math.max(rt.end-Rt,rt.start):rt.start:et:NaN}function W(){null===At&&(At=setInterval((function(){var et;Qt.trigger(ft.Z.WALLCLOCK_TIME_UPDATED,{isDynamic:Ot,time:new Date}),V()&&(nt.addDVRMetric(),G()?(et=Date.now(),(!Lt||et>Lt+500)&&(Lt=et,se())):K())}),zt.get().streaming.wallclockTimeUpdateInterval))}function X(){clearInterval(At),At=null}function Q(et){var tt=ot.convertRepresentationToRepresentationInfo(et.currentRepresentation),nt=tt?tt.mediaInfo.streamInfo:null;null!==nt&&Dt.id===nt.id&&(Dt=nt)}function J(){Qt.trigger(ft.Z.CAN_PLAY)}function $(){Qt.trigger(ft.Z.CAN_PLAY_THROUGH)}function ee(et){et.streamId===nt.getActiveStreamInfo().id&&(qt=et.state===st.Z.BUFFER_EMPTY,zt.get().streaming.buffer.setStallState&&dt.setStallState(et.mediaType,et.state===st.Z.BUFFER_EMPTY))}function te(){tt.info("Native video element event: play"),K(),W(),Qt.trigger(ft.Z.PLAYBACK_STARTED,{startTime:B()})}function ne(){tt.info("Native video element event: waiting"),Qt.trigger(ft.Z.PLAYBACK_WAITING,{playingTime:B()})}function re(){tt.info("Native video element event: playing"),Gt=!1,Qt.trigger(ft.Z.PLAYBACK_PLAYING,{playingTime:B()})}function ie(){tt.info("Native video element event: pause"),Qt.trigger(ft.Z.PLAYBACK_PAUSED,{ended:H()})}function ae(){if(!Gt){var et=B();isNaN(Bt)||Bt===et||(et=Bt),Bt=NaN,tt.info("Seeking to: "+et),W(),Qt.trigger(ft.Z.PLAYBACK_SEEKING,{seekTime:et,streamId:Dt.id})}}function oe(){tt.info("Native video element event: seeked"),Gt=!1,Qt.trigger(ft.Z.PLAYBACK_SEEKED)}function se(){Dt&&Qt.trigger(ft.Z.PLAYBACK_TIME_UPDATED,{timeToEnd:P(),time:B(),streamId:Dt.id})}function ue(){Qt.trigger(ft.Z.PLAYBACK_PROGRESS,{streamId:Dt.id})}function le(){var et=j();tt.info("Native video element event: ratechange: ",et),Qt.trigger(ft.Z.PLAYBACK_RATE_CHANGED,{playbackRate:et})}function ce(){tt.info("Native video element event: loadedmetadata"),Qt.trigger(ft.Z.PLAYBACK_METADATA_LOADED),W()}function fe(){tt.info("Native video element event: loadeddata"),Qt.trigger(ft.Z.PLAYBACK_LOADED_DATA)}function de(){tt.info("Native video element event: ended"),F(),X();var et=nt?nt.getActiveStreamInfo():null;et&&Qt.trigger(ft.Z.PLAYBACK_ENDED,{isLast:et.isLast})}function ge(){Qt.trigger(ft.Z.PLAYBACK_VOLUME_CHANGED)}function he(et){if(At&&et.isLast){tt.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var nt=et.seekTime?et.seekTime:L();dt.setCurrentTime(nt),F(),X()}}function pe(et){var tt=et.target||et.srcElement;Qt.trigger(ft.Z.PLAYBACK_ERROR,{error:tt.error})}function me(et){if(!1===et.stream&&Ut&&!isNaN(et.request.duration)){var nt=1.2*et.request.duration;nt>Rt&&(tt.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",nt.toFixed(2)),Rt=nt,Nt=nt)}}function ye(et){Qt.trigger(ft.Z.PLAYBACK_STALLED,{e:et})}function Ee(et){var nt;(nt=et.mediaInfo)&&nt.supplementalProperties&&"true"===nt.supplementalProperties[at.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&(tt.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),Ut=!0)}function ve(et){var tt=nt.getActiveStreamInfo();et&&tt&&et.currentRepresentation&&et.streamId&&et.streamId===tt.id&&et.mediaType&&(et.mediaType===at.Z.VIDEO||et.mediaType===at.Z.AUDIO)&&(kt=et.currentRepresentation.availabilityTimeComplete,(Ut=!kt)&&!Vt&&(Vt=!0))}function _e(){jt=!0}function Te(){jt=!1}return et={initialize:function(tt,nt){Dt=tt,!0!==nt&&(dt.addEventListener("canplay",J),dt.addEventListener("canplaythrough",$),dt.addEventListener("play",te),dt.addEventListener("waiting",ne),dt.addEventListener("playing",re),dt.addEventListener("pause",ie),dt.addEventListener("error",pe),dt.addEventListener("seeking",ae),dt.addEventListener("seeked",oe),dt.addEventListener("timeupdate",se),dt.addEventListener("progress",ue),dt.addEventListener("ratechange",le),dt.addEventListener("loadedmetadata",ce),dt.addEventListener("loadeddata",fe),dt.addEventListener("stalled",ye),dt.addEventListener("ended",de),dt.addEventListener("volumechange",ge),Ot=Dt.manifestInfo.isDynamic,qt=!1,Gt=!1,Qt.on(ft.Z.DATA_UPDATE_COMPLETED,Q,et),Qt.on(ft.Z.LOADING_PROGRESS,me,et),Qt.on(ft.Z.MANIFEST_UPDATED,_e,et),Qt.on(ft.Z.STREAMS_COMPOSED,Te,et),Qt.on(yt.Z.PLAYBACK_ENDED,he,et,{priority:lt.Z.EVENT_PRIORITY_HIGH}),Qt.on(yt.Z.STREAM_INITIALIZING,Ee,et),Qt.on(yt.Z.REPRESENTATION_SWITCH,ve,et),Qt.on(yt.Z.BUFFER_LEVEL_STATE_CHANGED,ee,et),Mt&&(Mt=!1,x()))},setConfig:function(et){et&&(et.streamController&&(nt=et.streamController),et.serviceDescriptionController&&(rt=et.serviceDescriptionController),et.dashMetrics&&(it=et.dashMetrics),et.adapter&&(ot=et.adapter),et.videoModel&&(dt=et.videoModel),et.timelineConverter&&(vt=et.timelineConverter),et.settings&&(zt=et.settings))},getTimeToStreamEnd:P,getBufferLevel:function(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,tt=null;return nt.getActiveStreamProcessors().forEach((function(nt){if(!et||0===et.length||-1===et.indexOf(nt.getType())){var rt=nt.getBufferLevel();tt=null===tt?rt:Math.min(tt,rt)}})),tt},getPlaybackStalled:function(){return qt},getTime:B,getLowLatencyModeEnabled:function(){return Ut},getInitialCatchupModeActivated:function(){return Vt},getIsManifestUpdateInProgress:function(){return jt},getPlaybackRate:j,getPlayedRanges:function(){return Dt&&dt?dt.getPlayedRanges():null},getEnded:H,getIsDynamic:V,getStreamController:function(){return nt},computeAndSetLiveDelay:function(et,tt){var nt,it,at,st=!isNaN(et)&&isFinite(et)?et:NaN,lt=ot.getSuggestedPresentationDelay(),ft=rt.getServiceDescriptionSettings();return nt=isNaN(zt.get().streaming.delay.liveDelay)?null===zt.get().streaming.delay.liveDelayFragmentCount||isNaN(zt.get().streaming.delay.liveDelayFragmentCount)||isNaN(st)?ft&&!isNaN(ft.liveDelay)&&ft.liveDelay>0?ft.liveDelay:!0===zt.get().streaming.delay.useSuggestedPresentationDelay&&null!==lt&&!isNaN(lt)&&lt>0?lt:isNaN(st)?tt&&!isNaN(tt.minBufferTime)?4*tt.minBufferTime:4*Dt.manifestInfo.minBufferTime:4*st:st*zt.get().streaming.delay.liveDelayFragmentCount:zt.get().streaming.delay.liveDelay,null!==(at=ot.getAvailabilityStartTime())&&(xt=at),it=tt&&tt.dvrWindowSize>0?Math.min(nt,tt.dvrWindowSize):nt,Rt=it,Nt=it,it},getLiveDelay:function(){return Rt},getOriginalLiveDelay:function(){return Nt},getCurrentLiveLatency:function(){if(!Ot||isNaN(xt))return NaN;var et=B();if(isNaN(et)||0===et)return 0;var tt=(new Date).getTime()+1e3*vt.getClientTimeOffset();return Math.max(((tt-xt-1e3*et)/1e3).toFixed(3),0)},play:x,isPaused:G,isStalled:Y,pause:F,isSeeking:q,getStreamEndTime:L,seek:k,seekToOriginalLive:function(){var et=arguments.length>0&&void 0!==arguments[0]&&arguments[0],tt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2],rt=U();if(0!==rt){var it=rt-(Rt=Nt);k(it,et,tt,nt)}},seekToCurrentLive:function(){var et=arguments.length>0&&void 0!==arguments[0]&&arguments[0],tt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2],rt=U();if(0!==rt){var it=rt-Rt;k(it,et,tt,nt)}},reset:M,updateCurrentTime:K,getAvailabilityStartTime:function(){return xt}},tt=(0,pt.Z)(Xt).getInstance().getLogger(et),M(),et}g.__dashjs_factory_name="PlaybackController";const vt=dt.Z.getSingletonFactory(g);var At=nt(3186),Rt="loading",Nt="executed",Dt="failed";function v(et){var tt,nt,rt,it,at=(et=et||{}).eventBus,ot=et.events,st=et.dashMetrics,lt=et.fragmentLoader,ft=et.debug,dt=et.streamInfo,pt=et.type;function d(et){var tt;return!!et&&(tt=!1,rt.some((function(nt){if(rt=et,it=nt,!isNaN(rt.index)&&rt.startTime===it.startTime&&rt.adaptationIndex===it.adaptationIndex&&rt.type===it.type||function(et,tt){return isNaN(et.index)&&isNaN(tt.index)&&et.quality===tt.quality}(et,nt)||function(et,tt){return et.action===At.Z.ACTION_COMPLETE&&et.action===tt.action}(et,nt))return tt=!0;var rt,it})),tt)}function g(et){return isNaN(et.duration)?.25:Math.min(et.duration/8,.5)}function h(et){rt=rt.filter((function(tt){var nt=g(tt);return isNaN(tt.startTime)||void 0!==et&&tt.startTime>=et-nt}))}function v(et,tt){tt<=et+.5||(rt=rt.filter((function(nt){var rt=g(nt);return isNaN(nt.startTime)||nt.startTime>=tt-rt||isNaN(nt.duration)||nt.startTime+nt.duration<=et+rt})))}function _(et,tt,nt){for(var rt=et.length-1;rt>=0;rt--){var it=et[rt],at=it.startTime,ot=at+it.duration;if(nt=isNaN(nt)?g(it):nt,!isNaN(at)&&!isNaN(ot)&&tt+nt>=at&&tt-nt<ot||isNaN(at)&&isNaN(tt))return it}return null}function T(et,tt){st.addSchedulingInfo(et,tt),st.addRequestsQueue(et.mediaType,it,rt)}function S(et){et.sender===lt&&(it.splice(it.indexOf(et.request),1),et.response&&!et.error&&rt.push(et.request),T(et.request,et.error?Dt:Nt),at.trigger(ot.FRAGMENT_LOADING_COMPLETED,{request:et.request,response:et.response,error:et.error,sender:this},{streamId:dt.id,mediaType:pt}))}function b(et){et.sender===lt&&at.trigger(ot.FRAGMENT_LOADING_PROGRESS,{request:et.request,response:et.response,error:et.error,sender:this},{streamId:dt.id,mediaType:pt})}function A(et){et.sender===lt&&at.trigger(ot.FRAGMENT_LOADING_ABANDONED,{request:et.request},{streamId:dt.id,mediaType:pt})}function I(){rt=[],it=[]}return tt={getStreamId:function(){return dt.id},getType:function(){return pt},getRequests:function(et){var tt=et?et.state instanceof Array?et.state:[et.state]:[],nt=[];return tt.forEach((function(tt){var at=function(et){var tt;switch(et){case Rt:tt=it;break;case Nt:tt=rt;break;default:tt=[]}return tt}(tt);nt=nt.concat(function(et,tt){return tt.hasOwnProperty("time")?[_(et,tt.time,tt.threshold)]:et.filter((function(et){for(var nt in tt)if("state"!==nt&&tt.hasOwnProperty(nt)&&et[nt]!=tt[nt])return!1;return!0}))}(at,et))})),nt},isFragmentLoaded:d,isFragmentLoadedOrPending:function(et){var tt,nt=!1,rt=0;if(!(nt=d(et)))for(rt=0;rt<it.length;rt++)tt=it[rt],et.url===tt.url&&et.startTime===tt.startTime&&(nt=!0);return nt},removeExecutedRequestsBeforeTime:h,removeExecutedRequestsAfterTime:function(et){rt=rt.filter((function(tt){return isNaN(tt.startTime)||void 0!==et&&tt.startTime<et}))},syncExecutedRequestsWithBufferedRange:function(et,tt){if(et&&0!==et.length){for(var nt=0,rt=0,it=et.length;rt<it;rt++)v(nt,et.start(rt)),nt=et.end(rt);tt>0&&v(nt,tt)}else h()},abortRequests:function(){nt.debug("abort requests"),lt.abort(),it=[]},executeRequest:function(et){et.action===At.Z.ACTION_DOWNLOAD?(T(et,Rt),it.push(et),function(et){at.trigger(ot.FRAGMENT_LOADING_STARTED,{request:et},{streamId:dt.id,mediaType:pt}),lt.load(et)}(et)):nt.warn("Unknown request action.")},reset:function(){at.off(ot.LOADING_COMPLETED,S,this),at.off(ot.LOADING_DATA_PROGRESS,b,this),at.off(ot.LOADING_ABANDONED,A,this),lt&&lt.reset(),I()},resetInitialSettings:I,addExecutedRequest:function(et){rt.push(et)}},nt=ft.getLogger(tt),I(),at.on(ot.LOADING_COMPLETED,S,tt),at.on(ot.LOADING_DATA_PROGRESS,b,tt),at.on(ot.LOADING_ABANDONED,A,tt),tt}v.__dashjs_factory_name="FragmentModel";var Ot=dt.Z.getClassFactory(v);Ot.FRAGMENT_MODEL_LOADING=Rt,Ot.FRAGMENT_MODEL_EXECUTED=Nt,Ot.FRAGMENT_MODEL_CANCELED="canceled",Ot.FRAGMENT_MODEL_FAILED=Dt,dt.Z.updateClassFactory(v.__dashjs_factory_name,Ot);const Mt=Ot;var Lt=nt(5459);function b(et){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function A(et,tt){return(A=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function I(et,tt){return!tt||"object"!==b(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function R(et){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const xt=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&A(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=R(tt);if(nt){var it=R(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return I(this,et)});function i(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(et=rt.call(this)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,et.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,et.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,et.SEGMENT_BASE_LOADER_ERROR_CODE=15,et.TIME_SYNC_FAILED_ERROR_CODE=16,et.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,et.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,et.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,et.APPEND_ERROR_CODE=20,et.REMOVE_ERROR_CODE=21,et.DATA_UPDATE_FAILED_ERROR_CODE=22,et.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,et.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,et.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,et.DOWNLOAD_ERROR_ID_SIDX_CODE=26,et.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,et.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,et.DOWNLOAD_ERROR_ID_XLINK_CODE=29,et.MANIFEST_ERROR_ID_PARSE_CODE=31,et.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,et.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,et.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,et.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,et.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",et.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",et.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",et.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",et.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",et.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",et.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",et.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",et.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",et.APPEND_ERROR_MESSAGE="chunk is not defined",et.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",et.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",et.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",et.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",et.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",et.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",et}return i}(nt(2230).Z));var kt=nt(1264),Ut=nt(7855);function D(et){var tt,nt,rt,it,ot,st,lt=this.context,dt=(0,kt.Z)(lt).getInstance(),yt=et.textController,vt=et.eventBus,At=[],Rt=[],Nt=!1,Dt=et.mediaSource,Ot=null;function v(et){return new Promise((function(tt){M((function(){it.changeType&&it.changeType(et),tt()}))}))}function _(et){return it=yt.getTextSourceBuffer(et),Promise.resolve()}function T(){if("function"==typeof it.addEventListener)try{it.addEventListener("updateend",D,!1),it.addEventListener("error",O,!1),it.addEventListener("abort",O,!1)}catch(et){st=setInterval(D,50)}else st=setInterval(D,50)}function b(et){return new Promise((function(tt){it&&dt.get().streaming.buffer.useAppendWindow?M((function(){try{if(!it)return void tt();var nt=Dt.duration,at=0;et&&!isNaN(et.start)&&!isNaN(et.duration)&&isFinite(et.duration)&&(nt=et.start+et.duration),et&&!isNaN(et.start)&&(at=et.start),it.appendWindowEnd===nt&&it.appendWindowStart===at||(it.appendWindowStart=0,it.appendWindowEnd=nt+.01,it.appendWindowStart=Math.max(at-.1,0),rt.debug("Updated append window for ".concat(ot.type,". Set start to ").concat(it.appendWindowStart," and end to ").concat(it.appendWindowEnd))),tt()}catch(et){rt.warn("Failed to set append window"),tt()}})):tt()}))}function A(et){return new Promise((function(tt){it?M((function(){try{it.timestampOffset===et||isNaN(et)||(it.timestampOffset=et,rt.debug("Set MSE timestamp offset to ".concat(et))),tt()}catch(et){tt()}})):tt()}))}function I(){if(!Nt&&Rt.length>0){Nt=!0;var et=Rt[0];Rt.splice(0,1);var t=function(){Nt=!1,Rt.length>0&&I.call(this),et&&et.data&&et.data.segmentType&&et.data.segmentType!==Ut.w.INIT_SEGMENT_TYPE&&delete et.data.bytes,et.promise.resolve({chunk:et.data})};try{Ot=et.request,0===et.data.bytes.byteLength?t.call(this):(it.appendBuffer?it.appendBuffer(et.data.bytes):it.append(et.data.bytes,et.data),M(t.bind(this)))}catch(t){rt.fatal('SourceBuffer append failed "'+t+'"'),Rt.length>0?I():Nt=!1,delete et.data.bytes,et.promise.reject({chunk:et.data,error:new Lt.Z(t.code,t.message)})}}}function R(){At.length>0&&(it.updating||(At.shift()(),R()))}function D(){it.updating||R()}function O(et){var tt,rt,it=et.target||{};tt=ft.Z.SOURCE_BUFFER_ERROR,rt={error:it,lastRequestAppended:Ot}||{},vt.trigger(tt,rt,{streamId:ot.streamInfo.id,mediaType:nt})}function M(et){At.push(et),it.updating||R()}return tt={getType:function(){return nt},getAllBufferRanges:function(){try{return it.buffered}catch(et){return rt.error("getAllBufferRanges exception: "+et.message),null}},getBuffer:function(){return it},append:function(et){var tt=this,nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(rt,it){et?(Rt.push({data:et,promise:{resolve:rt,reject:it},request:nt}),M(I.bind(tt))):it({chunk:et,error:new Lt.Z(xt.APPEND_ERROR_CODE,xt.APPEND_ERROR_MESSAGE)})}))},remove:function(et){return new Promise((function(tt,nt){var rt=et.start,at=et.end;rt>=0&&at>rt?M((function(){try{it.remove(rt,at),M((function(){tt({from:rt,to:at,unintended:!1}),et.resolve&&et.resolve()}))}catch(tt){nt({from:rt,to:at,unintended:!1,error:new Lt.Z(xt.REMOVE_ERROR_CODE,xt.REMOVE_ERROR_MESSAGE)}),et.reject&&et.reject(tt)}})):tt()}))},abort:function(){return new Promise((function(et){try{Rt=[],"open"===Dt.readyState?M((function(){try{it&&it.abort(),et()}catch(tt){et()}})):it&&it.setTextTrack&&"ended"===Dt.readyState?(it.abort(),et()):et()}catch(tt){et()}}))},reset:function(){if(it){try{At=[],function(){try{"function"==typeof it.removeEventListener&&(it.removeEventListener("updateend",D,!1),it.removeEventListener("error",O,!1),it.removeEventListener("abort",O,!1)),clearInterval(st)}catch(et){rt.error(et)}}(),Nt=!1,Rt=[],it.getClassName&&"TextSourceBuffer"===it.getClassName()||(rt.debug("Removing sourcebuffer from media source"),Dt.removeSourceBuffer(it))}catch(et){}it=null}Ot=null},updateTimestampOffset:A,initializeForStreamSwitch:function(et,tt,rt){nt=(ot=et).type;var at=ot.codec;!function(et){it=et.getBuffer()}(rt),T();var st=[];return st.push(new Promise((function(et){M((function(){var tt=it.appendWindowStart,nt=it.appendWindowEnd;it&&(it.abort(),it.appendWindowStart=tt,it.appendWindowEnd=nt),et()}))}))),st.push(b(ot.streamInfo)),dt.get().streaming.buffer.useChangeTypeForTrackSwitch&&st.push(v(at)),tt&&void 0!==tt.MSETimeOffset&&st.push(A(tt.MSETimeOffset)),Promise.all(st)},initializeForFirstUse:function(et,tt,rt){nt=(ot=tt).type;var st=ot.codec;try{if(st.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return _(et);it=Dt.addSourceBuffer(st),T();var lt=[];return lt.push(b(ot.streamInfo)),rt&&void 0!==rt.MSETimeOffset&&lt.push(A(rt.MSETimeOffset)),Promise.all(lt)}catch(tt){return ot.type==at.Z.TEXT&&!ot.isFragmented||-1!==st.indexOf('codecs="stpp')||-1!==st.indexOf('codecs="vtt')?_(et):Promise.reject(tt)}},updateAppendWindow:b,changeType:v},rt=(0,pt.Z)(lt).getInstance().getLogger(tt),tt}D.__dashjs_factory_name="SourceBufferSink";const Bt=dt.Z.getClassFactory(D);function M(et){var tt,nt,rt,it=this.context,at=[],ot=et;function s(et,tt){return at=at.filter((function(nt){return!((isNaN(tt)||nt.start<tt)&&(isNaN(et)||nt.end>et))})),Promise.resolve()}return tt={getAllBufferRanges:function(){for(var et=[],tt=0;tt<at.length;tt++){var nt=at[tt];0===et.length||nt.start>et[et.length-1].end?et.push({start:nt.start,end:nt.end}):et[et.length-1].end=nt.end}var rt={start:function(tt){return et[tt].start},end:function(tt){return et[tt].end}};return Object.defineProperty(rt,"length",{get:function(){return et.length}}),rt},append:function(et){return"InitializationSegment"!==et.segmentType?(at.push(et),at.sort((function(et,tt){return et.start-tt.start})),rt=null):rt=et,nt.debug("PreBufferSink appended chunk s: "+et.start+"; e: "+et.end),ot&&ot({chunk:et}),Promise.resolve()},remove:s,abort:function(){return Promise.resolve()},discharge:function(et,tt){var nt=function(et,tt){return at.filter((function(nt){return(isNaN(tt)||nt.start<tt)&&(isNaN(et)||nt.end>et)}))}(et,tt);return rt&&(nt.push(rt),rt=null),s(et,tt),nt},reset:function(){at=[],rt=null,ot=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(et){et()},getBuffer:function(){return this}},nt=(0,pt.Z)(it).getInstance().getLogger(tt),tt}M.__dashjs_factory_name="PreBufferSink";const Gt=dt.Z.getClassFactory(M);function L(){var et={};return{save:function(tt){var nt=tt.streamId,rt=tt.representationId;et[nt]=et[nt]||{},et[nt][rt]=tt},extract:function(tt,nt){return et&&et[tt]&&et[tt][nt]?et[tt][nt]:null},reset:function(){et={}}}}L.__dashjs_factory_name="InitCache";const qt=dt.Z.getSingletonFactory(L);var jt=.01,Vt="BufferController";function U(et){et=et||{};var tt,nt,rt,it,ot,dt,vt,At,Rt,Nt,Dt,Ot,kt,zt,Xt,Qt,$t,tn,nn,on,un,cn=this.context,fn=(0,lt.Z)(cn).getInstance(),dn=et.errHandler,gn=et.fragmentModel,pn=et.representationController,mn=et.adapter,yn=et.textController,En=et.abrController,_n=et.playbackController,Tn=et.streamInfo,Sn=et.type,bn=et.settings;function W(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(nt,rt){dt=et,Rt&&tt&&"function"==typeof Rt.discharge?(Nt=Rt,Q(tt).then((function(){nt()})).catch((function(et){rt(et)}))):nt()}))}function X(et){return mn.convertRepresentationToRepresentationInfo(pn.getRepresentationForQuality(et))}function Q(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(nt,rt){tn&&et?dt?(Dt=!1,$(et,tt).then((function(et){nt(et)})).catch((function(et){rt(et)}))):(Dt=!0,J().then((function(et){nt(et)})).catch((function(et){rt(et)}))):nt(null)}))}function J(){var et=this;return new Promise((function(tt,nt){var rt=En.getQualityFor(Sn,Tn.id);Rt=Gt(cn).create(ie.bind(et)),_e(X(rt)).then((function(){tt(Rt)})).catch((function(){nt()}))}))}function $(et,tt){return new Promise((function(rt,it){var ot=En.getQualityFor(Sn,Tn.id);Rt=Bt(cn).create({mediaSource:dt,textController:yn,eventBus:fn}),function(et,tt,nt){var rt=X(nt);return tt&&tt[Sn]&&(Sn===at.Z.VIDEO||Sn===at.Z.AUDIO)?Rt.initializeForStreamSwitch(et,rt,tt[Sn]):Rt.initializeForFirstUse(Tn,et,rt)}(et,tt,ot).then((function(){return _e(X(ot))})).then((function(){rt(Rt)})).catch((function(et){nt.fatal("Caught error on create SourceBuffer: "+et),dn.error(new Lt.Z(xt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,xt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+Sn)),it(et)}))}))}function ee(et){bn.get().streaming.cacheInitSegments&&(nt.info("Init fragment finished loading saving to",Sn+"'s init cache"),tn.save(et.chunk)),nt.debug("Append Init fragment",Sn," with representationId:",et.chunk.representationId," and quality:",et.chunk.quality,", data size:",et.chunk.bytes.byteLength),ne(et.chunk)}function te(et){ne(et.chunk,et.request)}function ne(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Rt.append(et,tt).then((function(et){ie(et)})).catch((function(et){ie(et)})),et.mediaInfo.type===at.Z.VIDEO&&Ne(ft.Z.VIDEO_CHUNK_RECEIVED,{chunk:et})}function re(et){if(et&&et.length>0)for(var tt=0,rt=et.length;tt<rt;tt++)nt.debug("Buffered range: "+et.start(tt)+" - "+et.end(tt)+", currentTime = ",_n.getTime())}function ie(et){if(et.error)return 22===et.error.code&&function(){if($t=!0,ot=.8*Ie(),nt.warn("Quota exceeded, Critical Buffer: "+ot),ot>0){var et=Math.max(.2*ot,1),tt=ot-et,rt=Math.min(bn.get().streaming.buffer.bufferTimeAtTopQuality,.9*tt),it=Math.min(bn.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*tt),at={streaming:{buffer:{bufferToKeep:parseFloat(et.toFixed(5)),bufferTimeAtTopQuality:parseFloat(rt.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(it.toFixed(5))}}};bn.update(at)}}(),void(22!==et.error.code&&we()||(nt.warn("Clearing playback buffer to overcome quota exceed situation"),Ne(ft.Z.QUOTA_EXCEEDED,{criticalBufferLevel:ot,quotaExceededTime:et.chunk.start}),ye(me())));if(Rt&&(fe(),$t=!1,(zt=et.chunk)&&zt.endFragment)){zt&&!isNaN(zt.index)&&(vt=Math.max(zt.index,vt),de());var tt=Rt.getAllBufferRanges();zt.segmentType===Ut.w.MEDIA_SEGMENT_TYPE&&(re(tt),se(),function(){if(!isNaN(un)&&!Dt)if(Sn===at.Z.AUDIO||Sn===at.Z.VIDEO){var et=_n.getTime(),tt=ce(et,0),nt=ce(un,0);if(tt&&nt&&tt.start===nt.start)un=NaN;else{var rt=pn.getCurrentRepresentation().segmentDuration,it=ce(un,rt);it&&(bn.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(et-un)>rt?un<=it.end&&_n.seek(Math.max(un,it.start),!1,!0):et<it.start&&_n.seek(it.start,!1,!0))}}else un=NaN}());var rt=!1;Ot&&(Ot.indexOf(zt)>0&&(rt=!0),Ot=null),zt&&!rt&&Ne(ft.Z.BYTES_APPENDED_END_FRAGMENT,{quality:zt.quality,startTime:zt.start,index:zt.index,bufferedRanges:tt,segmentType:zt.segmentType,mediaType:Sn})}}function ae(){return new Promise((function(et,tt){var nt=oe();if(!nt||0===nt.length)return se(),void et();ye(nt).then((function(){et()})).catch((function(et){tt(et)}))}))}function oe(et){var tt=[],rt=Rt.getAllBufferRanges();if(!rt||0===rt.length)return tt;if(!et&&0!==et||isNaN(et))tt.push({start:rt.start(0),end:rt.end(rt.length-1)+.5});else{var it=function(et,tt){var nt=bn.get().streaming.buffer.bufferToKeep,rt=tt.start(0);if(et-rt>nt){var it=Math.max(0,et-nt),at=gn.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,time:et,threshold:jt})[0];if(at&&(it=Math.min(at.startTime,it)),it>0)return{start:rt,end:it}}return null}(et,rt),at=function(et,tt){var rt=tt.end(tt.length-1)+.5,it=Re(et),at=Tn.manifestInfo.duration>=bn.get().streaming.buffer.longFormContentDurationThreshold?bn.get().streaming.buffer.bufferTimeAtTopQualityLongForm:bn.get().streaming.buffer.bufferTimeAtTopQuality,ot=isNaN(it)?et:Math.min(it,et+at);if(ot>=tt.end(tt.length-1))return null;var st=gn.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,time:et,threshold:jt})[0];if(st&&(ot=Math.max(st.startTime+st.duration,ot)),bn.get().streaming.buffer.avoidCurrentTimeRangePruning)for(var lt=0;lt<tt.length;lt++)if(tt.start(lt)<=et&&et<=tt.end(lt)&&tt.start(lt)<=ot&&ot<=tt.end(lt)){var ft=ot;ot=lt+1<tt.length?tt.start(lt+1):tt.end(lt)+1,nt.debug("Buffered range ["+tt.start(lt)+", "+tt.end(lt)+"] overlaps with targetTime "+et+" and range to be pruned ["+ft+", "+rt+"], using ["+ot+", "+rt+"] instead"+(ot<rt?"":" (no actual pruning)"));break}return ot<tt.end(tt.length-1)?{start:ot,end:rt}:null}(et,rt);it&&tt.push(it),at&&tt.push(at)}return tt}function se(){(!on||Sn===at.Z.TEXT&&yn.isTextEnabled())&&fe()}function ue(){ge()}function le(){ge(),un=NaN}function ce(et,tt){var nt,rt,it=Rt.getAllBufferRanges(),at=0,ot=0,st=null,lt=null,ft=0,dt=isNaN(tt)?.15:tt;if(null!=it){for(rt=0,nt=it.length;rt<nt;rt++)if(at=it.start(rt),ot=it.end(rt),null===st)ft=Math.abs(at-et),(et>=at&&et<ot||ft<=dt)&&(st=at,lt=ot);else{if(!((ft=at-lt)<=dt))break;lt=ot}if(null!==st)return{start:st,end:lt}}return null}function fe(){if(_n){var et=_n.getTime()||0;Dt&&(et=isNaN(un)?0:un);var tt=bn.get().streaming.gaps.jumpGaps&&!isNaN(bn.get().streaming.gaps.smallGapLimit)?bn.get().streaming.gaps.smallGapLimit:NaN;it=Math.max(function(et,tt){var nt;return bn.get().streaming.gaps.jumpGaps&&(tt=bn.get().streaming.gaps.smallGapLimit),null===(nt=ce(et,tt))?0:nt.end-et}(et,tt),0),Ne(ft.Z.BUFFER_LEVEL_UPDATED,{mediaType:Sn,bufferLevel:it}),ge()}}function de(){var et=vt>=At-1,tt=_n.getTimeToStreamEnd(Tn)-it<1e-5;!et&&!tt||rt||(Ae(!0),nt.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat(Tn.id," and type ").concat(Sn)))}function ge(){Sn!==at.Z.AUDIO&&Sn!==at.Z.VIDEO||((!_n.getLowLatencyModeEnabled()&&it<bn.get().streaming.buffer.stallThreshold||0===it)&&!rt?he(st.Z.BUFFER_EMPTY):(rt||it>=bn.get().streaming.buffer.stallThreshold||_n.getLowLatencyModeEnabled()&&it>0)&&he(st.Z.BUFFER_LOADED))}function he(et){kt===et||et===st.Z.BUFFER_EMPTY&&0===_n.getTime()||Sn===at.Z.TEXT&&!yn.isTextEnabled()||(kt=et,Ne(ft.Z.BUFFER_LEVEL_STATE_CHANGED,{state:et}),Ne(et===st.Z.BUFFER_LOADED?ft.Z.BUFFER_LOADED:ft.Z.BUFFER_EMPTY),nt.debug(et===st.Z.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function pe(){Rt&&Sn!==at.Z.TEXT&&(rt||ye(me()))}function me(){var et=[],tt=Rt.getAllBufferRanges();if(!tt||0===tt.length)return et;var nt=_n.getTime(),rt=Math.max(0,nt-bn.get().streaming.buffer.bufferToKeep),it=gn.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,time:nt,threshold:jt})[0];if(it)rt=Math.min(it.startTime,rt);else if(0===nt&&_n.getIsDynamic())return[];if(tt.start(0)<=rt){for(var at={start:0,end:rt},ot=0;ot<tt.length&&tt.end(ot)<=rt;ot++)at.end=tt.end(ot);at.start<at.end&&et.push(at)}return et}function ye(et){return new Promise((function(tt,nt){if(et&&Rt&&0!==et.length){var rt=[];et.forEach((function(et){rt.push(function(et){return new Promise((function(tt,nt){et.resolve=tt,et.reject=nt,nn.push(et)}))}(et))})),Qt||Ee(),Promise.all(rt).then((function(){tt()})).catch((function(et){nt(et)}))}else tt()}))}function Ee(){try{if(0===nn.length||!Rt)return nt.debug("Nothing to prune, halt pruning"),nn=[],void(Qt=!1);var et=Rt.getBuffer();if(!et||!et.buffered||0===et.buffered.length)return nt.debug("SourceBuffer is empty (or does not exist), halt pruning"),nn=[],void(Qt=!1);var tt=nn.shift();nt.debug("".concat(Sn,": Removing buffer from: ").concat(tt.start," to ").concat(tt.end)),Qt=!0,_n.getTime()<tt.end&&Ae(!1),Rt.remove(tt).then((function(et){ve(et)})).catch((function(et){ve(et)}))}catch(et){Qt=!1}}function ve(et){nt.debug("onRemoved buffer from:",et.from,"to",et.to),re(Rt.getAllBufferRanges()),0===nn.length&&(Qt=!1,fe()),et.unintended&&(nt.warn("Detected unintended removal from:",et.from,"to",et.to,"setting streamprocessor time to",et.from),Ne(ft.Z.SEEK_TARGET,{time:et.from})),Qt?Ee():(on?on=!1:fe(),Ne(ft.Z.BUFFER_CLEARED,{from:et.from,to:et.to,unintended:et.unintended,hasEnoughSpaceToAppend:we(),quotaExceeded:$t}))}function _e(et){return new Promise((function(tt){et&&void 0!==et.MSETimeOffset&&Rt&&Rt.updateTimestampOffset?Rt.updateTimestampOffset(et.MSETimeOffset).then((function(){tt()})).catch((function(){tt()})):tt()}))}function Te(){return Rt&&!rt?Rt.updateAppendWindow(Tn):Promise.resolve()}function Se(){++Xt*(bn.get().streaming.wallclockTimeUpdateInterval/1e3)>=bn.get().streaming.buffer.bufferPruningInterval&&(Xt=0,pe())}function be(){ge()}function Ae(et){(rt=et)?Ne(ft.Z.BUFFERING_COMPLETED):At=Number.POSITIVE_INFINITY}function Ie(){try{var et,tt,nt=Rt.getAllBufferRanges(),rt=0;if(!nt)return rt;for(tt=0,et=nt.length;tt<et;tt++)rt+=nt.end(tt)-nt.start(tt);return rt}catch(et){return 0}}function Re(et){try{var tt=et,nt=Rt.getAllBufferRanges();if(!nt||0===nt.length)return NaN;for(var rt=0;tt===et&&rt<nt.length;){var it=nt.start(rt),at=nt.end(rt);tt>=it&&tt<=at&&(tt=at),rt+=1}return tt===et?NaN:tt}catch(et){}}function we(){var et=Ie();return isNaN(et)||et<ot}function Ne(et,tt){var nt=tt||{};fn.trigger(et,nt,{streamId:Tn.id,mediaType:Sn})}function Ce(et,tt){if(ot=Number.POSITIVE_INFINITY,kt=void 0,At=Number.POSITIVE_INFINITY,vt=0,zt=null,rt=!1,Qt=!1,$t=!1,it=0,Xt=0,nn=[],un=NaN,Dt=!1,Rt){var nt=Rt;Rt=null,et||tt||nt.abort().then((function(){nt.reset(tt),nt=null}))}on=!1}return tt={initialize:function(et){W(et),fn.on(ft.Z.INIT_FRAGMENT_LOADED,ee,tt),fn.on(ft.Z.MEDIA_FRAGMENT_LOADED,te,tt),fn.on(ft.Z.WALLCLOCK_TIME_UPDATED,Se,tt),fn.on(yt.Z.PLAYBACK_PLAYING,le,tt),fn.on(yt.Z.PLAYBACK_PROGRESS,se,tt),fn.on(yt.Z.PLAYBACK_TIME_UPDATED,se,tt),fn.on(yt.Z.PLAYBACK_RATE_CHANGED,be,tt),fn.on(yt.Z.PLAYBACK_STALLED,ue,tt)},getStreamId:function(){return Tn.id},getType:function(){return Sn},getBufferControllerType:function(){return Vt},createBufferSink:Q,dischargePreBuffer:function(){if(Rt&&Nt&&"function"==typeof Nt.discharge){var et=Nt.getAllBufferRanges();if(et.length>0){for(var tt="Beginning "+Sn+"PreBuffer discharge, adding buffer for:",rt=0;rt<et.length;rt++)tt+=" start: "+et.start(rt)+", end: "+et.end(rt)+";";nt.debug(tt)}else nt.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");Ot=[];for(var it=Nt.discharge(),at=null,ot=0;ot<it.length;ot++){var st=it[ot];if(st.segmentType!==Ut.w.INIT_SEGMENT_TYPE){var lt=tn.extract(st.streamId,st.representationId);lt&&at!==lt&&(Ot.push(lt),Rt.append(lt),at=lt)}Ot.push(st),Rt.append(st)}Nt.reset(),Nt=null}},getBuffer:function(){return Rt},getBufferLevel:function(){return it},getRangeAt:ce,hasBufferAtTime:function(et){try{var tt=Rt.getAllBufferRanges();if(!tt||0===tt.length)return!1;for(var rt=0;rt<tt.length;){var it=tt.start(rt),at=tt.end(rt);if(et>=it&&et<=at)return!0;rt+=1}return!1}catch(et){return nt.error(et),!1}},pruneBuffer:pe,setMediaSource:W,getMediaSource:function(){return dt},appendInitSegmentFromCache:function(et){var tt=tn.extract(Tn.id,et);return!!tt&&(nt.info("Append Init fragment",Sn," with representationId:",tt.representationId," and quality:",tt.quality,", data size:",tt.bytes.byteLength),ne(tt),!0)},getIsBufferingCompleted:function(){return rt},setIsBufferingCompleted:Ae,getIsPruningInProgress:function(){return Qt},reset:function(et,tt){fn.off(ft.Z.INIT_FRAGMENT_LOADED,ee,this),fn.off(ft.Z.MEDIA_FRAGMENT_LOADED,te,this),fn.off(ft.Z.WALLCLOCK_TIME_UPDATED,Se,this),fn.off(yt.Z.PLAYBACK_PLAYING,le,this),fn.off(yt.Z.PLAYBACK_PROGRESS,se,this),fn.off(yt.Z.PLAYBACK_TIME_UPDATED,se,this),fn.off(yt.Z.PLAYBACK_RATE_CHANGED,be,this),fn.off(yt.Z.PLAYBACK_STALLED,ue,this),Ce(et,tt)},prepareForPlaybackSeek:function(){return rt&&Ae(!1),Rt.abort()},prepareForReplacementTrackSwitch:function(et){return new Promise((function(tt,nt){Rt.abort().then((function(){return Te()})).then((function(){return bn.get().streaming.buffer.useChangeTypeForTrackSwitch?Rt.changeType(et):Promise.resolve()})).then((function(){return ae()})).then((function(){Ae(!1),tt()})).catch((function(et){nt(et)}))}))},prepareForNonReplacementTrackSwitch:function(et){return new Promise((function(tt,nt){Te().then((function(){return bn.get().streaming.buffer.useChangeTypeForTrackSwitch?Rt.changeType(et):Promise.resolve()})).then((function(){tt()})).catch((function(et){nt(et)}))}))},prepareForForceReplacementQualitySwitch:function(et){return new Promise((function(tt,nt){Rt.abort().then((function(){return Te()})).then((function(){return ae()})).then((function(){return _e(et)})).then((function(){Ae(!1),tt()})).catch((function(et){nt(et)}))}))},updateAppendWindow:Te,getAllRangesWithSafetyFactor:oe,getContinuousBufferTimeForTargetTime:Re,clearBuffers:ye,pruneAllSafely:ae,updateBufferTimestampOffset:_e,setSeekTarget:function(et){un=et},segmentRequestingCompleted:function(et){isNaN(et)||(At=et,de())}},nt=(0,pt.Z)(cn).getInstance().getLogger(tt),tn=qt(cn).getInstance(),Ce(),tt}U.__dashjs_factory_name=Vt;const zt=dt.Z.getClassFactory(U);var Xt="NotFragmentedTextBufferController";function G(et){et=et||{};var tt,nt,rt,it,at,ot,st=this.context,dt=(0,lt.Z)(st).getInstance(),pt=et.textController,yt=et.errHandler,vt=et.streamInfo,At=et.type;function p(et){it=et}function m(et){var tt,rt;nt!==et&&(nt=et)&&(tt=ft.Z.BUFFERING_COMPLETED,rt={},dt.trigger(tt,rt,{streamId:vt.id,mediaType:At}))}function y(et){et.chunk.bytes&&!nt&&(ot.save(et.chunk),at.append(et.chunk),m(!0))}return tt={initialize:function(et){p(et)},getStreamId:function(){return vt.id},getType:function(){return At},getBufferControllerType:function(){return Xt},createBufferSink:function(et){return new Promise((function(tt,nt){try{(at=Bt(st).create({mediaSource:it,textController:pt,eventBus:dt})).initializeForFirstUse(vt,et),rt||(at.getBuffer()&&"function"==typeof at.getBuffer().initialize&&at.getBuffer().initialize(),rt=!0),tt(at)}catch(et){yt.error(new Lt.Z(xt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,xt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+At)),nt(et)}}))},dischargePreBuffer:function(){},getBuffer:function(){return at},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:p,getMediaSource:function(){return it},appendInitSegmentFromCache:function(et){return null!==ot.extract(vt.id,et)},getIsBufferingCompleted:function(){return nt},setIsBufferingCompleted:m,getIsPruningInProgress:function(){return!1},reset:function(et){dt.off(ft.Z.INIT_FRAGMENT_LOADED,y,tt),!et&&at&&(at.abort(),at.reset(),at=null)},clearBuffers:function(){return Promise.resolve()},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return nt=!1,Promise.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()},segmentRequestingCompleted:function(){}},rt=!1,it=null,nt=!1,ot=qt(st).getInstance(),dt.on(ft.Z.INIT_FRAGMENT_LOADED,y,tt),tt}G.__dashjs_factory_name=Xt;const Qt=dt.Z.getClassFactory(G);function Y(et){et=et||{};var tt,nt,rt,it,ot,dt,vt,At,Rt,Nt,Dt,Ot,Lt=this.context,xt=(0,lt.Z)(Lt).getInstance(),kt=et.dashMetrics,Ut=et.mediaPlayerModel,Bt=et.fragmentModel,Gt=et.abrController,qt=et.playbackController,jt=et.textController,Vt=et.type,zt=et.bufferController,Xt=et.representationController,Qt=et.settings;function M(et){if(!zt.getIsBufferingCompleted()){P();var tt=isNaN(et)?0:et;ot=setTimeout(L,tt)}}function P(){ot&&(clearTimeout(ot),ot=null)}function L(){try{if(function(){try{return Vt===at.Z.TEXT&&!jt.isTextEnabled()||qt.isPaused()&&(!qt.getStreamController().getInitialPlayback()||!qt.getStreamController().getAutoPlay())&&!Qt.get().streaming.scheduling.scheduleWhilePaused}catch(et){return!1}}())return void P();if(function(){try{return Xt.getCurrentRepresentationInfo()&&(isNaN(Rt)||Nt||(et=nt.id,tt=Gt.getMaxAllowedIndexFor(Vt,et),!(!isNaN(At)&&At==tt||(rt.info("Top quality "+Vt+" index has changed from "+At+" to "+tt),At=tt,0)))||function(){var et=Xt.getCurrentRepresentationInfo();return!Vt||!et||kt.getCurrentBufferLevel(Vt)<x()}())}catch(et){return!1}var et,tt}()){var et=!1;Ot&&(et=Gt.checkPlaybackQuality(Vt,nt.id)),et||(it=Xt.getCurrentRepresentationInfo(),Dt||it.quality!==Rt||Nt?(Nt?(rt.debug("Switch track for "+Vt+", representation id = "+it.id),Nt=!1):rt.debug("Quality has changed, get init request for representationid = "+it.id),xt.trigger(ft.Z.INIT_FRAGMENT_NEEDED,{representationId:it.id,sender:tt},{streamId:nt.id,mediaType:Vt}),Ot=!1,Dt=!1):(rt.debug("Media segment needed for ".concat(Vt," and stream id ").concat(nt.id)),xt.trigger(ft.Z.MEDIA_FRAGMENT_NEEDED,{},{streamId:nt.id,mediaType:Vt}),Ot=!0))}else M(qt.getLowLatencyModeEnabled()?Qt.get().streaming.scheduling.lowLatencyTimeout:Qt.get().streaming.scheduling.defaultTimeout)}catch(et){M(qt.getLowLatencyModeEnabled()?Qt.get().streaming.scheduling.lowLatencyTimeout:Qt.get().streaming.scheduling.defaultTimeout)}var it}function x(){var et=NaN,tt=Xt.getCurrentRepresentationInfo();return Vt&&tt?et=Vt===at.Z.TEXT?function(){try{if(jt.isTextEnabled()){var et=Xt.getCurrentRepresentationInfo();if(isNaN(et.fragmentDuration)){var tt=kt.getCurrentSchedulingInfo(st.Z.SCHEDULING_INFO);return tt?tt.duration:0}return et.fragmentDuration}return 0}catch(et){return 0}}():Vt===at.Z.AUDIO&&dt?function(){try{var et=kt.getCurrentBufferLevel(at.Z.VIDEO),tt=Xt.getCurrentRepresentationInfo();return isNaN(tt.fragmentDuration)?et+1:Math.max(et+1,tt.fragmentDuration)}catch(et){return 0}}():function(){try{var et=Xt.getCurrentRepresentationInfo().mediaInfo.streamInfo;return Gt.isPlayingAtTopQuality(et)?et.manifestInfo.duration>=Qt.get().streaming.buffer.longFormContentDurationThreshold?Qt.get().streaming.buffer.bufferTimeAtTopQualityLongForm:Qt.get().streaming.buffer.bufferTimeAtTopQuality:Ut.getStableBufferTime()}catch(et){return Ut.getStableBufferTime()}}():et}function F(){k(!0)}function k(et){if(qt&&Bt){var tt=Bt.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,time:qt.getTime(),threshold:0})[0];tt&&qt.getTime()>=tt.startTime&&((!vt.mediaInfo||tt.mediaInfo.type===vt.mediaInfo.type&&tt.mediaInfo.id!==vt.mediaInfo.id)&&et&&xt.trigger(ft.Z.TRACK_CHANGE_RENDERED,{mediaType:Vt,oldMediaInfo:vt.mediaInfo,newMediaInfo:tt.mediaInfo,streamId:nt.id}),tt.quality===vt.quality&&tt.adaptationIndex===vt.adaptationIndex||!et||(rt.debug("Quality change rendered for streamId ".concat(nt.id," and type ").concat(Vt)),xt.trigger(ft.Z.QUALITY_CHANGE_RENDERED,{mediaType:Vt,oldQuality:vt.quality,newQuality:tt.quality,streamId:nt.id})),vt={mediaInfo:tt.mediaInfo,quality:tt.quality,adaptationIndex:tt.adaptationIndex})}}function U(){Bt.abortRequests(),P()}function Z(){Qt.get().streaming.scheduling.scheduleWhilePaused||M()}function B(et){kt.updatePlayListTraceMetrics({playbackspeed:et.playbackRate.toString()})}function G(){Ot=!0,it=0,Rt=NaN,vt={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},At=NaN,Nt=!1,Dt=!1}return tt={initialize:function(et){dt=et,xt.on(ft.Z.URL_RESOLUTION_FAILED,U,tt),xt.on(yt.Z.PLAYBACK_STARTED,Z,tt),xt.on(yt.Z.PLAYBACK_RATE_CHANGED,B,tt),xt.on(yt.Z.PLAYBACK_TIME_UPDATED,F,tt)},getType:function(){return Vt},getStreamId:function(){return nt.id},setTimeToLoadDelay:function(et){it=et},getTimeToLoadDelay:function(){return it},setSwitchTrack:function(et){Nt=et},getSwitchTrack:function(){return Nt},startScheduleTimer:M,clearScheduleTimer:P,reset:function(){xt.off(ft.Z.URL_RESOLUTION_FAILED,U,tt),xt.off(yt.Z.PLAYBACK_STARTED,Z,tt),xt.off(yt.Z.PLAYBACK_RATE_CHANGED,B,tt),xt.off(yt.Z.PLAYBACK_TIME_UPDATED,F,tt),P(),k(!1),G(),nt=null},getBufferTarget:x,getPlaybackController:function(){return qt},setCheckPlaybackQuality:function(et){Ot=et},setInitSegmentRequired:function(et){Dt=et},setLastInitializedQuality:function(et){Rt=et}},rt=(0,pt.Z)(Lt).getInstance().getLogger(tt),G(),nt=et.streamInfo,tt}Y.__dashjs_factory_name="ScheduleController";const $t=dt.Z.getClassFactory(Y);var tn=nt(7387);function V(et){var tt,nt,rt,it,ot,st,lt=(et=et||{}).eventBus,ft=et.events,dt=et.abrController,pt=et.dashMetrics,vt=et.playbackController,At=et.timelineConverter,Rt=et.type,Nt=et.streamInfo,Dt=et.dashConstants,Ot=et.segmentsController,Mt=et.isDynamic,Lt=et.adapter;function T(){return Rt}function S(){if(!(dt&&pt&&vt&&At))throw new Error(at.Z.MISSING_CONFIG_ERROR)}function b(){return rt}function A(){return st}function I(){nt=null,rt=!0,it=[],ot=null}function R(et){return new Promise((function(tt,nt){var rt=et.hasInitialization(),at=et.hasSegments(),ot=[];ot.push(Ot.updateInitData(et,rt)),ot.push(Ot.updateSegmentData(et,at)),Promise.all(ot).then((function(nt){var rt;nt[0]&&!nt[0].error&&(et=function(et,tt){return tt&&!tt.error&&tt.representation?tt.representation:et}(et,nt[0])),nt[1]&&!nt[1].error&&(et=function(et,tt){if(tt&&!tt.error){var nt,rt,it,at,ot=tt.segments,st=[],lt=0;for(nt=0,rt=ot?ot.length:0;nt<rt;nt++)it=ot[nt],(at=(0,tn.TJ)(At,Mt,et,it.startTime,it.duration,it.timescale,it.media,it.mediaRange,lt))&&(st.push(at),at=null,lt++);return st.length>0&&(et.segments=st),et}}(et,nt[1])),(rt=et).mediaFinishedInformation=Ot.getMediaFinishedInformation(rt),function(et){if(b()){var tt,nt,rt=pt.getCurrentManifestUpdate(),at=!1;if(rt){for(var ot=0;ot<rt.representationInfo.length;ot++)if((tt=rt.representationInfo[ot]).index===et.index&&tt.mediaType===T()){at=!0;break}at||pt.addManifestUpdateRepresentationInfo(et,T())}if(function(){for(var et=0,tt=it.length;et<tt;et++){var nt=it[et].segmentInfoType;if(!it[et].hasInitialization()||(nt===Dt.SEGMENT_BASE||nt===Dt.BASE_URL)&&!it[et].segments)return!1}return!0}()){dt.setPlaybackQuality(Rt,Nt,(nt=st,it.indexOf(nt)));var lt=pt.getCurrentDVRInfo(Rt);lt&&pt.updateManifestUpdateInfo({latency:lt.range.end-vt.getTime()}),pt.getCurrentRepresentationSwitch(A().adaptation.type)||w(),C()}}}(et),tt()})).catch((function(et){nt(et)}))}))}function w(){S();var et=new Date,tt=A(),nt=1e3*vt.getTime();tt&&pt.addRepresentationSwitch(tt.adaptation.type,et,nt,tt.id),lt.trigger(yt.Z.REPRESENTATION_SWITCH,{mediaType:Rt,streamId:Nt.id,currentRepresentation:tt,numberOfRepresentations:it.length},{streamId:Nt.id,mediaType:Rt})}function N(et){return null==et||et>=it.length?null:it[et]}function C(et){rt=!1,lt.trigger(ft.DATA_UPDATE_COMPLETED,{data:nt,currentRepresentation:st,error:et},{streamId:Nt.id,mediaType:Rt})}function D(et){st=et,ot=Lt.convertRepresentationToRepresentationInfo(st)}function O(et){if(et.newDuration){var tt=A();tt&&tt.adaptation.period&&(tt.adaptation.period.duration=et.newDuration)}}return tt={getStreamId:function(){return Nt.id},getType:T,getData:function(){return nt},isUpdating:b,updateData:function(et,tt,ot,st,lt){if(S(),rt=!0,it=tt,D(N(lt)),nt=et,ot!==at.Z.VIDEO&&ot!==at.Z.AUDIO&&(ot!==at.Z.TEXT||!st))return C(),Promise.resolve();for(var ft=[],dt=0,pt=it.length;dt<pt;dt++){var yt=it[dt];ft.push(R(yt))}return Promise.all(ft)},getCurrentRepresentation:A,getCurrentRepresentationInfo:function(){return ot},getRepresentationForQuality:N,prepareQualityChange:function(et){D(N(et)),w()},reset:function(){lt.off(yt.Z.MANIFEST_VALIDITY_CHANGED,O,tt),I()}},I(),lt.on(yt.Z.MANIFEST_VALIDITY_CHANGED,O,tt),tt}V.__dashjs_factory_name="RepresentationController";const nn=dt.Z.getClassFactory(V);var on=nt(3106),un=nt(9326),cn=nt(7473),fn=nt(2594);function J(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}var dn=function e(){J(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};dn.INITIAL_PLAYOUT_START_REASON="initial_playout",dn.SEEK_START_REASON="seek",dn.RESUME_FROM_PAUSE_START_REASON="resume",dn.METRICS_COLLECTION_START_REASON="metrics_collection_start";var gn=function e(){J(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};gn.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",gn.REBUFFERING_REASON="rebuffering",gn.USER_REQUEST_STOP_REASON="user_request",gn.END_OF_PERIOD_STOP_REASON="end_of_period",gn.END_OF_CONTENT_STOP_REASON="end_of_content",gn.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",gn.FAILURE_STOP_REASON="failure";var pn=nt(7802);function ne(){return{ntpToUTC:function(et){var tt=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(tt.getTime()+et).getTime()}}}ne.__dashjs_factory_name="TimeUtils";const mn=dt.Z.getSingletonFactory(ne);function ie(et){et=et||{};var tt,nt,rt,it,dt,vt,At,Rt,Nt,Dt,Ot,kt,Bt,Gt,qt=this.context,jt=(0,lt.Z)(qt).getInstance(),Vt=et.streamInfo,Xt=et.type,tn=et.errHandler,dn=et.mimeType,yn=et.timelineConverter,En=et.adapter,_n=et.manifestModel,Tn=et.mediaPlayerModel,Sn=et.fragmentModel,bn=et.abrController,In=et.playbackController,wn=et.mediaController,Cn=et.textController,On=et.dashMetrics,Pn=et.settings,xn=et.boxParser,Bn=et.segmentBlacklistController;function $(){return Vt.id}function ne(){return Xt}function ie(){return En.getIsTextTrack(Rt.getData())}function ae(){dt=[],it=null,Bt=0,Nt=!1,Dt=!1,Gt=null}function oe(et){return!isNaN(et)&&!isNaN(Vt.duration)&&isFinite(Vt.duration)&&et>=Vt.start+Vt.duration}function se(et){var tt=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(et.sender)if(In.getIsManifestUpdateInProgress())de();else if((!ie()||Cn.isTextEnabled())&&vt&&et.representationId&&!vt.appendInitSegmentFromCache(et.representationId)){var nt=Rt.getCurrentRepresentation();if(0===nt.range)return void ue();var rt=Ot?Ot.getInitRequest(it,nt):null;rt?Sn.executeRequest(rt):tt&&(At.setInitSegmentRequired(!0),de())}}function ue(et){var tt=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(In.getIsManifestUpdateInProgress()||vt.getIsPruningInProgress())de();else{var nt=fe();nt?(Nt=!1,le(nt)):ce(tt)}}function le(et){isNaN(et.startTime+et.duration)||(Bt=et.startTime+et.duration),et.delayLoadingTime=(new Date).getTime()+At.getTimeToLoadDelay(),At.setTimeToLoadDelay(0),function(et){var tt=et.url;return et.range&&(tt=tt.concat("_",et.range)),Bn.contains(tt)}(et)?(nt.warn("Fragment request url ".concat(et.url," for stream id ").concat(Vt.id," and media type ").concat(Xt," is on the ignore list and will be skipped")),de()):(nt.debug("Next fragment request url for stream id ".concat(Vt.id," and media type ").concat(Xt," is ").concat(et.url)),Sn.executeRequest(et))}function ce(et){var tt,at=Rt.getCurrentRepresentation();if(!Pn.get().streaming.gaps.enableSeekFix||!Nt&&0!==In.getTime()||(rt?rt&&at.segmentInfoType===ot.Z.SEGMENT_TIMELINE&&(tt=Ot.getValidTimeAheadOfTargetTime(Bt,it,at,Pn.get().streaming.gaps.threshold)):tt=Ot.getValidTimeAheadOfTargetTime(Bt,it,at,Pn.get().streaming.gaps.threshold),isNaN(tt)||tt===Bt)){if(Ot.isLastSegmentRequested(at,Bt)){var st=Ot.getCurrentIndex();return nt.debug("Segment requesting for stream ".concat(Vt.id," has finished")),jt.trigger(ft.Z.STREAM_REQUESTING_COMPLETED,{segmentIndex:st},{streamId:Vt.id,mediaType:Xt}),vt.segmentRequestingCompleted(st),void At.clearScheduleTimer()}et&&de()}else In.isSeeking()||0===In.getTime()?(nt.warn("Adjusting playback time ".concat(tt," because of gap in the manifest. Seeking by ").concat(tt-Bt)),In.seek(tt,!1,!1)):(nt.warn("Adjusting buffering time ".concat(tt," because of gap in the manifest. Adjusting time by ").concat(tt-Bt)),Le(tt),et&&de())}function fe(){var et,tt=we();if(isNaN(Bt)||ne()===at.Z.TEXT&&!Cn.isTextEnabled())return null;if(Ot){var nt=Rt&&tt?Rt.getRepresentationForQuality(tt.quality):null;et=Nt?Ot.getSegmentRequestForTime(it,nt,Bt):Ot.getNextSegmentRequest(it,nt)}return et}function de(){At.startScheduleTimer(In.getLowLatencyModeEnabled()?Pn.get().streaming.scheduling.lowLatencyTimeout:Pn.get().streaming.scheduling.defaultTimeout)}function ge(et){et.error||vt.getIsBufferingCompleted()||vt.updateBufferTimestampOffset(et.currentRepresentation)}function he(et){On.addBufferState(Xt,et.state,At.getBufferTarget()),et.state!==st.Z.BUFFER_EMPTY||In.isSeeking()||(nt.info("Buffer is empty! Stalling!"),On.pushPlayListTraceMetrics(new Date,gn.REBUFFERING_REASON))}function pe(et){Sn.syncExecutedRequestsWithBufferedRange(vt.getBuffer().getAllBufferRanges(),Vt.duration),et.quotaExceeded&&et.from>In.getTime()&&Le(et.from),et.hasEnoughSpaceToAppend&&et.quotaExceeded&&At.startScheduleTimer()}function me(et){if(et&&et.lastRequestAppended&&et.lastRequestAppended.url){var tt=et.lastRequestAppended.url;et.lastRequestAppended.range&&(tt=tt.concat("_",et.lastRequestAppended.range)),nt.warn("Blacklisting segment with url ".concat(tt)),Bn.add(tt)}}function ye(et){if(nt.debug("Appended bytes for ".concat(et.mediaType," and stream id ").concat(et.streamId)),et.segmentType===Ut.w.INIT_SEGMENT_TYPE){var tt=et.quality;At.setLastInitializedQuality(tt),nt.info("["+Xt+"] lastInitializedRepresentationInfo changed to "+et.quality)}Gt?Ee(Gt):At.startScheduleTimer(0)}function Ee(et){var tt=Sn.getRequests({state:Mt.FRAGMENT_MODEL_LOADING});if(tt&&tt.length>0)return nt.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(Gt=et);vt.updateBufferTimestampOffset(et).then((function(){it.segmentAlignment||it.subSegmentAlignment?At.startScheduleTimer():Me(),Gt=null,Dt=!1})).catch((function(){Gt=null,Dt=!1}))}function ve(et){nt.info("onFragmentLoadingAbandoned request: "+et.request.url+" has been aborted"),In.isSeeking()||At.getSwitchTrack()||Dt||(nt.info("onFragmentLoadingAbandoned request: "+et.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),et.request&&et.request.isInitializationRequest()?At.setInitSegmentRequired(!0):Le(et.request.startTime+et.request.duration/2),At.startScheduleTimer(0))}function _e(et){nt.info("OnFragmentLoadingCompleted for stream id "+Vt.id+" and media type "+Xt+" - Url:",et.request?et.request.url:"undefined",et.request.range?", Range:"+et.request.range:""),ie()&&At.startScheduleTimer(0),et.error&&et.request.serviceLocation&&function(et){nt.info("Fragment loading completed with an error"),et&&et.request&&et.request.type&&(et.request.type===Ut.w.INIT_SEGMENT_TYPE?se({representationId:et.request.representationId,sender:{}},!1):et.request.type===Ut.w.MEDIA_SEGMENT_TYPE&&(Le(et.request.startTime+et.request.duration/2),ue({},!1)))}(et)}function Te(){Le(In.getTime()),Re().startScheduleTimer()}function Se(et){var tt=et.currentTrackInfo;if(tt){var nt=dt.find((function(et){return et.index===tt.index&&et.lang===tt.lang}));nt&&Ie(nt).then((function(){vt.setIsBufferingCompleted(!1),Le(In.getTime()),At.setInitSegmentRequired(!0),At.startScheduleTimer()}))}}function be(et){Le(et.quotaExceededTime),At.clearScheduleTimer()}function Ae(){return vt?vt.getBuffer():null}function Ie(et){et===it||et&&it&&et.type!==it.type||(it=et);var tt=En.getRealAdaptation(Vt,it),nt=En.getVoRepresentations(it);if(Rt){var ot,st=Rt.getData(),lt=bn.getMaxAllowedIndexFor(Xt,Vt.id),ft=bn.getMinAllowedIndexFor(Xt,Vt.id),dt=null;return null!==st&&st.id===tt.id||Xt===at.Z.TEXT?ot=bn.getQualityFor(Xt,Vt.id):(dt=bn.getThroughputHistory().getAverageThroughput(Xt,rt)||bn.getInitialBitrateFor(Xt,Vt.id),ot=bn.getQualityForBitrate(it,dt,Vt.id)),void 0!==ft&&ot<ft&&(ot=ft),ot>lt&&(ot=lt),Rt.updateData(tt,nt,Xt,it.isFragmented,ot)}return Promise.resolve()}function Re(){return At}function we(et){var tt;return void 0!==et?((0,on.SE)(et),tt=Rt?Rt.getRepresentationForQuality(et):null):tt=Rt?Rt.getCurrentRepresentation():null,En.convertRepresentationToRepresentationInfo(tt)}function Ne(){return!!vt&&vt.getIsBufferingCompleted()}function Ce(et){if(Pn.get().streaming.enableManifestTimescaleMismatchFix){var tt=et.chunk,nt=tt.bytes,rt=we(tt.quality),it=Rt&&rt?Rt.getRepresentationForQuality(rt.quality):null;rt&&it&&(it.timescale=xn.getMediaTimescaleFromMoov(nt))}}function De(et){var tt=et.chunk,nt=tt.bytes,rt=tt.quality,it=we(rt),at=Rt&&it?Rt.getRepresentationForQuality(it.quality):null;if(it&&at){var st;if(Pn.get().streaming.parseInbandPrft&&et.request.type===Ut.w.MEDIA_SEGMENT_TYPE){var lt=function(et,tt){var nt=et.getBoxes("prft"),rt=[];return nt.forEach((function(et){rt.push(function(et,tt){var nt="unknown";switch(et.flags){case 0:nt=ot.Z.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:nt=ot.Z.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:nt=ot.Z.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var rt=1e3*et.ntp_timestamp_sec+et.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:nt,ntpTimestamp:rt=mn(qt).getInstance().ntpToUTC(rt),mediaTime:et.media_time/tt}}(et,tt))})),rt}(st=st||xn.parse(nt),at.timescale);lt&&lt.length&&jt.trigger(yt.Z.INBAND_PRFT,{data:lt},{streamId:Vt.id,mediaType:Xt})}var dt=En.getEventsFor(it.mediaInfo,null,Vt),pt=En.getEventsFor(it,at,Vt);if(dt&&dt.length>0||pt&&pt.length>0){var vt=Sn.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,quality:rt,index:tt.index})[0],At=function(et,tt,nt,rt){try{for(var it={},at=[],ot=nt.concat(rt),st=0,lt=ot.length;st<lt;st++)it[ot[st].schemeIdUri+"/"+ot[st].value]=ot[st];var ft=et.getBoxes("emsg");if(!ft||0===ft.length)return at;for(var dt=et.getBox("sidx"),pt=!dt||isNaN(dt.earliest_presentation_time)||isNaN(dt.timescale)?tt&&!isNaN(tt.mediaStartTime)?tt.mediaStartTime:0:dt.earliest_presentation_time/dt.timescale,yt=Math.max(pt,0),vt=Rt.getCurrentRepresentation(),At=0,Nt=ft.length;At<Nt;At++){var Dt=En.getEvent(ft[At],it,yt,vt);Dt&&at.push(Dt)}return at}catch(et){return[]}}(st=st||xn.parse(nt),vt,dt,pt);jt.trigger(ft.Z.INBAND_EVENTS,{events:At},{streamId:Vt.id})}}}function Oe(){var et=In.getTime();Pn.get().streaming.buffer.flushBufferAtTrackSwitch&&In.seek(et+.001,!1,!0),Le(et),vt.setSeekTarget(et),At.startScheduleTimer()}function Me(){var et=In.getTime(),tt=vt.getContinuousBufferTimeForTargetTime(et);Le(isNaN(tt)?et:tt),At.startScheduleTimer()}function Pe(et){et&&!isNaN(et.time)&&(Le(et.time),vt.setSeekTarget(et.time))}function Le(et){Bt=et,Nt=!0}return tt={initialize:function(nt,it,st){kt=(0,pn.Z)(qt).create({events:ft.Z,eventBus:jt,streamInfo:Vt,timelineConverter:yn,dashConstants:ot.Z,segmentBaseController:et.segmentBaseController,type:Xt}),Ot=(0,un.Z)(qt).create({streamInfo:Vt,type:Xt,timelineConverter:yn,dashMetrics:On,mediaPlayerModel:Tn,baseURLController:et.baseURLController,errHandler:tn,segmentsController:kt,settings:Pn,boxParser:xn,events:ft.Z,eventBus:jt,errors:xt,debug:(0,pt.Z)(qt).getInstance(),requestModifier:(0,cn.Z)(qt).getInstance(),dashConstants:ot.Z,constants:at.Z,urlUtils:(0,fn.Z)(qt).getInstance()}),rt=Vt.manifestInfo.isDynamic,Ot.initialize(rt),bn.registerStreamType(Xt,tt),Rt=nn(qt).create({streamInfo:Vt,type:Xt,abrController:bn,dashMetrics:On,playbackController:In,timelineConverter:yn,dashConstants:ot.Z,events:ft.Z,eventBus:jt,errors:xt,isDynamic:rt,adapter:En,segmentsController:kt}),(vt=function(et,tt){return et?et!==at.Z.TEXT||tt?zt(qt).create({streamInfo:Vt,type:et,mediaPlayerModel:Tn,manifestModel:_n,fragmentModel:Sn,errHandler:tn,mediaController:wn,representationController:Rt,adapter:En,textController:Cn,abrController:bn,playbackController:In,settings:Pn}):Qt(qt).create({streamInfo:Vt,type:et,mimeType:dn,fragmentModel:Sn,textController:Cn,errHandler:tn,settings:Pn}):(tn.error(new Lt.Z(xt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,xt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}(Xt,st))&&vt.initialize(nt),(At=$t(qt).create({streamInfo:Vt,type:Xt,mimeType:dn,adapter:En,dashMetrics:On,mediaPlayerModel:Tn,fragmentModel:Sn,abrController:bn,playbackController:In,textController:Cn,mediaController:wn,bufferController:vt,representationController:Rt,settings:Pn})).initialize(it),Bt=0,Nt=!1},getStreamId:$,getType:ne,isUpdating:function(){return!!Rt&&Rt.isUpdating()},getBufferController:function(){return vt},dischargePreBuffer:function(){vt.dischargePreBuffer()},getFragmentModel:function(){return Sn},getScheduleController:Re,getRepresentationController:function(){return Rt},getRepresentationInfo:we,getBufferLevel:function(){return vt?vt.getBufferLevel():0},isBufferingCompleted:Ne,createBufferSinks:function(et){var tt=Ae();return tt?Promise.resolve(tt):vt?vt.createBufferSink(it,et):Promise.resolve(null)},updateStreamInfo:function(et){return Vt=et,Ne()?Promise.resolve():vt.updateAppendWindow()},getStreamInfo:function(){return Vt},selectMediaInfo:Ie,clearMediaInfoArray:function(){dt=[]},addMediaInfo:function(et){-1===dt.indexOf(et)&&dt.push(et)},prepareTrackSwitch:function(){return new Promise((function(et){nt.debug("Preparing track switch for type ".concat(Xt));var tt=Xt===at.Z.TEXT||Pn.get().streaming.trackSwitchMode[Xt]===at.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&In.getTimeToStreamEnd(Vt)>Pn.get().streaming.buffer.stallThreshold;if(vt.getIsBufferingCompleted()&&!tt)return vt.prepareForNonReplacementTrackSwitch(it.codec).then((function(){jt.trigger(ft.Z.BUFFERING_COMPLETED,{},{streamId:Vt.id,mediaType:Xt})})).catch((function(){jt.trigger(ft.Z.BUFFERING_COMPLETED,{},{streamId:Vt.id,mediaType:Xt})})),void et();At.clearScheduleTimer(),At.setSwitchTrack(!0),tt?(jt.trigger(ft.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:Xt,streamId:Vt.id},{mediaType:Xt,streamId:Vt.id}),Sn.abortRequests(),vt.prepareForReplacementTrackSwitch(it.codec).then((function(){var et=we();return vt.updateBufferTimestampOffset(et)})).then((function(){Oe(),et()})).catch((function(){Oe(),et()}))):vt.prepareForNonReplacementTrackSwitch(it.codec).then((function(){Me(),et()})).catch((function(){Me(),et()}))}))},prepareQualityChange:function(et){Gt&&nt.warning("Canceling queued representation switch to ".concat(Gt.quality," for ").concat(Xt)),nt.debug("Preparing quality switch for type ".concat(Xt));var tt=et.newQuality;Dt=!0,At.clearScheduleTimer(),Rt.prepareQualityChange(tt);var rt=we(tt);et.reason&&et.reason.forceReplace?function(et){Sn.abortRequests(),jt.trigger(ft.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:Xt,streamId:Vt.id},{mediaType:Xt,streamId:Vt.id}),vt.prepareForForceReplacementQualitySwitch(et).then((function(){Oe(),Dt=!1})).catch((function(){Oe(),Dt=!1}))}(rt):Pn.get().streaming.buffer.fastSwitchEnabled?function(et){var tt=In.getTime(),nt=1.5*(isNaN(et.fragmentDuration)?1:et.fragmentDuration),rt=Sn.getRequests({state:Mt.FRAGMENT_MODEL_EXECUTED,time:tt+nt,threshold:0})[0];if(rt&&!ie()){var it=vt.getBufferLevel(),at=bn.getAbandonmentStateFor(Vt.id,Xt);rt.quality<et.quality&&it>=nt&&at!==st.Z.ABANDON_LOAD?vt.updateBufferTimestampOffset(et).then((function(){Sn.abortRequests(),Le(tt+nt),At.setCheckPlaybackQuality(!1),At.startScheduleTimer(),Dt=!1})).catch((function(){Dt=!1})):Ee(et)}else At.startScheduleTimer(),Dt=!1}(rt):Ee(rt),On.pushPlayListTraceMetrics(new Date,gn.REPRESENTATION_SWITCH_STOP_REASON),On.createPlaylistTraceMetrics(rt.id,1e3*In.getTime(),In.getPlaybackRate())},getMediaInfo:function(){return it},getMediaSource:function(){return vt.getMediaSource()},setMediaSource:function(et){return vt.setMediaSource(et,it)},getBuffer:Ae,setExplicitBufferingTime:Le,finalisePlayList:function(et,tt){On.pushPlayListTraceMetrics(et,tt)},probeNextRequest:function(){var et=we(),tt=Rt&&et?Rt.getRepresentationForQuality(et.quality):null;return Ot.getNextSegmentRequestIdempotent(it,tt)},prepareInnerPeriodPlaybackSeeking:function(et){return new Promise((function(tt){if(vt.hasBufferAtTime(et.seekTime))return vt.pruneBuffer(),oe(vt.getContinuousBufferTimeForTargetTime(et.seekTime))&&vt.setIsBufferingCompleted(!0),void tt();At.clearScheduleTimer(),Sn.abortRequests(),vt.prepareForPlaybackSeek().then((function(){var tt=vt.getAllRangesWithSafetyFactor(et.seekTime);return vt.clearBuffers(tt)})).then((function(){var nt=vt.getContinuousBufferTimeForTargetTime(et.seekTime);if(oe(nt))vt.setIsBufferingCompleted(!0),tt();else{var rt=isNaN(nt)?et.seekTime:nt;Le(rt),vt.setSeekTarget(rt);var it=[];it.push(vt.updateAppendWindow());var at=we();it.push(vt.updateBufferTimestampOffset(at)),Promise.all(it).then((function(){At.setInitSegmentRequired(!0),At.setCheckPlaybackQuality(!1),At.startScheduleTimer(),tt()}))}})).catch((function(et){nt.error(et)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((function(et,tt){try{At.clearScheduleTimer(),Sn.abortRequests(),vt.prepareForPlaybackSeek().then((function(){return vt.pruneAllSafely()})).then((function(){et()}))}catch(et){tt(et)}}))},reset:function(et,nt){Ot&&Ot.reset(),vt&&(vt.reset(et,nt),vt=null),At&&(At.reset(),At=null),Rt&&(Rt.reset(),Rt=null),kt&&(kt=null),bn&&bn.unRegisterStreamType($(),Xt),jt.off(ft.Z.DATA_UPDATE_COMPLETED,ge,tt),jt.off(ft.Z.INIT_FRAGMENT_NEEDED,se,tt),jt.off(ft.Z.MEDIA_FRAGMENT_NEEDED,ue,tt),jt.off(ft.Z.INIT_FRAGMENT_LOADED,Ce,tt),jt.off(ft.Z.MEDIA_FRAGMENT_LOADED,De,tt),jt.off(ft.Z.BUFFER_LEVEL_STATE_CHANGED,he,tt),jt.off(ft.Z.BUFFER_CLEARED,pe,tt),jt.off(ft.Z.SEEK_TARGET,Pe,tt),jt.off(ft.Z.FRAGMENT_LOADING_ABANDONED,ve,tt),jt.off(ft.Z.FRAGMENT_LOADING_COMPLETED,_e,tt),jt.off(ft.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Te,tt),jt.off(ft.Z.SET_NON_FRAGMENTED_TEXT,Se,tt),jt.off(ft.Z.QUOTA_EXCEEDED,be,tt),jt.off(ft.Z.SOURCE_BUFFER_ERROR,me,tt),jt.off(ft.Z.BYTES_APPENDED_END_FRAGMENT,ye,tt),ae(),Xt=null,Vt=null}},nt=(0,pt.Z)(qt).getInstance().getLogger(tt),ae(),jt.on(ft.Z.DATA_UPDATE_COMPLETED,ge,tt,{priority:lt.Z.EVENT_PRIORITY_HIGH}),jt.on(ft.Z.INIT_FRAGMENT_NEEDED,se,tt),jt.on(ft.Z.MEDIA_FRAGMENT_NEEDED,ue,tt),jt.on(ft.Z.INIT_FRAGMENT_LOADED,Ce,tt),jt.on(ft.Z.MEDIA_FRAGMENT_LOADED,De,tt),jt.on(ft.Z.BUFFER_LEVEL_STATE_CHANGED,he,tt),jt.on(ft.Z.BUFFER_CLEARED,pe,tt),jt.on(ft.Z.SEEK_TARGET,Pe,tt),jt.on(ft.Z.FRAGMENT_LOADING_ABANDONED,ve,tt),jt.on(ft.Z.FRAGMENT_LOADING_COMPLETED,_e,tt),jt.on(ft.Z.QUOTA_EXCEEDED,be,tt),jt.on(ft.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Te,tt),jt.on(ft.Z.SET_NON_FRAGMENTED_TEXT,Se,tt),jt.on(ft.Z.SOURCE_BUFFER_ERROR,me,tt),jt.on(ft.Z.BYTES_APPENDED_END_FRAGMENT,ye,tt),tt}ie.__dashjs_factory_name="StreamProcessor";const yn=dt.Z.getClassFactory(ie),En=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};var _n=nt(9032);function ue(et,tt){if(et){if("string"==typeof et)return le(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);return"Object"===nt&&et.constructor&&(nt=et.constructor.name),"Map"===nt||"Set"===nt?Array.from(et):"Arguments"===nt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)?le(et,tt):void 0}}function le(et,tt){(null==tt||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function ce(et){et=et||{};var tt,nt=this.context,rt=et.requestModifier,it=et.lowLatencyThroughputModel,ot=et.boxParser,st=(0,kt.Z)(nt).getInstance();function l(et){var nt,lt=new Date,ft=et.request,dt=new Headers;if(ft.range&&dt.append("Range","bytes="+ft.range),et.headers)for(var pt in et.headers){var yt=et.headers[pt];yt&&dt.append(pt,yt)}ft.requestStartDate||(ft.requestStartDate=lt),rt&&rt.modifyRequestHeader&&rt.modifyRequestHeader({setRequestHeader:function(et,tt){dt.append(et,tt)}},{url:et.url}),"function"==typeof window.AbortController&&(nt=new AbortController,et.abortController=nt,nt.signal.onabort=et.onabort);var vt={method:et.method,headers:dt,credentials:et.withCredentials?"include":void 0,signal:nt?nt.signal:void 0},At=st.get().streaming.abr.fetchThroughputCalculationMode,Rt=Date.now(),Nt=0;new Promise((function(et){if(At===at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&it&&(Nt=it.getThroughputCapacityDelayMS(ft,1e3*tt.getCurrentBufferLevel(ft.mediaType))))return setTimeout(et,Nt);et()})).then((function(){var nt=Date.now();fetch(et.url,vt).then((function(rt){et.response||(et.response={}),et.response.status=rt.status,et.response.statusText=rt.statusText,et.response.responseURL=rt.url,rt.ok||et.onerror();var st,lt="",dt=function(et,tt){var nt;if("undefined"==typeof Symbol||null==et[Symbol.iterator]){if(Array.isArray(et)||(nt=ue(et))){nt&&(et=nt);var rt=0,i=function(){};return{s:i,n:function(){return rt>=et.length?{done:!0}:{done:!1,value:et[rt++]}},e:function(et){throw et},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,at=!0,ot=!1;return{s:function(){nt=et[Symbol.iterator]()},n:function(){var et=nt.next();return at=et.done,et},e:function(et){ot=!0,it=et},f:function(){try{at||null==nt.return||nt.return()}finally{if(ot)throw it}}}}(rt.headers.keys());try{for(dt.s();!(st=dt.n()).done;){var pt=st.value;lt+=pt+": "+rt.headers.get(pt)+"\r\n"}}catch(et){dt.e(et)}finally{dt.f()}if(et.response.responseHeaders=lt,!rt.body)return rt.arrayBuffer().then((function(tt){et.response.response=tt;var nt={loaded:tt.byteLength,total:tt.byteLength,stream:!1};et.progress(nt),et.onload(),et.onend()}));var yt,vt,Dt,Ot=parseInt(rt.headers.get("Content-Length"),10),Mt=0,Lt=!1,xt=new Uint8Array,kt=0;if(At===at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&it){var Ut=nt,Bt=0,Gt=function(et){if(Array.isArray(et))return et}(Dt=rt.body.tee())||function(et,tt){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(et)){var nt=[],rt=!0,it=!1,at=void 0;try{for(var ot,st=et[Symbol.iterator]();!(rt=(ot=st.next()).done)&&(nt.push(ot.value),2!==nt.length);rt=!0);}catch(et){it=!0,at=et}finally{try{rt||null==st.return||st.return()}finally{if(it)throw at}}return nt}}(Dt)||ue(Dt,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),qt=Gt[0],jt=Gt[1];yt=qt.getReader(),vt=[],yt.read().then((function r(rt){var at=rt.value,ot=rt.done;if(Bt=Date.now(),at&&at.length){var st=Bt-Ut,dt=at.length;vt.push({chunkDownloadTimeRelativeMS:Bt-nt,chunkDownloadDurationMS:st,chunkBytes:dt,kbps:Math.round(8*dt/(st/1e3)),bufferLevel:tt.getCurrentBufferLevel(ft.mediaType)})}if(ot){var pt=Bt-nt,At=vt.reduce((function(et,tt){return et+tt.chunkBytes}),0);return it.addMeasurement(ft,pt,vt,Rt,Nt,lt),void et.progress({loaded:At,total:At,lengthComputable:!0,time:it.getEstimatedDownloadDurationMS(ft),stream:!0})}return Ut=Date.now(),yt.read().then(r)})),et.reader=jt.getReader()}else et.reader=rt.body.getReader();var Vt=[],zt=[],Xt=[],Qt=!0;c(et,(function t(tt){var nt=tt.value;if(tt.done){if(xt){if(At!==at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var rt=null,it=null;At===at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(rt=function(et,tt){try{var nt,rt;nt=et.filter((function(tt,nt){return nt<et.length-1})),rt=tt.filter((function(et,nt){return nt<tt.length-1}));var it=[];if(nt.length>1){for(var at=0,ot=0,st=0;st<nt.length;st++)if(nt[st]&&rt[st]){var lt=rt[st].ts-nt[st].ts;if(lt>1)it.push(8*rt[st].bytes/lt),ot=0;else{0===ot&&(ot=nt[st].ts,at=0);var ft=rt[st].ts-ot;ft>1?(at+=rt[st].bytes,it.push(8*at/ft),ot=0):at+=rt[st].bytes}}if(it.length>0)return it.reduce((function(et,tt){return et+tt}),0)/it.length}return null}catch(et){return null}}(zt,Xt))&&(it=8*Mt/rt):At===at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(it=f(Vt,Mt)),et.progress({loaded:Mt,total:isNaN(Ot)?Mt:Ot,lengthComputable:!0,time:it,stream:!0})}et.response.response=xt.buffer}return et.onload(),void et.onend()}if(nt&&nt.length>0){xt=function(et,tt){if(0===et.length)return tt;var nt=new Uint8Array(et.length+tt.length);return nt.set(et),nt.set(tt,et.length),nt}(xt,nt),Mt+=nt.length,Vt.push({ts:Date.now(),bytes:nt.length}),At===at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&Qt&&ot.findLastTopIsoBoxCompleted(["moof"],xt,kt).found&&(Qt=!1,zt.push({ts:performance.now(),bytes:nt.length}));var st=ot.findLastTopIsoBoxCompleted(["moov","mdat"],xt,kt);if(st.found){var lt,ft=st.lastCompletedOffset+st.size;At!==at.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||Qt||(Qt=!0,Xt.push({ts:performance.now(),bytes:xt.length})),ft===xt.length?(lt=xt,xt=new Uint8Array):(lt=new Uint8Array(xt.subarray(0,ft)),xt=xt.subarray(ft)),et.progress({data:lt.buffer,lengthComputable:!1,noTrace:!0}),kt=0}else kt=st.lastCompletedOffset,Lt||(et.progress({lengthComputable:!1,noTrace:!0}),Lt=!0)}c(et,t)}))})).catch((function(tt){et.onerror&&et.onerror(tt)}))}))}function c(et,tt){et.reader.read().then(tt).catch((function(tt){et.onerror&&200===et.response.status&&et.onerror(tt)}))}function f(et,tt){try{if((et=et.filter((function(nt){return nt.bytes>tt/4/et.length}))).length>1){var nt=0,rt=(et[et.length-1].ts-et[0].ts)/et.length;return et.forEach((function(tt,it){var at=et[it+1];if(at){var ot=at.ts-tt.ts;nt+=ot<rt?ot:0}})),nt}return null}catch(et){return null}}return{load:function(et){rt&&rt.modifyRequest?(0,cn.k)(et,rt).then((function(){return l(et)})):l(et)},abort:function(et){if(et.abortController)et.abortController.abort();else if(et.reader)try{et.reader.cancel(),et.onabort()}catch(et){}},calculateDownloadedTime:f,setup:function(et){tt=et.dashMetrics}}}ce.__dashjs_factory_name="FetchLoader";const Tn=dt.Z.getClassFactory(ce);var Sn=nt(1180);const bn=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.mimeType=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.frameRate=null}var et;return(et=[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==ot.Z.BASE_URL&&this.segmentInfoType!==ot.Z.SEGMENT_BASE&&!this.indexRange}}])&&function ge(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}(),In=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.period=null,this.index=-1,this.type=null};var wn=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null};wn.DEFAULT_ID="defaultId";const Cn=wn,On=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.publishTime=null,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN};var Pn=nt(2610);const xn=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};var Bn=function e(et,tt,nt,rt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et||"",this.serviceLocation=tt||et||"",this.dvb_priority=nt||1,this.dvb_weight=rt||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}};Bn.DEFAULT_DVB_PRIORITY=1,Bn.DEFAULT_DVB_WEIGHT=1;const qn=Bn,jn=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0},Vn=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null},Wn=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0},Qn=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri=null,this.value=null,this.id=null}var et;return(et=[{key:"init",value:function(et){return et&&(this.schemeIdUri=et.schemeIdUri?et.schemeIdUri:null,this.value=et.value?et.value:null,this.id=et.id?et.id:null),this}}])&&function Re(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}();var rr=nt(3101),ur=nt.n(rr);function De(){return{areEqual:function(et,tt){return ur()(et,tt)}}}De.__dashjs_factory_name="ObjectUtils";const lr=dt.Z.getSingletonFactory(De);var hr=nt(7803);const pr=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et||"",this.serviceLocation=tt||null,this.queryParams={}},_r=function e(et,tt,nt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et||"",this.serviceLocation=tt||null,this.ttl=nt||NaN,this.queryParams={}};function xe(et,tt){var nt;if("undefined"==typeof Symbol||null==et[Symbol.iterator]){if(Array.isArray(et)||(nt=Fe(et))||tt&&et&&"number"==typeof et.length){nt&&(et=nt);var rt=0,i=function(){};return{s:i,n:function(){return rt>=et.length?{done:!0}:{done:!1,value:et[rt++]}},e:function(et){throw et},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,at=!0,ot=!1;return{s:function(){nt=et[Symbol.iterator]()},n:function(){var et=nt.next();return at=et.done,et},e:function(et){ot=!0,it=et},f:function(){try{at||null==nt.return||nt.return()}finally{if(ot)throw it}}}}function Fe(et,tt){if(et){if("string"==typeof et)return ke(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);return"Object"===nt&&et.constructor&&(nt=et.constructor.name),"Map"===nt||"Set"===nt?Array.from(et):"Arguments"===nt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)?ke(et,tt):void 0}}function ke(et,tt){(null==tt||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function Ue(){var et,tt,nt,rt,it=this.context,st=(0,fn.Z)(it).getInstance(),lt=Number.isInteger||function(et){return"number"==typeof et&&isFinite(et)&&Math.floor(et)===et};function l(et,tt){if(!et)throw new Error("adaptation is not defined");if(!tt)throw new Error("type is not defined");if(et.Representation_asArray&&et.Representation_asArray.length){var nt=v(et.Representation_asArray[0]);if(nt&&nt.length>0&&hr.Y.indexOf(nt[0].schemeIdUri)>=0)return tt===at.Z.IMAGE}if(et.ContentComponent_asArray&&et.ContentComponent_asArray.length>0){if(et.ContentComponent_asArray.length>1)return tt===at.Z.MUXED;if(et.ContentComponent_asArray[0].contentType===tt)return!0}var rt=tt===at.Z.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(tt);if(et.Representation_asArray&&et.Representation_asArray.length){var it=et.Representation_asArray[0].codecs;if(rt.test(it))return!0}if(et.hasOwnProperty(ot.Z.MIME_TYPE))return rt.test(et.mimeType);if(et.Representation_asArray)for(var st,lt=0;lt<et.Representation_asArray.length;lt++)if((st=et.Representation_asArray[lt]).hasOwnProperty(ot.Z.MIME_TYPE))return rt.test(st.mimeType);return!1}function c(et){if(!et)throw new Error("adaptation is not defined");if(et.hasOwnProperty(ot.Z.SEGMENT_TEMPLATE)||et.hasOwnProperty(ot.Z.SEGMENT_TIMELINE)||et.hasOwnProperty(ot.Z.SEGMENT_LIST)||et.hasOwnProperty(ot.Z.SEGMENT_BASE))return!0;if(et.Representation_asArray&&et.Representation_asArray.length>0){var tt=et.Representation_asArray[0];if(tt.hasOwnProperty(ot.Z.SEGMENT_TEMPLATE)||tt.hasOwnProperty(ot.Z.SEGMENT_TIMELINE)||tt.hasOwnProperty(ot.Z.SEGMENT_LIST)||tt.hasOwnProperty(ot.Z.SEGMENT_BASE))return!0}return!1}function d(et){return l(et,at.Z.VIDEO)}function g(et){return l(et,at.Z.TEXT)}function h(et){return l(et,at.Z.IMAGE)}function p(et){return et&&Array.isArray(et.Representation_asArray)&&et.Representation_asArray.sort((function(et,tt){return et.bandwidth-tt.bandwidth})),et}function m(et,tt){return et&&et.Period_asArray&&lt(tt)&&et.Period_asArray[tt]?et.Period_asArray[tt].AdaptationSet_asArray:[]}function y(et){return et&&et.Period_asArray?et.Period_asArray:[]}function E(et){var tt=!1;return et&&et.hasOwnProperty("type")&&(tt=et.type===ot.Z.DYNAMIC),tt}function v(et){return et&&et.EssentialProperty_asArray&&et.EssentialProperty_asArray.length?et.EssentialProperty_asArray.map((function(et){return{schemeIdUri:et.schemeIdUri,value:et.value}})):null}function _(et){if(!et||!et.S_asArray)return NaN;var tt=et.S_asArray[0],nt=et.S_asArray[1];return tt.hasOwnProperty("d")?tt.d:nt.t-tt.t}function T(et,tt){if(!et)throw new Error("Period cannot be null or undefined");var nt=Cn.DEFAULT_ID+"_"+tt;return et.hasOwnProperty(ot.Z.ID)&&et.id.length>0&&"__proto__"!==et.id&&(nt=et.id),nt}function b(et,tt,nt){var rt,it=[];if(!et)return it;for(rt=0;rt<et.length;rt++){var st=new jn;if(st.timescale=1,st.representation=tt,!et[rt].hasOwnProperty(at.Z.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");st.schemeIdUri=et[rt].schemeIdUri,et[rt].hasOwnProperty(ot.Z.TIMESCALE)&&(st.timescale=et[rt].timescale),et[rt].hasOwnProperty(ot.Z.VALUE)&&(st.value=et[rt].value),it.push(st),st.period=nt}return it}function A(et){var tt=[],nt=et.BaseURL_asArray||[et.baseUri],rt=!1;return nt.some((function(nt){if(nt){var it=new qn,at=nt.__text||nt;return st.isRelative(at)&&(rt=!0,et.baseUri&&(at=st.resolve(at,et.baseUri))),it.url=at,nt.hasOwnProperty(ot.Z.SERVICE_LOCATION)&&nt.serviceLocation.length?it.serviceLocation=nt.serviceLocation:it.serviceLocation=at,nt.hasOwnProperty(ot.Z.DVB_PRIORITY)&&(it.dvb_priority=nt[ot.Z.DVB_PRIORITY]),nt.hasOwnProperty(ot.Z.DVB_WEIGHT)&&(it.dvb_weight=nt[ot.Z.DVB_WEIGHT]),nt.hasOwnProperty(ot.Z.AVAILABILITY_TIME_OFFSET)&&(it.availabilityTimeOffset=nt[ot.Z.AVAILABILITY_TIME_OFFSET]),nt.hasOwnProperty(ot.Z.AVAILABILITY_TIME_COMPLETE)&&(it.availabilityTimeComplete="false"!==nt[ot.Z.AVAILABILITY_TIME_COMPLETE]),tt.push(it),rt}})),tt}function I(et){var tt=new Wn;return tt.serverUrl=et.__text,et.hasOwnProperty(ot.Z.DEFAULT_SERVICE_LOCATION)&&(tt.defaultServiceLocation=et[ot.Z.DEFAULT_SERVICE_LOCATION],tt.defaultServiceLocationArray=tt.defaultServiceLocation.split(" ")),et.hasOwnProperty(ot.Z.QUERY_BEFORE_START)&&(tt.queryBeforeStart="true"===et[ot.Z.QUERY_BEFORE_START].toLowerCase()),et.hasOwnProperty(ot.Z.CLIENT_REQUIREMENT)&&(tt.clientRequirement="false"!==et[ot.Z.CLIENT_REQUIREMENT].toLowerCase()),tt}return et={getIsTypeOf:l,getIsText:g,getIsFragmented:c,getProducerReferenceTimesForAdaptation:function(et){var tt=et&&et.hasOwnProperty(ot.Z.PRODUCERREFERENCETIME_ASARRAY)?et[ot.Z.PRODUCERREFERENCETIME_ASARRAY]:[];(et&&et.hasOwnProperty(ot.Z.REPRESENTATION_ASARRAY)?et[ot.Z.REPRESENTATION_ASARRAY]:[]).forEach((function(et){var nt;et.hasOwnProperty(ot.Z.PRODUCERREFERENCETIME_ASARRAY)&&tt.push.apply(tt,function(et){if(Array.isArray(et))return ke(et)}(nt=et[ot.Z.PRODUCERREFERENCETIME_ASARRAY])||function(et){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(et))return Array.from(et)}(nt)||Fe(nt)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));var nt=[];return tt.forEach((function(et){var tt=new Vn;et.hasOwnProperty(ot.Z.ID)&&(tt[ot.Z.ID]=et[ot.Z.ID],et.hasOwnProperty(ot.Z.WALL_CLOCK_TIME)&&(tt[ot.Z.WALL_CLOCK_TIME]=et[ot.Z.WALL_CLOCK_TIME],et.hasOwnProperty(ot.Z.PRESENTATION_TIME)&&(tt[ot.Z.PRESENTATION_TIME]=et[ot.Z.PRESENTATION_TIME],et.hasOwnProperty(ot.Z.INBAND)&&(tt[ot.Z.INBAND]="false"!==et[ot.Z.INBAND]),et.hasOwnProperty(ot.Z.TYPE)&&(tt[ot.Z.TYPE]=et[ot.Z.TYPE]),nt.push(tt))))})),nt},getLanguageForAdaptation:function(et){var tt="";return et&&et.hasOwnProperty(ot.Z.LANG)&&(tt=et.lang),tt},getViewpointForAdaptation:function(et){return et&&et.hasOwnProperty(ot.Z.VIEWPOINT_ASARRAY)&&et[ot.Z.VIEWPOINT_ASARRAY].length?et[ot.Z.VIEWPOINT_ASARRAY].map((function(et){return(new Qn).init(et)})):[]},getRolesForAdaptation:function(et){return et&&et.hasOwnProperty(ot.Z.ROLE_ASARRAY)&&et[ot.Z.ROLE_ASARRAY].length?et[ot.Z.ROLE_ASARRAY].map((function(et){return(new Qn).init(et)})):[]},getAccessibilityForAdaptation:function(et){return et&&et.hasOwnProperty(ot.Z.ACCESSIBILITY_ASARRAY)&&et[ot.Z.ACCESSIBILITY_ASARRAY].length?et[ot.Z.ACCESSIBILITY_ASARRAY].map((function(et){return(new Qn).init(et)})):[]},getAudioChannelConfigurationForAdaptation:function(et){return et&&et.hasOwnProperty(ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY)&&et[ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].length?et[ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].map((function(et){return(new Qn).init(et)})):[]},getAudioChannelConfigurationForRepresentation:function(et){return et&&et.hasOwnProperty(ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY)&&et[ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].length?et[ot.Z.AUDIOCHANNELCONFIGURATION_ASARRAY].map((function(et){return(new Qn).init(et)})):[]},getAdaptationForIndex:function(et,tt,nt){var rt=m(tt,nt);return rt.length>0&&lt(et)?rt[et]:null},getIndexForAdaptation:function(et,tt,nt){if(!et)return-1;for(var rt=m(tt,nt),at=0;at<rt.length;at++)if(lr(it).getInstance().areEqual(rt[at],et))return at;return-1},getAdaptationForId:function(et,tt,nt){var rt,it,at=m(tt,nt);for(rt=0,it=at.length;rt<it;rt++)if(at[rt].hasOwnProperty(ot.Z.ID)&&at[rt].id===et)return at[rt];return null},getAdaptationsForType:function(et,tt,nt){var rt,it,at=m(et,tt),ot=[];for(rt=0,it=at.length;rt<it;rt++)l(at[rt],nt)&&ot.push(p(at[rt]));return ot},getRealPeriods:y,getRealPeriodForIndex:function(et,tt){var nt=y(tt);return nt.length>0&&lt(et)?nt[et]:null},getCodec:function(et,tt,nt){var rt=null;if(et&&et.Representation_asArray&&et.Representation_asArray.length>0){var it=lt(tt)&&tt>=0&&tt<et.Representation_asArray.length?et.Representation_asArray[tt]:et.Representation_asArray[0];it&&(rt=it.mimeType+';codecs="'+it.codecs+'"',nt&&void 0!==it.width&&(rt+=';width="'+it.width+'";height="'+it.height+'"'))}return rt&&(rt=rt.replace(/\sprofiles=[^;]*/g,"")),rt},getSelectionPriority:function(et){try{var tt=et&&void 0!==et.selectionPriority?parseInt(et.selectionPriority):1;return isNaN(tt)?1:tt}catch(et){return 1}},getMimeType:function(et){return et&&et.Representation_asArray&&et.Representation_asArray.length>0?et.Representation_asArray[0].mimeType:null},getKID:function(et){return et&&et.hasOwnProperty(ot.Z.CENC_DEFAULT_KID)?et[ot.Z.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(et){if(!et||!Array.isArray(et.Label_asArray))return[];for(var tt=[],nt=0;nt<et.Label_asArray.length;nt++)tt.push({lang:et.Label_asArray[nt].lang,text:et.Label_asArray[nt].__text||et.Label_asArray[nt]});return tt},getContentProtectionData:function(et){return et&&et.hasOwnProperty(ot.Z.CONTENTPROTECTION_ASARRAY)&&0!==et.ContentProtection_asArray.length?et.ContentProtection_asArray:null},getIsDynamic:E,getId:function(et){return et&&et[ot.Z.ID]||null},hasProfile:function(et,tt){var nt=!1;return et&&et.profiles&&et.profiles.length>0&&(nt=-1!==et.profiles.indexOf(tt)),nt},getDuration:function(et){return et&&et.hasOwnProperty(ot.Z.MEDIA_PRESENTATION_DURATION)?et.mediaPresentationDuration:et&&"dynamic"==et.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(et){return et&&et.bandwidth?et.bandwidth:NaN},getManifestUpdatePeriod:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,nt=NaN;return et&&et.hasOwnProperty(ot.Z.MINIMUM_UPDATE_PERIOD)&&(nt=et.minimumUpdatePeriod),isNaN(nt)?nt:Math.max(nt-tt,1)},getPublishTime:function(et){return et&&et.hasOwnProperty(ot.Z.PUBLISH_TIME)?new Date(et[ot.Z.PUBLISH_TIME]):null},getRepresentationCount:function(et){return et&&Array.isArray(et.Representation_asArray)?et.Representation_asArray.length:0},getBitrateListForAdaptation:function(et){var tt=p(et);return(tt&&Array.isArray(tt.Representation_asArray)?tt.Representation_asArray:[]).map((function(et){return{bandwidth:et.bandwidth,width:et.width||0,height:et.height||0,scanType:et.scanType||null,id:et.id||null}}))},getRepresentationFor:function(et,tt){return tt&&tt.Representation_asArray&&tt.Representation_asArray.length>0&&lt(et)?tt.Representation_asArray[et]:null},getRepresentationsForAdaptation:function(et){var tt,nt,rt,it,at=[],st=function(et){if(et&&et.period&&lt(et.period.index)){var tt=et.period.mpd.manifest.Period_asArray[et.period.index];if(tt&&tt.AdaptationSet_asArray&&lt(et.index))return p(tt.AdaptationSet_asArray[et.index])}}(et);if(st&&st.Representation_asArray){if(et&&et.period&&lt(et.period.index)){var ft=A(et.period.mpd.manifest);ft&&(nt=ft[0])}for(var dt=0,pt=st.Representation_asArray.length;dt<pt;++dt){var yt=st.Representation_asArray[dt],vt=new bn;if(vt.index=dt,vt.adaptation=et,yt.hasOwnProperty(ot.Z.ID)&&(vt.id=yt.id),yt.hasOwnProperty(ot.Z.CODECS)&&(vt.codecs=yt.codecs),yt.hasOwnProperty(ot.Z.MIME_TYPE)&&(vt.mimeType=yt[ot.Z.MIME_TYPE]),yt.hasOwnProperty(ot.Z.CODEC_PRIVATE_DATA)&&(vt.codecPrivateData=yt.codecPrivateData),yt.hasOwnProperty(ot.Z.BANDWITH)&&(vt.bandwidth=yt.bandwidth),yt.hasOwnProperty(ot.Z.WIDTH)&&(vt.width=yt.width),yt.hasOwnProperty(ot.Z.HEIGHT)&&(vt.height=yt.height),yt.hasOwnProperty(ot.Z.SCAN_TYPE)&&(vt.scanType=yt.scanType),yt.hasOwnProperty(ot.Z.MAX_PLAYOUT_RATE)&&(vt.maxPlayoutRate=yt.maxPlayoutRate),yt.hasOwnProperty(ot.Z.SEGMENT_BASE)?(tt=yt.SegmentBase,vt.segmentInfoType=ot.Z.SEGMENT_BASE):yt.hasOwnProperty(ot.Z.SEGMENT_LIST)?(tt=yt.SegmentList).hasOwnProperty(ot.Z.SEGMENT_TIMELINE)?vt.segmentInfoType=ot.Z.SEGMENT_TIMELINE:vt.segmentInfoType=ot.Z.SEGMENT_LIST:yt.hasOwnProperty(ot.Z.SEGMENT_TEMPLATE)?((tt=yt.SegmentTemplate).hasOwnProperty(ot.Z.SEGMENT_TIMELINE)?vt.segmentInfoType=ot.Z.SEGMENT_TIMELINE:vt.segmentInfoType=ot.Z.SEGMENT_TEMPLATE,tt.hasOwnProperty(ot.Z.INITIALIZATION_MINUS)&&(vt.initialization=tt.initialization.split("$Bandwidth$").join(yt.bandwidth).split("$RepresentationID$").join(yt.id))):vt.segmentInfoType=ot.Z.BASE_URL,vt.essentialProperties=v(yt),tt){if(tt.hasOwnProperty(ot.Z.INITIALIZATION)){var At=tt.Initialization;At.hasOwnProperty(ot.Z.SOURCE_URL)&&(vt.initialization=At.sourceURL),At.hasOwnProperty(ot.Z.RANGE)&&(vt.range=At.range)}else g(st)&&c(st)&&st.mimeType&&-1===st.mimeType.indexOf("application/mp4")&&(vt.range=0);tt.hasOwnProperty(ot.Z.TIMESCALE)&&(vt.timescale=tt.timescale),tt.hasOwnProperty(ot.Z.DURATION)?vt.segmentDuration=tt.duration/vt.timescale:yt.hasOwnProperty(ot.Z.SEGMENT_TEMPLATE)&&(tt=yt.SegmentTemplate).hasOwnProperty(ot.Z.SEGMENT_TIMELINE)&&(vt.segmentDuration=_(tt.SegmentTimeline)/vt.timescale),tt.hasOwnProperty(ot.Z.MEDIA)&&(vt.media=tt.media),tt.hasOwnProperty(ot.Z.START_NUMBER)&&(vt.startNumber=tt.startNumber),tt.hasOwnProperty(ot.Z.INDEX_RANGE)&&(vt.indexRange=tt.indexRange),tt.hasOwnProperty(ot.Z.PRESENTATION_TIME_OFFSET)&&(vt.presentationTimeOffset=tt.presentationTimeOffset/vt.timescale),tt.hasOwnProperty(ot.Z.AVAILABILITY_TIME_OFFSET)?vt.availabilityTimeOffset=tt.availabilityTimeOffset:nt&&void 0!==nt.availabilityTimeOffset&&(vt.availabilityTimeOffset=nt.availabilityTimeOffset),tt.hasOwnProperty(ot.Z.AVAILABILITY_TIME_COMPLETE)?vt.availabilityTimeComplete="false"!==tt.availabilityTimeComplete:nt&&void 0!==nt.availabilityTimeComplete&&(vt.availabilityTimeComplete=nt.availabilityTimeComplete)}vt.MSETimeOffset=(it=(rt=vt).presentationTimeOffset,rt.adaptation.period.start-it),vt.path=[et.period.index,et.index,dt],at.push(vt)}}return at},getAdaptationsForPeriod:function(et){var nt,rt,it,st=et&&lt(et.index)?et.mpd.manifest.Period_asArray[et.index]:null,ft=[];if(st&&st.AdaptationSet_asArray)for(it=0;it<st.AdaptationSet_asArray.length;it++)rt=st.AdaptationSet_asArray[it],nt=new In,rt.hasOwnProperty(ot.Z.ID)&&(nt.id=rt.id),nt.index=it,nt.period=et,l(rt,at.Z.MUXED)?nt.type=at.Z.MUXED:l(rt,at.Z.AUDIO)?nt.type=at.Z.AUDIO:d(rt)?nt.type=at.Z.VIDEO:g(rt)?nt.type=at.Z.TEXT:h(rt)?nt.type=at.Z.IMAGE:tt.warn("Unknown Adaptation stream type"),ft.push(nt);return ft},getRegularPeriods:function(et){var rt,it,st=!!et&&E(et.manifest),lt=[],ft=null,dt=null,pt=null,yt=null;for(it=0,rt=et&&et.manifest&&et.manifest.Period_asArray?et.manifest.Period_asArray.length:0;it<rt;it++)(dt=et.manifest.Period_asArray[it]).hasOwnProperty(ot.Z.START)?(yt=new Cn).start=dt.start:null!==ft&&ft.hasOwnProperty(ot.Z.DURATION)&&null!==pt?(yt=new Cn).start=parseFloat((pt.start+pt.duration).toFixed(5)):0!==it||st||((yt=new Cn).start=0),null!==pt&&isNaN(pt.duration)&&(null!==yt?pt.duration=parseFloat((yt.start-pt.start).toFixed(5)):tt.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==yt&&(yt.id=T(dt,it),yt.index=it,yt.mpd=et,dt.hasOwnProperty(ot.Z.DURATION)&&(yt.duration=dt.duration),pt&&(pt.nextPeriodId=yt.id),lt.push(yt),ft=dt,pt=yt),dt=null,yt=null;return 0===lt.length||null!==pt&&isNaN(pt.duration)&&(pt.duration=parseFloat((function(et){!function(){if(!nt||!nt.hasOwnProperty("error"))throw new Error(at.Z.MISSING_CONFIG_ERROR)}();var tt,rt=E(et.mpd.manifest);return et.mpd.manifest.mediaPresentationDuration?tt=et.mpd.manifest.mediaPresentationDuration:et.duration?tt=et.duration:rt?tt=Number.POSITIVE_INFINITY:nt.error(new Lt.Z(xt.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",et)),tt}(pt)-pt.start).toFixed(5))),lt},getMpd:function(et){var tt=new On;return et&&(tt.manifest=et,et.hasOwnProperty(ot.Z.AVAILABILITY_START_TIME)?tt.availabilityStartTime=new Date(et.availabilityStartTime.getTime()):et.loadedTime&&(tt.availabilityStartTime=new Date(et.loadedTime.getTime())),et.hasOwnProperty(ot.Z.AVAILABILITY_END_TIME)&&(tt.availabilityEndTime=new Date(et.availabilityEndTime.getTime())),et.hasOwnProperty(ot.Z.MINIMUM_UPDATE_PERIOD)&&(tt.minimumUpdatePeriod=et.minimumUpdatePeriod),et.hasOwnProperty(ot.Z.MEDIA_PRESENTATION_DURATION)&&(tt.mediaPresentationDuration=et.mediaPresentationDuration),et.hasOwnProperty(ot.Z.SUGGESTED_PRESENTATION_DELAY)&&(tt.suggestedPresentationDelay=et.suggestedPresentationDelay),et.hasOwnProperty(ot.Z.TIMESHIFT_BUFFER_DEPTH)&&(tt.timeShiftBufferDepth=et.timeShiftBufferDepth),et.hasOwnProperty(ot.Z.MAX_SEGMENT_DURATION)&&(tt.maxSegmentDuration=et.maxSegmentDuration),et.hasOwnProperty(ot.Z.PUBLISH_TIME)&&(tt.publishTime=new Date(et.publishTime))),tt},getEventsForPeriod:function(et){var tt,nt,it=et&&et.mpd&&et.mpd.manifest?et.mpd.manifest:null,st=it?it.Period_asArray:null,ft=st&&et&&lt(et.index)?st[et.index].EventStream_asArray:null,dt=[];if(ft)for(tt=0;tt<ft.length;tt++){var pt=new jn;if(pt.period=et,pt.timescale=1,!ft[tt].hasOwnProperty(at.Z.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(pt.schemeIdUri=ft[tt][at.Z.SCHEME_ID_URI],ft[tt].hasOwnProperty(ot.Z.TIMESCALE)&&(pt.timescale=ft[tt][ot.Z.TIMESCALE]),ft[tt].hasOwnProperty(ot.Z.VALUE)&&(pt.value=ft[tt][ot.Z.VALUE]),ft[tt].hasOwnProperty(ot.Z.PRESENTATION_TIME_OFFSET)&&(pt.presentationTimeOffset=ft[tt][ot.Z.PRESENTATION_TIME_OFFSET]),nt=0;ft[tt].Event_asArray&&nt<ft[tt].Event_asArray.length;nt++){var yt=ft[tt].Event_asArray[nt],vt=new xn;vt.presentationTime=0,vt.eventStream=pt,yt.hasOwnProperty(ot.Z.PRESENTATION_TIME)&&(vt.presentationTime=yt.presentationTime);var At=pt.presentationTimeOffset?pt.presentationTimeOffset/pt.timescale:0;vt.calculatedPresentationTime=vt.presentationTime/pt.timescale+et.start-At,yt.hasOwnProperty(ot.Z.DURATION)&&(vt.duration=yt.duration/pt.timescale),yt.hasOwnProperty(ot.Z.ID)?vt.id=yt.id:vt.id=null,yt.Signal&&yt.Signal.Binary?vt.messageData=rt.decodeArray(yt.Signal.Binary.toString()):vt.messageData=yt.messageData||yt.__cdata||yt.__text,dt.push(vt)}}return dt},getEssentialPropertiesForRepresentation:v,getEventStreamForAdaptationSet:function(et,tt,nt){var rt,it,at;return et&&et.Period_asArray&&tt&&tt.period&&lt(tt.period.index)&&(it=et.Period_asArray[tt.period.index])&&it.AdaptationSet_asArray&&lt(tt.index)&&(at=it.AdaptationSet_asArray[tt.index])&&(rt=at.InbandEventStream_asArray),b(rt,null,nt)},getEventStreamForRepresentation:function(et,tt,nt){var rt,it,at,ot;return et&&et.Period_asArray&&tt&&tt.adaptation&&tt.adaptation.period&&lt(tt.adaptation.period.index)&&(it=et.Period_asArray[tt.adaptation.period.index])&&it.AdaptationSet_asArray&&lt(tt.adaptation.index)&&(at=it.AdaptationSet_asArray[tt.adaptation.index])&&at.Representation_asArray&&lt(tt.index)&&(ot=at.Representation_asArray[tt.index])&&(rt=ot.InbandEventStream_asArray),b(rt,tt,nt)},getUTCTimingSources:function(et){var tt=E(et),nt=!!et&&et.hasOwnProperty(ot.Z.AVAILABILITY_START_TIME),rt=et?et.UTCTiming_asArray:null,it=[];return(tt||nt)&&rt&&rt.forEach((function(et){var tt=new Pn.Z;et.hasOwnProperty(at.Z.SCHEME_ID_URI)&&(tt.schemeIdUri=et.schemeIdUri,et.hasOwnProperty(ot.Z.VALUE)&&(tt.value=et.value.toString(),it.push(tt)))})),it},getBaseURLsFromElement:A,getRepresentationSortFunction:function(){return function(et,tt){return et.bandwidth-tt.bandwidth}},getContentSteering:function(et){if(et&&et.hasOwnProperty(ot.Z.CONTENT_STEERING_AS_ARRAY))return I(et[ot.Z.CONTENT_STEERING_AS_ARRAY][0])},getLocation:function(et){return et&&et.hasOwnProperty(ot.Z.LOCATION_AS_ARRAY)?et[ot.Z.LOCATION_AS_ARRAY].map((function(et){var tt=et.__text||et,nt=et.hasOwnProperty(ot.Z.SERVICE_LOCATION)?et[ot.Z.SERVICE_LOCATION]:null;return new pr(tt,nt)})):[]},getPatchLocation:function(et){return et&&et.hasOwnProperty(ot.Z.PATCH_LOCATION_AS_ARRAY)?et[ot.Z.PATCH_LOCATION_AS_ARRAY].map((function(et){var tt=et.__text||et,nt=et.hasOwnProperty(ot.Z.SERVICE_LOCATION)?et[ot.Z.SERVICE_LOCATION]:null,rt=et.hasOwnProperty(ot.Z.TTL)?1e3*parseFloat(et[ot.Z.TTL]):NaN;return new _r(tt,nt,rt)})):[]},getSuggestedPresentationDelay:function(et){return et&&et.hasOwnProperty(ot.Z.SUGGESTED_PRESENTATION_DELAY)?et.suggestedPresentationDelay:null},getAvailabilityStartTime:function(et){return et&&et.hasOwnProperty(ot.Z.AVAILABILITY_START_TIME)&&null!==et.availabilityStartTime?et.availabilityStartTime.getTime():null},getServiceDescriptions:function(et){var tt=[];if(et&&et.hasOwnProperty(ot.Z.SERVICE_DESCRIPTION)){var nt,rt=xe(et.ServiceDescription_asArray);try{for(rt.s();!(nt=rt.n()).done;){var it=nt.value,at=null,st=null,lt=null,ft=null,dt=null,pt=null,yt=null;for(var vt in it)it.hasOwnProperty(vt)&&(vt===ot.Z.ID?at=it[vt]:vt===ot.Z.SERVICE_DESCRIPTION_SCOPE?st=it[vt].schemeIdUri:vt===ot.Z.SERVICE_DESCRIPTION_LATENCY?lt={target:parseInt(it[vt].target),max:parseInt(it[vt].max),min:parseInt(it[vt].min),referenceId:parseInt(it[vt].referenceId)}:vt===ot.Z.SERVICE_DESCRIPTION_PLAYBACK_RATE?ft={max:parseFloat(it[vt].max),min:parseFloat(it[vt].min)}:vt===ot.Z.SERVICE_DESCRIPTION_OPERATING_QUALITY?dt={mediaType:it[vt].mediaType,max:parseInt(it[vt].max),min:parseInt(it[vt].min),target:parseInt(it[vt].target),type:it[vt].type,maxQualityDifference:parseInt(it[vt].maxQualityDifference)}:vt===ot.Z.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH?pt={mediaType:it[vt].mediaType,max:parseInt(it[vt].max),min:parseInt(it[vt].min),target:parseInt(it[vt].target)}:vt===ot.Z.CONTENT_STEERING&&(yt=I(it[vt])));tt.push({id:at,schemeIdUri:st,latency:lt,playbackRate:ft,operatingQuality:dt,operatingBandwidth:pt,contentSteering:yt})}}catch(et){rt.e(et)}finally{rt.f()}}return tt},getSegmentAlignment:function(et){return!(!et||!et.hasOwnProperty(ot.Z.SEGMENT_ALIGNMENT))&&"true"===et[ot.Z.SEGMENT_ALIGNMENT]},getSubSegmentAlignment:function(et){return!(!et||!et.hasOwnProperty(ot.Z.SUB_SEGMENT_ALIGNMENT))&&"true"===et[ot.Z.SUB_SEGMENT_ALIGNMENT]},getSupplementalPropertiesForAdaptation:function(et){var tt={};if(et&&et.hasOwnProperty(ot.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)){var nt,rt=xe(et.SupplementalProperty_asArray);try{for(rt.s();!(nt=rt.n()).done;){var it=nt.value;it.hasOwnProperty(at.Z.SCHEME_ID_URI)&&it.hasOwnProperty(ot.Z.VALUE)&&(tt[it[at.Z.SCHEME_ID_URI]]=it[ot.Z.VALUE])}}catch(et){rt.e(et)}finally{rt.f()}}return tt},getSupplementalPropertiesAsArrayForAdaptation:function(et){return et&&et.hasOwnProperty(ot.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)&&et.SupplementalProperty_asArray.length?et.SupplementalProperty_asArray.map((function(et){return(new Qn).init(et)})):[]},getSupplementalPropertiesForRepresentation:function(et){var tt={};if(et&&et.hasOwnProperty(ot.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)){var nt,rt=xe(et.SupplementalProperty_asArray);try{for(rt.s();!(nt=rt.n()).done;){var it=nt.value;it.hasOwnProperty(at.Z.SCHEME_ID_URI)&&it.hasOwnProperty(ot.Z.VALUE)&&(tt[it[at.Z.SCHEME_ID_URI]]=it[ot.Z.VALUE])}}catch(et){rt.e(et)}finally{rt.f()}}return tt},getSupplementalPropertiesAsArrayForRepresentation:function(et){return et&&et.hasOwnProperty(ot.Z.SUPPLEMENTAL_PROPERTY_ASARRAY)&&et.SupplementalProperty_asArray.length?et.SupplementalProperty_asArray.map((function(et){return(new Qn).init(et)})):[]},setConfig:function(et){et&&(et.errHandler&&(nt=et.errHandler),et.BASE64&&(rt=et.BASE64))}},tt=(0,pt.Z)(it).getInstance().getLogger(et),et}Ue.__dashjs_factory_name="DashManifestModel";const Tr=dt.Z.getSingletonFactory(Ue);var wr=nt(703);function Ge(et,tt){var nt;if("undefined"==typeof Symbol||null==et[Symbol.iterator]){if(Array.isArray(et)||(nt=function(et,tt){if(et){if("string"==typeof et)return qe(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);return"Object"===nt&&et.constructor&&(nt=et.constructor.name),"Map"===nt||"Set"===nt?Array.from(et):"Arguments"===nt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)?qe(et,tt):void 0}}(et))||tt&&et&&"number"==typeof et.length){nt&&(et=nt);var rt=0,i=function(){};return{s:i,n:function(){return rt>=et.length?{done:!0}:{done:!1,value:et[rt++]}},e:function(et){throw et},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,at=!0,ot=!1;return{s:function(){nt=et[Symbol.iterator]()},n:function(){var et=nt.next();return at=et.done,et},e:function(et){ot=!0,it=et},f:function(){try{at||null==nt.return||nt.return()}finally{if(ot)throw it}}}}function qe(et,tt){(null==tt||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function Ye(){var et,tt,nt,rt,it,ot,st,ft,dt,pt,vt=this.context,At=(0,lt.Z)(vt).getInstance(),Rt=(0,kt.Z)(vt).getInstance();function m(){nt={pr:1,nor:null,st:null,sf:null,sid:"".concat(wr.Z.generateUuid()),cid:null},dt={},ft={},pt={},E()}function y(){E()}function E(){if(ot){var et=ot.getStreamController();if(et&&"function"==typeof et.getActiveStream){var tt=et.getActiveStream();tt&&(st=tt.getProcessors())}}}function v(et,tt){var nt,rt={},it=Ge(tt);try{for(it.s();!(nt=it.n()).done;){var at=nt.value;et[at]&&(rt[at]=et[at])}}catch(et){it.e(et)}finally{it.f()}return rt}function _(et){var tt=Rt.get().streaming.cmcd.enabledKeys;return et.filter((function(et){return tt.includes(et)}))}function T(et){try{return et.type===Ut.w.MPD_TYPE?((lt=S()).ot="m",lt):et.type===Ut.w.MEDIA_SEGMENT_TYPE?(tt=et.mediaType,pt.hasOwnProperty(tt)||(pt[tt]=!1),ft.hasOwnProperty(tt)||(ft[tt]=!1),dt.hasOwnProperty(tt)||(dt[tt]=!1),function(et){var tt,lt=S(),yt=function(et){try{var tt=et.quality,nt=et.mediaInfo.bitrateList;return parseInt(nt[tt].bandwidth/1e3)}catch(et){return null}}(et),vt=function(et){try{return isNaN(et.duration)?null:Math.round(1e3*et.duration)}catch(et){return null}}(et),At=function(et){try{return 100*parseInt(rt.getThroughputHistory().getSafeAverageThroughput(et)/100)}catch(et){return null}}(et.mediaType),Nt=function(et){try{var tt=nt.pr,rt=it.getCurrentBufferLevel(et);return isNaN(tt)||isNaN(rt)?null:100*parseInt(rt/tt*10)}catch(et){return null}}(et.mediaType),Dt=b(et.mediaType),Ot=function(et){try{var tt=rt.getTopBitrateInfoFor(et);return Math.round(tt.bitrate/1e3)}catch(et){return null}}(et.mediaType),Mt=nt.pr,Lt=function(et){if(st&&0!==st.length){var tt,nt=Ge(st);try{for(nt.s();!(tt=nt.n()).done;){var rt=tt.value;if(rt.getType()===et)return rt.probeNextRequest()}}catch(et){nt.e(et)}finally{nt.f()}}}(et.mediaType);et.mediaType===at.Z.VIDEO&&(tt="v"),et.mediaType===at.Z.AUDIO&&(tt="a"),et.mediaType===at.Z.TEXT&&(tt="application/mp4"===et.mediaInfo.mimeType?"tt":"c");var xt=Rt.get().streaming.cmcd.rtp;return xt||(xt=function(et){var tt=ot.getPlaybackRate();tt||(tt=1);var nt=et.quality,rt=et.mediaType,it=et.mediaInfo,at=et.duration,st=b(rt);0===st&&(st=500);var lt=it.bitrateList[nt].bandwidth*at/1e3/(st/tt/1e3),ft=Rt.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(Rt.get().streaming.cmcd.rtpSafetyFactor)?Rt.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(parseInt(lt*ft/100)+1)}(et)),lt.rtp=xt,Lt&&(et.url!==Lt.url?lt.nor=encodeURIComponent(wr.Z.getRelativeUrl(et.url,Lt.url)):Lt.range&&(lt.nrr=Lt.range)),yt&&(lt.br=yt),tt&&(lt.ot=tt),isNaN(vt)||(lt.d=vt),isNaN(At)||(lt.mtp=At),isNaN(Nt)||(lt.dl=Nt),isNaN(Dt)||(lt.bl=Dt),isNaN(Ot)||(lt.tb=Ot),isNaN(Mt)||1===Mt||(lt.pr=Mt),dt[et.mediaType]&&(lt.bs=!0,dt[et.mediaType]=!1),!ft[et.mediaType]&&pt[et.mediaType]||(lt.su=!0,ft[et.mediaType]=!1,pt[et.mediaType]=!0),lt}(et)):et.type===Ut.w.INIT_SEGMENT_TYPE?function(){var et=S();return et.ot="i",et.su=!0,et}():et.type===Ut.w.OTHER_TYPE||et.type===Ut.w.XLINK_EXPANSION_TYPE?function(){var et=S();return et.ot="o",et}():et.type===Ut.w.LICENSE?function(et){var tt=S();return tt.ot="k",tt}():null}catch(et){return null}var tt,lt}function S(){var et={},tt=Rt.get().streaming.cmcd.cid?Rt.get().streaming.cmcd.cid:nt.cid;return et.v=1,et.sid=Rt.get().streaming.cmcd.sid?Rt.get().streaming.cmcd.sid:nt.sid,et.sid="".concat(et.sid),tt&&(et.cid="".concat(tt)),isNaN(nt.pr)||1===nt.pr||null===nt.pr||(et.pr=nt.pr),nt.st&&(et.st=nt.st),nt.sf&&(et.sf=nt.sf),et}function b(et){try{var tt=it.getCurrentBufferLevel(et);return isNaN(tt)?null:100*parseInt(10*tt)}catch(et){return null}}function A(et){try{nt.pr=et.playbackRate}catch(et){}}function I(tt){try{var rt=et.getIsDynamic(tt.data)?"l":"v",it=tt.protocol&&"MSS"===tt.protocol?"s":"d";nt.st="".concat(rt),nt.sf="".concat(it)}catch(et){}}function R(et){try{et.state&&et.mediaType&&et.state===yt.Z.BUFFER_EMPTY&&(dt[et.mediaType]||(dt[et.mediaType]=!0),ft[et.mediaType]||(ft[et.mediaType]=!0))}catch(et){}}function w(){for(var et in dt)dt.hasOwnProperty(et)&&(dt[et]=!0);for(var tt in ft)ft.hasOwnProperty(tt)&&(ft[tt]=!0)}function D(et){try{if(!et)return null;var tt=Object.keys(et).sort((function(et,tt){return et.localeCompare(tt)})),nt=tt.length,rt=tt.reduce((function(tt,rt,it){return"v"===rt&&1===et[rt]||("string"==typeof et[rt]&&"ot"!==rt&&"sf"!==rt&&"st"!==rt?tt+="".concat(rt,"=").concat(JSON.stringify(et[rt])):tt+="".concat(rt,"=").concat(et[rt]),it<nt-1&&(tt+=",")),tt}),"");return(rt=rt.replace(/=true/g,"")).replace(/,\s*$/,"")}catch(et){return null}}return tt={getQueryParameter:function(et){try{if(Rt.get().streaming.cmcd&&Rt.get().streaming.cmcd.enabled){var tt=T(et),nt=D(function(et){try{var tt=Rt.get().streaming.cmcd.enabledKeys;return Object.keys(et).filter((function(et){return tt.includes(et)})).reduce((function(tt,nt){return tt[nt]=et[nt],tt}),{})}catch(tt){return et}}(tt));return At.trigger(Sn.Z.CMCD_DATA_GENERATED,{url:et.url,mediaType:et.mediaType,cmcdData:tt,cmcdString:nt}),{key:"CMCD",value:nt}}return null}catch(et){return null}},getHeaderParameters:function(et){try{if(Rt.get().streaming.cmcd&&Rt.get().streaming.cmcd.enabled){var tt=T(et),nt=v(tt,_(["br","d","ot","tb"])),rt=v(tt,_(["bl","dl","mtp","nor","nrr","su"])),it=v(tt,_(["bs","rtp"])),at=v(tt,_(["cid","pr","sf","sid","st","v"])),ot={"CMCD-Object":D(nt),"CMCD-Request":D(rt),"CMCD-Status":D(it),"CMCD-Session":D(at)};return At.trigger(Sn.Z.CMCD_DATA_GENERATED,{url:et.url,mediaType:et.mediaType,cmcdData:tt,headers:ot}),ot}return null}catch(et){return null}},setConfig:function(et){et&&(et.abrController&&(rt=et.abrController),et.dashMetrics&&(it=et.dashMetrics),et.playbackController&&(ot=et.playbackController))},reset:function(){At.off(yt.Z.PLAYBACK_RATE_CHANGED,A,this),At.off(yt.Z.MANIFEST_LOADED,I,this),At.off(yt.Z.BUFFER_LEVEL_STATE_CHANGED,R,tt),At.off(yt.Z.PLAYBACK_SEEKED,w,tt),m()},initialize:function(){At.on(yt.Z.PLAYBACK_RATE_CHANGED,A,tt),At.on(yt.Z.MANIFEST_LOADED,I,tt),At.on(yt.Z.BUFFER_LEVEL_STATE_CHANGED,R,tt),At.on(yt.Z.PLAYBACK_SEEKED,w,tt),At.on(yt.Z.PERIOD_SWITCH_COMPLETED,y,tt)}},et=Tr(vt).getInstance(),m(),tt}Ye.__dashjs_factory_name="CmcdModel";const Cr=dt.Z.getSingletonFactory(Ye);function He(et){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function Ve(et,tt){Ve=function(et,tt){return new a(et,void 0,tt)};var nt=ze(RegExp),rt=RegExp.prototype,it=new WeakMap;function a(et,tt,rt){var at=nt.call(this,et,tt);return it.set(at,rt||it.get(et)),at}function o(et,tt){var nt=it.get(tt);return Object.keys(nt).reduce((function(tt,rt){return tt[rt]=et[nt[rt]],tt}),Object.create(null))}return Ke(a,nt),a.prototype.exec=function(et){var tt=rt.exec.call(this,et);return tt&&(tt.groups=o(tt,this)),tt},a.prototype[Symbol.replace]=function(et,tt){if("string"==typeof tt){var nt=it.get(this);return rt[Symbol.replace].call(this,et,tt.replace(/\$<([^>]+)>/g,(function(et,tt){return"$"+nt[tt]})))}if("function"==typeof tt){var at=this;return rt[Symbol.replace].call(this,et,(function(){var et=[];return et.push.apply(et,arguments),"object"!==He(et[et.length-1])&&et.push(o(et,at)),tt.apply(this,et)}))}return rt[Symbol.replace].call(this,et,tt)},Ve.apply(this,arguments)}function Ke(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&Qe(et,tt)}function ze(et){var tt="function"==typeof Map?new Map:void 0;return(ze=function(et){if(null===et||(nt=et,-1===Function.toString.call(nt).indexOf("[native code]")))return et;var nt;if("function"!=typeof et)throw new TypeError("Super expression must either be null or a function");if(void 0!==tt){if(tt.has(et))return tt.get(et);tt.set(et,r)}function r(){return We(et,arguments,Je(this).constructor)}return r.prototype=Object.create(et.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Qe(r,et)})(et)}function We(et,tt,nt){return(We=Xe()?Reflect.construct:function(et,tt,nt){var rt=[null];rt.push.apply(rt,tt);var it=new(Function.bind.apply(et,rt));return nt&&Qe(it,nt.prototype),it}).apply(null,arguments)}function Xe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}function Qe(et,tt){return(Qe=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Je(et){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}var Or="dynamic",Fr="stream",Gr=["mb","st","sf","v"],Yr={video:"v",audio:"a",text:"tt",stream:Fr},Hr=/^[-0-9]/;function ut(){var et,tt,nt,rt,it=this.context,at=(0,lt.Z)(it).getInstance();function o(){nt={},rt={}}function s(et){et&&Object.keys(et).forEach((function(tt){Gr.includes(tt)||delete et[tt]}))}function c(et){return!et||"false"!==et.toLowerCase()&&(Hr.test(et)?parseInt(et,10):et.replace(/["]+/g,""))}function d(et){try{for(var nt={},rt=et.split(","),it=0;it<rt.length;it++){var at=rt[it].split("="),ot=at[0],st=c(at[1]);nt[ot]=st}return nt}catch(et){tt.error("Failed to parse CMSD-Static response header value:",et)}}function g(et){try{for(var nt={},rt=et.split(","),it=rt[rt.length-1].split(";"),at=1;at<it.length;at++){var ot=it[at].split("="),st=ot[0],lt=c(ot[1]);nt[st]=lt}return nt}catch(et){return tt.error("Failed to parse CMSD-Dynamic response header value:",et),[]}}function h(et){return Yr[et]||"o"}function p(et,tt,it){var at="static"===et?nt:rt,ot=at[tt]||{},st=at[Fr]||{};return ot[it]||st[it]}return et={setConfig:function(){},initialize:function(){},reset:function(){o()},parseResponseHeaders:function(et,tt){for(var it=null,ot=null,st=et.split("\r\n"),lt=st.length-1;lt>=0;lt--){var dt=st[lt].match(Ve(/^((?:(?!:)[\s\S])*):[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(.*)$/,{key:1,value:2}));if(dt&&dt.groups){var pt=dt.groups.key.toLowerCase(),yt=dt.groups.value;switch(pt){case"cmsd-static":it=d(yt),at.trigger(ft.Z.CMSD_STATIC_HEADER,it);break;case"cmsd-dynamic":ot||(ot=g(yt))}}}var vt=Fr;return it&&it.ot?vt=it.ot:tt&&(vt=h(tt)),s(nt[vt]),s(rt[vt]),it&&(nt[vt]=Object.assign(nt[vt]||{},it)),ot&&(rt[vt]=Object.assign(rt[vt]||{},ot)),{static:it,dynamic:ot}},getMaxBitrate:function(et){var tt=h(et);return p(Or,tt,"mb")||-1},getEstimatedThroughput:function(et){var tt=h(et);return p(Or,tt,"etp")||null},getResponseDelay:function(et){var tt=h(et);return p(Or,tt,"rd")||null},getRoundTripTime:function(et){var tt=h(et);return p(Or,tt,"rtt")||null}},tt=(0,pt.Z)(it).getInstance().getLogger(et),o(),et}ut.__dashjs_factory_name="CmsdModel";const Kr=dt.Z.getSingletonFactory(ut);function ct(){var et,tt,nt=this.context,rt={};function i(){tt=(0,pt.Z)(nt).getInstance().getLogger(et)}function a(et){for(var tt={},nt=0,rt=0,it=0,at=0,ot=et.length,st=0;st<ot;++st)nt+=et[st].chunkDownloadTimeRelativeMS,rt+=et[st].bufferLevel,it+=et[st].chunkDownloadTimeRelativeMS*et[st].bufferLevel,at+=et[st].chunkDownloadTimeRelativeMS*et[st].chunkDownloadTimeRelativeMS;return tt.m=(it-nt*rt/ot)/(at-nt*nt/ot),tt.b=rt/ot-tt.m*nt/ot,function(et){return tt.m*et+tt.b}}function o(et){var tt,nt=!0,rt=et.reduce((function(et,tt){return et+tt.bufferLevelAtSegmentEnd}),0)/et.length;return et.forEach((function(et){Math.abs(et.bufferLevelAtSegmentEnd/et.bufferLevelAtSegmentStart)<.95&&(nt=!1),et.bufferLevelAtSegmentEnd/rt<.8&&(nt=!1),tt?tt>et.bitrate&&(nt=!1):tt=et.bitrate})),nt}return et={setup:i,addMeasurement:function(et,tt,nt,it,at){et&&et.mediaType&&!rt[et.mediaType]&&(rt[et.mediaType]=[]);var ot=et.mediaInfo.bitrateList.find((function(tt){return tt.id===et.representationId}));rt[et.mediaType].push({index:et.index,repId:et.representationId,mediaType:et.mediaType,requestTimeMS:it,adjustedAvailabilityStartTimeMS:et.availabilityStartTime.getTime(),segDurationMS:1e3*et.duration,chunksDurationMS:nt.reduce((function(et,tt){return et+tt.chunkDownloadDurationMS}),0),segmentBytes:nt.reduce((function(et,tt){return et+tt.chunkBytes}),0),bitrate:ot&&ot.bandwidth,bitrateList:et.mediaInfo.bitrateList,chunkMeasurements:nt,fetchDownloadDurationMS:tt,throughputCapacityDelayMS:at,getEstimatedBufferLevel:a(nt.slice(1))}),rt[et.mediaType].length>10&&rt[et.mediaType].shift()},getThroughputCapacityDelayMS:function(et,tt){var nt=rt[et.mediaType]&&rt[et.mediaType].slice(-3);return!nt||nt.length<3?0:o(nt)?tt/4>250?250:tt/4:0},getEstimatedDownloadDurationMS:function(et){var nt=rt[et.mediaType].slice(-1).pop(),it=rt[et.mediaType].slice(-3),at=nt.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;nt.bufferLevelAtSegmentStart=nt.getEstimatedBufferLevel(at/2),nt.bufferLevelAtSegmentEnd=nt.getEstimatedBufferLevel(at);var ot=o(it),st=ot?.6:.8;if(nt.isBufferStable&&1.05*nt.segDurationMS<nt.fetchDownloadDurationMS)return nt.fetchDownloadDurationMS;if(!ot||nt.segDurationMS<nt.fetchDownloadDurationMS)return.8*nt.fetchDownloadDurationMS;if(nt.adjustedAvailabilityStartTimeMS<=nt.requestTimeMS+nt.throughputCapacityDelayMS-nt.segDurationMS)return.8*nt.fetchDownloadDurationMS;for(var lt=nt.requestTimeMS+nt.throughputCapacityDelayMS-nt.adjustedAvailabilityStartTimeMS,ft=0,dt=0,pt=0,yt=0;yt<nt.chunkMeasurements.length;yt++){var vt=nt.chunkMeasurements[yt];if(lt<dt+vt.chunkDownloadDurationMS)break;dt+=vt.chunkDownloadDurationMS,ft+=vt.chunkBytes,pt++}if(lt<0&&tt.warn("request time was before adjusted availibitly start time"),ft&&dt&&pt>.2*nt.chunkMeasurements.length){var At=ft/dt,Rt=nt.segmentBytes/At;return nt.fetchDownloadDurationMS<Rt?nt.fetchDownloadDurationMS*st:Rt*st}var Nt=nt.bitrate;return nt.bitrateList.some((function(et){if(et.bandwidth>nt.bitrate)return Nt=et.bandwidth,!0})),Nt===nt.bitrate?nt.fetchDownloadDurationMS*st:st*nt.segmentBytes*8*1e3/Nt}},i(),et}ct.__dashjs_factory_name="LowLatencyThroughputModel";const zr=dt.Z.getSingletonFactory(ct);var Xr=nt(5717);function gt(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function ht(et){et=et||{};var tt,nt,rt,it,ot,st,dt,yt,vt,At,Rt,Nt=this.context,Dt=et.errHandler,Ot=et.dashMetrics,Mt=et.mediaPlayerModel,xt=et.requestModifier,Bt=et.boxParser,Gt=et.errors,qt=et.requestTimeout||0,jt=(0,lt.Z)(Nt).getInstance(),Vt=(0,kt.Z)(Nt).getInstance();return tt={load:function(et){et.request?function w(et,tt){var lt,pt=et.request,Rt=[],kt=!0,Gt=!0,zt=new Date,Xt=zt,Qt=0,$t=null,tn=null;if(!xt||!Ot||!Dt)throw new Error("config object is not correct or missing");var nn,F=function(et){if(Gt=!1,pt.requestStartDate=zt,pt.requestEndDate=new Date,pt.firstByteDate=pt.firstByteDate||zt,pt.fileLoaderType=tn,!pt.checkExistenceOnly){var tt=lt.response?lt.response.responseURL:null,nt=lt.response?lt.response.status:null,rt=lt.response&&lt.response.getAllResponseHeaders?lt.response.getAllResponseHeaders():lt.response?lt.response.responseHeaders:null,it=Vt.get().streaming.cmsd&&Vt.get().streaming.cmsd.enabled?dt.parseResponseHeaders(rt,pt.mediaType):null;Ot.addHttpRequest(pt,tt,nt,rt,et?Rt:null,it),pt.type===Ut.w.MPD_TYPE&&(Ot.addManifestUpdate(pt),jt.trigger(ft.Z.MANIFEST_LOADING_FINISHED,{request:pt}))}},k=function(){if($t&&(clearTimeout($t),$t=null),-1!==nt.indexOf(lt)&&(nt.splice(nt.indexOf(lt),1),Gt))if(F(!1),tt>0){try{Vt.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&pt.type===Ut.w.MEDIA_SEGMENT_TYPE&&Mt.getRetryAttemptsForType(Ut.w.MEDIA_SEGMENT_TYPE)===tt&&jt.trigger(ft.Z.ATTEMPT_BACKGROUND_SYNC)}catch(et){}tt--;var rt={config:et};it.push(rt),rt.timeout=setTimeout((function(){-1!==it.indexOf(rt)&&(it.splice(it.indexOf(rt),1),w(et,tt))}),Mt.getRetryIntervalsForType(pt.type))}else{if(pt.type===Ut.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;Dt.error(new Lt.Z(ot[pt.type],pt.url+" is not available",{request:pt,response:lt.response})),et.error&&et.error(pt,"error",lt.response.statusText,lt.response),et.complete&&et.complete(pt,lt.response.statusText)}};pt.hasOwnProperty("availabilityTimeComplete")&&!1===pt.availabilityTimeComplete&&window.fetch&&"arraybuffer"===pt.responseType&&pt.type===Ut.w.MEDIA_SEGMENT_TYPE?((nn=Tn(Nt).create({requestModifier:xt,lowLatencyThroughputModel:vt,boxParser:Bt})).setup({dashMetrics:Ot}),tn=at.Z.FILE_LOADER_TYPES.FETCH):(nn=(0,_n.Z)(Nt).create({requestModifier:xt}),tn=at.Z.FILE_LOADER_TYPES.XHR);var on=null,un=xt.modifyRequestURL?xt.modifyRequestURL(pt.url):pt.url;if(Vt.get().streaming.cmcd&&Vt.get().streaming.cmcd.enabled){var cn=Vt.get().streaming.cmcd.mode;if(cn===at.Z.CMCD_MODE_QUERY){var fn=function(et){try{var tt=[],nt=st.getQueryParameter(et);return nt&&tt.push(nt),tt}catch(et){return[]}}(pt);un=wr.Z.addAditionalQueryParameterToUrl(un,fn)}else cn===at.Z.CMCD_MODE_HEADER&&(on=st.getHeaderParameters(pt))}var dn=pt.checkExistenceOnly?Ut.w.HEAD:Ut.w.GET,gn=yt.getXHRWithCredentialsForType(pt.type);if(pt.queryParams){var pn=Object.keys(pt.queryParams).map((function(et){return{key:et,value:pt.queryParams[et]}}));un=wr.Z.addAditionalQueryParameterToUrl(un,pn)}pt.url=un,lt={url:un,method:dn,withCredentials:gn,request:pt,onload:function(){lt.response.status>=200&&lt.response.status<=299&&(F(!0),et.success&&et.success(lt.response.response,lt.response.statusText,lt.response.responseURL),et.complete&&et.complete(pt,lt.response.statusText))},onend:k,onerror:k,progress:function(tt){var nt=new Date;kt&&(kt=!1,(!tt.lengthComputable||tt.lengthComputable&&tt.total!==tt.loaded)&&(pt.firstByteDate=nt)),tt.lengthComputable&&(pt.bytesLoaded=tt.loaded,pt.bytesTotal=tt.total),tt.noTrace||(Rt.push({s:Xt,d:tt.time?tt.time:nt.getTime()-Xt.getTime(),b:[tt.loaded?tt.loaded-Qt:0]}),Xt=nt,Qt=tt.loaded),$t&&(clearTimeout($t),$t=null),Vt.get().streaming.fragmentRequestProgressTimeout>0&&($t=setTimeout((function(){At.warn("Abort request "+lt.url+" due to progress timeout"),lt.response.onabort=null,lt.loader.abort(lt),k()}),Vt.get().streaming.fragmentRequestProgressTimeout)),et.progress&&tt&&et.progress(tt)},onabort:function(){$t&&(clearTimeout($t),$t=null),et.abort&&et.abort(pt)},ontimeout:function(et){var tt;if(et.lengthComputable){var nt=et.loaded/et.total*100;tt="Request timeout: loaded: "+et.loaded+", out of: "+et.total+" : "+nt.toFixed(3)+"% Completed"}else tt="Request timeout: non-computable download size";At.warn(tt)},loader:nn,timeout:qt,headers:on};var mn=(new Date).getTime();if(isNaN(pt.delayLoadingTime)||mn>=pt.delayLoadingTime)nt.push(lt),nn.load(lt);else{var yn={httpRequest:lt};rt.push(yn),yn.delayTimeout=setTimeout((function(){if(-1!==rt.indexOf(yn)){rt.splice(rt.indexOf(yn),1);try{zt=new Date,Xt=zt,nt.push(yn.httpRequest),nn.load(yn.httpRequest)}catch(et){yn.httpRequest.onerror()}}}),pt.delayLoadingTime-mn)}}(et,Mt.getRetryAttemptsForType(et.request.type)):et.error&&et.error(et.request,"error")},abort:function(){it.forEach((function(et){clearTimeout(et.timeout),et.config.request&&et.config.abort&&et.config.abort(et.config.request)})),it=[],rt.forEach((function(et){return clearTimeout(et.delayTimeout)})),rt=[],nt.forEach((function(et){et.request.type!==Ut.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(et.onloadend=et.onerror=et.onprogress=void 0,et.loader.abort(et))})),nt=[]}},At=(0,pt.Z)(Nt).getInstance().getLogger(tt),nt=[],rt=[],it=[],st=Cr(Nt).getInstance(),dt=Kr(Nt).getInstance(),vt=zr(Nt).getInstance(),yt=(0,Xr.Z)(Nt).getInstance(),gt(Rt={},Ut.w.MPD_TYPE,Gt.DOWNLOAD_ERROR_ID_MANIFEST_CODE),gt(Rt,Ut.w.XLINK_EXPANSION_TYPE,Gt.DOWNLOAD_ERROR_ID_XLINK_CODE),gt(Rt,Ut.w.INIT_SEGMENT_TYPE,Gt.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),gt(Rt,Ut.w.MEDIA_SEGMENT_TYPE,Gt.DOWNLOAD_ERROR_ID_CONTENT_CODE),gt(Rt,Ut.w.INDEX_SEGMENT_TYPE,Gt.DOWNLOAD_ERROR_ID_CONTENT_CODE),gt(Rt,Ut.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,Gt.DOWNLOAD_ERROR_ID_CONTENT_CODE),gt(Rt,Ut.w.OTHER_TYPE,Gt.DOWNLOAD_ERROR_ID_CONTENT_CODE),ot=Rt,tt}ht.__dashjs_factory_name="HTTPLoader";const Qr=dt.Z.getClassFactory(ht);function mt(){var et;function t(){et={}}function n(){t()}return n(),{getLoader:function(tt){for(var nt in et)if(et.hasOwnProperty(nt)&&tt.startsWith(nt))return et[nt];return Qr},registerLoader:function(tt,nt){et[tt]=nt},unregisterLoader:function(tt){et[tt]&&delete et[tt]},unregisterAllLoader:t,reset:n}}mt.__dashjs_factory_name="SchemeLoaderFactory";const $r=dt.Z.getSingletonFactory(mt);function Et(et){et=et||{};var tt,nt,rt=this.context;return tt=$r(rt).getInstance(),{load:function(it){if(!nt){var at=tt.getLoader(it&&it.request?it.request.url:null);nt=at(rt).create({errHandler:et.errHandler,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,dashMetrics:et.dashMetrics,boxParser:et.boxParser?et.boxParser:null,constants:et.constants?et.constants:null,dashConstants:et.dashConstants?et.dashConstants:null,urlUtils:et.urlUtils?et.urlUtils:null,requestTimeout:isNaN(et.requestTimeout)?0:et.requestTimeout,errors:et.errors})}nt.load(it)},abort:function(){nt&&nt.abort()}}}Et.__dashjs_factory_name="URLLoader";const ti=dt.Z.getClassFactory(Et);function _t(et){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function Tt(et,tt){return(Tt=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function St(et,tt){return!tt||"object"!==_t(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function bt(et){return(bt=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const ni=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&Tt(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=bt(tt);if(nt){var it=bt(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return St(this,et)});function i(et){var tt;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(tt=rt.call(this,et)).checkForExistenceOnly=!0,tt}return i}(At.Z);function It(et){et=et||{};var tt,nt,rt=this.context,it=et.eventBus,ot=et.events,st=et.urlUtils,lt=et.errors,ft=et.streamId;return tt={checkForExistence:function(et){var t=function(tt){it.trigger(ot.CHECK_FOR_EXISTENCE_COMPLETED,{request:et,exists:tt})};if(et){var tt=new ni(et.url);nt.load({request:tt,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(et){var r=function(nt,rt){it.trigger(ot.LOADING_COMPLETED,{request:et,response:nt||null,error:rt||null,sender:tt})};et?nt.load({request:et,progress:function(nt){it.trigger(ot.LOADING_PROGRESS,{request:et,stream:nt.stream,streamId:ft}),nt.data&&it.trigger(ot.LOADING_DATA_PROGRESS,{request:et,response:nt.data||null,error:null,sender:tt})},success:function(et){r(et)},error:function(et,tt,nt){r(void 0,new Lt.Z(lt.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,nt,tt))},abort:function(et){et&&it.trigger(ot.LOADING_ABANDONED,{mediaType:et.mediaType,request:et,sender:tt})}}):r(void 0,new Lt.Z(lt.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,lt.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){nt&&nt.abort()},reset:function(){nt&&(nt.abort(),nt=null)}},nt=ti(rt).create({errHandler:et.errHandler,errors:lt,dashMetrics:et.dashMetrics,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,urlUtils:st,constants:at.Z,boxParser:et.boxParser,dashConstants:et.dashConstants,requestTimeout:et.settings.get().streaming.fragmentRequestTimeout}),tt}It.__dashjs_factory_name="FragmentLoader";const ii=dt.Z.getClassFactory(It);function wt(){return{modifyResponseAsync:function(et){return Promise.resolve(et)}}}wt.__dashjs_factory_name="SegmentResponseModifier";const ai=dt.Z.getSingletonFactory(wt);function Ct(et){et=et||{};var tt,nt,rt,it=this.context,ot=(0,lt.Z)(it).getInstance(),st=et.errHandler,dt=et.mediaPlayerModel,vt=et.dashMetrics,At=(0,pt.Z)(it).getInstance(),Rt=ai(it).getInstance(),Nt=et.streamInfo;function y(){return Nt.id}function E(){for(var et in rt)rt[et].reset();rt={}}function v(et){if(et.sender){var tt=et.request,rt=et.response,it=tt.isInitializationRequest(),st=tt.mediaInfo.streamInfo;if(et.error&&(tt.mediaType===at.Z.AUDIO||tt.mediaType===at.Z.VIDEO||tt.mediaType===at.Z.TEXT&&tt.mediaInfo.isFragmented)&&ot.trigger(ft.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:et.request.serviceLocation}),rt&&st){var lt=function(et,tt,nt,rt){var it=new En;return it.streamId=nt,it.mediaInfo=tt.mediaInfo,it.segmentType=tt.type,it.start=tt.startTime,it.duration=tt.duration,it.end=it.start+it.duration,it.bytes=et,it.index=tt.index,it.quality=tt.quality,it.representationId=tt.representationId,it.endFragment=rt,it}(rt,tt,Nt.id,et.type!==ft.Z.FRAGMENT_LOADING_PROGRESS);Rt.modifyResponseAsync(lt).then((function(et){ot.trigger(it?ft.Z.INIT_FRAGMENT_LOADED:ft.Z.MEDIA_FRAGMENT_LOADED,{chunk:et,request:tt},{streamId:st.id,mediaType:tt.mediaType})})).catch((function(et){nt.error(et),ot.trigger(it?ft.Z.INIT_FRAGMENT_LOADED:ft.Z.MEDIA_FRAGMENT_LOADED,{chunk:lt,request:tt},{streamId:st.id,mediaType:tt.mediaType})}))}else nt.warn("No "+tt.mediaType+" bytes to push or stream is inactive.")}}return tt={getStreamId:y,getModel:function(tt){var nt=rt[tt];return nt||(nt=Mt(it).create({streamInfo:Nt,type:tt,dashMetrics:vt,fragmentLoader:ii(it).create({dashMetrics:vt,mediaPlayerModel:dt,errHandler:st,requestModifier:(0,cn.Z)(it).getInstance(),settings:et.settings,boxParser:et.boxParser,eventBus:ot,events:ft.Z,errors:xt,dashConstants:et.dashConstants,urlUtils:et.urlUtils,streamId:y()}),debug:At,eventBus:ot,events:ft.Z}),rt[tt]=nt),nt},reset:function(){ot.off(yt.Z.FRAGMENT_LOADING_COMPLETED,v,this),ot.off(yt.Z.FRAGMENT_LOADING_PROGRESS,v,this),E()}},nt=At.getLogger(tt),E(),ot.on(yt.Z.FRAGMENT_LOADING_COMPLETED,v,tt),ot.on(yt.Z.FRAGMENT_LOADING_PROGRESS,v,tt),tt}Ct.__dashjs_factory_name="FragmentController";const si=dt.Z.getClassFactory(Ct),ui=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null},ci=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};function Pt(et){var tt,nt,rt=this.context,it=et.streamInfo;function o(et){nt.setTrackByIndex(et)}function s(){nt&&nt.reset()}return tt={getStreamId:function(){return it.id},initialize:function(){nt.addTracks();var et=nt.getTracks();et&&et.length>0&&o(0)},provide:function(et,tt){if("function"==typeof tt){var rt,it,at=nt.getCurrentTrack();if(!at||at.segmentDuration<=0||null==et)tt(null);else{(it=nt.getThumbnailRequestForTime(et))&&(at.segmentDuration=it.duration),rt=et%at.segmentDuration;var ot=Math.floor(rt*at.tilesHor*at.tilesVert/at.segmentDuration),st=new ui;if(st.width=Math.floor(at.widthPerTile),st.height=Math.floor(at.heightPerTile),st.x=Math.floor(ot%at.tilesHor)*at.widthPerTile,st.y=Math.floor(ot/at.tilesHor)*at.heightPerTile,"readThumbnail"in at)return at.readThumbnail(et,(function(et){st.url=et,tt(st)}));if(it)st.url=it.url,at.segmentDuration=NaN;else{var lt=Math.floor(et/at.segmentDuration);st.url=function(et,tt){var nt=tt+et.startNumber,rt=(0,tn.vi)(et.templateUrl,"Number",nt);return rt=(0,tn.vi)(rt,"Time",(nt-1)*et.segmentDuration*et.timescale),rt=(0,tn.vi)(rt,"Bandwidth",et.bandwidth),(0,tn.eR)(rt)}(at,lt)}tt(st)}}},setTrackByIndex:o,getCurrentTrackIndex:function(){return nt.getCurrentTrackIndex()},getBitrateList:function(){var et=nt.getTracks(),tt=0;return et.map((function(et){var nt=new ci;return nt.mediaType=at.Z.IMAGE,nt.qualityIndex=tt++,nt.bitrate=et.bitrate,nt.width=et.width,nt.height=et.height,nt}))},reset:s},s(),nt=(0,hr.Z)(rt).create({streamInfo:it,adapter:et.adapter,baseURLController:et.baseURLController,timelineConverter:et.timelineConverter,debug:et.debug,eventBus:et.eventBus,events:et.events,dashConstants:et.dashConstants,dashMetrics:et.dashMetrics,segmentBaseController:et.segmentBaseController}),tt}Pt.__dashjs_factory_name="ThumbnailController";const di=dt.Z.getClassFactory(Pt);var hi=nt(7417);function Ft(et){var tt;et=et||{};var nt=[],rt=(0,lt.Z)(this.context).getInstance(),it=et.updateEventName,at=et.addBlacklistEventName;function o(et){-1===nt.indexOf(et)&&(nt.push(et),rt.trigger(it,{entry:et}))}return tt={add:o,contains:function(et){return!!(nt.length&&et&&et.length)&&-1!==nt.indexOf(et)},reset:function(){nt=[]}},at&&rt.on(at,(function(et){o(et.entry)}),tt),tt}Ft.__dashjs_factory_name="BlackListController";const mi=dt.Z.getClassFactory(Ft);var yi=[at.Z.VIDEO,at.Z.AUDIO,at.Z.TEXT,at.Z.MUXED,at.Z.IMAGE];function Zt(et){et=et||{};var tt,nt,rt,it,st,dt,yt,vt,At,Rt,Nt,Dt,Ot,Mt,kt,Ut,Bt,Gt,qt=this.context,jt=(0,lt.Z)(qt).getInstance(),Vt=(0,fn.Z)(qt).getInstance(),zt=et.manifestModel,Xt=et.mediaPlayerModel,Qt=et.dashMetrics,$t=et.manifestUpdater,tn=et.adapter,nn=et.timelineConverter,on=et.capabilities,un=et.errHandler,cn=et.abrController,dn=et.playbackController,gn=et.eventController,pn=et.mediaController,mn=et.protectionController,En=et.textController,_n=et.videoModel,Tn=et.streamInfo,Sn=et.settings;function V(et,tt){return new Promise((function(it,ot){ne(),Rt=!0,ie();var st=_n.getElement(),lt=[];yi.forEach((function(tt){(tt!==at.Z.TEXT||et)&&(tt!==at.Z.VIDEO||!st||st&&/^VIDEO$/i.test(st.nodeName))&&lt.push(K(tt,et))})),Promise.all(lt).then((function(){return et=tt,new Promise((function(tt){var nt={},it=rt.map((function(tt){return tt.createBufferSinks(et)}));Promise.all(it).then((function(et){et.forEach((function(et){et&&(nt[et.getType()]=et)})),tt(nt)})).catch((function(){tt(nt)}))}));var et})).then((function(tt){if(Rt=!1,0===rt.length){var at="No streams to play.";un.error(new Lt.Z(xt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,at,zt.getValue())),nt.fatal(at)}else oe();et&&En.createTracks(Tn),it(tt)})).catch((function(et){ot(et)}))}))}function K(tt,it){var st,lt=tn.getAllMediaInfoForType(Tn,tt),dt=[],pt=null;if(!lt||0===lt.length)return nt.info("No "+tt+" data."),Promise.resolve();tt===at.Z.VIDEO&&(yt=!0),tt===at.Z.AUDIO&&(vt=!0);for(var At=0,Rt=lt.length;At<Rt;At++)pt=lt[At],tt===at.Z.TEXT&&pt.isEmbedded&&(En.addEmbeddedTrack(Tn,pt),dt.push(pt)),z(pt)&&pn.addTrack(pt);if(dt.length>0&&(pn.setInitialMediaSettingsForType(tt,Tn),En.addMediaInfosToBuffer(Tn,tt,dt)),0===(lt=lt.filter((function(et){return!et.isEmbedded}))).length)return Promise.resolve();if(tt===at.Z.IMAGE)return(Dt=di(qt).create({streamInfo:Tn,adapter:tn,baseURLController:et.baseURLController,timelineConverter:et.timelineConverter,debug:Ut,eventBus:jt,events:ft.Z,dashConstants:ot.Z,dashMetrics:et.dashMetrics,segmentBaseController:et.segmentBaseController})).initialize(),Promise.resolve();jt.trigger(ft.Z.STREAM_INITIALIZING,{streamInfo:Tn,mediaInfo:pt}),pn.setInitialMediaSettingsForType(tt,Tn);var Mt=function(tt,nt){var it=tt&&tt.length>0?tt[0]:null,ot=Nt.getModel(it?it.type:null),st=it?it.type:null,lt=it?it.mimeType:null,ft=it?it.isFragmented:null,dt=yn(qt).create({streamInfo:Tn,type:st,mimeType:lt,timelineConverter:nn,adapter:tn,manifestModel:zt,mediaPlayerModel:Xt,fragmentModel:ot,dashMetrics:et.dashMetrics,baseURLController:et.baseURLController,segmentBaseController:et.segmentBaseController,abrController:cn,playbackController:dn,mediaController:pn,textController:En,errHandler:un,settings:Sn,boxParser:kt,segmentBlacklistController:Ot});dt.initialize(nt,yt,ft),rt.push(dt);for(var pt=0;pt<tt.length;pt++)dt.addMediaInfo(tt[pt]);return st===at.Z.TEXT&&En.addMediaInfosToBuffer(Tn,st,tt,ot),dt}(lt,it);return(st=pn.getCurrentTrackFor(tt,Tn.id))?(cn.updateTopQualityIndex(st),Mt.selectMediaInfo(tt===at.Z.TEXT&&st.isEmbedded?lt[0]:st)):Promise.resolve()}function z(et){var tt,rt=et?et.type:null;return rt===at.Z.MUXED?(tt="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",nt.fatal(tt),un.error(new Lt.Z(xt.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,tt,zt.getValue())),!1):!(rt!==at.Z.TEXT&&rt!==at.Z.IMAGE&&et.contentProtection&&!on.supportsEncryptedMedia()&&(un.error(new Lt.Z(xt.CAPABILITY_MEDIAKEYS_ERROR_CODE,xt.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function W(et){for(var tt=rt?rt.length:0,nt=0;nt<tt;nt++){var it=rt[nt].getFragmentModel();it.abortRequests(),it.resetInitialSettings(),rt[nt].reset(!1,et)}En&&En.deactivateStream(Tn),rt=[],st=!1,dt=!1,me(!1),J(!1),jt.trigger(ft.Z.STREAM_DEACTIVATED,{streamInfo:Tn})}function X(et){W(et),it=!1,yt=!1,vt=!1,At={},Rt=!1,Bt=!1,Gt=[]}function J(et){Bt=et}function $(){return Tn?Tn.start:NaN}function ee(){return Tn?Tn.id:null}function te(){return Tn}function ne(){if(!_n||!cn)throw new Error(at.Z.MISSING_CONFIG_ERROR)}function re(et){et.error&&(un.error(et.error),nt.fatal(et.error.message))}function ie(){if(gn){var et=tn.getEventsFor(Tn);et&&et.length>0&&gn.addInlineEvents(et,Tn.id)}}function oe(){for(var et=rt.length,tt=At.audio||At.video?new Lt.Z(xt.DATA_UPDATE_FAILED_ERROR_CODE,xt.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,nt=0;nt<et;nt++)if(rt[nt].isUpdating()||Rt)return;if(mn){mn.clearMediaInfoArray();for(var ot=0;ot<et&&rt[ot];ot++){var st=rt[ot].getType(),lt=rt[ot].getMediaInfo();if(st===at.Z.AUDIO||st===at.Z.VIDEO||st===at.Z.TEXT&&lt.isFragmented){var dt=rt[ot].getMediaInfo();dt&&mn.initializeForMedia(dt)}}mn.handleKeySystemFromManifest()}tt?un.error(tt):it||(it=!0,_n.waitForReadyState(at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){jt.trigger(ft.Z.STREAM_INITIALIZED,{streamInfo:Tn})})))}function se(){var et=de(),tt=et.length;if(0!==tt){for(var rt=0;rt<tt;rt++)if(!et[rt].isBufferingCompleted()&&(et[rt].getType()===at.Z.AUDIO||et[rt].getType()===at.Z.VIDEO))return void nt.debug("onBufferingCompleted - One streamProcessor has finished but",et[rt].getType(),"one is not buffering completed");nt.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),dt=!0,jt.trigger(ft.Z.STREAM_BUFFERING_COMPLETED,{streamInfo:Tn},{streamInfo:Tn})}else nt.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ue(et){At[et.mediaType]=et.error,oe()}function le(et){gn&&gn.addInbandEvents(et.events,Tn.id)}function ce(et){return et&&et.type?fe(et.type):null}function fe(et){return et?de().filter((function(tt){return tt.getType()===et}))[0]:null}function de(){for(var et,tt,nt=[],it=0;it<rt.length;it++)(et=(tt=rt[it]).getType())!==at.Z.AUDIO&&et!==at.Z.VIDEO&&et!==at.Z.TEXT||nt.push(tt);return nt}function ge(et,tt){var nt=te(),rt=tt.getStreamInfo();if(!rt||!nt)return!0;var it=tn.getAdaptationForType(rt.index,et,rt),at=tn.getAdaptationForType(nt.index,et,nt);return it&&at?!(!he(at)&&he(it)):!it&&!at}function he(et){return!!et&&!!(et.ContentProtection||et.Representation_asArray&&et.Representation_asArray.length>0&&et.Representation_asArray[0].ContentProtection)}function pe(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!et||!et.hasOwnProperty("getStreamInfo"))return!1;var rt=et.getStreamInfo(),it=nt?nt.getStreamInfo():te();if(!rt||!it)return!1;var at=tn.getAdaptationForType(rt.index,tt,rt),ot=tn.getAdaptationForType(it.index,tt,it);if(!at||!ot)return!at&&!ot;var st=at&&ot&&at.mimeType===ot.mimeType,lt=ot.Representation_asArray.map((function(et){return et.codecs})),ft=at.Representation_asArray.map((function(et){return et.codecs})),dt=ft.some((function(et){return lt.indexOf(et)>-1})),pt=ft.some((function(et){return lt.some((function(tt){return on.codecRootCompatibleWithCodec(tt,et)}))}));return dt||pt&&st}function me(et){Mt=et}function ye(){return Mt}return tt={initialize:function(){jt.on(ft.Z.BUFFERING_COMPLETED,se,tt),jt.on(ft.Z.DATA_UPDATE_COMPLETED,ue,tt),jt.on(ft.Z.INBAND_EVENTS,le,tt),mn&&(jt.on(ft.Z.KEY_ERROR,re,tt),jt.on(ft.Z.SERVER_CERTIFICATE_UPDATED,re,tt),jt.on(ft.Z.LICENSE_REQUEST_COMPLETE,re,tt),jt.on(ft.Z.KEY_SYSTEM_SELECTED,re,tt),jt.on(ft.Z.KEY_SESSION_CREATED,re,tt),jt.on(ft.Z.KEY_STATUSES_CHANGED,re,tt)),En.initializeForStream(Tn),jt.trigger(ft.Z.STREAM_UPDATED,{streamInfo:Tn})},getStreamId:function(){return Tn?Tn.id:null},activate:function(et,tt){return new Promise((function(nt,rt){if(!st)return ye()?(st=!0,jt.trigger(ft.Z.STREAM_ACTIVATED,{streamInfo:Tn}),void nt(tt)):void function(et,tt){return V(et,tt)}(et,tt).then((function(et){st=!0,jt.trigger(ft.Z.STREAM_ACTIVATED,{streamInfo:Tn}),nt(et)})).catch((function(et){rt(et)}));nt(tt)}))},deactivate:W,getIsActive:function(){return st},getDuration:function(){return Tn?Tn.duration:NaN},getStartTime:$,getId:ee,getStreamInfo:te,getHasAudioTrack:function(){return vt},getHasVideoTrack:function(){return yt},startPreloading:function(et,tt){return new Promise((function(it,at){ye()?at():(nt.info("[startPreloading] Preloading next stream with id ".concat(ee())),me(!0),V(et,tt).then((function(){for(var et=0;et<rt.length&&rt[et];et++)rt[et].setExplicitBufferingTime($()),rt[et].getScheduleController().startScheduleTimer();it()})).catch((function(){me(!1),at()})))}))},initializeForTextWithMediaSource:function(et){return new Promise((function(tt,nt){K(at.Z.TEXT,et).then((function(){return(et=fe(at.Z.TEXT))?et.createBufferSinks():Promise.resolve();var et})).then((function(){En.createTracks(Tn),tt()})).catch((function(et){nt(et)}))}))},getThumbnailController:function(){return Dt},getBitrateListFor:function(et){if(ne(),et===at.Z.IMAGE)return Dt?Dt.getBitrateList():[];var tt=function(et){for(var tt=null,nt=0;nt<rt.length;nt++)if((tt=rt[nt]).getType()===et)return tt.getMediaInfo();return null}(et);return cn.getBitrateList(tt)},updateData:function(et){return new Promise((function(tt){Rt=!0,Tn=et,gn&&ie();for(var nt=[],it=0,at=rt.length;it<at;it++){var ot=rt[it],st=ot.getMediaInfo();nt.push(ot.updateStreamInfo(Tn));var lt=tn.getAllMediaInfoForType(Tn,ot.getType());if(lt=lt.filter((function(et){return!et.isEmbedded}))){ot.clearMediaInfoArray();for(var dt=0;dt<lt.length;dt++){var pt=lt[dt];ot.addMediaInfo(lt[dt]),tn.areMediaInfosEqual(st,pt)&&(cn.updateTopQualityIndex(pt),nt.push(ot.selectMediaInfo(pt)))}}}Promise.all(nt).then((function(){for(nt=[];Gt.length>0;){var et=Gt.pop(),tt=et.newMediaInfo,rt=ce(et.oldMediaInfo);if(!rt)return;nt.push(rt.prepareTrackSwitch()),nt.push(rt.selectMediaInfo(tt))}return Promise.all(nt)})).then((function(){Rt=!1,oe(),jt.trigger(ft.Z.STREAM_UPDATED,{streamInfo:Tn}),tt()}))}))},reset:function(et){Nt&&(Nt.reset(),Nt=null),cn&&Tn&&cn.clearDataForStream(Tn.id),Ot&&(Ot.reset(),Ot=null),X(et),Tn=null,jt.off(ft.Z.DATA_UPDATE_COMPLETED,ue,tt),jt.off(ft.Z.BUFFERING_COMPLETED,se,tt),jt.off(ft.Z.INBAND_EVENTS,le,tt),mn&&(jt.off(ft.Z.KEY_ERROR,re,tt),jt.off(ft.Z.SERVER_CERTIFICATE_UPDATED,re,tt),jt.off(ft.Z.LICENSE_REQUEST_COMPLETE,re,tt),jt.off(ft.Z.KEY_SYSTEM_SELECTED,re,tt),jt.off(ft.Z.KEY_SESSION_CREATED,re,tt),jt.off(ft.Z.KEY_STATUSES_CHANGED,re,tt))},getProcessors:de,setMediaSource:function(et){return new Promise((function(tt,it){for(var at=[],ot=0;ot<rt.length;)z(rt[ot].getMediaInfo())?(at.push(rt[ot].setMediaSource(et)),ot++):(rt[ot].reset(),rt.splice(ot,1));Promise.all(at).then((function(){for(var et=0;et<rt.length;et++)rt[et].dischargePreBuffer();if(0===rt.length){var it="No streams to play.";un.error(new Lt.Z(xt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,it+"nostreams",zt.getValue())),nt.fatal(it)}tt()})).catch((function(et){nt.error(et),it(et)}))}))},isMediaCodecCompatible:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return pe(et,at.Z.VIDEO,tt)&&pe(et,at.Z.AUDIO,tt)},isProtectionCompatible:function(et){return!et||ge(at.Z.VIDEO,et)&&ge(at.Z.AUDIO,et)},getPreloaded:ye,getIsEndedEventSignaled:function(){return Bt},setIsEndedEventSignaled:J,getAdapter:function(){return tn},getHasFinishedBuffering:function(){return dt},setPreloaded:me,startScheduleControllers:function(){for(var et=rt.length,tt=0;tt<et&&rt[tt];tt++)rt[tt].getScheduleController().startScheduleTimer()},prepareTrackChange:function(et){if(st&&Tn){dt=!1;var tt=et.newMediaInfo,rt=zt.getValue();tn.setCurrentMediaInfo(Tn.id,tt.type,tt);var it=ce(tt);if(it){var ot=dn.getTime();nt.info("Stream - Process track changed at current time "+ot),rt.refreshManifestOnSwitchTrack?(Gt.push(et),$t.getIsUpdating()||(nt.debug("Stream - Refreshing manifest for switch track"),$t.refreshManifest())):it.selectMediaInfo(tt).then((function(){tt.type!==at.Z.VIDEO&&tt.type!==at.Z.AUDIO||cn.updateTopQualityIndex(tt),it.prepareTrackSwitch()}))}}},prepareQualityChange:function(et){var tt=fe(et.mediaType);tt&&tt.prepareQualityChange(et)}},function(){try{Ut=(0,pt.Z)(qt).getInstance(),nt=Ut.getLogger(tt),X(),kt=(0,hi.Z)(qt).getInstance(),Ot=mi(qt).create({updateEventName:ft.Z.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:ft.Z.SEGMENT_LOCATION_BLACKLIST_ADD}),Nt=si(qt).create({streamInfo:Tn,mediaPlayerModel:Xt,dashMetrics:Qt,errHandler:un,settings:Sn,boxParser:kt,dashConstants:ot.Z,urlUtils:Vt})}catch(et){throw et}}(),tt}Zt.__dashjs_factory_name="Stream";const Ei=dt.Z.getClassFactory(Zt),_i=function e(et){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et||null,this.type=Ut.w.CONTENT_STEERING_TYPE,this.responseType="json"},Ti=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]};function Yt(){var et,tt,nt,rt,it,at,st,lt,ft,dt,vt,At,Rt,Nt,Dt,Ot=this.context,Mt=(0,fn.Z)(Ot).getInstance();function _(et){I(et,"baseUrl")}function T(et){I(et,"location")}function S(et){if(et&&et.request&&et.request.serviceLocation&&et.request.requestStartDate&&et.request.requestEndDate&&!isNaN(et.request.bytesTotal)){var tt=et.request.serviceLocation,nt=et.request.requestEndDate.getTime()-et.request.requestStartDate.getTime();A(tt,parseInt(8*et.request.bytesTotal/nt*1e3))}}function b(et){et&&et.httpRequest&&et.httpRequest._serviceLocation&&!isNaN(et.throughput)&&A(et.httpRequest._serviceLocation,1e3*et.throughput)}function A(et,tt){it[et]||(it[et]=[]),it[et].push(tt),it[et].length>4&&it[et].shift()}function I(et,tt){if(et&&et.request&&et.request.serviceLocation){var nt=et.request.serviceLocation;-1===rt[tt].all.indexOf(nt)&&rt[tt].all.push(nt),rt[tt].current=nt}}function R(){var et=vt.getValue(),tt=Dt.getContentSteering(et);return tt||(tt=Rt.getServiceDescriptionSettings().contentSteering),tt}function N(){return new Promise((function(et){try{var at=R();if(!at||!at.serverUrl)return void et();var lt=function(et){var tt=et.serverUrl;nt&&nt.reloadUri&&(tt=Mt.isRelative(nt.reloadUri)?Mt.resolve(nt.reloadUri,et.serverUrl):nt.reloadUri);var at=[],ot=rt.baseUrl.all.concat(rt.location.all);if(ot.length>0){var st=ot.map((function(et){return{serviceLocation:et,throughput:function(et){if(!et||!it[et]||0===it[et].length)return-1;var tt=it[et].reduce((function(et,tt){return et+tt}))/it[et].length;return parseInt(tt)}(et)}}));st.sort((function(et,tt){return tt.throughput-et.throughput}));var lt="",ft="";st.forEach((function(et,tt){0!==tt&&(lt="".concat(lt,","),et.throughput>-1&&(ft="".concat(ft,","))),lt="".concat(lt).concat(et.serviceLocation),et.throughput>-1&&(ft="".concat(ft).concat(et.throughput))})),at.push({key:"_DASH_pathway",value:'"'.concat(lt,'"')}),at.push({key:"_DASH_throughput",value:ft})}return wr.Z.addAditionalQueryParameterToUrl(tt,at)}(at),ft=new _i(lt);st.load({request:ft,success:function(tt){!function(et){et&&et[ot.Z.CONTENT_STEERING_RESPONSE.VERSION]&&1===parseInt(et[ot.Z.CONTENT_STEERING_RESPONSE.VERSION])&&((nt=new Ti).version=et[ot.Z.CONTENT_STEERING_RESPONSE.VERSION],et[ot.Z.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(et[ot.Z.CONTENT_STEERING_RESPONSE.TTL])&&(nt.ttl=et[ot.Z.CONTENT_STEERING_RESPONSE.TTL]),et[ot.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(nt.reloadUri=et[ot.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]),et[ot.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(nt.pathwayPriority=et[ot.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),et[ot.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(nt.pathwayClones=et[ot.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],nt.pathwayClones=nt.pathwayClones.filter((function(et){return function(et){return et[ot.Z.CONTENT_STEERING_RESPONSE.BASE_ID]&&et[ot.Z.CONTENT_STEERING_RESPONSE.ID]&&et[ot.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&et[ot.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][ot.Z.CONTENT_STEERING_RESPONSE.HOST]}(et)}))),O())}(tt),Nt.trigger(yt.Z.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:nt,url:lt}),et()},error:function(rt,it,at,ot){!function(et,rt){try{switch(tt.warn("Error fetching data from content steering server",et),rt.status){case 410:break;case 429:var it=rt&&rt.getResponseHeader?rt.getResponseHeader("retry-after"):null;null!==it&&(nt||(nt={}),nt.ttl=parseInt(it)),O();break;default:O()}}catch(et){tt.error(et)}}(rt,ot),et(rt)},complete:function(){rt.baseUrl.all=C(rt.baseUrl),rt.location.all=C(rt.location)}})}catch(tt){et(tt)}}))}function C(et){return et.all&&0!==et.all.length&&et.current?et.all.filter((function(tt){return tt===et.current})):[]}function D(et){try{var rt=[];return et&&0!==et.length&&nt&&nt.pathwayClones&&0!==nt.pathwayClones.length?(nt.pathwayClones.forEach((function(tt){var nt=et.filter((function(et){return tt[ot.Z.CONTENT_STEERING_RESPONSE.BASE_ID]===et.serviceLocation})),it=null;if(nt&&nt.length>0&&(it=nt[0]),it){var at=new URL(it.url),st={synthesizedUrl:"".concat(tt[ot.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][ot.Z.CONTENT_STEERING_RESPONSE.HOST]).concat(at.pathname),serviceLocation:tt[ot.Z.CONTENT_STEERING_RESPONSE.ID],queryParams:tt[ot.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][ot.Z.CONTENT_STEERING_RESPONSE.PARAMS],reference:it};rt.push(st)}})),rt):rt}catch(et){return tt.error(et),[]}}function O(){nt&&nt.ttl&&!isNaN(nt.ttl)&&(at&&clearTimeout(at),at=setTimeout((function(){N()}),1e3*nt.ttl))}function M(){at&&clearTimeout(at),at=null}function P(){nt=null,it={},rt={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},M()}return et={reset:function(){P(),Nt.off(yt.Z.FRAGMENT_LOADING_STARTED,_,et),Nt.off(yt.Z.MANIFEST_LOADING_STARTED,T,et),Nt.off(yt.Z.MANIFEST_LOADING_FINISHED,S,et),Nt.off(yt.Z.THROUGHPUT_MEASUREMENT_STORED,b,et)},setConfig:function(et){et&&(et.adapter&&(Dt=et.adapter),et.errHandler&&(lt=et.errHandler),et.dashMetrics&&(ft=et.dashMetrics),et.mediaPlayerModel&&(dt=et.mediaPlayerModel),et.requestModifier&&(At=et.requestModifier),et.manifestModel&&(vt=et.manifestModel),et.serviceDescriptionController&&(Rt=et.serviceDescriptionController),et.eventBus&&(Nt=et.eventBus))},loadSteeringData:N,getCurrentSteeringResponseData:function(){return nt},shouldQueryBeforeStart:function(){var et=R();return!!et&&et.queryBeforeStart},getSteeringDataFromManifest:R,stopSteeringRequestTimer:M,getSynthesizedBaseUrlElements:function(et){try{return D(et).map((function(et){var tt=new qn(et.synthesizedUrl,et.serviceLocation);return tt.queryParams=et.queryParams,tt.dvb_priority=et.reference.dvb_priority,tt.dvb_weight=et.reference.dvb_weight,tt.availabilityTimeOffset=et.reference.availabilityTimeOffset,tt.availabilityTimeComplete=et.reference.availabilityTimeComplete,tt}))}catch(et){return tt.error(et),[]}},getSynthesizedLocationElements:function(et){try{return D(et).map((function(et){var tt=new pr(et.synthesizedUrl,et.serviceLocation);return tt.queryParams=et.queryParams,tt}))}catch(et){return tt.error(et),[]}},initialize:function(){st=ti(Ot).create({errHandler:lt,dashMetrics:ft,mediaPlayerModel:dt,requestModifier:At,errors:xt}),Nt.on(yt.Z.FRAGMENT_LOADING_STARTED,_,et),Nt.on(yt.Z.MANIFEST_LOADING_STARTED,T,et),Nt.on(yt.Z.MANIFEST_LOADING_FINISHED,S,et),Nt.on(yt.Z.THROUGHPUT_MEASUREMENT_STORED,b,et)}},tt=(0,pt.Z)(Ot).getInstance().getLogger(et),P(),et}Yt.__dashjs_factory_name="ContentSteeringController";const Si=dt.Z.getSingletonFactory(Yt);function Ht(){var et,tt,nt,rt=this.context,it=(0,kt.Z)(rt).getInstance();return et={select:function(et){if(!et||0===et.length)return null;var rt=null;return it.get().streaming.applyContentSteering&&(rt=function(et){var rt=nt.getCurrentSteeringResponseData();return rt&&rt.pathwayPriority&&rt.pathwayPriority.length>0?function(){for(var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],rt=0,it=null,a=function(){var at=et[rt],ot=nt.findIndex((function(et){return et.serviceLocation&&et.serviceLocation===at}));if(-1!==ot&&!tt.contains(nt[ot].serviceLocation))return it=nt[ot],"break";rt+=1};rt<et.length&&"break"!==a(););return it}(rt.pathwayPriority,et):null}(et)),rt||(rt=function(et){return et[0]}(et)),rt},setConfig:function(et){et.blacklistController&&(tt=et.blacklistController),et.contentSteeringController&&(nt=et.contentSteeringController)},reset:function(){tt.reset()}},tt=mi(rt).create({updateEventName:ft.Z.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:ft.Z.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD}),nt=Si(rt).getInstance(),et}Ht.__dashjs_factory_name="LocationSelector";const bi=dt.Z.getClassFactory(Ht);function Kt(){var et,tt,nt,rt,it,at,st,dt,vt,At,Rt,Nt,Dt,Ot,Mt=this.context,Lt=(0,lt.Z)(Mt).getInstance(),kt=(0,fn.Z)(Mt).getInstance();function S(){nt=NaN,st=!1,it=!0,at=!1,b()}function b(){null!==rt&&(clearTimeout(rt),rt=null)}function A(et){b(),at||(isNaN(et)&&!isNaN(nt)&&(et=1e3*nt),isNaN(et)||(tt.debug("Refresh manifest in "+et+" milliseconds."),rt=setTimeout(C,et)))}function I(){var et=arguments.length>0&&void 0!==arguments[0]&&arguments[0];st=!0;var tt=vt.getValue(),nt=tt.url,rt=null,it=Rt.getPatchLocation(tt),at=At.select(it),ot=null;if(at&&!et)nt=at.url,rt=at.serviceLocation,ot=at.queryParams;else{var lt=R(tt),ft=At.select(lt);ft&&(nt=ft.url,rt=ft.serviceLocation,ot=ft.queryParams)}kt.isRelative(nt)&&(nt=kt.resolve(nt,tt.url)),dt.load(nt,rt,ot)}function R(et){var tt=Rt.getLocation(et),nt=Dt.getSynthesizedLocationElements(tt);return tt.concat(nt)}function N(et){if(et){if(Rt.getIsPatch(et)){var rt=et;et=vt.getValue();var lt=Rt.isPatchValid(et,rt),dt=lt;if(lt){var pt=Rt.getPublishTime(et);dt=Rt.applyPatchToManifest(et,rt);var yt=Rt.getPublishTime(et);dt=pt.getTime()!=yt.getTime()}if(!dt)return tt.debug("Patch provided is invalid, performing full manifest refresh"),void I(!0);et.loadedTime=new Date}}else(et=vt.getValue()).loadedTime=new Date;if(vt.getValue()&&vt.getValue().type===ot.Z.DYNAMIC&&et.type===ot.Z.STATIC)return Lt.trigger(ft.Z.DYNAMIC_TO_STATIC),st=!1,void(at=!0);vt.setValue(et);var At=new Date,Nt=(At.getTime()-et.loadedTime.getTime())/1e3;1e3*(nt=Rt.getManifestUpdatePeriod(et,Nt))>2147483647&&(nt=2147483.647),Lt.trigger(ft.Z.MANIFEST_UPDATED,{manifest:et}),tt.info("Manifest has been refreshed at "+At+"["+At.getTime()/1e3+"] "),it||A()}function C(){it||(st?A(Ot.get().streaming.manifestUpdateRetryInterval):I())}function D(et){et.error?et.error.code===xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&Nt.error(et.error):N(et.manifest)}function O(){it=!1,A()}function M(){(it=!Ot.get().streaming.scheduling.scheduleWhilePaused)&&b()}function P(){st=!1}return et={initialize:function(){S(),Lt.on(ft.Z.STREAMS_COMPOSED,P,this),Lt.on(yt.Z.PLAYBACK_STARTED,O,this),Lt.on(yt.Z.PLAYBACK_PAUSED,M,this),Lt.on(ft.Z.INTERNAL_MANIFEST_LOADED,D,this)},setManifest:function(et){N(et)},refreshManifest:I,getIsUpdating:function(){return st},setConfig:function(et){et&&(et.manifestModel&&(vt=et.manifestModel),et.adapter&&(Rt=et.adapter),et.manifestLoader&&(dt=et.manifestLoader),et.errHandler&&(Nt=et.errHandler),et.locationSelector&&(At=et.locationSelector),et.settings&&(Ot=et.settings),et.contentSteeringController&&(Dt=et.contentSteeringController))},reset:function(){Lt.off(yt.Z.PLAYBACK_STARTED,O,this),Lt.off(yt.Z.PLAYBACK_PAUSED,M,this),Lt.off(ft.Z.STREAMS_COMPOSED,P,this),Lt.off(ft.Z.INTERNAL_MANIFEST_LOADED,D,this),S()}},tt=(0,pt.Z)(Mt).getInstance().getLogger(et),At=bi(Mt).create(),et}Kt.__dashjs_factory_name="ManifestUpdater";const Ai=dt.Z.getClassFactory(Kt);function Wt(){var et,tt,nt,rt,it,at,ot,st,dt,yt,vt,At,Rt,Nt,Dt,Ot,Mt=this.context,kt=(0,lt.Z)(Mt).getInstance(),Bt=(0,fn.Z)(Mt).getInstance();function b(){st=[],dt=[],yt=null,vt=null,Rt=null,At=NaN,nt=!1,rt=!1,Nt=it.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function A(){it.get().streaming.utcSynchronization.enabled&&!nt&&!rt&&Rt&&Rt.value&&Rt.schemeIdUri&&!isNaN(At)&&!isNaN(it.get().streaming.utcSynchronization.backgroundAttempts)&&(vt&&(Date.now()-vt)/1e3<30||(st=[],rt=!0,function I(et){try{if(et<=0)return void B();var tt=Date.now();at[Rt.schemeIdUri](Rt.value,(function(nt){var rt=Date.now(),it=N(tt,rt,nt);st.push(it),I(et-1)}),(function(){B()}))}catch(et){B()}}(isNaN(it.get().streaming.utcSynchronization.backgroundAttempts)?2:it.get().streaming.utcSynchronization.backgroundAttempts)))}function N(et,tt,nt){return nt-(tt-(tt-et)/2)}function D(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN,tt=isNaN(et);tt&&it.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?U():Z(tt,et)}function O(et){var tt=Date.parse(et);return isNaN(tt)&&(tt=function(et){var tt,nt,rt=/^([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(et);return tt=Date.UTC(parseInt(rt[1],10),parseInt(rt[2],10)-1,parseInt(rt[3],10),parseInt(rt[4],10),parseInt(rt[5],10),rt[6]&&(parseInt(rt[6],10)||0),rt[7]&&1e3*parseFloat(rt[7])||0),rt[9]&&rt[10]&&(nt=60*parseInt(rt[9],10)+parseInt(rt[10],10),tt+=("+"===rt[8]?-1:1)*nt*60*1e3),new Date(tt).getTime()}(et)),tt}function M(et){return Date.parse(et)}function P(et){return Date.parse(et)}function L(et,tt,nt){nt()}function x(et,tt,nt){var rt=O(et);isNaN(rt)?nt():tt(rt)}function F(et,tt,nt,rt,it){var at,ot,st=!1,lt=new XMLHttpRequest,ft=it?Ut.w.HEAD:Ut.w.GET,dt=tt.match(/\S+/g);if(tt=dt.shift(),at=function(){st||(st=!0,dt.length?F(et,dt.join(" "),nt,rt,it):rt())},ot=function(){var tt,rt;200===lt.status&&(tt=it?lt.getResponseHeader("Date"):lt.response,rt=et(tt),isNaN(rt)||(nt(rt),st=!0))},Bt.isRelative(tt)){var pt=Ot.resolve();pt&&(tt=Bt.resolve(tt,pt.url))}lt.open(ft,tt),lt.timeout=5e3,lt.onload=ot,lt.onloadend=at,lt.send()}function k(et,tt,nt){F(P,et,tt,nt,!0)}function U(){var et=ot.getLatestMPDRequestHeaderValueByID("Date"),tt=null!==et?new Date(et).getTime():Number.NaN;isNaN(tt)?Z(!0):Z(!1,tt-Date.now())}function Z(et,rt){if(isNaN(At)||isNaN(rt)||et||function(et){try{var nt,rt=G(et),at=isNaN(Nt)?30:Nt,ot=isNaN(it.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:it.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,st=isNaN(it.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:it.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,lt=isNaN(it.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:it.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;rt?(nt=Math.min(at*ot,st),tt.debug("Increasing timeBetweenSyncAttempts to ".concat(nt))):(nt=Math.max(at/ot,lt),tt.debug("Decreasing timeBetweenSyncAttempts to ".concat(nt))),Nt=nt}catch(et){}}(rt),!et&&!isNaN(rt)){yt=Date.now(),nt=!1;var at=isNaN(At);At=rt,at&&A(),tt.debug("Completed UTC sync. Setting client - server offset to ".concat(rt))}et&&(Rt=null,nt=!1,Dt.error(new Lt.Z(xt.TIME_SYNC_FAILED_ERROR_CODE,xt.TIME_SYNC_FAILED_ERROR_MESSAGE))),kt.trigger(ft.Z.UPDATE_TIME_SYNC_OFFSET,{offset:rt}),kt.trigger(ft.Z.TIME_SYNCHRONIZATION_COMPLETED)}function B(){if(st&&0!==st.length){var et=st.reduce((function(et,tt){return et+tt}),0)/st.length;G(et)?tt.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(tt.debug("Completed background UTC sync. Setting client - server offset to ".concat(et)),At=et,kt.trigger(ft.Z.UPDATE_TIME_SYNC_OFFSET,{offset:At})),rt=!1,vt=Date.now()}}function G(et){try{if(isNaN(At))return!0;var tt=it.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(it.get().streaming.utcSynchronization.maximumAllowedDrift)?it.get().streaming.utcSynchronization.maximumAllowedDrift:100;return et>=At-tt&&et<=At+tt}catch(et){return!0}}return et={initialize:function(){b(),at={"urn:mpeg:dash:utc:http-head:2014":k,"urn:mpeg:dash:utc:http-xsdate:2014":F.bind(null,O),"urn:mpeg:dash:utc:http-iso:2014":F.bind(null,M),"urn:mpeg:dash:utc:direct:2014":x,"urn:mpeg:dash:utc:http-head:2012":k,"urn:mpeg:dash:utc:http-xsdate:2012":F.bind(null,O),"urn:mpeg:dash:utc:http-iso:2012":F.bind(null,M),"urn:mpeg:dash:utc:direct:2012":x,"urn:mpeg:dash:utc:http-ntp:2014":L,"urn:mpeg:dash:utc:ntp:2014":L,"urn:mpeg:dash:utc:sntp:2014":L}},attemptSync:function(et,tt){dt=et,nt||(function(et){try{if(!et||!it.get().streaming.utcSynchronization.enabled)return!1;var tt=isNaN(Nt)?30:Nt;return!(yt&&tt&&!isNaN(tt))||(Date.now()-yt)/1e3>=tt}catch(et){return!0}}(tt)?(nt=!0,function R(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,tt=et||0;if(!dt||0===dt.length||tt>=dt.length)D();else{var nt=dt[tt];if(nt)if(at.hasOwnProperty(nt.schemeIdUri)){var rt=(new Date).getTime();at[nt.schemeIdUri](nt.value,(function(et){var tt=(new Date).getTime(),it=N(rt,tt,et);Rt=nt,D(it)}),(function(){R(tt+1)}))}else R(tt+1);else D()}}()):kt.trigger(ft.Z.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(et){et&&(et.dashMetrics&&(ot=et.dashMetrics),et.baseURLController&&(Ot=et.baseURLController),et.errHandler&&(Dt=et.errHandler),et.settings&&(it=et.settings))},reset:function(){b(),kt.off(ft.Z.ATTEMPT_BACKGROUND_SYNC,A,et)}},tt=(0,pt.Z)(Mt).getInstance().getLogger(et),kt.on(ft.Z.ATTEMPT_BACKGROUND_SYNC,A,et),et}Wt.__dashjs_factory_name="TimeSyncController";var Ii=dt.Z.getSingletonFactory(Wt);Ii.HTTP_TIMEOUT_MS=5e3,dt.Z.updateSingletonFactory(Wt.__dashjs_factory_name,Ii);const Ri=Ii;function Jt(){var et,tt,nt,rt=this.context;return et={createMediaSource:function(){var et="WebKitMediaSource"in window;return"MediaSource"in window?tt=new MediaSource:et&&(tt=new WebKitMediaSource),tt},attachMediaSource:function(et){var nt=window.URL.createObjectURL(tt);return et.setSource(nt),nt},detachMediaSource:function(et){et.setSource(null)},setDuration:function e(et){tt&&"open"===tt.readyState&&(null===et&&isNaN(et)||tt.duration!==et&&(function(et){for(var tt=et.sourceBuffers,nt=0;nt<tt.length;nt++)if(tt[nt].updating)return!0;return!1}(tt)?setTimeout(e.bind(null,et),50):(nt.info("Set MediaSource duration:"+et),tt.duration=et)))},setSeekable:function(et,nt){tt&&"function"==typeof tt.setLiveSeekableRange&&"function"==typeof tt.clearLiveSeekableRange&&"open"===tt.readyState&&et>=0&&et<nt&&(tt.clearLiveSeekableRange(),tt.setLiveSeekableRange(et,nt))},signalEndOfStream:function(et){if(et&&"open"===et.readyState){for(var tt=et.sourceBuffers,rt=0;rt<tt.length;rt++){if(tt[rt].updating)return;if(0===tt[rt].buffered.length)return}nt.info("call to mediaSource endOfStream"),et.endOfStream()}}},nt=(0,pt.Z)(rt).getInstance().getLogger(et),et}Jt.__dashjs_factory_name="MediaSourceController";const Ni=dt.Z.getSingletonFactory(Jt);function en(){var et,tt,nt,rt,it,at,ot,st,ft,dt,vt,At="urn:mpeg:dash:event:2012",Rt="discarded",Nt="updated",Dt="added",Ot=this.context,Mt=(0,lt.Z)(Ot).getInstance();function _(){if(!ot||!st)throw new Error("setConfig function has to be called previously")}function T(){vt=!1,nt={},rt={},it=null,dt=!1,at=Date.now()/1e3}function S(){try{if(!dt){dt=!0;var et=st.getTime(),it=et-at;it=at>0?Math.max(0,it):0,b(rt,it,et),b(nt,it,et),A(rt),A(nt),at=et,dt=!1}}catch(et){dt=!1,tt.error(et)}}function b(et,nt,rt){try{N(et,(function(it){if(void 0!==it){var at=isNaN(it.duration)?0:it.duration;it.calculatedPresentationTime<=rt&&it.calculatedPresentationTime+nt+at>=rt?D(it,yt.Z.EVENT_MODE_ON_START):(C(rt,at+nt,it.calculatedPresentationTime)||function(et){try{var nt=et.eventStream.period.start+et.eventStream.period.duration;return et.calculatedPresentationTime>nt}catch(et){return tt.error(et),!1}}(it))&&(tt.debug("Removing event ".concat(it.id," from period ").concat(it.eventStream.period.id," as it is expired or invalid")),function(et,nt){try{var rt=nt.eventStream.schemeIdUri,it=nt.eventStream.period.id,at=nt.eventStream.value,ot=nt.id;et[it][rt]=et[it][rt].filter((function(et){return at&&et.eventStream.value&&et.eventStream.value!==at||et.id!==ot})),0===et[it][rt].length&&delete et[it][rt]}catch(et){tt.error(et)}}(et,it))}}))}catch(et){tt.error(et)}}function A(et){try{for(var nt in et)et.hasOwnProperty(nt)&&0===Object.keys(et[nt]).length&&delete et[nt]}catch(et){tt.error(et)}}function I(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2],rt=et.eventStream.schemeIdUri,it=et.eventStream.value,at=et.id,ot=Rt;tt[rt]||(tt[rt]=[]);var st=tt[rt].findIndex((function(et){return(!it||et.eventStream.value&&et.eventStream.value===it)&&et.id===at}));if(-1===st)tt[rt].push(et),et.triggeredReceivedEvent=!1,et.triggeredStartEvent=!1,ot=Dt;else if(nt){var lt=tt[rt][st];et.triggeredReceivedEvent=lt.triggeredReceivedEvent,et.triggeredStartEvent=lt.triggeredStartEvent,tt[rt][st]=et,ot=Nt}return ot}function R(et){try{if(1==et.eventStream.value){var nt,rt=et.calculatedPresentationTime;nt=4294967295==et.calculatedPresentationTime?NaN:et.calculatedPresentationTime+et.duration,Mt.trigger(yt.Z.MANIFEST_VALIDITY_CHANGED,{id:et.id,validUntil:rt,newDuration:nt,newManifestValidAfter:NaN},{mode:yt.Z.EVENT_MODE_ON_START})}}catch(et){tt.error(et)}}function w(et){try{var nt=st.getTime();N(et,(function(et){var tt=et.eventStream&&et.eventStream.period&&!isNaN(et.eventStream.period.duration)?et.eventStream.period.duration:NaN,rt=et.eventStream&&et.eventStream.period&&!isNaN(et.eventStream.period.start)?et.eventStream.period.start:NaN;if(!isNaN(tt)&&!isNaN(rt)){var it=et.calculatedPresentationTime;Math.abs(it-nt)<300&&D(et,yt.Z.EVENT_MODE_ON_START)}}))}catch(et){tt.error(et)}}function N(et,nt){try{if(et)for(var rt=Object.keys(et),it=0;it<rt.length;it++)for(var at=et[rt[it]],ot=Object.keys(at),st=0;st<ot.length;st++)at[ot[st]].forEach((function(et){void 0!==et&&nt(et)}))}catch(et){tt.error(et)}}function C(et,nt,rt){try{return et-nt>rt}catch(et){return tt.error(et),!1}}function D(et,nt){try{var rt=st.getTime(),it=et.id;if(nt===yt.Z.EVENT_MODE_ON_RECEIVE&&!et.triggeredReceivedEvent)return tt.debug("Received event ".concat(it)),et.triggeredReceivedEvent=!0,void Mt.trigger(et.eventStream.schemeIdUri,{event:et},{mode:nt});et.triggeredStartEvent||(et.eventStream.schemeIdUri===At&&1==et.eventStream.value?0===et.duration&&0===et.presentationTimeDelta||(tt.debug("Starting manifest refresh event ".concat(it," at ").concat(rt)),function(){try{_(),ot.refreshManifest()}catch(et){tt.error(et)}}()):"urn:mpeg:dash:event:callback:2015"===et.eventStream.schemeIdUri&&1==et.eventStream.value?(tt.debug("Starting callback event ".concat(it," at ").concat(rt)),function(et){try{(0,_n.Z)(Ot).create({}).load({method:"get",url:et,request:{responseType:"arraybuffer"}})}catch(et){tt.error(et)}}(et.messageData)):(tt.debug("Starting event ".concat(it," from period ").concat(et.eventStream.period.id," at ").concat(rt)),Mt.trigger(et.eventStream.schemeIdUri,{event:et},{mode:nt})),et.triggeredStartEvent=!0)}catch(et){tt.error(et)}}return et={addInlineEvents:function(et,rt){try{if(_(),nt[rt]||(nt[rt]={}),et)for(var it=0;it<et.length;it++){var at=et[it];if(!C(st.getTime(),isNaN(at.duration)?0:at.duration,at.calculatedPresentationTime)){var ot=I(at,nt[rt],!0);ot===Dt?(tt.debug("Added inline event with id ".concat(at.id," from period ").concat(rt)),D(at,yt.Z.EVENT_MODE_ON_RECEIVE)):ot===Nt&&tt.debug("Updated inline event with id ".concat(at.id," from period ").concat(rt))}}}catch(et){throw et}},addInbandEvents:function(et,nt){try{_(),rt[nt]||(rt[nt]={});for(var it=0;it<et.length;it++){var at=et[it];C(st.getTime(),isNaN(at.duration)?0:at.duration,at.calculatedPresentationTime)||(I(at,rt[nt],!1)===Dt?(at.eventStream.schemeIdUri===At&&R(at),tt.debug("Added inband event with id ".concat(at.id," from period ").concat(nt)),D(at,yt.Z.EVENT_MODE_ON_RECEIVE)):tt.debug("Inband event with scheme_id_uri ".concat(at.eventStream.schemeIdUri,", value ").concat(at.eventStream.value,", period id ").concat(nt," and event id ").concat(at.id," was ignored because it has been added before.")))}S()}catch(et){throw et}},getInbandEvents:function(){return rt},getInlineEvents:function(){return nt},start:function(){try{_(),tt.debug("Start Event Controller");var et=ft.get().streaming.eventControllerRefreshDelay;vt||isNaN(et)||(vt=!0,it=setInterval(S,et))}catch(et){throw et}},setConfig:function(et){try{if(!et)return;et.manifestUpdater&&(ot=et.manifestUpdater),et.playbackController&&(st=et.playbackController),et.settings&&(ft=et.settings)}catch(et){throw et}},reset:function(){(function(){try{null!==it&&vt&&(clearInterval(it),it=null,vt=!1,function(){try{w(rt),w(nt)}catch(et){tt.error(et)}}())}catch(et){throw et}})(),T()}},tt=(0,pt.Z)(Ot).getInstance().getLogger(et),T(),et}en.__dashjs_factory_name="EventController";const Ci=dt.Z.getSingletonFactory(en),Di={LEVELS:{SUGGESTION:"Suggestion",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."}}};function rn(et,tt){(null==tt||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}function an(){var et,tt,nt,rt,it,ot,dt,vt,At,Rt,Nt,Dt,Ot,Mt,kt,Ut,Bt,Gt,jt,Vt,zt,Xt,Qt,$t,tn,nn,on,un,cn,fn,pn,mn,yn,En,_n,Tn,Sn,bn,In,wn,Cn,On,Pn,xn,Bn,qn,jn,Vn,Wn=this.context,Qn=(0,lt.Z)(Wn).getInstance();function se(){if(!(ot&&ot.hasOwnProperty("load")&&zt&&zt.hasOwnProperty("initialize")&&zt.hasOwnProperty("reset")&&zt.hasOwnProperty("getClientTimeOffset")&&dt&&Vt&&At&&yn))throw new Error(at.Z.MISSING_CONFIG_ERROR)}function ue(){if(!it||!it.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}function le(){!function(){try{var et=vt.getStreamsInfo();if(!Qt&&0===et.length)throw new Error("There are no periods in the MPD");Qt&&et.length>0&&At.updateManifestUpdateInfo({currentTime:yn.getTime(),buffered:mn.getBufferRange(),presentationStartTime:et[0].start,clientTimeOffset:zt.getClientTimeOffset()}),Xt.length>0&&function(et){0!==et.length?Xt=Xt.filter((function(nt){var rt=et.filter((function(et){return et.id===nt.getId()})).length>0||nt.getId()===Qt.getId();return rt||(tt.debug("Removing stream ".concat(nt.getId())),nt.reset(!0)),rt})):tt.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(et);for(var nt=[],rt=0,it=et.length;rt<it;rt++){var at=et[rt];nt.push(fe(at)),At.addManifestUpdateStreamInfo(at)}Promise.all(nt).then((function(){return new Promise((function(tt,nt){Qt?tt():de(et,tt,nt)}))})).then((function(){Qn.trigger(ft.Z.STREAMS_COMPOSED),Me()})).catch((function(et){throw et}))}catch(et){Vt.error(new Lt.Z(xt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,et.message+" nostreamscomposed",dt.getValue())),fn=!0,Qe()}}()}function ce(){Bn=!0}function fe(et){var tt=ze(et.id);return tt?tt.updateData(et):(tt=Ei(Wn).create({manifestModel:dt,mediaPlayerModel:_n,dashMetrics:At,manifestUpdater:it,adapter:vt,timelineConverter:zt,capabilities:nt,capabilitiesFilter:rt,errHandler:Vt,baseURLController:Ot,segmentBaseController:Mt,textController:tn,abrController:Ut,playbackController:yn,eventController:Gt,mediaController:Bt,protectionController:$t,videoModel:mn,streamInfo:et,settings:xn}),Xt.push(tt),tt.initialize(),Promise.resolve())}function de(et,nt,rt){try{Ae();var it=At.getCurrentDVRInfo().range;if(it.end<it.start){qn&&clearTimeout(qn);var at=Math.min(1e3*(-1*(it.end-it.start)+2),2147483647);return tt.debug("Waiting for ".concat(at," ms before playback can start")),Qn.trigger(ft.Z.AST_IN_FUTURE,{delay:at}),void(qn=setTimeout((function(){de(et,nt,rt)}),at))}xn.get().streaming.applyProducerReferenceTime&&En.calculateProducerReferenceTimeOffsets(et);var ot=et[0].manifestInfo;if(xn.get().streaming.applyServiceDescription&&En.applyServiceDescription(ot),vt.getIsDynamic()){var st=Be(et,ot);yn.computeAndSetLiveDelay(st,ot)}(xn.get().streaming.applyContentSteering&&Dt.shouldQueryBeforeStart()?Dt.loadSteeringData():Promise.resolve()).then((function(){var et=dt.getValue();et&&Ot.update(et),ge(),nt()})).catch((function(et){tt.error(et),ge(),nt()}))}catch(et){rt(et)}}function ge(){var et=function(){var et;if(vt.getIsDynamic()){var nt=At.getCurrentDVRInfo();et=(nt&&nt.range?nt.range.end:0)-yn.getOriginalLiveDelay();var rt=nt?nt.range:null;if(rt){if(isNaN(jn)&&-1===jn.toString().indexOf("posix:")){var it=ke(!0);isNaN(it)||(tt.info("Start time from URI parameters: ".concat(it)),et=Math.min(et,it))}else{tt.info("Start time provided by the app: ".concat(jn));var at=Ue(!0,jn);isNaN(at)||(et=Math.min(et,at))}var ot=xn.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;et=Math.max(et,rt.start+ot)}}else if(et=$e()[0].getStreamInfo().start,isNaN(jn)){var st=ke(!1);isNaN(st)||(tt.info("Start time from URI parameters: ".concat(st)),et=Math.max(et,st))}else{tt.info("Start time provided by the app: ".concat(jn));var lt=Ue(!1,jn);isNaN(lt)||(et=Math.max(et,lt))}return et}(),nt=be(et),rt=null!==nt?nt:Xt[0];Qn.trigger(ft.Z.INITIAL_STREAM_SWITCH,{startTime:et}),he(rt,null,et),wn||(wn=setInterval((function(){!un&&yn.getTimeToStreamEnd()<=0&&!yn.isSeeking()&&Qn.trigger(ft.Z.PLAYBACK_ENDED,{isLast:Ke().isLast})}),200))}function he(et,nt,rt){try{if(un||!et||nt===et&&et.getIsActive())return;un=!0,Qn.trigger(ft.Z.PERIOD_SWITCH_STARTED,{fromStreamInfo:nt?nt.getStreamInfo():null,toStreamInfo:et.getStreamInfo()});var it=!1;Qt=et,nt&&(it=Te(et,nt),nt.deactivate(it)),rt=isNaN(rt)?!it&&nt?et.getStreamInfo().start:NaN:rt,tt.info("Switch to stream ".concat(et.getId(),". Seektime is ").concat(rt,", current playback time is ").concat(yn.getTime(),". Seamless period switch is set to ").concat(it)),On=On.filter((function(et){return et.getId()!==Qt.getId()})),yn.initialize(Ke(),!!nt),mn.getElement()?pe(rt,it,!1):me(rt,it)}catch(et){un=!1}}function pe(et,nt){var rt,it=arguments.length>2&&void 0!==arguments[2]&&arguments[2];function a(){if(pn&&"open"===pn.readyState){tt.debug("MediaSource is open!"),window.URL.revokeObjectURL(rt),pn.removeEventListener("sourceopen",a),pn.removeEventListener("webkitsourceopen",a),Fe();var at=At.getCurrentDVRInfo();Rt.setSeekable(at.range.start,at.range.end),it?(isNaN(et)||yn.seek(et,!0,!0),Qt.setMediaSource(pn).then((function(){Qt.initializeForTextWithMediaSource(pn)}))):me(et,nt)}}function o(){pn.addEventListener("sourceopen",a,!1),pn.addEventListener("webkitsourceopen",a,!1),rt=Rt.attachMediaSource(mn),tt.debug("MediaSource attached to element. Waiting on open...")}pn?nt?me(et,nt):(Rt.detachMediaSource(mn),o()):(pn=Rt.createMediaSource(),o())}function me(et,tt){Qt.activate(pn,tt?Cn:void 0,et).then((function(tt){if(tt){var nt=Object.keys(tt);nt.length>0&&tt[nt[0]].getBuffer().changeType&&(Pn=!0),Cn=tt}isNaN(et)||(Qn.trigger(ft.Z.SEEK_TARGET,{time:et},{streamId:Qt.getId()}),yn.seek(et,!1,!0),Qt.startScheduleControllers()),un=!1,Qn.trigger(ft.Z.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ke()})}))}function ye(et){var tt=be(et.seekTime);tt&&tt!==Qt?tt&&tt!==Qt&&(Ee(),function(et,tt){var nt=et&&!isNaN(et.seekTime)?et.seekTime:NaN,rt=Qt.getProcessors().map((function(tt){return tt.prepareOuterPeriodPlaybackSeeking(et)}));Promise.all(rt).then((function(){he(tt,Qt,nt)})).catch((function(et){Vt.error(et)}))}(et,tt)):(Ee(),function(et){Qt.getProcessors().forEach((function(tt){return tt.prepareInnerPeriodPlaybackSeeking(et)})),je(gn.USER_REQUEST_STOP_REASON)}(et)),He(dn.SEEK_START_REASON)}function Ee(){ve()}function ve(){On&&On.length>0&&(On.forEach((function(et){et.deactivate(!0)})),On=[])}function _e(et){et.newMediaInfo.streamInfo.id===Qt.getId()&&(ve(),Qt.prepareTrackChange(et))}function Te(et,tt){try{return xn.get().streaming.buffer.reuseExistingSourceBuffers&&(tt.isProtectionCompatible(et)||Bn)&&(Pn&&xn.get().streaming.buffer.useChangeTypeForTrackSwitch||tt.isMediaCodecCompatible(et,tt))}catch(et){return!1}}function Se(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(pn&&!et.getPreloaded()){var nt=Te(et,tt);nt&&et.startPreloading(pn,Cn).then((function(){On.push(et)}))}}function be(et){if(isNaN(et))return null;for(var tt=Xt.length,nt=0;nt<tt;nt++){var rt=Xt[nt];if(et<parseFloat((rt.getStartTime()+rt.getDuration()).toFixed(5)))return rt}return null}function Ae(){try{var et=vt.getIsDynamic(),tt=vt.getStreamsInfo()[0].manifestInfo,nt=yn.getTime(),rt=zt.calcTimeShiftBufferWindow(Xt,et),it=Le();if(void 0===rt.start||void 0===rt.end)return;it&&0!==it.length?it.forEach((function(et){At.addDVRInfo(et.getType(),nt,tt,rt)})):At.addDVRInfo(at.Z.VIDEO,nt,tt,rt)}catch(et){}}function Ie(et){if(bn&&on){var tt=_n.getInitialBufferLevel(),nt=[at.Z.TEXT];(isNaN(tt)||tt<=yn.getBufferLevel(nt)||vt.getIsDynamic()&&tt>yn.getLiveDelay())&&(bn=!1,He(dn.INITIAL_PLAYOUT_START_REASON),yn.play())}et&&et.mediaType&&At.addBufferLevel(et.mediaType,new Date,1e3*et.bufferLevel)}function Re(et){et.streamInfo.id===Qt.getId()&&et.reason&&et.reason.forceReplace&&ve(),ze(et.streamInfo.id).prepareQualityChange(et)}function we(){if(vt.getIsDynamic()&&0!==yn.getOriginalLiveDelay()&&Qt){var et=vt.getStreamsInfo();if(et.length>0){var tt=et[0].manifestInfo,nt=Be(et,tt);yn.computeAndSetLiveDelay(nt,tt)}}}function Ne(){if(qe()){var et=mn.getPlaybackQuality();et&&At.addDroppedFrames(et)}}function Ce(){tt.debug("[onPlaybackStarted]"),!bn&&Sn&&He(dn.RESUME_FROM_PAUSE_START_REASON),bn&&(bn=!1),In&&(In=!1,xn.get().streaming.applyContentSteering&&!Dt.shouldQueryBeforeStart()&&Dt.loadSteeringData()),Sn=!1}function De(et){tt.debug("[onPlaybackPaused]"),et.ended||(Sn=!0,je(gn.USER_REQUEST_STOP_REASON))}function Oe(et){tt.debug("Stream with id ".concat(et.streamInfo.id," finished buffering"));var nt=et.streamInfo.isLast;pn&&nt?(tt.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),Rt.signalEndOfStream(pn)):Me()}function Me(){if(Qt&&Qt.getHasFinishedBuffering())for(var et=function(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var tt=et||Qt||null;if(tt){var nt=tt.getStreamInfo();return Xt.filter((function(et){var tt=et.getStreamInfo();return tt.start>nt.start&&nt.id!==tt.id}))}}catch(et){return[]}}(Qt),tt=0;tt<et.length;){var nt=et[tt],rt=0===tt?Qt:et[tt-1];!nt.getPreloaded()&&rt.getHasFinishedBuffering()&&pn&&Se(nt,rt),tt+=1}}function Pe(){wn&&(clearInterval(wn),wn=null)}function Le(){return Qt?Qt.getProcessors():[]}function xe(et){if(Qt&&!Qt.getIsEndedEventSignaled()){Qt.setIsEndedEventSignaled(!0);var nt=function(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,tt=et||Qt||null;if(!tt)return null;for(var nt=tt.getStreamInfo(),rt=nt.start,it=0,at=-1,ot=NaN;it<Xt.length;){var st=Xt[it].getStreamInfo(),lt=st.start-rt;lt>0&&(isNaN(ot)||lt<ot)&&nt.id!==st.id&&(ot=lt,at=it),it+=1}return at>=0?Xt[at]:null}();nt?(tt.debug("StreamController onEnded, found next stream with id ".concat(nt.getStreamInfo().id,". Switching from ").concat(Qt.getStreamInfo().id," to ").concat(nt.getStreamInfo().id)),he(nt,Qt,NaN)):(tt.debug("StreamController no next stream found"),Qt.setIsEndedEventSignaled(!1)),je(nt?gn.END_OF_PERIOD_STOP_REASON:gn.END_OF_CONTENT_STOP_REASON)}et&&et.isLast&&(Pe(),Dt.stopSteeringRequestTimer())}function Fe(et){var tt=et||Ke().manifestInfo.duration;Rt.setDuration(tt)}function ke(et){var tt=kt.getURIFragmentData();if(!tt||!tt.t)return NaN;var nt=$e()[0].getStreamInfo().start;return tt.t=tt.t.split(",")[0],Ze(et,tt.t,nt)}function Ue(et,tt){var nt=0;return et||(nt=$e()[0].getStreamInfo().start),Ze(et,tt,nt)}function Ze(et,tt,nt){var rt=vt.getRegularPeriods()[0],it=tt.toString(),at=-1!==it.indexOf("posix:")?"now"===it.substring(6)?Date.now()/1e3:parseFloat(it.substring(6)):NaN;return et&&!isNaN(at)?zt.calcPresentationTimeFromWallTime(new Date(1e3*at),rt):parseFloat(it)+nt}function Be(et,tt){try{var nt=NaN;if(tt&&!isNaN(tt.maxFragmentDuration)&&isFinite(tt.maxFragmentDuration))return tt.maxFragmentDuration;if(et&&1===et.length){var rt=et[0],it=[at.Z.VIDEO,at.Z.AUDIO,at.Z.TEXT].reduce((function(et,tt){var nt=vt.getMediaInfoForType(rt,tt);return nt&&!1!==nt.isFragmented&&et.push(nt),et}),[]).reduce((function(et,tt){var nt=vt.getVoRepresentations(tt);return nt&&nt.length>0&&nt.forEach((function(tt){tt&&et.push(tt)})),et}),[]).reduce((function(et,tt){var nt=vt.convertRepresentationToRepresentationInfo(tt);return nt&&nt.fragmentDuration&&!isNaN(nt.fragmentDuration)&&et.push(nt.fragmentDuration),et}),[]);nt=Math.max.apply(Math,function(et){if(Array.isArray(et))return rn(et)}(ot=it)||function(et){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(et))return Array.from(et)}(ot)||function(et,tt){if(et){if("string"==typeof et)return rn(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);return"Object"===nt&&et.constructor&&(nt=et.constructor.name),"Map"===nt||"Set"===nt?Array.from(et):"Arguments"===nt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)?rn(et,tt):void 0}}(ot)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return isFinite(nt)?nt:NaN}catch(et){return NaN}var ot}function Ge(et){if(et.error)fn=!0,Qe();else{tt.info("Manifest updated... updating data system wide.");var nt=et.manifest;vt.updatePeriods(nt);var it=vt.getUTCTimingSources();!vt.getIsDynamic()||it&&0!==it.length||Qn.trigger(yt.Z.CONFORMANCE_VIOLATION,{level:Di.LEVELS.WARNING,event:Di.EVENTS.NO_UTC_TIMING_ELEMENT});var at=vt.getIsDynamic()?it.concat(Tn.getUTCTimingSources()):it;rt.filterUnsupportedFeatures(nt).then((function(){Ot.initialize(nt),Nt.attemptSync(at,vt.getIsDynamic())}))}}function qe(){return!!Qt&&Qt.getHasVideoTrack()}function Ye(){return!!Qt&&Qt.getHasAudioTrack()}function je(et,tt){tt=tt||new Date,Le().forEach((function(nt){nt.finalisePlayList(tt,et)})),At.addPlayList()}function He(et){At.createPlaylistMetrics(1e3*yn.getTime(),et)}function Ve(et){if(et.error){var nt="";switch(et.error.code){case 1:nt="MEDIA_ERR_ABORTED";break;case 2:nt="MEDIA_ERR_NETWORK";break;case 3:nt="MEDIA_ERR_DECODE",Vn.counts.mediaErrorDecode+=1;break;case 4:nt="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:nt="MEDIA_ERR_ENCRYPTED";break;default:nt="UNKNOWN"}"MEDIA_ERR_DECODE"===nt&&xn.get().errors.recoverAttempts.mediaErrorDecode>=Vn.counts.mediaErrorDecode?function(){tt.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var et=yn.getTime();Qt.deactivate(!1),tt.warn("MediaSource has been resetted. Resuming playback from time ".concat(et)),pe(et,!1,!1)}():(cn=!0,et.error.message&&(nt+=" ("+et.error.message+")"),et.error.msExtendedCode&&(nt+=" (0x"+(et.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),tt.fatal("Video Element Error: "+nt),et.error&&tt.fatal(et.error),Vt.error(new Lt.Z(et.error.code,nt)),Qe())}}function Ke(){return Qt?Qt.getStreamInfo():null}function ze(et){for(var tt=0,nt=Xt.length;tt<nt;tt++)if(Xt[tt].getId()===et)return Xt[tt];return null}function We(et){isNaN(et.newDuration)||Fe(et.newDuration)}function Xe(){Xt=[],jn=NaN,$t=null,un=!1,Qt=null,cn=!1,fn=!1,bn=!0,In=!0,Sn=!1,on=!0,wn=null,Bn=!1,Pn=!1,On=[],qn=null,Vn={counts:{mediaErrorDecode:0}}}function Qe(){se(),Nt.reset(),je(cn||fn?gn.FAILURE_STOP_REASON:gn.USER_REQUEST_STOP_REASON);for(var tt=0,nt=Xt?Xt.length:0;tt<nt;tt++)Xt[tt].reset(cn);Qn.off(yt.Z.PLAYBACK_TIME_UPDATED,Ne,et),Qn.off(yt.Z.PLAYBACK_SEEKING,ye,et),Qn.off(yt.Z.PLAYBACK_ERROR,Ve,et),Qn.off(yt.Z.PLAYBACK_STARTED,Ce,et),Qn.off(yt.Z.PLAYBACK_PAUSED,De,et),Qn.off(yt.Z.PLAYBACK_ENDED,xe,et),Qn.off(yt.Z.METRIC_ADDED,Je,et),Qn.off(yt.Z.MANIFEST_VALIDITY_CHANGED,We,et),Qn.off(yt.Z.BUFFER_LEVEL_UPDATED,Ie,et),Qn.off(yt.Z.QUALITY_CHANGE_REQUESTED,Re,et),ft.Z.KEY_SESSION_UPDATED&&Qn.off(ft.Z.KEY_SESSION_UPDATED,ce,et),Qn.off(ft.Z.MANIFEST_UPDATED,Ge,et),Qn.off(ft.Z.STREAM_BUFFERING_COMPLETED,Oe,et),Qn.off(ft.Z.TIME_SYNCHRONIZATION_COMPLETED,le,et),Qn.off(ft.Z.CURRENT_TRACK_CHANGED,_e,et),Qn.off(ft.Z.SETTING_UPDATED_LIVE_DELAY,we,et),Qn.off(ft.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,we,et),Ot.reset(),it.reset(),Gt.reset(),At.clearAllCurrentMetrics(),dt.setValue(null),ot.reset(),zt.reset(),jt.reset(),pn&&(Rt.detachMediaSource(mn),pn=null),mn=null,$t&&($t=null,nn=null,dt.getValue()&&Qn.trigger(ft.Z.PROTECTION_DESTROYED,{data:dt.getValue().url})),Pe(),Qn.trigger(ft.Z.STREAM_TEARDOWN_COMPLETE),Xe()}function Je(et){if(et.metric===st.Z.DVR_INFO){var tt=Ye()?at.Z.AUDIO:at.Z.VIDEO;et.mediaType===tt&&Rt.setSeekable(et.value.range.start,et.value.range.end)}}function $e(){return Xt}return et={initialize:function(tt,nt){se(),on=tt,nn=nt,zt.initialize(),(it=Ai(Wn).create()).setConfig({manifestModel:dt,adapter:vt,manifestLoader:ot,errHandler:Vt,settings:xn,contentSteeringController:Dt}),it.initialize(),(Gt=Ci(Wn).getInstance()).setConfig({manifestUpdater:it,playbackController:yn,settings:xn}),Gt.start(),Nt.setConfig({dashMetrics:At,baseURLController:Ot,errHandler:Vt,settings:xn}),Nt.initialize(),$t&&(Qn.trigger(ft.Z.PROTECTION_CREATED,{controller:$t}),$t.setMediaElement(mn.getElement()),nn&&$t.setProtectionData(nn)),Qn.on(yt.Z.PLAYBACK_TIME_UPDATED,Ne,et),Qn.on(yt.Z.PLAYBACK_SEEKING,ye,et),Qn.on(yt.Z.PLAYBACK_ERROR,Ve,et),Qn.on(yt.Z.PLAYBACK_STARTED,Ce,et),Qn.on(yt.Z.PLAYBACK_PAUSED,De,et),Qn.on(yt.Z.PLAYBACK_ENDED,xe,et),Qn.on(yt.Z.METRIC_ADDED,Je,et),Qn.on(yt.Z.MANIFEST_VALIDITY_CHANGED,We,et),Qn.on(yt.Z.BUFFER_LEVEL_UPDATED,Ie,et),Qn.on(yt.Z.QUALITY_CHANGE_REQUESTED,Re,et),ft.Z.KEY_SESSION_UPDATED&&Qn.on(ft.Z.KEY_SESSION_UPDATED,ce,et),Qn.on(ft.Z.MANIFEST_UPDATED,Ge,et),Qn.on(ft.Z.STREAM_BUFFERING_COMPLETED,Oe,et),Qn.on(ft.Z.TIME_SYNCHRONIZATION_COMPLETED,le,et),Qn.on(ft.Z.CURRENT_TRACK_CHANGED,_e,et),Qn.on(ft.Z.SETTING_UPDATED_LIVE_DELAY,we,et),Qn.on(ft.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,we,et)},getActiveStreamInfo:Ke,addDVRMetric:Ae,hasVideoTrack:qe,hasAudioTrack:Ye,getStreamById:ze,getStreamForTime:be,getTimeRelativeToStreamId:function(et,tt){for(var nt=null,rt=0,it=0,at=null,ot=0;ot<Xt.length;ot++){if(it=(nt=Xt[ot]).getStartTime(),at=nt.getDuration(),Number.isFinite(it)&&(rt=it),nt.getId()===tt)return et-rt;Number.isFinite(at)&&(rt+=at)}return null},load:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;se(),jn=tt,ot.load(et)},loadWithManifest:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;ue(),jn=tt,it.setManifest(et)},getActiveStreamProcessors:Le,setConfig:function(et){et&&(et.capabilities&&(nt=et.capabilities),et.capabilitiesFilter&&(rt=et.capabilitiesFilter),et.manifestLoader&&(ot=et.manifestLoader),et.manifestModel&&(dt=et.manifestModel),et.mediaPlayerModel&&(_n=et.mediaPlayerModel),et.customParametersModel&&(Tn=et.customParametersModel),et.protectionController&&($t=et.protectionController),et.adapter&&(vt=et.adapter),et.dashMetrics&&(At=et.dashMetrics),et.errHandler&&(Vt=et.errHandler),et.timelineConverter&&(zt=et.timelineConverter),et.videoModel&&(mn=et.videoModel),et.playbackController&&(yn=et.playbackController),et.serviceDescriptionController&&(En=et.serviceDescriptionController),et.contentSteeringController&&(Dt=et.contentSteeringController),et.textController&&(tn=et.textController),et.abrController&&(Ut=et.abrController),et.mediaController&&(Bt=et.mediaController),et.settings&&(xn=et.settings),et.baseURLController&&(Ot=et.baseURLController),et.uriFragmentModel&&(kt=et.uriFragmentModel),et.segmentBaseController&&(Mt=et.segmentBaseController))},setProtectionData:function(et){nn=et,$t&&$t.setProtectionData(nn)},getIsStreamSwitchInProgress:function(){return un},switchToVideoElement:function(et){Qt&&(yn.initialize(Ke()),pe(et,!1,!0))},getHasMediaOrInitialisationError:function(){return cn||fn},getStreams:$e,getActiveStream:function(){return Qt},getInitialPlayback:function(){return bn},getAutoPlay:function(){return on},reset:Qe},tt=(0,pt.Z)(Wn).getInstance().getLogger(et),Nt=Ri(Wn).getInstance(),Rt=Ni(Wn).getInstance(),jt=qt(Wn).getInstance(),Xe(),et}an.__dashjs_factory_name="StreamController";const Mi=dt.Z.getSingletonFactory(an);function sn(){var et,tt,nt,rt,it,ot,st,dt,yt,vt,At,Rt,Nt=this.context,Dt=(0,lt.Z)(Nt).getInstance();function E(){Rt.debug("Stopping the gap controller"),it&&(clearInterval(it),it=null),function(){Dt.off(ft.Z.WALLCLOCK_TIME_UPDATED,b,this),Dt.off(ft.Z.INITIAL_STREAM_SWITCH,S,this),Dt.off(ft.Z.PLAYBACK_SEEKING,v,this),Dt.off(ft.Z.BUFFER_REPLACEMENT_STARTED,_,et),Dt.off(ft.Z.TRACK_CHANGE_RENDERED,T,et)}(),it=null,ot=NaN,rt=0,vt=null,At={}}function v(){vt&&(clearTimeout(vt),vt=null)}function _(et){try{if(et.streamId!==dt.getActiveStreamInfo().id||et.mediaType!==at.Z.VIDEO&&et.mediaType!==at.Z.AUDIO)return;et.streamId===dt.getActiveStreamInfo().id&&(At[et.mediaType]=!0)}catch(et){Rt.error(et)}}function T(et){et&&et.mediaType&&(At[et.mediaType]=!1)}function S(){it||function(){try{it||(Rt.debug("Starting the gap controller"),it=setInterval((function(){A()&&N(st.getTime())}),100))}catch(et){}}()}function b(){if(A(nt.get().streaming.gaps.enableSeekFix)&&++rt>=10){var et=st.getTime();tt===et?N(et,!0):(tt=et,ot=NaN),rt=0}}function A(){var et=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!dt.getActiveStream())return!1;var tt=Object.keys(At).some((function(et){return At[et]})),rt=!!et&&I();return!tt&&nt.get().streaming.gaps.jumpGaps&&dt.getActiveStreamProcessors().length>0&&(!st.isSeeking()||rt)&&!st.isPaused()&&!dt.getIsStreamSwitchInProgress()&&!dt.getHasMediaOrInitialisationError()}function I(){var et=dt.getActiveStream(),tt=parseFloat((et.getStartTime()+et.getDuration()).toFixed(5));return st.getTime()+nt.get().streaming.gaps.threshold>=tt}function R(et,tt){try{if(!et||et.length<=1&&tt>0)return NaN;for(var rt=NaN,it=0;isNaN(rt)&&it<et.length;){var at=it>0?et.end(it-1):0;tt<et.start(it)&&at-tt<nt.get().streaming.gaps.threshold&&(rt=it),it+=1}return rt}catch(et){return null}}function w(et,tt){for(var nt=0,rt=et.length;nt<rt;nt++)if(tt>=et.start(nt)&&tt<=et.end(nt))return!0;return!1}function N(et){var tt,rt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],it=nt.get().streaming.gaps.enableStallFix,at=nt.get().streaming.gaps.stallSeek,lt=nt.get().streaming.gaps.smallGapLimit,ft=nt.get().streaming.gaps.jumpLargeGaps,pt=yt.getBufferRange(),At=NaN,Nt=!1;if(tt=R(pt,et),!isNaN(tt)){var Dt=pt.start(tt),Ot=Dt-et;Ot>0&&(Ot<=lt||ft)&&(At=Dt)}var Mt=st.getTimeToStreamEnd();if(isNaN(At)&&rt&&isFinite(Mt)&&!isNaN(Mt)&&Mt<lt&&(At=parseFloat(st.getStreamEndTime().toFixed(5)),Nt=!0),it&&isNaN(At)&&rt&&isNaN(tt)&&w(pt,et)&&(0===at?(Rt.warn("Toggle play pause to break stall"),yt.pause(),yt.play()):(Rt.warn("Jumping ".concat(at,"s to break stall")),At=et+at)),At>0&&ot!==At&&At>et&&!vt){var Lt=At-et;if(Nt){var xt=dt.getStreamForTime(At),kt=xt&&!!xt.getPreloaded();Rt.warn("Jumping to end of stream because of gap from ".concat(et," to ").concat(At,". Gap duration: ").concat(Lt)),st.seek(At,!0,kt)}else{var Ut=st.getIsDynamic(),Bt=tt>0?pt.end(tt-1):et,Gt=Ut?1e3*Math.max(0,Lt-.1):0;vt=window.setTimeout((function(){st.seek(At,!0,!0),Rt.warn("Jumping gap occuring in period ".concat(dt.getActiveStream().getStreamId()," starting at ").concat(Bt," and ending at ").concat(At,". Jumping by: ").concat(At-Bt)),vt=null}),Gt)}ot=At}}return et={reset:E,setConfig:function(et){et&&(et.settings&&(nt=et.settings),et.playbackController&&(st=et.playbackController),et.streamController&&(dt=et.streamController),et.videoModel&&(yt=et.videoModel))},initialize:function(){!function(){Dt.on(ft.Z.WALLCLOCK_TIME_UPDATED,b,this),Dt.on(ft.Z.INITIAL_STREAM_SWITCH,S,this),Dt.on(ft.Z.PLAYBACK_SEEKING,v,this),Dt.on(ft.Z.BUFFER_REPLACEMENT_STARTED,_,et),Dt.on(ft.Z.TRACK_CHANGE_RENDERED,T,et)}()}},Rt=(0,pt.Z)(Nt).getInstance().getLogger(et),E(),et}sn.__dashjs_factory_name="GapController";const Li=dt.Z.getSingletonFactory(sn);function ln(){var et,tt,nt,rt,it,ot,dt,vt,At,Rt,Nt=this.context,Dt=(0,lt.Z)(Nt).getInstance();function E(){tt=!1;var et=wr.Z.parseUserAgent();nt=et&&et.browser&&et.browser.name&&"safari"===et.browser.name.toLowerCase()}function v(){tt=!1}function _(et){if(et.streamId===ot.getActiveStreamInfo().id&&At){var tt=dt.getLiveDelay();dt.getBufferLevel()>tt/2&&(At=!1)}}function T(et){et.streamId===ot.getActiveStreamInfo().id&&(At=et.state===st.Z.BUFFER_EMPTY)}function S(){vt.getCatchupModeEnabled()||rt.setPlaybackRate(1)}function b(){dt.getIsDynamic()&&vt.getCatchupModeEnabled()&&(vt.getCatchupPlaybackRates().max>0||vt.getCatchupPlaybackRates().min<0)&&!dt.isPaused()&&!dt.isSeeking()&&function(){try{return!(!dt.getTime()>0||tt)&&(I()===at.Z.LIVE_CATCHUP_MODE_LOLP?function(et,tt){try{return Math.abs(A())>0||et<tt}catch(et){return!1}}(dt.getBufferLevel(),it.get().streaming.liveCatchup.playbackBufferMin):function(){try{return Math.abs(A())>0}catch(et){return!1}}())}catch(et){return!1}}()&&function(){if(!tt&&rt){var et,ot=rt.getPlaybackRate(),st=vt.getCatchupPlaybackRates(),lt=dt.getBufferLevel(),ft=A(),pt=vt.getCatchupMaxDrift();if(!isNaN(pt)&&pt>0&&ft>pt)Rt.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),tt=!0,dt.seekToCurrentLive(!0,!1);else{var yt=dt.getCurrentLiveLatency(),Nt=dt.getLiveDelay();et=I()===at.Z.LIVE_CATCHUP_MODE_LOLP?function(et,tt,nt,rt,it){var at;if(it<rt){var ot=Math.abs(et.min),st=5*(it-rt);at=1-ot+2*ot/(1+Math.pow(Math.E,-st)),Rt.debug("[LoL+ playback control_buffer-based] bufferLevel: "+it+", newRate: "+at)}else{var lt=et.max;if(Math.abs(tt-nt)<=.02*nt)at=1;else{var ft=5*(tt-nt);at=1-lt+2*lt/(1+Math.pow(Math.E,-ft))}Rt.debug("[LoL+ playback control_latency-based] latency: "+tt+", newRate: "+at)}return at}(st,yt,Nt,it.get().streaming.liveCatchup.playbackBufferMin,lt):function(et,tt,nt,rt){if(At)return 1;var it=tt-nt,at=it<0?Math.abs(et.min):et.max,ot=5*it,st=1-at+2*at/(1+Math.pow(Math.E,-ot));return dt.getPlaybackStalled()&&rt<=nt/2&&it>0&&(st=1),st}(st,yt,Nt,lt);var Dt=nt?.25:.02/(.5/st.max);et&&Math.abs(ot-et)>=Dt&&(Rt.debug("[CatchupController]: Setting playback rate to ".concat(et)),rt.setPlaybackRate(et))}}}()}function A(){return dt.getCurrentLiveLatency()-dt.getLiveDelay()}function I(){var et=it.get().streaming.liveCatchup.playbackBufferMin;return it.get().streaming.liveCatchup.mode!==at.Z.LIVE_CATCHUP_MODE_LOLP||null===et||isNaN(et)?at.Z.LIVE_CATCHUP_MODE_DEFAULT:at.Z.LIVE_CATCHUP_MODE_LOLP}function R(){vt.getCatchupPlaybackRates(!0)}return et={reset:function(){Dt.off(yt.Z.BUFFER_LEVEL_UPDATED,_,et),Dt.off(yt.Z.BUFFER_LEVEL_STATE_CHANGED,T,et),Dt.off(yt.Z.PLAYBACK_PROGRESS,b,et),Dt.off(yt.Z.PLAYBACK_TIME_UPDATED,b,et),Dt.off(yt.Z.PLAYBACK_SEEKED,b,et),Dt.off(ft.Z.SETTING_UPDATED_CATCHUP_ENABLED,S,et),Dt.off(ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,R,et),Dt.off(ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,R,et),Dt.off(yt.Z.STREAM_INITIALIZED,R,et),E(),rt.setPlaybackRate(1,!0)},setConfig:function(et){et&&(et.settings&&(it=et.settings),et.videoModel&&(rt=et.videoModel),et.streamController&&(ot=et.streamController),et.playbackController&&(dt=et.playbackController),et.mediaPlayerModel&&(vt=et.mediaPlayerModel))},initialize:function(){Dt.on(yt.Z.BUFFER_LEVEL_UPDATED,_,et),Dt.on(yt.Z.BUFFER_LEVEL_STATE_CHANGED,T,et),Dt.on(yt.Z.PLAYBACK_PROGRESS,b,et),Dt.on(yt.Z.PLAYBACK_TIME_UPDATED,b,et),Dt.on(yt.Z.PLAYBACK_SEEKED,v,et),Dt.on(ft.Z.SETTING_UPDATED_CATCHUP_ENABLED,S,et),Dt.on(ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,R,et),Dt.on(ft.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,R,et),Dt.on(yt.Z.STREAM_INITIALIZED,R,et),R()}},Rt=(0,pt.Z)(Nt).getInstance().getLogger(et),E(),et}ln.__dashjs_factory_name="CatchupController";const Fi=dt.Z.getSingletonFactory(ln);var Ui=[at.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME];function hn(){var et,tt,nt,rt,it,st=this.context;function u(){tt={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},nt=[]}function l(et,nt,it){try{tt[et][nt]=it/1e3}catch(et){rt.error(et)}}return et={getServiceDescriptionSettings:function(){return tt},getProducerReferenceTimeOffsets:function(){return nt},calculateProducerReferenceTimeOffsets:function(et){try{var tt=[];if(et&&et.length>0){var st=[at.Z.VIDEO,at.Z.AUDIO,at.Z.TEXT],lt=it.getAvailabilityStartTime()/1e3;et.forEach((function(et){var nt=st.reduce((function(tt,nt){return tt.concat(it.getAllMediaInfoForType(et,nt))}),[]).reduce((function(tt,nt){return it.getProducerReferenceTimes(et,nt).forEach((function(rt){var at=it.getVoRepresentations(nt);if(at&&at.length>0&&at[0].adaptation&&at[0].segmentInfoType===ot.Z.SEGMENT_TEMPLATE){var st=at[0],ft=new Date(rt[ot.Z.WALL_CLOCK_TIME]).getTime()/1e3-(rt[ot.Z.PRESENTATION_TIME]/st[ot.Z.TIMESCALE]-st[ot.Z.PRESENTATION_TIME_OFFSET]+et.start),dt=lt-ft;tt.push({id:rt[ot.Z.ID],to:dt})}})),tt}),[]);tt=tt.concat(nt)}))}nt=tt}catch(et){rt.error(et),nt=[]}},applyServiceDescription:function(et){if(et&&et.serviceDescriptions){var it=et.serviceDescriptions.filter((function(et){return Ui.includes(et.schemeIdUri)})),ot=et.serviceDescriptions.filter((function(et){return null==et.schemeIdUri})),st=it.length>0?it[it.length-1]:ot[ot.length-1];st&&(st.latency&&st.latency.target>0&&function(et){var it;if(et.schemeIdUri,at.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME,it=function(et){return{liveDelay:et.latency.target/1e3,maxDrift:!isNaN(et.latency.max)&&et.latency.max>et.latency.target?(et.latency.max-et.latency.target+500)/1e3:NaN,referenceId:et.latency.referenceId||NaN}}(et),nt.length>0){var ot=function(et){var tt,rt=0,it=nt.filter((function(tt){return tt.id===et.referenceId}));return 0===it.length?(rt=nt.length>0?nt[0].to:0,tt=nt[0].id||NaN):(rt=it[0].to||0,tt=it[0].id||NaN),{to:rt,id:tt}}(it),st=ot.to,lt=ot.id;tt.liveDelay=it.liveDelay-st,tt.liveCatchup.maxDrift=it.maxDrift,rt.debug("\n Found latency properties coming from service description. Applied time offset of ".concat(st," from ProducerReferenceTime element with id ").concat(lt,".\n Live Delay: ").concat(it.liveDelay-st,", Live catchup max drift: ").concat(it.maxDrift,"\n "))}else tt.liveDelay=it.liveDelay,tt.liveCatchup.maxDrift=it.maxDrift,rt.debug("Found latency properties coming from service description: Live Delay: ".concat(it.liveDelay,", Live catchup max drift: ").concat(it.maxDrift))}(st),st.playbackRate&&function(et){var nt=et.playbackRate.min?Math.round(1e3*(et.playbackRate.min-1))/1e3:NaN,it=et.playbackRate.max?Math.round(1e3*(et.playbackRate.max-1))/1e3:NaN;tt.liveCatchup.playbackRate.min=nt,tt.liveCatchup.playbackRate.max=it,rt.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(nt)),rt.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(it))}(st),st.operatingQuality,st.operatingBandwidth&&function(et){if(et&&et.operatingBandwidth&&et.operatingBandwidth.mediaType&&"all"!==et.operatingBandwidth.mediaType){var tt={};tt.minBandwidth=et.operatingBandwidth.min,tt.maxBandwidth=et.operatingBandwidth.max,tt.targetBandwidth=et.operatingBandwidth.target;var nt=[];"video"===et.operatingBandwidth.mediaType||"audio"===et.operatingBandwidth.mediaType?nt.push(et.operatingBandwidth.mediaType):"any"===et.operatingBandwidth.mediaType&&(nt.push("audio"),nt.push("video")),nt.forEach((function(et){isNaN(tt.minBandwidth)||l("minBitrate",et,tt.minBandwidth),isNaN(tt.maxBandwidth)||l("maxBitrate",et,tt.maxBandwidth),isNaN(tt.targetBandwidth)||l("initialBitrate",et,tt.targetBandwidth)}))}}(st),st.contentSteering&&function(et){tt.contentSteering=et.contentSteering}(st))}},reset:function(){u()},setConfig:function(et){et&&et.adapter&&(it=et.adapter)}},rt=(0,pt.Z)(st).getInstance().getLogger(et),u(),et}hn.__dashjs_factory_name="ServiceDescriptionController";const Zi=dt.Z.getSingletonFactory(hn);var Bi=nt(3973),Gi=nt.n(Bi),qi=nt(3039);function vn(){var et,tt,nt,rt,it,ot,st,dt,yt=this.context,vt=(0,lt.Z)(yt).getInstance();function h(et,tt){return et&&nt[tt]&&nt[tt][et]?nt[tt][et].list:[]}function p(et,tt){return et&&nt[tt]&&nt[tt][et]?nt[tt][et].current:null}function m(et){var tt=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(et&&et.streamInfo){var it=et.type,st=et.streamInfo,lt=st.id,pt=p(it,lt);if(nt[lt]&&nt[lt][it]&&(nt[lt][it].current=et,nt[lt][it].current&&(it!==at.Z.TEXT&&!v(et,pt)||it===at.Z.TEXT&&et.isFragmented)&&vt.trigger(ft.Z.CURRENT_TRACK_CHANGED,{oldMediaInfo:pt,newMediaInfo:et,switchMode:rt.get().streaming.trackSwitchMode[it]},{streamId:lt}),!tt)){var yt=T(et);if(!yt||!nt[lt][it].storeLastSettings)return;yt.roles&&(yt.role=yt.roles[0],delete yt.roles),yt.accessibility&&(yt.accessibility=yt.accessibility[0]),yt.audioChannelConfiguration&&(yt.audioChannelConfiguration=yt.audioChannelConfiguration[0]),ot[it]=yt,dt.setSavedMediaSettings(it,yt)}}}function y(et,tt){et&&tt&&(it[et]=tt)}function E(et){return et?it[et]:null}function v(et,tt){if(!et&&!tt)return!0;if(!et||!tt)return!1;var nt=et.id===tt.id,rt=et.viewpoint===tt.viewpoint,it=JSON.stringify(et.viewpointsWithSchemeIdUri)===JSON.stringify(tt.viewpointsWithSchemeIdUri),at=et.lang===tt.lang,ot=et.codec===tt.codec,st=et.roles.toString()===tt.roles.toString(),lt=JSON.stringify(et.rolesWithSchemeIdUri)===JSON.stringify(tt.rolesWithSchemeIdUri),ft=et.accessibility.toString()===tt.accessibility.toString(),dt=JSON.stringify(et.accessibilitiesWithSchemeIdUri)===JSON.stringify(tt.accessibilitiesWithSchemeIdUri),pt=et.audioChannelConfiguration.toString()===tt.audioChannelConfiguration.toString(),yt=JSON.stringify(et.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(tt.audioChannelConfigurationsWithSchemeIdUri);return nt&&ot&&rt&&it&&at&&st&&lt&&ft&&dt&&pt&&yt}function _(){nt={},ot={},it={audio:null,video:null,text:null}}function T(et){var tt={lang:et.lang,viewpoint:et.viewpoint,roles:et.roles,accessibility:et.accessibility,audioChannelConfiguration:et.audioChannelConfiguration};return tt.lang||tt.viewpoint||tt.role&&tt.role.length>0||tt.accessibility&&tt.accessibility.length>0||tt.audioChannelConfiguration&&tt.audioChannelConfiguration.length>0?tt:null}function S(et,tt,nt){var rt=[];return et.forEach((function(et){tt(nt,et)&&rt.push(et)})),0!==rt.length?rt:et}function b(et,tt){return!et.lang||et.lang instanceof RegExp?tt.lang.match(et.lang):""!==tt.lang&&(0,qi.extendedFilter)(tt.lang,Gi()(et.lang)).length>0}function A(et,tt){return void 0===et.index||null===et.index||tt.index===et.index}function I(et,tt){return!et.viewpoint||et.viewpoint===tt.viewpoint}function R(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2],rt=!et.role||!!tt.roles.filter((function(tt){return tt===et.role}))[0];return rt||tt.type===at.Z.AUDIO&&nt}function w(et,tt){return et.accessibility?!!tt.accessibility.filter((function(tt){return tt===et.accessibility}))[0]:!tt.accessibility.length}function N(et,tt){return!et.audioChannelConfiguration||!!tt.audioChannelConfiguration.filter((function(tt){return tt===et.audioChannelConfiguration}))[0]}function C(et){var tt,nt=0,rt=[];return et.forEach((function(et){(tt=Math.max.apply(Math,et.bitrateList.map((function(et){return et.bandwidth}))))>nt?(nt=tt,rt=[et]):tt===nt&&rt.push(et)})),rt}function D(et){var tt,nt=1/0,rt=[];return et.forEach((function(et){var it=et.bitrateList.reduce((function(et,tt){var nt=Math.max(1,tt.width*tt.height);return et+tt.bandwidth/nt}),0);(tt=it/et.bitrateList.length)<nt?(nt=tt,rt=[et]):tt===nt&&rt.push(et)})),rt}function O(et){var tt,nt=0,rt=[];return et.forEach((function(et){(tt=et.representationCount)>nt?(nt=tt,rt=[et]):tt===nt&&rt.push(et)})),rt}function M(et,nt){if(et===at.Z.TEXT)return nt[0];var it,ot=rt.get().streaming.selectionModeForInitialTrack,lt=st.getCustomInitialTrackSelectionFunction();if(lt&&"function"==typeof lt)it=lt(nt);else switch(ot){case at.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:it=function(et){var tt,nt,rt=(tt=0,nt=[],et.forEach((function(et){isNaN(et.selectionPriority)||(et.selectionPriority>tt?(tt=et.selectionPriority,nt=[et]):et.selectionPriority===tt&&nt.push(et))})),nt);return rt.length>1&&(rt=C(rt)),rt.length>1&&(rt=O(rt)),rt}(nt);break;case at.Z.TRACK_SELECTION_MODE_HIGHEST_BITRATE:it=function(et){var tt=C(et);return tt.length>1&&(tt=O(tt)),tt}(nt);break;case at.Z.TRACK_SELECTION_MODE_FIRST_TRACK:it=P(nt);break;case at.Z.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:it=function(et){var tt=D(et);return tt.length>1&&(tt=C(tt)),tt}(nt);break;case at.Z.TRACK_SELECTION_MODE_WIDEST_RANGE:it=function(et){var tt=O(et);return tt.length>1&&(tt=C(et)),tt}(nt);break;default:tt.warn("Track selection mode ".concat(ot," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),it=P(nt)}return it.length>0?it[0]:nt[0]}function P(et){return et[0]}return et={setInitialMediaSettingsForType:function(et,tt){var nt=ot[et]||E(et),rt=h(et,tt.id),it=[];nt||y(et,nt=dt.getSavedMediaSettings(et)),rt&&0!==rt.length&&(nt&&(it=S(it=Array.from(rt),b,nt),it=S(it,A,nt),it=S(it,I,nt),et===at.Z.AUDIO&&ot[et]||(it=S(it,R,nt)),it=S(it,w,nt),it=S(it,N,nt)),0===it.length?m(M(et,rt),!0):it.length>1?m(M(et,it,ot[et])):m(it[0]))},addTrack:function(et){if(et){var tt=et.type;if((rt=tt)===at.Z.AUDIO||rt===at.Z.VIDEO||rt===at.Z.TEXT||rt===at.Z.IMAGE){var rt,it=et.streamInfo.id;nt[it]||(nt[it]={audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}});for(var ot=nt[it][tt].list,st=0,lt=ot.length;st<lt;++st)if(v(ot[st],et))return;ot.push(et)}}},getTracksFor:h,getCurrentTrackFor:p,isCurrentTrack:function(et){if(!et)return!1;var tt=et.type,rt=et.streamInfo.id;return nt[rt]&&nt[rt][tt]&&v(nt[rt][tt].current,et)},setTrack:m,selectInitialTrack:M,setInitialSettings:y,getInitialSettings:E,getTracksWithHighestBitrate:C,getTracksWithHighestEfficiency:D,getTracksWithWidestRange:O,isTracksEqual:v,matchSettings:function(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var rt=!1;if(et.lang){if(et.lang instanceof RegExp)rt=tt.lang.match(et.lang);else if(""!==tt.lang){var it=Gi()(et.lang);it&&(rt=(0,qi.extendedFilter)(tt.lang,it).length>0)}}else rt=!0;var ot=void 0===et.index||null===et.index||tt.index===et.index,st=!et.viewpoint||et.viewpoint===tt.viewpoint,lt=!et.role||!!tt.roles.filter((function(tt){return tt===et.role}))[0],ft=!et.accessibility||!!tt.accessibility.filter((function(tt){return tt===et.accessibility}))[0],dt=!et.audioChannelConfiguration||!!tt.audioChannelConfiguration.filter((function(tt){return tt===et.audioChannelConfiguration}))[0];return rt&&ot&&st&&(lt||tt.type===at.Z.AUDIO&&nt)&&ft&&dt}catch(et){return!1}},matchSettingsLang:b,matchSettingsIndex:A,matchSettingsViewPoint:I,matchSettingsRole:R,matchSettingsAccessibility:w,matchSettingsAudioChannelConfig:N,saveTextSettingsDisabled:function(){dt.setSavedMediaSettings(at.Z.TEXT,null)},setConfig:function(et){et&&(et.domStorage&&(dt=et.domStorage),et.settings&&(rt=et.settings),et.customParametersModel&&(st=et.customParametersModel))},reset:_},tt=(0,pt.Z)(yt).getInstance().getLogger(et),_(),et}vn.__dashjs_factory_name="MediaController";var ji=dt.Z.getSingletonFactory(vn);dt.Z.updateSingletonFactory(vn.__dashjs_factory_name,ji);const Vi=ji;var zi=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={baseUrls:et||null,selectedIdx:tt||NaN},this.children=[]};function An(){var et,tt,nt,rt,it=this.context,at=lr(it).getInstance();function o(et,tt,nt){var rt=s(nt);et[tt]?at.areEqual(rt,et[tt].data.baseUrls)||(et[tt].data.baseUrls=rt,et[tt].data.selectedIdx=NaN):et[tt]=new zi(rt)}function s(et){var tt=nt.getBaseURLsFromElement(et),it=rt.getSynthesizedBaseUrlElements(tt);return it&&it.length>0&&(tt=tt.concat(it)),tt}function l(){tt=new zi}return et={reset:l,update:function(et){!function(et){!function(){if(!nt||!nt.hasOwnProperty("getBaseURLsFromElement")||!nt.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var rt=s(et);at.areEqual(rt,tt.data.baseUrls)||(tt.data.baseUrls=rt,tt.data.selectedIdx=NaN),et&&et.Period_asArray&&et.Period_asArray.forEach((function(et,rt){o(tt.children,rt,et),et.AdaptationSet_asArray&&et.AdaptationSet_asArray.forEach((function(et,it){o(tt.children[rt].children,it,et),et.Representation_asArray&&et.Representation_asArray.sort(nt.getRepresentationSortFunction()).forEach((function(et,nt){o(tt.children[rt].children[it].children,nt,et)}))}))}))}(et)},getForPath:function(et){var nt=tt,rt=[nt.data];return et&&et.forEach((function(et){(nt=nt.children[et])&&rt.push(nt.data)})),rt.filter((function(et){return et.baseUrls.length}))},invalidateSelectedIndexes:function(et){!function u(et,nt){var rt=nt||tt;et(rt.data),rt.children&&rt.children.forEach((function(tt){return u(et,tt)}))}((function(tt){isNaN(tt.selectedIdx)||et===tt.baseUrls[tt.selectedIdx].serviceLocation&&(tt.selectedIdx=NaN)}))},setConfig:function(et){et.adapter&&(nt=et.adapter),et.contentSteeringController&&(rt=et.contentSteeringController)},getBaseUrls:function(et){return s(et)}},l(),et}An.__dashjs_factory_name="BaseURLTreeModel";const Xi=dt.Z.getClassFactory(An);function Rn(et){var tt=(et=et||{}).blacklistController;return{select:function(et){return et&&function(et){var tt,nt,rt=0,it=[],at=0;if((nt=et.sort((function(et,tt){var nt=et.dvb_priority-tt.dvb_priority;return isNaN(nt)?0:nt})).filter((function(et,tt,nt){return!tt||nt[0].dvb_priority&&et.dvb_priority&&nt[0].dvb_priority===et.dvb_priority}))).length)return nt.length>1&&(nt.forEach((function(et){rt+=et.dvb_weight,it.push(rt)})),tt=Math.floor(Math.random()*(rt-1)),it.every((function(et,nt){return at=nt,!(tt<et)}))),nt[at]}((nt=[],et.filter((function(et){return!tt.contains(et.serviceLocation)||(et.dvb_priority&&nt.push(et.dvb_priority),!1)})).filter((function(et){return!nt.length||!et.dvb_priority||-1===nt.indexOf(et.dvb_priority)}))));var nt}}}Rn.__dashjs_factory_name="DVBSelector";const Ji=dt.Z.getClassFactory(Rn);function Nn(et){var tt=(et=et||{}).blacklistController;return{select:function(et){var nt,rt=0;return et&&et.some((function(et,nt){return rt=nt,!tt.contains(et.serviceLocation)}))&&(nt=et[rt]),nt}}}Nn.__dashjs_factory_name="BasicSelector";const $i=dt.Z.getClassFactory(Nn);function Dn(){var et,tt,nt,rt=this.context;function i(){for(var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],rt=0,it=NaN,a=function(){var at=et[rt],ot=tt.findIndex((function(et){return et.serviceLocation&&et.serviceLocation===at}));if(-1!==ot&&!nt.contains(tt[ot].serviceLocation))return it=ot,"break";rt+=1};rt<et.length;){var at=a();if("break"===at)break}return it}return et={selectBaseUrlIndex:function(et){var nt=NaN;if(isNaN(et.selectedIdx)){var rt=tt.getSteeringDataFromManifest();rt&&rt.defaultServiceLocationArray.length>0&&(nt=i(rt.defaultServiceLocationArray,et.baseUrls))}var it=tt.getCurrentSteeringResponseData();return et.baseUrls&&et.baseUrls.length&&it&&it.pathwayPriority&&it.pathwayPriority.length&&(nt=i(it.pathwayPriority,et.baseUrls)),nt},setConfig:function(et){et.blacklistController&&(nt=et.blacklistController),et.contentSteeringController&&(tt=et.contentSteeringController)}},tt=Si(rt).getInstance(),et}Dn.__dashjs_factory_name="ContentSteeringSelector";const ea=dt.Z.getClassFactory(Dn);function Mn(){var et,tt,nt,rt,it,at,ot=this.context,st=(0,lt.Z)(ot).getInstance(),dt=(0,kt.Z)(ot).getInstance();function f(){tt.reset()}return et={chooseSelector:function(et){(0,on.PS)(et,"boolean"),at=et?rt:nt},select:function(et){if(et){if(dt.get().streaming.applyContentSteering){var tt=it.selectBaseUrlIndex(et);isNaN(tt)||-1===tt||(et.selectedIdx=tt)}if(!isNaN(et.selectedIdx))return et.baseUrls[et.selectedIdx];var rt=at.select(et.baseUrls);return rt?(et.selectedIdx=et.baseUrls.indexOf(rt),rt):(st.trigger(ft.Z.URL_RESOLUTION_FAILED,{error:new Lt.Z(xt.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,xt.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(at===nt&&f()))}},reset:f,setConfig:function(et){et.selector&&(at=et.selector),et.contentSteeringSelector&&(it=et.contentSteeringSelector)}},tt=mi(ot).create({updateEventName:ft.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:ft.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),nt=$i(ot).create({blacklistController:tt}),rt=Ji(ot).create({blacklistController:tt}),(it=ea(ot).create()).setConfig({blacklistController:tt}),at=nt,et}Mn.__dashjs_factory_name="BaseURLSelector";const ta=dt.Z.getClassFactory(Mn);function Ln(){var et,tt,nt,rt,it,at=this.context,ot=(0,lt.Z)(at).getInstance(),st=(0,fn.Z)(at).getInstance();function c(et){nt.update(et),rt.chooseSelector(tt.getIsDVB(et)),ot.trigger(yt.Z.BASE_URLS_UPDATED,{baseUrls:f(et)})}function f(et){return nt.getBaseUrls(et)}return et={reset:function(){nt.reset(),rt.reset()},initialize:function(et){nt.setConfig({adapter:tt,contentSteeringController:it}),c(et)},resolve:function(et){var tt=nt.getForPath(et).reduce((function(et,tt){var nt=rt.select(tt);return nt?(st.isRelative(nt.url)?et.url=st.resolve(nt.url,et.url):(et.url=nt.url,et.serviceLocation=nt.serviceLocation),et.availabilityTimeOffset=nt.availabilityTimeOffset,et.availabilityTimeComplete=nt.availabilityTimeComplete,et.queryParams=nt.queryParams,et):new qn}),new qn);if(!st.isRelative(tt.url))return tt},setConfig:function(et){et.baseURLTreeModel&&(nt=et.baseURLTreeModel),et.baseURLSelector&&(rt=et.baseURLSelector),et.adapter&&(tt=et.adapter),et.contentSteeringController&&(it=et.contentSteeringController)},getBaseUrls:f,update:c},nt=Xi(at).create(),rt=ta(at).create(),ot.on(ft.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(et){nt.invalidateSelectedIndexes(et.entry)}),et),et}Ln.__dashjs_factory_name="BaseURLController";const na=dt.Z.getClassFactory(Ln);function Fn(et){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function kn(et,tt){return(kn=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Un(et,tt){return!tt||"object"!==Fn(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function Zn(et){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const ra=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&kn(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=Zn(tt);if(nt){var it=Zn(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Un(this,et)});function i(et,tt){var nt;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(nt=rt.call(this)).url=et||null,nt.type=tt||null,nt.mediaType=at.Z.STREAM,nt.responseType="",nt}return i}(At.Z);function Gn(et){et=et||{};var tt=this.context,nt=(0,lt.Z)(tt).getInstance(),rt=ti(tt).create({errHandler:et.errHandler,dashMetrics:et.dashMetrics,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,errors:xt});return{load:function(et,tt,it){var a=function(rt,at){tt.resolved=!0,tt.resolvedContent=rt||null,nt.trigger(ft.Z.XLINK_ELEMENT_LOADED,{element:tt,resolveObject:it,error:rt||at?null:new Lt.Z(xt.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,xt.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+et)})};if("urn:mpeg:dash:resolve-to-zero:2013"===et)a(null,!0);else{var at=new ra(et,Ut.w.XLINK_EXPANSION_TYPE);rt.load({request:at,success:function(et){a(et)},error:function(){a(null)}})}},reset:function(){rt&&(rt.abort(),rt=null)}}}Gn.__dashjs_factory_name="XlinkLoader";const ia=dt.Z.getClassFactory(Gn),Yn=function(et){function t(et){var tt=et.localName;return null==tt&&(tt=et.baseName),null!=tt&&""!=tt||(tt=et.nodeName),tt}function n(et){return"string"==typeof et?et.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):et}function r(et,tt,nt,rt){for(var it=0;it<et.length;it++){var at=et[it];if("string"==typeof at){if(at==rt)break}else if(at instanceof RegExp){if(at.test(rt))break}else if("function"==typeof at&&at(tt,nt,rt))break}return it!=et.length}function i(tt,nt,rt){"property"===et.arrayAccessForm&&(tt[nt]instanceof Array?tt[nt+"_asArray"]=tt[nt]:tt[nt+"_asArray"]=[tt[nt]]),!(tt[nt]instanceof Array)&&et.arrayAccessFormPaths.length>0&&r(et.arrayAccessFormPaths,tt,nt,rt)&&(tt[nt]=[tt[nt]])}function a(et){var tt=et.split(/[-T:+Z]/g),nt=new Date(tt[0],tt[1]-1,tt[2]),rt=tt[5].split(".");if(nt.setHours(tt[3],tt[4],rt[0]),rt.length>1&&nt.setMilliseconds(rt[1]),tt[6]&&tt[7]){var it=60*tt[6]+Number(tt[7]);it=0+("-"==(/\d\d-\d\d:\d\d$/.test(et)?"-":"+")?-1*it:it),nt.setMinutes(nt.getMinutes()-it-nt.getTimezoneOffset())}else-1!==et.indexOf("Z",et.length-1)&&(nt=new Date(Date.UTC(nt.getFullYear(),nt.getMonth(),nt.getDate(),nt.getHours(),nt.getMinutes(),nt.getSeconds(),nt.getMilliseconds())));return nt}function o(tt,nt,rt,it){return!(1==nt&&et.xmlElementsFilter.length>0)||r(et.xmlElementsFilter,tt,rt,it)}function s(tt,nt){if(9==tt.nodeType){for(var rt=new Object,it=tt.childNodes,at=0;at<it.length;at++)1==(st=it[at]).nodeType&&(et.ignoreRoot?rt=s(st):(rt={})[lt=t(st)]=s(st));return rt}if(1==tt.nodeType){(rt=new Object).__cnt=0;var ot=[];for(it=tt.childNodes,at=0;at<it.length;at++){var st,lt=t(st=it[at]);if(8!=st.nodeType){var ft=nt+"."+lt;if(o(rt,st.nodeType,lt,ft))if(rt.__cnt++,null==rt[lt]){var dt=s(st,ft);("#text"!=lt||/[^\s]/.test(dt))&&((pt={})[lt]=dt,ot.push(pt)),rt[lt]=dt,i(rt,lt,ft)}else{var pt;null!=rt[lt]&&(rt[lt]instanceof Array||(rt[lt]=[rt[lt]],i(rt,lt,ft))),dt=s(st,ft),("#text"!=lt||/[^\s]/.test(dt))&&((pt={})[lt]=dt,ot.push(pt)),rt[lt][rt[lt].length]=dt}}}rt.__children=ot;for(var yt=t(tt),vt=0;vt<tt.attributes.length;vt++){var At=tt.attributes[vt];rt.__cnt++;for(var Rt=At.value,Nt=0,Dt=et.matchers.length;Nt<Dt;Nt++){var Ot=et.matchers[Nt];Ot.test(At,yt)&&(Rt=Ot.converter(At.value))}rt[et.attributePrefix+At.name]=Rt}var Mt=function(et){return et.prefix}(tt);return null!=Mt&&""!=Mt&&(rt.__cnt++,rt.__prefix=Mt),null!=rt["#text"]&&(rt.__text=rt["#text"],rt.__text instanceof Array&&(rt.__text=rt.__text.join("\n")),et.stripWhitespaces&&(rt.__text=rt.__text.trim()),delete rt["#text"],"property"==et.arrayAccessForm&&delete rt["#text_asArray"],rt.__text=function(tt,nt,rt){if(et.datetimeAccessFormPaths.length>0){var it=rt.split(".#")[0];return r(et.datetimeAccessFormPaths,tt,nt,it)?a(tt):tt}return tt}(rt.__text,lt,nt+"."+lt)),null!=rt["#cdata-section"]&&(rt.__cdata=rt["#cdata-section"],delete rt["#cdata-section"],"property"==et.arrayAccessForm&&delete rt["#cdata-section_asArray"]),0==rt.__cnt&&"text"==et.emptyNodeForm?rt="":1==rt.__cnt&&null!=rt.__text?rt=rt.__text:1!=rt.__cnt||null==rt.__cdata||et.keepCData?rt.__cnt>1&&null!=rt.__text&&et.skipEmptyTextNodesForObj&&(et.stripWhitespaces&&""==rt.__text||""==rt.__text.trim())&&delete rt.__text:rt=rt.__cdata,delete rt.__cnt,!et.enableToStringFunc||null==rt.__text&&null==rt.__cdata||(rt.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),rt}if(3==tt.nodeType||4==tt.nodeType)return tt.nodeValue}function u(tt,nt,rt,it){var at="<"+(null!=tt&&null!=tt.__prefix?tt.__prefix+":":"")+nt;if(null!=rt)for(var ot=0;ot<rt.length;ot++){var st=rt[ot],lt=tt[st];et.escapeMode&&(lt=n(lt)),at+=" "+st.substr(et.attributePrefix.length)+"=",et.useDoubleQuotes?at+='"'+lt+'"':at+="'"+lt+"'"}return at+(it?"/>":">")}function l(et,tt){return"</"+(null!=et.__prefix?et.__prefix+":":"")+tt+">"}function c(tt,nt){return"property"==et.arrayAccessForm&&(it="_asArray",-1!==(rt=nt.toString()).indexOf(it,rt.length-it.length))||0==nt.toString().indexOf(et.attributePrefix)||0==nt.toString().indexOf("__")||tt[nt]instanceof Function;var rt,it}function f(et){var tt=0;if(et instanceof Object)for(var nt in et)c(et,nt)||tt++;return tt}function d(tt,nt,rt){return 0==et.jsonPropertiesFilter.length||""==rt||r(et.jsonPropertiesFilter,tt,nt,rt)}function g(tt){var nt=[];if(tt instanceof Object)for(var rt in tt)-1==rt.toString().indexOf("__")&&0==rt.toString().indexOf(et.attributePrefix)&&nt.push(rt);return nt}function h(tt){var nt="";return tt instanceof Object?nt+=function(tt){var nt="";return null!=tt.__cdata&&(nt+="<![CDATA["+tt.__cdata+"]]>"),null!=tt.__text&&(et.escapeMode?nt+=n(tt.__text):nt+=tt.__text),nt}(tt):null!=tt&&(et.escapeMode?nt+=n(tt):nt+=tt),nt}function p(et,tt){return""===et?tt:et+"."+tt}function m(et,tt,nt,rt){var it="";if(0==et.length)it+=u(et,tt,nt,!0);else for(var at=0;at<et.length;at++)it+=u(et[at],tt,g(et[at]),!1),it+=y(et[at],p(rt,tt)),it+=l(et[at],tt);return it}function y(et,tt){var nt="";if(f(et)>0)for(var rt in et)if(!c(et,rt)&&(""==tt||d(et,rt,p(tt,rt)))){var it=et[rt],at=g(it);null==it||null==it?nt+=u(it,rt,at,!0):it instanceof Object?it instanceof Array?nt+=m(it,rt,at,tt):it instanceof Date?(nt+=u(it,rt,at,!1),nt+=it.toISOString(),nt+=l(it,rt)):f(it)>0||null!=it.__text||null!=it.__cdata?(nt+=u(it,rt,at,!1),nt+=y(it,p(tt,rt)),nt+=l(it,rt)):nt+=u(it,rt,at,!0):(nt+=u(it,rt,at,!1),nt+=h(it),nt+=l(it,rt))}return nt+h(et)}void 0===(et=et||{}).escapeMode&&(et.escapeMode=!0),void 0===et.attributePrefix&&(et.attributePrefix="_"),et.arrayAccessForm=et.arrayAccessForm||"none",et.emptyNodeForm=et.emptyNodeForm||"text",void 0===et.enableToStringFunc&&(et.enableToStringFunc=!0),et.arrayAccessFormPaths=et.arrayAccessFormPaths||[],void 0===et.skipEmptyTextNodesForObj&&(et.skipEmptyTextNodesForObj=!0),void 0===et.stripWhitespaces&&(et.stripWhitespaces=!0),et.datetimeAccessFormPaths=et.datetimeAccessFormPaths||[],void 0===et.useDoubleQuotes&&(et.useDoubleQuotes=!1),et.xmlElementsFilter=et.xmlElementsFilter||[],et.jsonPropertiesFilter=et.jsonPropertiesFilter||[],void 0===et.keepCData&&(et.keepCData=!1),void 0===et.ignoreRoot&&(et.ignoreRoot=!1),this.parseXmlString=function(et){var tt;if(window.ActiveXObject||window,void 0===et)return null;if(window.DOMParser){var nt=new window.DOMParser;try{(tt=nt.parseFromString(et,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(tt=null)}catch(et){tt=null}}else 0==et.indexOf("<?")&&(et=et.substr(et.indexOf("?>")+2)),(tt=new ActiveXObject("Microsoft.XMLDOM")).async="false",tt.loadXML(et);return tt},this.asArray=function(et){return void 0===et||null==et?[]:et instanceof Array?et:[et]},this.toXmlDateTime=function(et){return et instanceof Date?et.toISOString():"number"==typeof et?new Date(et).toISOString():null},this.asDateTime=function(et){return"string"==typeof et?a(et):et},this.xml2json=function(et){return s(et)},this.xml_str2json=function(et){var tt=this.parseXmlString(et);return null!=tt?this.xml2json(tt):null},this.json2xml_str=function(et){return y(et,"")},this.json2xml=function(et){var tt=this.json2xml_str(et);return this.parseXmlString(tt)},this.getVersion=function(){return"1.2.0"}};var oa="onLoad";function Hn(et){et=et||{};var tt,nt,rt,it,at,st,dt=this.context,pt=(0,lt.Z)(dt).getInstance(),yt=(0,fn.Z)(dt).getInstance();function g(et,tt,nt){var rt,it,at={};at.elements=et,at.type=tt,at.resolveType=nt,0===at.elements.length&&p(at);for(var ot=0;ot<at.elements.length;ot++)rt=at.elements[ot],it=yt.isHTTPURL(rt.url)?rt.url:rt.originalContent.BaseURL+rt.url,st.load(it,rt,at)}function h(et){var tt,nt,rt="";if(tt=et.element,nt=et.resolveObject,tt.resolvedContent){var it=0;0===tt.resolvedContent.indexOf("<?xml")&&(it=tt.resolvedContent.indexOf("?>")+2),rt=tt.resolvedContent.substr(0,it)+"<response>"+tt.resolvedContent.substr(it)+"</response>",tt.resolvedContent=at.xml_str2json(rt)}(function(et){var tt;for(tt=0;tt<et.elements.length;tt++)if(!1===et.elements[tt].resolved)return!1;return!0})(nt)&&p(nt)}function p(et){var tt,nt,at=[];if(function(et){var tt,nt,at,ot,st,lt,ft=[];for(ot=et.elements.length-1;ot>=0;ot--){if(nt=(tt=et.elements[ot]).type+"_asArray",tt.resolvedContent){if(tt.resolvedContent)for(st=0;st<tt.resolvedContent[nt].length;st++)at=tt.resolvedContent[nt][st],ft.push(at)}else delete tt.originalContent["xlink:actuate"],delete tt.originalContent["xlink:href"],ft.push(tt.originalContent);for(tt.parentElement[nt].splice(tt.index,1),lt=0;lt<ft.length;lt++)tt.parentElement[nt].splice(tt.index+lt,0,ft[lt]);ft=[]}et.elements.length>0&&rt.run(it)}(et),"onActuate"===et.resolveType&&pt.trigger(ft.Z.XLINK_READY,{manifest:it}),et.resolveType===oa)switch(et.type){case ot.Z.PERIOD:for(tt=0;tt<it[ot.Z.PERIOD+"_asArray"].length;tt++)(nt=it[ot.Z.PERIOD+"_asArray"][tt]).hasOwnProperty(ot.Z.ADAPTATION_SET+"_asArray")&&(at=at.concat(m(nt[ot.Z.ADAPTATION_SET+"_asArray"],nt,ot.Z.ADAPTATION_SET,oa))),nt.hasOwnProperty(ot.Z.EVENT_STREAM+"_asArray")&&(at=at.concat(m(nt[ot.Z.EVENT_STREAM+"_asArray"],nt,ot.Z.EVENT_STREAM,oa)));g(at,ot.Z.ADAPTATION_SET,oa);break;case ot.Z.ADAPTATION_SET:pt.trigger(ft.Z.XLINK_READY,{manifest:it})}}function m(et,tt,nt,rt){var it,at,ot,st=[];for(at=et.length-1;at>=0;at--)(it=et[at]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===it["xlink:href"]&&et.splice(at,1);for(at=0;at<et.length;at++)(it=et[at]).hasOwnProperty("xlink:href")&&it.hasOwnProperty("xlink:actuate")&&it["xlink:actuate"]===rt&&(ot=y(it["xlink:href"],tt,nt,at,rt,it),st.push(ot));return st}function y(et,tt,nt,rt,it,at){return{url:et,parentElement:tt,type:nt,index:rt,resolveType:it,originalContent:at,resolvedContent:null,resolved:!1}}return tt={resolveManifestOnLoad:function(et){at=new Yn({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:nt}),(it=et).Period_asArray?g(m(it.Period_asArray,it,ot.Z.PERIOD,oa),ot.Z.PERIOD,oa):pt.trigger(ft.Z.XLINK_READY,{manifest:it})},setMatchers:function(et){et&&(nt=et)},setIron:function(et){et&&(rt=et)},reset:function(){pt.off(ft.Z.XLINK_ELEMENT_LOADED,h,tt),st&&(st.reset(),st=null)}},pt.on(ft.Z.XLINK_ELEMENT_LOADED,h,tt),st=ia(dt).create({errHandler:et.errHandler,dashMetrics:et.dashMetrics,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,settings:et.settings}),tt}Hn.__dashjs_factory_name="XlinkController";const sa=dt.Z.getClassFactory(Hn);function Kn(et){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function zn(et){function t(et,tt){for(var nt in et)tt.hasOwnProperty(nt)||(tt[nt]=et[nt])}function n(et,tt,nt){for(var rt=0,it=et.length;rt<it;++rt){var at=et[rt];if(tt[at.name])if(nt[at.name]){if(at.merge){var ot=tt[at.name],st=nt[at.name];"object"===Kn(ot)&&"object"===Kn(st)?t(ot,st):nt[at.name]=ot+st}}else nt[at.name]=tt[at.name]}}function r(et,tt){for(var nt=0,rt=et.children.length;nt<rt;++nt){var it=et.children[nt],at=tt[it.name+"_asArray"];if(at)for(var ot=0,st=at.length;ot<st;++ot){var lt=at[ot];n(et.properties,tt,lt),r(it,lt)}}}return{run:function(tt){if(null===tt||"object"!==Kn(tt))return tt;if(tt.Period_asArray&&"period"in et)for(var nt=et.period,rt=tt.Period_asArray,it=0,at=rt.length;it<at;++it){var ot=rt[it];if(r(nt,ot),"adaptationset"in et){var st=ot.AdaptationSet_asArray;if(st)for(var lt=et.adaptationset,ft=0,dt=st.length;ft<dt;++ft)r(lt,st[ft])}}return tt}}}zn.__dashjs_factory_name="ObjectIron";const ua=dt.Z.getClassFactory(zn),la=function(){function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this._test=et,this._converter=tt}var et;return(et=[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])&&function Xn(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}();function Jn(et){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function $n(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function er(et,tt){return(er=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function tr(et,tt){return!tt||"object"!==Jn(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function nr(et){return(nr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const ca=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&er(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=nr(tt);if(nt){var it=nr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return tr(this,et)});function i(){return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),rt.call(this,(function(et,tt){var nt,rt=($n(nt={},ot.Z.MPD,[ot.Z.ID,ot.Z.PROFILES]),$n(nt,ot.Z.PERIOD,[ot.Z.ID]),$n(nt,ot.Z.BASE_URL,[ot.Z.SERVICE_LOCATION,ot.Z.BYTE_RANGE]),$n(nt,ot.Z.SEGMENT_BASE,[ot.Z.INDEX_RANGE]),$n(nt,ot.Z.INITIALIZATION,[ot.Z.RANGE]),$n(nt,ot.Z.REPRESENTATION_INDEX,[ot.Z.RANGE]),$n(nt,ot.Z.SEGMENT_LIST,[ot.Z.INDEX_RANGE]),$n(nt,ot.Z.BITSTREAM_SWITCHING,[ot.Z.RANGE]),$n(nt,ot.Z.SEGMENT_URL,[ot.Z.MEDIA_RANGE,ot.Z.INDEX_RANGE]),$n(nt,ot.Z.SEGMENT_TEMPLATE,[ot.Z.INDEX_RANGE,ot.Z.MEDIA,ot.Z.INDEX,ot.Z.INITIALIZATION_MINUS,ot.Z.BITSTREAM_SWITCHING_MINUS]),$n(nt,ot.Z.ASSET_IDENTIFIER,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.EVENT_STREAM,[ot.Z.VALUE]),$n(nt,ot.Z.ADAPTATION_SET,[ot.Z.PROFILES,ot.Z.MIME_TYPE,ot.Z.SEGMENT_PROFILES,ot.Z.CODECS,ot.Z.CONTENT_TYPE]),$n(nt,ot.Z.FRAME_PACKING,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.AUDIO_CHANNEL_CONFIGURATION,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.CONTENT_PROTECTION,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.ESSENTIAL_PROPERTY,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.SUPPLEMENTAL_PROPERTY,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.INBAND_EVENT_STREAM,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.ACCESSIBILITY,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.ROLE,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.RATING,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.VIEWPOINT,[ot.Z.VALUE,ot.Z.ID]),$n(nt,ot.Z.CONTENT_COMPONENT,[ot.Z.CONTENT_TYPE]),$n(nt,ot.Z.REPRESENTATION,[ot.Z.ID,ot.Z.DEPENDENCY_ID,ot.Z.MEDIA_STREAM_STRUCTURE_ID]),$n(nt,ot.Z.SUBSET,[ot.Z.ID]),$n(nt,ot.Z.METRICS,[ot.Z.METRICS_MINUS]),$n(nt,ot.Z.REPORTING,[ot.Z.VALUE,ot.Z.ID]),nt);if(rt.hasOwnProperty(tt)){var it=rt[tt];return void 0!==it&&it.indexOf(et.name)>=0}return!1}),(function(et){return String(et)}))}return i}(la);function ir(et){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function ar(et,tt){return(ar=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function or(et,tt){return!tt||"object"!==ir(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function sr(et){return(sr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}var da=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/;const ha=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&ar(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=sr(tt);if(nt){var it=sr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return or(this,et)});function i(){return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),rt.call(this,(function(et){for(var tt=[ot.Z.MIN_BUFFER_TIME,ot.Z.MEDIA_PRESENTATION_DURATION,ot.Z.MINIMUM_UPDATE_PERIOD,ot.Z.TIMESHIFT_BUFFER_DEPTH,ot.Z.MAX_SEGMENT_DURATION,ot.Z.MAX_SUBSEGMENT_DURATION,ot.Z.SUGGESTED_PRESENTATION_DELAY,ot.Z.START,at.Z.START_TIME,ot.Z.DURATION],nt=tt.length,rt=0;rt<nt;rt++)if(et.nodeName===tt[rt])return da.test(et.value);return!1}),(function(et){var tt=da.exec(et),nt=31536e3*parseFloat(tt[3]||0)+2592e3*parseFloat(tt[5]||0)+86400*parseFloat(tt[7]||0)+3600*parseFloat(tt[9]||0)+60*parseFloat(tt[11]||0)+parseFloat(tt[13]||0);return void 0!==tt[1]&&(nt=-nt),nt}))}return i}(la);function cr(et){return(cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function fr(et,tt){return(fr=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function dr(et,tt){return!tt||"object"!==cr(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function gr(et){return(gr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}var ma=/^([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}))?/;const ya=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&fr(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=gr(tt);if(nt){var it=gr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return dr(this,et)});function i(){return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),rt.call(this,(function(et){return ma.test(et.value)}),(function(et){var tt,nt=ma.exec(et);if(tt=Date.UTC(parseInt(nt[1],10),parseInt(nt[2],10)-1,parseInt(nt[3],10),parseInt(nt[4],10),parseInt(nt[5],10),nt[6]&&parseInt(nt[6],10)||0,nt[7]&&1e3*parseFloat(nt[7])||0),nt[9]&&nt[10]){var rt=60*parseInt(nt[9],10)+parseInt(nt[10],10);tt+=("+"===nt[8]?-1:1)*rt*60*1e3}return new Date(tt)}))}return i}(la);function mr(et){return(mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function yr(et,tt){return(yr=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Er(et,tt){return!tt||"object"!==mr(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function vr(et){return(vr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}var Ea=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/;const ba=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&yr(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=vr(tt);if(nt){var it=vr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Er(this,et)});function i(){return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),rt.call(this,(function(et){return Ea.test(et.value)}),(function(et){return parseFloat(et)}))}return i}(la);function Sr(et){return(Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function br(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}function Ar(et,tt){return(Ar=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Ir(et,tt){return!tt||"object"!==Sr(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function Rr(et){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const Aa=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&Ar(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=Rr(tt);if(nt){var it=Rr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Ir(this,et)});function i(){return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),rt.call(this,(function(et,tt){var nt,rt=(br(nt={},ot.Z.ADAPTATION_SET,[ot.Z.LANG]),br(nt,ot.Z.REPRESENTATION,[ot.Z.LANG]),br(nt,ot.Z.CONTENT_COMPONENT,[ot.Z.LANG]),br(nt,ot.Z.LABEL,[ot.Z.LANG]),br(nt,ot.Z.GROUP_LABEL,[ot.Z.LANG]),nt);if(rt.hasOwnProperty(tt)){var it=rt[tt];return void 0!==it&&it.indexOf(et.name)>=0}return!1}),(function(et){var tt=Gi()(et);return void 0!==tt?tt:String(et)}))}return i}(la),Ra=function(){function e(et){var tt;!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=et,this._merge=(tt=et)&&tt.length&&tt.charAt(0)===tt.charAt(0).toUpperCase()}var et;return(et=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&function Nr(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}(),Na=function(){function e(et,tt,nt){var rt=this;!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=et||"",this._properties=[],this._children=nt||[],Array.isArray(tt)&&tt.forEach((function(et){rt._properties.push(new Ra(et))}))}var et;return(et=[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}])&&function Dr(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}();function Mr(et){return(Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function Pr(et,tt){return(Pr=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Lr(et,tt){return!tt||"object"!==Mr(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function xr(et){return(xr=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const Ca=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&Pr(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=xr(tt);if(nt){var it=xr(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Lr(this,et)});function i(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i);var et=[ot.Z.PROFILES,ot.Z.WIDTH,ot.Z.HEIGHT,ot.Z.SAR,ot.Z.FRAMERATE,ot.Z.AUDIO_SAMPLING_RATE,ot.Z.MIME_TYPE,ot.Z.SEGMENT_PROFILES,ot.Z.CODECS,ot.Z.MAXIMUM_SAP_PERIOD,ot.Z.START_WITH_SAP,ot.Z.MAX_PLAYOUT_RATE,ot.Z.CODING_DEPENDENCY,ot.Z.SCAN_TYPE,ot.Z.FRAME_PACKING,ot.Z.AUDIO_CHANNEL_CONFIGURATION,ot.Z.CONTENT_PROTECTION,ot.Z.ESSENTIAL_PROPERTY,ot.Z.ESSENTIAL_PROPERTY+"_asArray",ot.Z.SUPPLEMENTAL_PROPERTY,ot.Z.INBAND_EVENT_STREAM];return rt.call(this,ot.Z.ADAPTATION_SET,et,[new Na(ot.Z.REPRESENTATION,et,[new Na(ot.Z.SUB_REPRESENTATION,et)])])}return i}(Na);function kr(et){return(kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function Ur(et,tt){return(Ur=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Zr(et,tt){return!tt||"object"!==kr(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function Br(et){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const Oa=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&Ur(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=Br(tt);if(nt){var it=Br(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Zr(this,et)});function i(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i);var et=[ot.Z.SEGMENT_BASE,ot.Z.SEGMENT_TEMPLATE,ot.Z.SEGMENT_LIST];return rt.call(this,ot.Z.PERIOD,et,[new Na(ot.Z.ADAPTATION_SET,et,[new Na(ot.Z.REPRESENTATION,et)])])}return i}(Na);function qr(et){et=et||{};var tt,nt,rt,it,at,ot=this.context,st=et.debug;return tt={parse:function(et){var tt,rt=window.performance.now();if(!(tt=it.xml_str2json(et)))throw new Error("parsing the manifest failed");var ot=window.performance.now();tt.Patch?((tt=tt.Patch).add_asArray&&tt.add_asArray.forEach((function(et){return at.run(et)})),tt.replace_asArray&&tt.replace_asArray.forEach((function(et){return at.run(et)}))):(tt=tt.MPD,at.run(tt));var st=window.performance.now();return nt.info("Parsing complete: ( xml2json: "+(ot-rt).toPrecision(3)+"ms, objectiron: "+(st-ot).toPrecision(3)+"ms, total: "+((st-rt)/1e3).toPrecision(3)+"s)"),tt.protocol="DASH",tt},getMatchers:function(){return rt},getIron:function(){return at}},nt=st.getLogger(tt),rt=[new ha,new ya,new ba,new Aa,new ca],it=new Yn({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:rt}),at=ua(ot).create({adaptationset:new Ca,period:new Oa}),tt}qr.__dashjs_factory_name="DashParser";const Pa=dt.Z.getClassFactory(qr);function jr(et){et=et||{};var tt,nt,rt,it,st,dt=this.context,pt=et.debug,yt=et.settings,vt=(0,lt.Z)(dt).getInstance(),At=(0,fn.Z)(dt).getInstance(),Rt=et.mssHandler,Nt=et.errHandler;function y(et){vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:et.manifest})}function E(et){var tt=null;return et.indexOf("SmoothStreamingMedia")>-1?(Rt&&(tt=Rt.createMssParser(),Rt.createMssFragmentProcessor(),Rt.registerEvents()),tt):et.indexOf("MPD")>-1||et.indexOf("Patch")>-1?Pa(dt).create({debug:pt}):tt}return tt={load:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,at=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,ot=new Date,lt=new ra(et,Ut.w.MPD_TYPE);tt&&(lt.serviceLocation=tt),at&&(lt.queryParams=at),lt.requestStartDate||(lt.requestStartDate=ot),vt.trigger(ft.Z.MANIFEST_LOADING_STARTED,{request:lt}),rt.load({request:lt,success:function(tt,rt,at){var ot,lt,dt;if(it)if(at&&at!==et?(lt=At.parseBaseUrl(at),ot=at):(At.isRelative(et)&&(et=At.resolve(et,window.location.href)),lt=At.parseBaseUrl(et)),"No Content"!=rt)if(null===st&&(st=E(tt)),null!==st){it.setMatchers(st.getMatchers()),it.setIron(st.getIron());try{dt=st.parse(tt)}catch(tt){return void vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Lt.Z(xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(et))})}if(dt){if(dt.url=ot||et,dt.originalUrl||(dt.originalUrl=dt.url),yt&&yt.get().streaming.enableManifestDurationMismatchFix&&dt.mediaPresentationDuration&&dt.Period_asArray.length>1){var pt=dt.Period_asArray.reduce((function(et,tt){return et+tt.duration}),0);!isNaN(pt)&&dt.mediaPresentationDuration>pt&&(nt.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),dt.mediaPresentationDuration=pt)}dt.baseUri=lt,dt.loadedTime=new Date,it.resolveManifestOnLoad(dt),vt.trigger(ft.Z.ORIGINAL_MANIFEST_LOADED,{originalManifest:tt})}else vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Lt.Z(xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(et))})}else vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Lt.Z(xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,xt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(et))});else vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(tt,nt,rt){vt.trigger(ft.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new Lt.Z(xt.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,xt.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(et,", ").concat(rt))})}})},reset:function(){vt.off(ft.Z.XLINK_READY,y,tt),Rt&&Rt.reset(),it&&(it.reset(),it=null),rt&&(rt.abort(),rt=null)}},nt=pt.getLogger(tt),vt.on(ft.Z.XLINK_READY,y,tt),rt=ti(dt).create({errHandler:et.errHandler,dashMetrics:et.dashMetrics,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,urlUtils:At,constants:at.Z,dashConstants:ot.Z,errors:xt,requestTimeout:et.settings.get().streaming.manifestRequestTimeout}),it=sa(dt).create({errHandler:Nt,dashMetrics:et.dashMetrics,mediaPlayerModel:et.mediaPlayerModel,requestModifier:et.requestModifier,settings:et.settings}),st=null,tt}jr.__dashjs_factory_name="ManifestLoader";const xa=dt.Z.getClassFactory(jr);function Vr(){var et=this.context,tt=(0,lt.Z)(et).getInstance();return{error:function(et){tt.trigger(ft.Z.ERROR,{error:et})}}}Vr.__dashjs_factory_name="ErrorHandler";const ka=dt.Z.getSingletonFactory(Vr);var Za=nt(1715);function Wr(){var et,tt,nt,rt,it,ot,st=this.context,dt=(0,lt.Z)(st).getInstance();function d(et,rt){if(!rt||!rt.Period_asArray||0===rt.Period_asArray.length)return Promise.resolve();var it=[];return rt.Period_asArray.forEach((function(rt){it.push(function(et,rt){return new Promise((function(it){if(et&&et.AdaptationSet_asArray&&0!==et.AdaptationSet_asArray.length){var st=[];et.AdaptationSet_asArray.forEach((function(et){tt.getIsTypeOf(et,rt)&&st.push(function(et,rt){return new Promise((function(it){if(et.Representation_asArray&&0!==et.Representation_asArray.length){var st=[],lt=[];et.Representation_asArray.forEach((function(it,ot){var ft=tt.getCodec(et,ot,!1),dt=function(et,tt,nt){switch(et){case at.Z.VIDEO:return function(et,tt){return{codec:tt,width:et.width||null,height:et.height||null,framerate:et.frameRate||null,bitrate:et.bandwidth||null}}(tt,nt);case at.Z.AUDIO:return function(et,tt){var nt=et.audioSamplingRate||null;return{codec:tt,bitrate:et.bandwidth||null,samplerate:nt}}(tt,nt);default:return null}}(rt,it,ft);lt.push(dt),st.push(nt.supportsCodec(dt,rt))})),Promise.all(st).then((function(tt){et.Representation_asArray=et.Representation_asArray.filter((function(et,nt){return tt[nt]||ot.debug("[Stream] Codec ".concat(lt[nt].codec," not supported ")),tt[nt]})),it()})).catch((function(){it()}))}else it()}))}(et,rt))})),Promise.all(st).then((function(){et.AdaptationSet_asArray=et.AdaptationSet_asArray.filter((function(et){var tt=et.Representation_asArray&&et.Representation_asArray.length>0;return tt||(dt.trigger(ft.Z.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:et}),ot.warn("AdaptationSet has been removed because of no supported Representation")),tt})),it()})).catch((function(){it()}))}else it()}))}(rt,et))})),Promise.all(it)}return et={setConfig:function(et){et&&(et.adapter&&(tt=et.adapter),et.capabilities&&(nt=et.capabilities),et.settings&&(rt=et.settings),et.customParametersModel&&(it=et.customParametersModel))},filterUnsupportedFeatures:function(et){return new Promise((function(st){var lt=[];lt.push(d(at.Z.VIDEO,et)),lt.push(d(at.Z.AUDIO,et)),Promise.all(lt).then((function(){rt.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(et){et&&et.Period_asArray&&0!==et.Period_asArray.length&&et.Period_asArray.forEach((function(et){et.AdaptationSet_asArray=et.AdaptationSet_asArray.filter((function(et){return!et.Representation_asArray||0===et.Representation_asArray.length||(et.Representation_asArray=et.Representation_asArray.filter((function(et){var rt=tt.getEssentialPropertiesForRepresentation(et);if(rt&&rt.length>0)for(var it=0;it<rt.length;){if(!nt.supportsEssentialProperty(rt[it]))return ot.debug("[Stream] EssentialProperty not supported: "+rt[it].schemeIdUri),!1;it+=1}return!0})),et.Representation_asArray&&et.Representation_asArray.length>0)}))}))}(et),function(et){var tt=it.getCustomCapabilitiesFilters();tt&&0!==tt.length&&et&&et.Period_asArray&&0!==et.Period_asArray.length&&et.Period_asArray.forEach((function(et){et.AdaptationSet_asArray=et.AdaptationSet_asArray.filter((function(et){return!et.Representation_asArray||0===et.Representation_asArray.length||(et.Representation_asArray=et.Representation_asArray.filter((function(et){return!tt.some((function(tt){return!tt(et)}))})),et.Representation_asArray&&et.Representation_asArray.length>0)}))}))}(et),st()})).catch((function(){st()}))}))}},ot=(0,pt.Z)(st).getInstance().getLogger(et),et}Wr.__dashjs_factory_name="CapabilitiesFilter";const Ga=dt.Z.getSingletonFactory(Wr),Ya=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};function Jr(){var et;return{initialize:function(tt){if(et=new Ya,!tt)return null;var nt=tt.indexOf("#");if(-1!==nt)for(var rt=tt.substr(nt+1).split("&"),it=0,at=rt.length;it<at;++it){var ot=rt[it],st=ot.indexOf("=");if(-1!==st){var lt=ot.substring(0,st);et.hasOwnProperty(lt)&&(et[lt]=ot.substr(st+1))}}},getURIFragmentData:function(){return et}}}Jr.__dashjs_factory_name="URIFragmentModel";const ja=dt.Z.getSingletonFactory(Jr);function ei(){var et,tt=this.context,nt=(0,lt.Z)(tt).getInstance();return{getValue:function(){return et},setValue:function(tt){et=tt,tt&&nt.trigger(ft.Z.MANIFEST_LOADED,{data:tt})}}}ei.__dashjs_factory_name="ManifestModel";const Ha=dt.Z.getSingletonFactory(ei);function ri(){var et,tt,nt,rt,it=this.context,at=(0,kt.Z)(it).getInstance();function o(et,nt){return isNaN(et)?0:et>0?(nt&&tt.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):et<-.5?(nt&&tt.warn("Supplied minimum playback rate is out of range and will be limited to ".concat(-.5,": ").concat(-50,"% playback speed.")),-.5):et}function s(et,nt){return isNaN(et)?0:et<0?(nt&&tt.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):et>1?(nt&&tt.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):et}function u(){var et=at.get().streaming.buffer.stableBufferTime>0?at.get().streaming.buffer.stableBufferTime:at.get().streaming.buffer.fastSwitchEnabled?20:12,tt=nt.getLiveDelay();return!isNaN(tt)&&tt>0?Math.min(et,tt):et}return et={getCatchupMaxDrift:function(){if(!isNaN(at.get().streaming.liveCatchup.maxDrift)&&at.get().streaming.liveCatchup.maxDrift>0)return at.get().streaming.liveCatchup.maxDrift;var et=rt.getServiceDescriptionSettings();return et&&et.liveCatchup&&!isNaN(et.liveCatchup.maxDrift)&&et.liveCatchup.maxDrift>0?et.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return null!==at.get().streaming.liveCatchup.enabled?at.get().streaming.liveCatchup.enabled:nt.getInitialCatchupModeActivated()},getStableBufferTime:u,getInitialBufferLevel:function(){var et=at.get().streaming.buffer.initialBufferLevel;return isNaN(et)||et<0?0:Math.min(u(),et)},getRetryAttemptsForType:function(et){var tt=isNaN(at.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:at.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return nt.getLowLatencyModeEnabled()?at.get().streaming.retryAttempts[et]*tt:at.get().streaming.retryAttempts[et]},getRetryIntervalsForType:function(et){var tt=isNaN(at.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:at.get().streaming.retryIntervals.lowLatencyReductionFactor;return nt.getLowLatencyModeEnabled()?at.get().streaming.retryIntervals[et]/tt:at.get().streaming.retryIntervals[et]},getCatchupPlaybackRates:function(et){var tt=at.get().streaming.liveCatchup.playbackRate;if(!isNaN(tt.min)||!isNaN(tt.max))return{min:o(tt.min,et),max:s(tt.max,et)};var nt=rt.getServiceDescriptionSettings();if(nt&&nt.liveCatchup&&(!isNaN(nt.liveCatchup.playbackRate.min)||!isNaN(nt.liveCatchup.playbackRate.max))){var it=nt.liveCatchup.playbackRate;return{min:o(it.min,et),max:s(it.max,et)}}return{min:-.5,max:.5}},getAbrBitrateParameter:function(et,tt){try{var nt=at.get().streaming.abr[et][tt];if(!isNaN(nt)&&-1!==nt)return nt;var it=rt.getServiceDescriptionSettings();return it&&it[et]&&!isNaN(it[et][tt])?it[et][tt]:-1}catch(et){return-1}},setConfig:function(et){et.playbackController&&(nt=et.playbackController),et.serviceDescriptionController&&(rt=et.serviceDescriptionController)},reset:function(){}},tt=(0,pt.Z)(it).getInstance().getLogger(et),et}ri.__dashjs_factory_name="MediaPlayerModel";const Va=dt.Z.getSingletonFactory(ri);var Ka=nt(1767);function oi(et){var tt=(et=et||{}).abrController,nt=et.switchHistory,rt=et.droppedFramesHistory,it=et.currentRequest,at=et.useBufferOccupancyABR,ot=et.useL2AABR,st=et.useLoLPABR,lt=et.streamProcessor?et.streamProcessor.getScheduleController():null,ft=et.streamProcessor?et.streamProcessor.getRepresentationInfo():null,dt=et.videoModel?et.videoModel:null;function f(){return ft?ft.mediaInfo:null}return{getMediaType:function(){var et=f();return et?et.type:null},getMediaInfo:f,getDroppedFramesHistory:function(){return rt},getCurrentRequest:function(){return it},getSwitchHistory:function(){return nt},getStreamInfo:function(){var et=f();return et?et.streamInfo:null},getScheduleController:function(){return lt},getAbrController:function(){return tt},getRepresentationInfo:function(){return ft},useBufferOccupancyABR:function(){return at},useL2AABR:function(){return ot},useLoLPABR:function(){return st},getVideoModel:function(){return dt}}}oi.__dashjs_factory_name="RulesContext";const za=dt.Z.getClassFactory(oi);var Wa=nt(2068);function li(){var et=[],tt=[];return{push:function(nt){nt.newValue===Wa.Z.NO_CHANGE&&(nt.newValue=nt.oldValue),et[nt.oldValue]||(et[nt.oldValue]={noDrops:0,drops:0,dropSize:0});var rt=nt.newValue-nt.oldValue,it=rt<0?1:0,at=it?-rt:0,ot=it?0:1;if(et[nt.oldValue].drops+=it,et[nt.oldValue].dropSize+=at,et[nt.oldValue].noDrops+=ot,tt.push({idx:nt.oldValue,noDrop:ot,drop:it,dropSize:at}),tt.length>8){var st=tt.shift();et[st.idx].drops-=st.drop,et[st.idx].dropSize-=st.dropSize,et[st.idx].noDrops-=st.noDrop}},getSwitchRequests:function(){return et},reset:function(){et=[],tt=[]}}}li.__dashjs_factory_name="SwitchRequestHistory";const Xa=dt.Z.getClassFactory(li);function fi(){var et={},tt={},nt={};return{push:function(rt,it,at){if(it){et[rt]||(et[rt]=[],tt[rt]=0,nt[rt]=0);var ot=at&&at.droppedVideoFrames?at.droppedVideoFrames:0,st=at&&at.totalVideoFrames?at.totalVideoFrames:0,lt=ot-tt[rt];tt[rt]=ot;var ft=st-nt[rt];nt[rt]=st;var dt=et[rt];isNaN(it)||(dt[it]?(dt[it].droppedVideoFrames+=lt,dt[it].totalVideoFrames+=ft):dt[it]={droppedVideoFrames:lt,totalVideoFrames:ft})}},getFrameHistory:function(tt){return et[tt]},clearForStream:function(rt){try{delete et[rt],delete tt[rt],delete nt[rt]}catch(et){}},reset:function(){et={},tt={},nt={}}}}fi.__dashjs_factory_name="DroppedFramesHistory";const Qa=dt.Z.getClassFactory(fi);function gi(et){var tt,nt,rt,it,ot,st=this.context,ft=(et=et||{}).settings,dt=(0,lt.Z)(st).getInstance();function f(et,tt,nt,rt){var it=Math.pow(.5,nt/rt.fast);et.fastEstimate=(1-it)*tt+it*et.fastEstimate;var at=Math.pow(.5,nt/rt.slow);et.slowEstimate=(1-at)*tt+at*et.slowEstimate,et.totalWeight+=nt}function g(et,st,lt){return ft.get().streaming.abr.movingAverageMethod!==at.Z.MOVING_AVERAGE_SLIDING_WINDOW?function(et,tt){var nt=et?ot.throughputHalfLife:ot.latencyHalfLife,at=et?rt[tt]:it[tt];if(!at||at.totalWeight<=0)return NaN;var st=at.fastEstimate/(1-Math.pow(.5,at.totalWeight/nt.fast)),lt=at.slowEstimate/(1-Math.pow(.5,at.totalWeight/nt.slow));return et?Math.min(st,lt):Math.max(st,lt)}(et,st):function(et,rt,it){var at=function(et,rt,it){var at,ot;if(et?(at=tt[rt],ot=it?3:4):(at=nt[rt],ot=4),at){if(ot>=at.length)ot=at.length;else if(et)for(var st=1;st<ot;++st){var lt=at[at.length-st]/at[at.length-st-1];if((lt>=1.3||lt<=1/1.3)&&(ot+=1)===at.length)break}}else ot=0;return ot}(et,rt,it),ot=(et?tt:nt)[rt];return 0!==at&&ot&&0!==ot.length?(ot=ot.slice(-at)).reduce((function(et,tt){return et+tt}))/ot.length:NaN}(et,st,lt)}function h(et,tt){return g(!0,et,tt)}function p(et){tt[et]=tt[et]||[],nt[et]=nt[et]||[],rt[et]=rt[et]||{fastEstimate:0,slowEstimate:0,totalWeight:0},it[et]=it[et]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function m(){tt={},nt={},rt={},it={}}var pt={push:function(et,st,lt){if(st.trace&&st.trace.length){var pt,vt=st.tresponse.getTime()-st.trequest.getTime()||1,At=st._tfinish.getTime()-st.tresponse.getTime()||1,Rt=st.trace.reduce((function(et,tt){return et+tt.b[0]}),0),Nt=0;if(0!==(pt=st._fileLoaderType&&st._fileLoaderType===at.Z.FILE_LOADER_TYPES.FETCH?st.trace.reduce((function(et,tt){return et+tt.d}),0):lt?At:vt+At)&&(Nt=Math.round(8*Rt/pt)),st.cmsd){var Dt=st.cmsd.dynamic&&st.cmsd.dynamic.etp?st.cmsd.dynamic.etp:null;if(Dt){var Ot=ft.get().streaming.cmsd.abr.etpWeightRatio;Ot>0&&Ot<=1&&(Nt=Nt*(1-Ot)+Dt*Ot)}}if(p(et),function(et,tt,nt){return et===at.Z.VIDEO?nt<ft.get().streaming.cacheLoadThresholds[at.Z.VIDEO]:et===at.Z.AUDIO?nt<ft.get().streaming.cacheLoadThresholds[at.Z.AUDIO]:void 0}(et,0,At)){if(tt[et].length>0&&!tt[et].hasCachedEntries)return;tt[et].hasCachedEntries=!0}else tt[et]&&tt[et].hasCachedEntries&&function(et){delete tt[et],delete nt[et],delete rt[et],delete it[et],p(et)}(et);tt[et].push(Nt),dt.trigger(yt.Z.THROUGHPUT_MEASUREMENT_STORED,{throughput:Nt,mediaType:et,httpRequest:st}),tt[et].length>20&&tt[et].shift(),nt[et].push(vt),nt[et].length>20&&nt[et].shift(),f(rt[et],Nt,.001*At,ot.throughputHalfLife),f(it[et],vt,1,ot.latencyHalfLife)}},getAverageThroughput:h,getSafeAverageThroughput:function(et,tt){var nt=h(et,tt);return isNaN(nt)||(nt*=ft.get().streaming.abr.bandwidthSafetyFactor),nt},getAverageLatency:function(et){return g(!1,et)},reset:m};return ot={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},m(),pt}gi.__dashjs_factory_name="ThroughputHistory";const Ja=dt.Z.getClassFactory(gi);function pi(){var et,tt,nt,rt,it,ot,dt,vt,At,Rt,Nt,Dt,Ot,Lt,xt,kt,Bt,Gt,qt,jt,Vt,zt,Xt,Qt,$t,tn,nn,un=this.context,cn=(0,pt.Z)(un).getInstance(),fn=(0,lt.Z)(un).getInstance();function U(){it={},ot={},vt={},dt={},jt={},Xt={},Qt={},$t={},void 0===Rt&&(Rt=!1),Vt&&Vt.reset(),qt=void 0,Vt=void 0,zt=void 0,clearTimeout(At),At=null}function Z(tt){var it=tt.request.mediaType,at=tt.streamId;if(it&&at&&dt[at]&&nn.get().streaming.abr.autoSwitchBitrate[it]){var ot=dt[at][it];if(ot){var lt=za(un).create({abrController:et,streamProcessor:ot,currentRequest:tt.request,useBufferOccupancyABR:Xt[it],useL2AABR:Qt[it],useLoLPABR:$t[it],videoModel:Lt}),ft=nt.shouldAbandonFragment(lt,at);ft.quality>Wa.Z.NO_CHANGE&&ot.getFragmentModel().getRequests({state:Mt.FRAGMENT_MODEL_LOADING,index:tt.request.index})[0]&&(vt[at][it].state=st.Z.ABANDON_LOAD,jt[at][it].reset(),jt[at][it].push({oldValue:j(it,at),newValue:ft.quality,confidence:1,reason:ft.reason}),H(it,rt.getActiveStreamInfo(),ft.quality,ft.reason),clearTimeout(At),At=setTimeout((function(){vt[at][it].state=st.Z.ALLOW_LOAD,At=null}),nn.get().streaming.abandonLoadTimeout))}}}function B(et){et.mediaType===at.Z.VIDEO&&(void 0!==qt&&Vt.push(et.streamId,qt,Lt.getPlaybackQuality()),qt=et.newQuality)}function G(et){var nt,rt;et.metric!==st.Z.HTTP_REQUEST||!et.value||et.value.type!==Ut.w.MEDIA_SEGMENT_TYPE||et.mediaType!==at.Z.AUDIO&&et.mediaType!==at.Z.VIDEO||zt.push(et.mediaType,et.value,nn.get().streaming.abr.useDeadTimeLatency),et.metric!==st.Z.BUFFER_LEVEL||et.mediaType!==at.Z.AUDIO&&et.mediaType!==at.Z.VIDEO||(nt=et.mediaType,rt=.001*et.value.level,nn.get().streaming.abr.ABRStrategy===at.Z.ABR_STRATEGY_DYNAMIC&&function(et,nt){try{var rt=xt.getStableBufferTime(),it=rt,at=.5*rt,ot=Xt[et],st=nt>(ot?at:it);Xt[et]=st,st!==ot&&(st?tt.info("["+et+"] switching from throughput to buffer occupancy ABR rule (buffer: "+nt.toFixed(3)+")."):tt.info("["+et+"] switching from buffer occupancy to throughput ABR rule (buffer: "+nt.toFixed(3)+")."))}catch(et){tt.error(et)}}(nt,rt))}function q(et,nt){try{var rt;return it[nt]=it[nt]||{},it[nt].hasOwnProperty(et)||(it[nt][et]=0),rt=function(et,tt,nt){if(tt!==at.Z.VIDEO||!nn.get().streaming.abr.limitBitrateByPortal||!dt[nt]||!dt[nt][tt])return et;Rt||Q();var rt=dt[nt][tt].getStreamInfo(),it=Ot.getAdaptationForType(rt.index,tt,rt).Representation_asArray,ot=et;if(Nt>0&&Dt>0){for(;ot>0&&it[ot]&&Nt<it[ot].width&&Nt-it[ot-1].width<it[ot].width-Nt;)ot-=1;for(;ot<it.length-1&&it[ot].width===it[ot+1].width;)ot+=1}return ot}(rt=function(et,tt,nt){var rt=it[nt][tt],at=nn.get().streaming.abr.maxRepresentationRatio[tt];return isNaN(at)||at>=1||at<0?et:Math.min(et,Math.round(rt*at))}(rt=function(et,tt){var nt=it[tt][et],rt=nt;if(!dt[tt]||!dt[tt][et])return rt;var at=Y(et,tt);void 0!==at&&(rt=Math.max(nt,at));var ot=function(et,tt){try{var nt=xt.getAbrBitrateParameter("maxBitrate",et);return nt>-1?W(dt[tt][et].getMediaInfo(),nt,tt):void 0}catch(et){return}}(et,tt);return void 0!==ot&&(rt=Math.min(rt,ot)),rt}(et,nt),et,nt),et,nt),nn.get().streaming.cmsd.enabled&&nn.get().streaming.cmsd.abr.applyMb&&(rt=function(et,nt,rt){if("video"!==nt)return et;var it=Bt.getMaxBitrate(nt);if(it<0)return et;var at=K(rt,"audio",j("audio",rt));it-=at?at.bitrate/1e3:0;var ot=W(dt[rt][nt].getMediaInfo(),it,rt);return tt.debug("Stream ID: "+rt+" ["+nt+"] Apply max bit rate from CMSD: "+it),Math.min(et,ot)}(rt,et,nt)),rt}catch(et){return}}function Y(et,tt){try{return function(et,tt){try{var nt=xt.getAbrBitrateParameter("minBitrate",et);if(nt>-1){var rt=dt[tt][et].getMediaInfo(),it=X(rt),at=W(rt,nt,tt);return it[at]&&at<it.length-1&&it[at].bitrate<1e3*nt&&at++,at}return}catch(et){return}}(et,tt)}catch(et){return}}function j(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return tt||(tt=rt.getActiveStreamInfo().id),et&&dt[tt]&&dt[tt][et]&&tt?(ot[tt]=ot[tt]||{},ot[tt].hasOwnProperty(et)||(ot[tt][et]=0),ot[tt][et]):0}catch(et){return 0}}function H(et,tt,nt){var rt=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(tt&&tt.id&&et){var it=tt.id,at=j(et,it);(0,on.SE)(nt);var ot=q(et,it);nt!==at&&nt>=0&&nt<=ot&&V(et,at,nt,ot,rt,it)}}function V(et,nt,rt,it,at,st){if(et&&dt[st]&&dt[st][et]){var lt=dt[st][et].getStreamInfo(),pt=lt&&lt.manifestInfo&&lt.manifestInfo.isDynamic,yt=tn.getCurrentBufferLevel(et);tt.info("Stream ID: "+st+" ["+et+"] switch from "+nt+" to "+rt+"/"+it+" (buffer: "+yt+") "+(at?JSON.stringify(at):".")),ot[st]=ot[st]||{},ot[st][et]=rt;var vt=K(st,et,rt);fn.trigger(ft.Z.QUALITY_CHANGE_REQUESTED,{oldQuality:nt,newQuality:rt,reason:at,streamInfo:lt,bitrateInfo:vt,maxIdx:it,mediaType:et},{streamId:lt.id,mediaType:et});var At=zt.getAverageThroughput(et,pt);isNaN(At)||Gt.setSavedBitrateSettings(et,At)}}function K(et,tt,nt){if(tt&&dt&&dt[et]&&dt[et][tt]){var rt=X(dt[et][tt].getMediaInfo());return rt[nt]?rt[nt]:null}return null}function W(et,tt,nt){var rt=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,it=et&&et.type?dt[nt][et.type].getRepresentationInfo():null;if(nn.get().streaming.abr.useDeadTimeLatency&&rt&&it&&it.fragmentDuration){rt/=1e3;var at=it.fragmentDuration;if(rt>at)return 0;var ot=rt/at;tt*=1-ot}for(var st=X(et),lt=st.length-1;lt>=0;lt--){var ft=st[lt];if(1e3*tt>=ft.bitrate)return lt}return 0}function X(et){var tt=[];if(!et||!et.bitrateList)return tt;for(var nt,rt=et.bitrateList,it=et.type,at=0,ot=rt.length;at<ot;at++)(nt=new ci).mediaType=it,nt.qualityIndex=at,nt.bitrate=rt[at].bandwidth,nt.width=rt[at].width,nt.height=rt[at].height,nt.scanType=rt[at].scanType,tt.push(nt);return tt}function Q(){if(Lt){var et=nn.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;Nt=Lt.getClientWidth()*et,Dt=Lt.getClientHeight()*et}}return et={initialize:function(){Vt=Qa(un).create(),zt=Ja(un).create({settings:nn}),(nt=(0,Ka.Z)(un).create({dashMetrics:tn,customParametersModel:kt,mediaPlayerModel:xt,settings:nn})).initialize(),fn.on(yt.Z.QUALITY_CHANGE_RENDERED,B,et),fn.on(yt.Z.METRIC_ADDED,G,et),fn.on(ft.Z.LOADING_PROGRESS,Z,et)},isPlayingAtTopQuality:function(et){var tt=et?et.id:null,nt=j(at.Z.AUDIO,tt),rt=j(at.Z.VIDEO,tt);return nt===q(at.Z.AUDIO,tt)&&rt===q(at.Z.VIDEO,tt)},updateTopQualityIndex:function(et){var tt=et.type,nt=et.streamInfo.id,rt=et.representationCount-1;return it[nt]=it[nt]||{},it[nt][tt]=rt,rt},clearDataForStream:function(et){Vt&&Vt.clearForStream(et),dt[et]&&delete dt[et],jt[et]&&delete jt[et],vt[et]&&delete vt[et]},getThroughputHistory:function(){return zt},getBitrateList:X,getQualityForBitrate:W,getTopBitrateInfoFor:function(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(tt||(tt=rt.getActiveStreamInfo().id),et&&dt&&dt[tt]&&dt[tt][et]){var nt=q(et,tt),it=X(dt[tt][et].getMediaInfo());return it[nt]?it[nt]:null}return null},getMinAllowedIndexFor:Y,getMaxAllowedIndexFor:q,getInitialBitrateFor:function(et,tt){if(function(){if(!Gt||!Gt.hasOwnProperty("getSavedBitrateSettings"))throw new Error(at.Z.MISSING_CONFIG_ERROR)}(),et===at.Z.TEXT)return NaN;var nt=Gt.getSavedBitrateSettings(et),rt=xt.getAbrBitrateParameter("initialBitrate",et),it=nn.get().streaming.abr.initialRepresentationRatio[et];if(-1===rt)if(it>-1){var ot=dt[tt][et].getStreamInfo(),st=Ot.getAdaptationForType(ot.index,et,ot).Representation_asArray;rt=Array.isArray(st)?st[Math.max(Math.round(st.length*it)-1,0)].bandwidth/1e3:0}else rt=isNaN(nt)?et===at.Z.VIDEO?1e3:100:nt;return rt},getQualityFor:j,getAbandonmentStateFor:function(et,tt){return vt[et]&&vt[et][tt]?vt[et][tt].state:null},setPlaybackQuality:H,checkPlaybackQuality:function(tt,rt){try{if(!(tt&&dt&&dt[rt]&&dt[rt][tt]))return!1;if(Vt){var it=Lt.getPlaybackQuality();it&&Vt.push(rt,qt,it)}if(!nn.get().streaming.abr.autoSwitchBitrate[tt])return!1;var at=j(tt,rt),ot=za(un).create({abrController:et,switchHistory:jt[rt][tt],droppedFramesHistory:Vt,streamProcessor:dt[rt][tt],currentValue:at,useBufferOccupancyABR:Xt[tt],useL2AABR:Qt[tt],useLoLPABR:$t[tt],videoModel:Lt}),lt=Y(tt,rt),ft=q(tt,rt),pt=nt.getMaxQuality(ot),yt=pt.quality;return void 0!==lt&&(yt>Wa.Z.NO_CHANGE?yt:at)<lt&&(yt=lt),yt>ft&&(yt=ft),jt[rt][tt].push({oldValue:at,newValue:yt}),yt>Wa.Z.NO_CHANGE&&yt!==at&&(vt[rt][tt].state===st.Z.ALLOW_LOAD||yt<at)&&(V(tt,at,yt,ft,pt.reason,rt),!0)}catch(et){return!1}},setElementSize:Q,setWindowResizeEventCalled:function(et){Rt=et},registerStreamType:function(et,tt){var nt=tt.getStreamInfo().id;dt[nt]||(dt[nt]={}),jt[nt]||(jt[nt]={}),vt[nt]||(vt[nt]={}),jt[nt][et]=Xa(un).create(),dt[nt][et]=tt,vt[nt][et]={},vt[nt][et].state=st.Z.ALLOW_LOAD,function(et){var tt=nn.get().streaming.abr.ABRStrategy;tt===at.Z.ABR_STRATEGY_L2A?(Xt[et]=!1,$t[et]=!1,Qt[et]=!0):tt===at.Z.ABR_STRATEGY_LoLP?(Xt[et]=!1,$t[et]=!0,Qt[et]=!1):tt===at.Z.ABR_STRATEGY_BOLA?(Xt[et]=!0,$t[et]=!1,Qt[et]=!1):tt===at.Z.ABR_STRATEGY_THROUGHPUT?(Xt[et]=!1,$t[et]=!1,Qt[et]=!1):tt===at.Z.ABR_STRATEGY_DYNAMIC&&(Xt[et]=!(!Xt||!Xt[et])&&Xt[et],$t[et]=!1,Qt[et]=!1)}(et),et===at.Z.VIDEO&&Q()},unRegisterStreamType:function(et,tt){try{dt[et]&&dt[et][tt]&&delete dt[et][tt],jt[et]&&jt[et][tt]&&delete jt[et][tt],vt[et]&&vt[et][tt]&&delete vt[et][tt]}catch(et){}},setConfig:function(et){et&&(et.streamController&&(rt=et.streamController),et.domStorage&&(Gt=et.domStorage),et.mediaPlayerModel&&(xt=et.mediaPlayerModel),et.customParametersModel&&(kt=et.customParametersModel),et.cmsdModel&&(Bt=et.cmsdModel),et.dashMetrics&&(tn=et.dashMetrics),et.adapter&&(Ot=et.adapter),et.videoModel&&(Lt=et.videoModel),et.settings&&(nn=et.settings))},reset:function(){U(),fn.off(ft.Z.LOADING_PROGRESS,Z,et),fn.off(yt.Z.QUALITY_CHANGE_RENDERED,B,et),fn.off(yt.Z.METRIC_ADDED,G,et),nt&&nt.reset()}},tt=cn.getLogger(et),U(),et}pi.__dashjs_factory_name="AbrController";var $a=dt.Z.getSingletonFactory(pi);$a.QUALITY_DEFAULT=0,dt.Z.updateSingletonFactory(pi.__dashjs_factory_name,$a);const eo=$a;var to=new Map([[at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function vi(){var et,tt,nt,rt,it,ot,st=this.context,dt=(0,lt.Z)(st).getInstance(),yt=[];function g(){nt&&(nt.playbackRate=1,nt.removeEventListener("canplay",g))}function h(){return yt.length>0}function p(){if(nt&&h()&&0===nt.playbackRate){var et=document.createEvent("Event");et.initEvent("waiting",!0,!1),nt.dispatchEvent(et)}}function m(et,tt){nt&&nt.addEventListener(et,tt)}function y(et,tt){nt&&nt.removeEventListener(et,tt)}function E(){return nt?nt.readyState:NaN}function v(){return nt?nt.buffered:null}function _(et,tt,rt,it,at){if(nt)for(var ot=0;ot<nt.textTracks.length;ot++)if(nt.textTracks[ot].kind===et&&(!tt||nt.textTracks[ot].label==tt)&&nt.textTracks[ot].language===rt&&nt.textTracks[ot].isTTML===it&&nt.textTracks[ot].isEmbedded===at)return nt.textTracks[ot];return null}function T(et,tt){et===at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||E()>=et?tt():function(et,tt){m(et,(function n(){y(et,n),tt(et)}))}(to.get(et),tt)}return et={initialize:function(){dt.on(ft.Z.PLAYBACK_PLAYING,p,this)},setCurrentTime:function(et,tt){nt&&(rt=et,T(at.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){if(nt.currentTime!==rt)try{rt=tt?function(et){var tt=v(),nt=et,rt=9999999999;if(tt)for(var it=0;it<tt.length;it++){var at=tt.start(it),ot=tt.end(it),st=Math.abs(at-et),lt=Math.abs(ot-et);if(et>=at&&et<=ot)return et;st<rt&&(rt=st,nt=at),lt<rt&&(rt=lt,nt=ot)}return nt}(rt):rt,nt.currentTime=rt,rt=NaN}catch(et){0===nt.readyState&&et.code===et.INVALID_STATE_ERR&&setTimeout((function(){nt.currentTime=rt,rt=NaN}),400)}else rt=NaN})))},play:function(){if(nt){nt.autoplay=!0;var et=nt.play();et&&et.catch&&"undefined"!=typeof Promise&&et.catch((function(et){"NotAllowedError"===et.name&&dt.trigger(ft.Z.PLAYBACK_NOT_ALLOWED),tt.warn("Caught pending play exception - continuing (".concat(et,")"))}))}},isPaused:function(){return nt?nt.paused:null},pause:function(){nt&&(nt.pause(),nt.autoplay=!1)},isStalled:h,isSeeking:function(){return nt?nt.seeking||!isNaN(rt):null},getTime:function(){return nt?isNaN(rt)?nt.currentTime:rt:null},getPlaybackRate:function(){return nt?nt.playbackRate:null},setPlaybackRate:function(et){var tt=arguments.length>1&&void 0!==arguments[1]&&arguments[1];nt&&(!tt&&nt.readyState<=2&&et>0?nt.addEventListener("canplay",g):nt.playbackRate=et)},getPlayedRanges:function(){return nt?nt.played:null},getEnded:function(){return nt?nt.ended:null},setStallState:function(et,tt){!function(et,tt){tt?function(et){null!==et&&nt&&!nt.seeking&&-1===yt.indexOf(et)&&yt.push(et)}(et):function(et){var tt=yt.indexOf(et);null!==et&&-1!==tt&&yt.splice(tt,1)}(et)}(et,tt)},getElement:function(){return nt},setElement:function(et){if(!(null==et||et&&/^(VIDEO|AUDIO)$/i.test(et.nodeName)))throw"element is not video or audio DOM type!";(nt=et)&&(nt.preload="auto")},setSource:function(et){nt&&(et?nt.src=et:(nt.removeAttribute("src"),nt.load()))},getSource:function(){return nt?nt.src:null},getTTMLRenderingDiv:function(){return it},setTTMLRenderingDiv:function(et){(it=et).style.position="absolute",it.style.display="flex",it.style.overflow="hidden",it.style.pointerEvents="none",it.style.top=0,it.style.left=0},getVttRenderingDiv:function(){return ot},setVttRenderingDiv:function(et){ot=et},getPlaybackQuality:function(){if(!nt)return null;var et="webkitDroppedFrameCount"in nt&&"webkitDecodedFrameCount"in nt,tt=null;return"getVideoPlaybackQuality"in nt?tt=nt.getVideoPlaybackQuality():et&&(tt={droppedVideoFrames:nt.webkitDroppedFrameCount,totalVideoFrames:nt.webkitDroppedFrameCount+nt.webkitDecodedFrameCount,creationTime:new Date}),tt},addEventListener:m,removeEventListener:y,getReadyState:E,getBufferRange:v,getClientWidth:function(){return nt?nt.clientWidth:NaN},getClientHeight:function(){return nt?nt.clientHeight:NaN},getTextTracks:function(){return nt?nt.textTracks:[]},getTextTrack:_,addTextTrack:function(et,tt,rt,it,at){if(!nt)return null;var ot=_(et,tt,rt,it,at);return ot||((ot=nt.addTextTrack(et,tt,rt)).isEmbedded=at,ot.isTTML=it),ot},appendChild:function(et){nt&&(nt.appendChild(et),void 0!==et.isTTML&&(nt.textTracks[nt.textTracks.length-1].isTTML=et.isTTML,nt.textTracks[nt.textTracks.length-1].isEmbedded=et.isEmbedded))},removeChild:function(et){nt&&nt.removeChild(et)},getVideoWidth:function(){return nt?nt.videoWidth:NaN},getVideoHeight:function(){return nt?nt.videoHeight:NaN},getVideoRelativeOffsetTop:function(){if(nt){var et=nt.parentNode.host||nt.parentNode;return et?nt.getBoundingClientRect().top-et.getBoundingClientRect().top:NaN}return NaN},getVideoRelativeOffsetLeft:function(){if(nt){var et=nt.parentNode.host||nt.parentNode;return et?nt.getBoundingClientRect().left-et.getBoundingClientRect().left:NaN}return NaN},waitForReadyState:T,reset:function(){dt.off(ft.Z.PLAYBACK_PLAYING,p,this)}},tt=(0,pt.Z)(st).getInstance().getLogger(et),rt=NaN,et}vi.__dashjs_factory_name="VideoModel";const no=dt.Z.getSingletonFactory(vi);var ro=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],io="dashjs_?_bitrate",ao="dashjs_?_settings",oo="localStorage",so="lastBitrate",uo="lastMediaSettings";function wi(et){et=et||{};var tt,nt,rt,it=this.context,ot=et.settings;function s(et){if(void 0!==rt)return rt;var tt;rt=!1;try{"undefined"!=typeof window&&(tt=window[et])}catch(et){return nt.warn("DOMStorage access denied: "+et.message),rt}if(!tt||et!==oo&&"sessionStorage"!==et)return rt;try{tt.setItem("1","1"),tt.removeItem("1"),rt=!0}catch(et){nt.warn("DOMStorage is supported, but cannot be used: "+et.message)}return rt}function u(){var et=6e5;return Math.round((new Date).getTime()/et)*et}function l(et,tt){return s(et)&&ot.get().streaming[tt+"CachingInfo"].enabled}function c(){if(!ot)throw new Error(at.Z.MISSING_CONFIG_ERROR)}return tt={getSavedBitrateSettings:function(et){if(c(),!ot.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var tt=NaN;if(l(oo,so)){var rt=io.replace(/\?/,et);try{var it=JSON.parse(localStorage.getItem(rt))||{},at=(new Date).getTime()-parseInt(it.timestamp,10)>=ot.get().streaming.lastBitrateCachingInfo.ttl||!1,st=parseFloat(it.bitrate);isNaN(st)||at?at&&localStorage.removeItem(rt):(tt=st,nt.debug("Last saved bitrate for "+et+" was "+st))}catch(et){return null}}return tt},setSavedBitrateSettings:function(et,tt){if(l(oo,so)&&tt){var rt=io.replace(/\?/,et);try{localStorage.setItem(rt,JSON.stringify({bitrate:tt.toFixed(3),timestamp:u()}))}catch(et){nt.error(et.message)}}},getSavedMediaSettings:function(et){if(c(),!ot.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var tt=null;if(l(oo,uo)){var nt=ao.replace(/\?/,et);try{var rt=JSON.parse(localStorage.getItem(nt))||{},it=(new Date).getTime()-parseInt(rt.timestamp,10)>=ot.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;tt=rt.settings,it&&(localStorage.removeItem(nt),tt=null)}catch(et){return null}}return tt},setSavedMediaSettings:function(et,tt){if(l(oo,uo)){var rt=ao.replace(/\?/,et);try{localStorage.setItem(rt,JSON.stringify({settings:tt,timestamp:u()}))}catch(et){nt.error(et.message)}}}},nt=(0,pt.Z)(it).getInstance().getLogger(tt),s(oo)&&ro.forEach((function(et){var tt=localStorage.getItem(et.oldKey);if(tt){localStorage.removeItem(et.oldKey);try{localStorage.setItem(et.newKey,tt)}catch(et){nt.error(et.message)}}})),tt}wi.__dashjs_factory_name="DOMStorage";const lo=dt.Z.getSingletonFactory(wi);var co=nt(2032),fo=nt(2011);function Oi(){var et,tt,nt,rt,it,at,ot,st,lt,ft,dt,pt,yt,vt=this.context;function h(et,nt,it,at){var ot=null,lt=et?yt.resolve(et.path):null,ft=at||{init:!0,url:lt?lt.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:nt};tt.debug("Start searching for initialization.");var dt=E(ft);st.load({request:dt,success:function(tt){if(ft.bytesLoaded=ft.range.end,!(ot=rt.findInitRange(tt)))return ft.range.end=ft.bytesLoaded+ft.bytesToLoad,h(et,nt,it,ft);et.range=ot,it(et)},error:function(){it(et)}}),tt.debug("Perform init search: "+ft.url)}function m(et,nt,it,at,ot,lt){if(it&&(void 0===it.start||void 0===it.end)){var ft=it?it.toString().split("-"):null;it=ft?{start:parseFloat(ft[0]),end:parseFloat(ft[1])}:null}ot=ot||y;var dt=null,pt=null,vt=!!it,At=et?yt.resolve(et.path):null,Rt={init:!1,url:At?At.url:void 0,range:vt?it:{start:0,end:1500},searching:!vt,bytesLoaded:lt?lt.bytesLoaded:0,bytesToLoad:1500,mediaType:nt},Nt=E(Rt);st.load({request:Nt,success:function(it){var st=Rt.bytesToLoad,lt=it.byteLength;if(Rt.bytesLoaded=Rt.range.end-Rt.range.start,dt=rt.parse(it),(pt=dt.getBox("sidx"))&&pt.isComplete){var ft,yt,vt=pt.references;if(null!=vt&&vt.length>0&&(ft=1===vt[0].reference_type),ft){var At,Nt,Dt,Ot;tt.debug("Initiate multiple SIDX load."),Rt.range.end=Rt.range.start+pt.size;var Mt=[],Lt=0,xt=(pt.offset||Rt.range.start)+pt.size,b=function(tt){tt?(Mt=Mt.concat(tt),++Lt>=Nt&&(Mt.sort((function(et,tt){return et.startTime-tt.startTime<0?-1:0})),ot(Mt,et,at))):ot(null,et,at)};for(At=0,Nt=vt.length;At<Nt;At++)Dt=xt,Ot=xt+vt[At].referenced_size-1,xt+=vt[At].referenced_size,m(et,nt,{start:Dt,end:Ot},at,b,Rt)}else tt.debug("Parsing segments from SIDX. representation "+nt+" - id: "+et.id+" for range : "+Rt.range.start+" - "+Rt.range.end),yt=function(et,tt){for(var nt,rt,it,at,ot=et.references,st=ot.length,lt=et.timescale,ft=et.earliest_presentation_time,dt=tt.range.start+et.offset+et.first_offset+et.size,pt=[],yt=0;yt<st;yt++)it=ot[yt].subsegment_duration,at=ot[yt].referenced_size,(nt=new fo.Z).duration=it,nt.startTime=ft,nt.timescale=lt,rt=dt+at-1,nt.mediaRange=dt+"-"+rt,pt.push(nt),ft+=it,dt+=at;return pt}(pt,Rt),ot(yt,et,at)}else{if(pt)Rt.range.start=pt.offset||Rt.range.start,Rt.range.end=Rt.range.start+(pt.size||st);else{if(lt<Rt.bytesLoaded)return void ot(null,et,at);var kt=dt.getLastBox();kt&&kt.size?(Rt.range.start=kt.offset+kt.size,Rt.range.end=Rt.range.start+st):Rt.range.end+=st}m(et,nt,Rt.range,at,null,Rt)}},error:function(){ot(null,et,at)}}),tt.debug("Perform SIDX load for type ".concat(nt," : ").concat(Rt.url," with range ").concat(Rt.range.start," - ").concat(Rt.range.end))}function y(et,tt,nt){nt({segments:et,representation:tt,error:et?void 0:new Lt.Z(lt.SEGMENT_BASE_LOADER_ERROR_CODE,lt.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function E(et){if(et.url){var tt=new At.Z;return tt.setInfo(et),tt}}return et={setConfig:function(st){st.baseURLController&&(yt=st.baseURLController),st.dashMetrics&&(at=st.dashMetrics),st.mediaPlayerModel&&(ot=st.mediaPlayerModel),st.errHandler&&(nt=st.errHandler),st.boxParser&&(rt=st.boxParser),st.debug&&(tt=st.debug.getLogger(et)),st.requestModifier&&(it=st.requestModifier),st.errors&&(lt=st.errors),st.urlUtils&&(pt=st.urlUtils),st.constants&&(ft=st.constants),st.dashConstants&&(dt=st.dashConstants)},initialize:function(){st=ti(vt).create({errHandler:nt,dashMetrics:at,mediaPlayerModel:ot,requestModifier:it,boxParser:rt,errors:lt,urlUtils:pt,constants:ft,dashConstants:dt})},loadInitialization:function(et,tt){return new Promise((function(nt){h(et,tt,nt)}))},loadSegments:function(et,tt,nt){return new Promise((function(rt){m(et,tt,nt,rt)}))},reset:function(){st&&(st.abort(),st=null)}}}Oi.__dashjs_factory_name="SegmentBaseLoader";const go=dt.Z.getSingletonFactory(Oi);function Pi(et){var tt;et=et||{};var nt=new DataView(et.data),rt=0;function i(et,tt){var it=!0,at=0;if(void 0===tt&&(tt=!1),et.tag>16777215?(nt.getUint32(rt)!==et.tag&&(it=!1),at=4):et.tag>65535?(256*nt.getUint16(rt)+nt.getUint8(rt+2)!==et.tag&&(it=!1),at=3):et.tag>255?(nt.getUint16(rt)!==et.tag&&(it=!1),at=2):(nt.getUint8(rt)!==et.tag&&(it=!1),at=1),!it&&et.required&&!tt)throw new Error("required tag not found");return it&&(rt+=at),it}function a(et){var tt=1,it=128,at=-1,ot=0,st=nt.getUint8(rt),lt=0;for(lt=0;lt<8;lt+=1){if((st&it)===it){ot=void 0===et?st&~it:st,at=lt;break}it>>=1}for(lt=0;lt<at;lt+=1,tt+=1)ot=ot<<8|255&nt.getUint8(rt+tt);return rt+=tt,ot}return tt={getPos:function(){return rt},setPos:function(et){rt=et},consumeTag:i,consumeTagAndSize:function(et,tt){var nt=i(et,tt);return nt&&a(),nt},parseTag:function(et){var nt;return i(et),nt=a(),tt[et.parse](nt)},skipOverElement:function(et,tt){var nt,it=i(et,tt);return it&&(nt=a(),rt+=nt),it},getMatroskaCodedNum:a,getMatroskaFloat:function(et){var tt;switch(et){case 4:tt=nt.getFloat32(rt),rt+=4;break;case 8:tt=nt.getFloat64(rt),rt+=8}return tt},getMatroskaUint:function(et){if(et>4)return function(et){for(var tt=Math.floor(Number.MAX_SAFE_INTEGER/256),it=0,at=0;at<et;at+=1){if(it>tt)throw new Error("Value exceeds safe integer limit");it*=256;var ot=nt.getUint8(rt+at);if(it>Number.MAX_SAFE_INTEGER-ot)throw new Error("Value exceeds safe integer limit");it+=ot}return rt+=et,it}(et);for(var tt=0,it=0;it<et;it+=1)tt<<=8,tt|=255&nt.getUint8(rt+it);return rt+=et,tt>>>0},moreData:function(){return rt<nt.byteLength}}}Pi.__dashjs_factory_name="EBMLParser";const ho=dt.Z.getClassFactory(Pi);function xi(){var et,tt,nt,rt,it,ot,st,lt,ft,dt,pt=this.context;function d(et){var tt=new At.Z;return tt.setInfo(et),tt}return et={setConfig:function(nt){if(!(nt.baseURLController&&nt.dashMetrics&&nt.mediaPlayerModel&&nt.errHandler))throw new Error(at.Z.MISSING_CONFIG_ERROR);dt=nt.baseURLController,ot=nt.dashMetrics,st=nt.mediaPlayerModel,rt=nt.errHandler,ft=nt.errors,tt=nt.debug.getLogger(et),it=nt.requestModifier},initialize:function(){lt=ti(pt).create({errHandler:rt,dashMetrics:ot,mediaPlayerModel:st,requestModifier:it,errors:ft})},loadInitialization:function(et,nt){return new Promise((function(rt){var it=null,at=et?dt.resolve(et.path):null,ot=et?et.range.split("-"):null,st={range:{start:ot?parseFloat(ot[0]):null,end:ot?parseFloat(ot[1]):null},request:it,url:at?at.url:void 0,init:!0,mediaType:nt};tt.info("Start loading initialization."),it=d(st),lt.load({request:it,success:function(){rt(et)},error:function(){rt(et)}}),tt.debug("Perform init load: "+st.url)}))},loadSegments:function(et,rt,it){return new Promise((function(at){var ot=null,st=et?dt.resolve(et.path):null,yt=st?st.url:void 0;ot=d({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:ot,url:yt,init:!1,mediaType:rt}),tt.debug("Parsing ebml header"),lt.load({request:ot,success:function(rt){!function(et,rt,it,at){if(et&&0!==et.byteLength){var ot,st,ft,dt,yt=ho(pt).create({data:et}),vt=it?it.split("-"):null,At=null,Rt={url:rt,range:{start:vt?parseFloat(vt[0]):null,end:vt?parseFloat(vt[1]):null},request:At};for(tt.debug("Parse EBML header: "+Rt.url),yt.skipOverElement(nt.EBML),yt.consumeTag(nt.Segment),ft=yt.getMatroskaCodedNum(),ft+=yt.getPos(),dt=yt.getPos();yt.moreData()&&!yt.consumeTagAndSize(nt.Segment.Info,!0);)if(!(yt.skipOverElement(nt.Segment.SeekHead,!0)||yt.skipOverElement(nt.Segment.Tracks,!0)||yt.skipOverElement(nt.Segment.Cues,!0)||yt.skipOverElement(nt.Void,!0)))throw new Error("no valid top level element found");for(;void 0===ot;){var Nt=yt.getMatroskaCodedNum(!0),Dt=yt.getMatroskaCodedNum();Nt===nt.Segment.Info.Duration.tag?ot=yt[nt.Segment.Info.Duration.parse](Dt):yt.setPos(yt.getPos()+Dt)}At=d(Rt),lt.load({request:At,success:function(et){st=function(et,rt,it,at){var ot,st,lt,ft,dt,yt,vt,At;for(lt=[],dt=0,yt=(st=function(et){var tt,rt,it=[],at=ho(pt).create({data:et});for(at.consumeTagAndSize(nt.Segment.Cues);at.moreData()&&at.consumeTagAndSize(nt.Segment.Cues.CuePoint,!0);){for((tt={}).CueTime=at.parseTag(nt.Segment.Cues.CuePoint.CueTime),tt.CueTracks=[];at.moreData()&&at.consumeTag(nt.Segment.Cues.CuePoint.CueTrackPositions,!0);){var ot=at.getMatroskaCodedNum(),st=at.getPos();if((rt={}).Track=at.parseTag(nt.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===rt.Track)throw new Error("Cue track cannot be 0");rt.ClusterPosition=at.parseTag(nt.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),tt.CueTracks.push(rt),at.setPos(st+ot)}if(0===tt.CueTracks.length)throw new Error("Mandatory cuetrack not found");it.push(tt)}if(0===it.length)throw new Error("mandatory cuepoint not found");return it}(et)).length;dt<yt;dt+=1)ft=new fo.Z,ot=dt<st.length-1?st[dt+1].CueTime-st[dt].CueTime:at-st[dt].CueTime,ft.duration=ot,ft.startTime=st[dt].CueTime,ft.timescale=1e3,vt=st[dt].CueTracks[0].ClusterPosition+rt,At=dt<st.length-1?st[dt+1].CueTracks[0].ClusterPosition+rt-1:it-1,ft.mediaRange=vt+"-"+At,lt.push(ft);return tt.debug("Parsed cues: "+lt.length+" cues."),lt}(et,dt,ft,ot),at(st)},error:function(){tt.error("Download Error: Cues "+Rt.url),at(null)}}),tt.debug("Perform cues load: "+Rt.url+" bytes="+Rt.range.start+"-"+Rt.range.end)}else at(null)}(rt,yt,it,(function(tt){at({segments:tt,representation:et,error:tt?void 0:new Lt.Z(ft.SEGMENT_BASE_LOADER_ERROR_CODE,ft.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){at({representation:et,error:new Lt.Z(ft.SEGMENT_BASE_LOADER_ERROR_CODE,ft.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})}))},reset:function(){lt&&(lt.abort(),lt=null)}},nt={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},et}xi.__dashjs_factory_name="WebmSegmentBaseLoader";const po=dt.Z.getSingletonFactory(xi);function ki(et){et=et||{};var tt,nt,rt,it=this.context,at=et.eventBus,ot=et.events,st=et.dashMetrics,lt=et.mediaPlayerModel,ft=et.errHandler,dt=et.baseURLController,pt=et.debug,yt=et.boxParser,vt=et.requestModifier,At=et.errors;function p(et){return"webm"===(et?et.split("/")[1]:"").toLowerCase()}return tt={initialize:function(){nt.initialize(),rt.initialize()},getSegmentBaseInitSegment:function(et){return p(et.representation.mimeType)?rt.loadInitialization(et.representation,et.mediaType):nt.loadInitialization(et.representation,et.mediaType)},getSegmentList:function(et){return p(et.mimeType)?rt.loadSegments(et.representation,et.mediaType,et.representation?et.representation.indexRange:null):nt.loadSegments(et.representation,et.mediaType,et.representation?et.representation.indexRange:null)},reset:function(){nt.reset(),rt.reset()}},nt=go(it).getInstance(),rt=po(it).getInstance(),nt.setConfig({baseURLController:dt,dashMetrics:st,mediaPlayerModel:lt,errHandler:ft,eventBus:at,events:ot,errors:At,debug:pt,boxParser:yt,requestModifier:vt}),rt.setConfig({baseURLController:dt,dashMetrics:st,mediaPlayerModel:lt,errHandler:ft,eventBus:at,events:ot,errors:At,debug:pt,requestModifier:vt}),tt}ki.__dashjs_factory_name="SegmentBaseController";const mo=dt.Z.getSingletonFactory(ki),yo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.quality=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null},Eo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.labels=null,this.lang=null,this.viewpoint=null,this.viewpointsWithSchemeIdUri=null,this.accessibility=null,this.accessibilitiesWithSchemeIdUri=null,this.audioChannelConfiguration=null,this.audioChannelConfigurationsWithSchemeIdUri=null,this.roles=null,this.rolesWithSchemeIdUri=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null,this.isFragmented=null,this.isEmbedded=null,this.selectionPriority=1,this.supplementalProperties={},this.supplementalPropertiesAsArray=[],this.segmentAlignment=!1,this.subSegmentAlignment=!1},vo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0},_o=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.dvrWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null,this.serviceDescriptions=[],this.protocol=null},To=function(){function e(et){var tt=this;!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.valid="/"==et[0],this.path=et.split("/").filter((function(et){return 0!==et.length})).map((function(et){var nt={name:et},rt=et.indexOf("[");if(-1!=rt){nt.name=et.substring(0,rt);var it=et.substring(rt+1,et.length-1);tt.valid=tt.valid&&-1==it.indexOf("[");var at=it.indexOf("=");-1!=at?(nt.attribute={name:it.substring(1,at),value:it.substring(at+1)},-1!=["'",'"'].indexOf(nt.attribute.value[0])&&(nt.attribute.value=nt.attribute.value.substring(1,nt.attribute.value.length-1))):nt.position=parseInt(it,10)-1}return nt}))}var et;return(et=[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){return this.path[this.path.length-1].name.startsWith("@")}},{key:"getMpdTarget",value:function(et,tt){for(var nt=null,rt=et,it=1,at="MPD";it<this.path.length&&null!==rt;){nt=rt;var ot=this.path[it];if(at=ot.name,it!==this.path.length-1||!at.startsWith("@")){var st=nt[at+"_asArray"]||[];0===st.length&&nt[at]&&st.push(nt[at]),ot.position?rt=st[ot.position]||null:ot.attribute?function(){var et=ot.attribute;rt=st.filter((function(tt){return tt[et.name]==et.value}))[0]||null}():rt=st[0]||null}it++}return null===rt?null:at.startsWith("@")?{name:at.substring(1),leaf:rt,target:rt}:{name:at,leaf:rt,target:tt?nt:rt}}}])&&function Yi(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}(),So=function(){function e(et,tt,nt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=et,this.xpath=tt,this.value=nt,this.position=null}var et;return(et=[{key:"getMpdTarget",value:function(et){var tt="remove"===this.action||"replace"===this.action||"before"===this.position||"after"===this.position;return this.xpath.getMpdTarget(et,tt)}}])&&function Hi(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}();function Ki(){var et,tt,nt=this.context;return et={getIsPatch:function(et){return et&&et.hasOwnProperty(ot.Z.ORIGINAL_MPD_ID)||!1},getPublishTime:function(et){return et&&et.hasOwnProperty(ot.Z.PUBLISH_TIME)?new Date(et[ot.Z.PUBLISH_TIME]):null},getOriginalPublishTime:function(et){return et&&et.hasOwnProperty(ot.Z.ORIGINAL_PUBLISH_TIME)?new Date(et[ot.Z.ORIGINAL_PUBLISH_TIME]):null},getMpdId:function(et){return et&&et[ot.Z.ORIGINAL_MPD_ID]||null},getPatchOperations:function(et){return et?(et.__children||[]).map((function(et){var nt=Object.keys(et)[0];if("add"!==nt&&"remove"!==nt&&"replace"!==nt)return tt.warn("Ignoring node of invalid action: ".concat(nt)),null;var rt=et[nt],it=rt.sel;if("add"===nt&&rt.type){if(!rt.type.startsWith("@"))return tt.warn("Ignoring add action for prefixed namespace declaration: ".concat(rt.type,"=").concat(rt.__text)),null;it="".concat(it,"/").concat(rt.type)}var at=new To(it);if(!at.isValid())return tt.warn("Ignoring action with invalid selector: ".concat(nt," - ").concat(it)),null;var ot=null;at.findsAttribute()?ot=rt.__text||"":"remove"!==nt&&(ot=rt.__children.reduce((function(et,tt){var nt=Object.keys(tt)[0];return"#text"!==nt&&(et[nt]=et[nt]||[],et[nt].push(tt[nt])),et}),{}));var st=new So(nt,at,ot);return"add"===nt&&(st.position=rt.pos),st})).filter((function(et){return!!et})):[]}},tt=(0,pt.Z)(nt).getInstance().getLogger(et),et}Ki.__dashjs_factory_name="PatchManifestModel";const bo=dt.Z.getSingletonFactory(Ki);function Wi(){var et,tt,nt,rt,it,at,st,lt=this.context;function l(et,nt,at){var st,lt=tt.getAdaptationsForType(rt[0].mpd.manifest,et,nt);if(!lt||0===lt.length)return null;if(lt.length>1&&at){var ft=d(at,nt);if(it[at.id]&&it[at.id][nt])for(var dt=0,pt=lt.length;dt<pt;dt++)if(c(it[at.id][nt],ft[dt]))return lt[dt];for(var yt=0,vt=lt.length;yt<vt;yt++)if(st=lt[yt],tt.getRolesForAdaptation(st).filter((function(et){return et.value===ot.Z.MAIN}))[0])return lt[yt]}return lt[0]}function c(et,tt){if(!et||!tt)return!1;var nt=et.id===tt.id,rt=et.codec===tt.codec,it=et.viewpoint===tt.viewpoint,at=JSON.stringify(et.viewpointsWithSchemeIdUri)===JSON.stringify(tt.viewpointsWithSchemeIdUri),ot=et.lang===tt.lang,st=et.roles.toString()===tt.roles.toString(),lt=JSON.stringify(et.rolesWithSchemeIdUri)===JSON.stringify(tt.rolesWithSchemeIdUri),ft=et.accessibility.toString()===tt.accessibility.toString(),dt=JSON.stringify(et.accessibilitiesWithSchemeIdUri)===JSON.stringify(tt.accessibilitiesWithSchemeIdUri),pt=et.audioChannelConfiguration.toString()===tt.audioChannelConfiguration.toString(),yt=JSON.stringify(et.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(tt.audioChannelConfigurationsWithSchemeIdUri);return nt&&rt&&it&&at&&ot&&st&&lt&&ft&&dt&&pt&&yt}function f(et,nt,rt,it,ot,st){var lt,ft,dt,pt,yt,vt,At=[];if(!it||0===it.length)return[];var Rt=tt.getAdaptationsForPeriod(nt);for(pt=0,vt=it.length;pt<vt;pt++)if(lt=it[pt],ft=v(Rt[dt=tt.getIndexForAdaptation(lt,et,rt.index)]),st){var Nt=ft.accessibility.length;for(yt=0;yt<Nt;yt++)if(ft){var Dt=ft.accessibility[yt];if(0===Dt.indexOf("cea-608:")){var Ot=Dt.substring(8).split(";");if("CC"===Ot[0].substring(0,2))for(yt=0;yt<Ot.length;yt++)ft||(ft=v.call(this,Rt[dt])),_(ft,Ot[yt].substring(0,3),Ot[yt].substring(4)),At.push(ft),ft=null;else for(yt=0;yt<Ot.length;yt++)ft||(ft=v.call(this,Rt[dt])),_(ft,"CC"+(yt+1),Ot[yt]),At.push(ft),ft=null}else 0===Dt.indexOf("cea-608")&&(_(ft,at.CC1,"eng"),At.push(ft),ft=null)}}else ot===at.IMAGE?(ft.type=at.IMAGE,At.push(ft),ft=null):ft&&At.push(ft);return At}function d(et,nt,it){var ot=rt,st=it,lt=[];if(st)S(),ot=g(st);else{if(!(rt.length>0))return lt;st=rt[0].mpd.manifest}var ft=E(et,ot),dt=tt.getAdaptationsForType(st,et?et.index:null,nt);return lt=f(st,ft,et,dt,nt),nt===at.TEXT&&(dt=tt.getAdaptationsForType(st,et?et.index:null,at.VIDEO),lt=lt.concat(f(st,ft,et,dt,nt,!0))),lt}function g(et){var nt=h(et);return tt.getRegularPeriods(nt)}function h(et){var nt=m(et);return tt.getMpd(nt)}function p(){rt=[],it={}}function m(et){return et||(rt.length>0?rt[0].mpd.manifest:null)}function y(et){try{var nt=E(et.streamInfo,rt),it=tt.getAdaptationsForPeriod(nt);return et&&et.streamInfo&&void 0!==et.streamInfo.id&&it?it[et.index]:null}catch(et){return null}}function E(et,tt){for(var nt=tt.length,rt=0;rt<nt;rt++){var it=tt[rt];if(et&&et.id===it.id)return it}return null}function v(et){if(!et)return null;var nt,rt,it,at,ot,lt=new Eo,ft=et.period.mpd.manifest.Period_asArray[et.period.index].AdaptationSet_asArray[et.index];if(lt.id=et.id,lt.index=et.index,lt.type=et.type,lt.streamInfo=T(et.period),lt.representationCount=tt.getRepresentationCount(ft),lt.labels=tt.getLabelsForAdaptation(ft),lt.lang=tt.getLanguageForAdaptation(ft),lt.segmentAlignment=tt.getSegmentAlignment(ft),lt.subSegmentAlignment=tt.getSubSegmentAlignment(ft),nt=tt.getViewpointForAdaptation(ft),lt.viewpoint=nt.length?nt[0].value:void 0,lt.viewpointsWithSchemeIdUri=nt,ot=tt.getAccessibilityForAdaptation(ft),lt.accessibility=ot.map((function(et){var tt=et.value,nt=tt;return et.schemeIdUri&&et.schemeIdUri.search("cea-608")>=0&&void 0!==st&&(nt=tt?"cea-608:"+tt:"cea-608",lt.embeddedCaptions=!0),nt})),lt.accessibilitiesWithSchemeIdUri=ot,rt=tt.getAudioChannelConfigurationForAdaptation(ft),lt.audioChannelConfiguration=rt.map((function(et){return et.value})),lt.audioChannelConfigurationsWithSchemeIdUri=rt,0===lt.audioChannelConfiguration.length&&Array.isArray(ft.Representation_asArray)&&ft.Representation_asArray.length>0&&(it=tt.getAudioChannelConfigurationForRepresentation(ft.Representation_asArray[0]),lt.audioChannelConfiguration=it.map((function(et){return et.value})),lt.audioChannelConfigurationsWithSchemeIdUri=it),at=tt.getRolesForAdaptation(ft),lt.roles=at.map((function(et){return et.value})),lt.rolesWithSchemeIdUri=at,lt.codec=tt.getCodec(ft),lt.mimeType=tt.getMimeType(ft),lt.contentProtection=tt.getContentProtectionData(ft),lt.bitrateList=tt.getBitrateListForAdaptation(ft),lt.selectionPriority=tt.getSelectionPriority(ft),lt.contentProtection){var dt=lt.contentProtection.map((function(et){return tt.getKID(et)})).filter((function(et){return null!==et}));if(dt.length){var pt=dt[0];lt.contentProtection.forEach((function(et){et.keyId=pt}))}}if(lt.isText=tt.getIsText(ft),lt.supplementalProperties=tt.getSupplementalPropertiesForAdaptation(ft),(!lt.supplementalProperties||0===Object.keys(lt.supplementalProperties).length)&&Array.isArray(ft.Representation_asArray)&&ft.Representation_asArray.length>0){var yt=ft.Representation_asArray.map((function(et){return tt.getSupplementalPropertiesForRepresentation(et)}));yt.every((function(et){return JSON.stringify(et)===JSON.stringify(yt[0])}))&&(lt.supplementalProperties=yt[0])}if(lt.supplementalPropertiesAsArray=tt.getSupplementalPropertiesAsArrayForAdaptation(ft),(!lt.supplementalPropertiesAsArray||0===lt.supplementalPropertiesAsArray.length)&&Array.isArray(ft.Representation_asArray)&&ft.Representation_asArray.length>0){var vt=ft.Representation_asArray.map((function(et){return tt.getSupplementalPropertiesAsArrayForRepresentation(et)}));vt.every((function(et){return JSON.stringify(et)===JSON.stringify(vt[0])}))&&(lt.supplementalPropertiesAsArray=vt[0])}return lt.isFragmented=tt.getIsFragmented(ft),lt.isEmbedded=!1,lt}function _(et,tt,nt){et.id=tt,et.index=100+parseInt(tt.substring(2,3)),et.type=at.TEXT,et.codec="cea-608-in-SEI",et.isEmbedded=!0,et.isFragmented=!1,et.lang=Gi()(nt),et.roles=["caption"],et.rolesWithSchemeIdUri=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function T(et){var nt,rt,it=new vo;return it.id=et.id,it.index=et.index,it.start=et.start,it.duration=et.duration,it.manifestInfo=(nt=et.mpd,(rt=new _o).dvrWindowSize=nt.timeShiftBufferDepth,rt.loadedTime=nt.manifest.loadedTime,rt.availableFrom=nt.availabilityStartTime,rt.minBufferTime=nt.manifest.minBufferTime,rt.maxFragmentDuration=nt.maxSegmentDuration,rt.duration=tt.getDuration(nt.manifest),rt.isDynamic=tt.getIsDynamic(nt.manifest),rt.serviceDescriptions=tt.getServiceDescriptions(nt.manifest),rt.protocol=nt.manifest.protocol,rt),it.isLast=1===et.mpd.manifest.Period_asArray.length||Math.abs(it.start+it.duration-it.manifestInfo.duration)<1,it}function S(){if(!at)throw new Error("setConfig function has to be called previously")}function b(et){return rt.length>0?rt[0].mpd.manifest.Period_asArray[et]:null}function A(et,tt,nt){var rt,it,at,ot,st;if(et)for(rt=et.AdaptationSet_asArray,ot=0;ot<rt.length;ot+=1)for(at=rt[ot].Representation_asArray,st=0;st<at.length;st+=1)if(tt===(it=at[st]).id)return nt?st:it;return null}return et={getBandwidthForRepresentation:function(et,tt){var nt;return(nt=A(b(tt),et))?nt.bandwidth:null},getIndexForRepresentation:function(et,tt){return function(et,tt){var nt=A(et,tt,!0);return null!==nt?nt:-1}(b(tt),et)},getMaxIndexForBufferType:function(et,nt){return function(et,nt){var rt,it,at,ot;if(!et||!nt)return-1;for(it=et.AdaptationSet_asArray,ot=0;ot<it.length;ot+=1)if(at=(rt=it[ot]).Representation_asArray,tt.getIsTypeOf(rt,nt))return at.length;return-1}(b(nt),et)},convertRepresentationToRepresentationInfo:function(et){if(et){var nt=new yo,rt=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index],it=tt.getRepresentationFor(et.index,rt);return nt.id=et.id,nt.quality=et.index,nt.bandwidth=tt.getBandwidth(it),nt.fragmentDuration=et.segmentDuration||(et.segments&&et.segments.length>0?et.segments[0].duration:NaN),nt.MSETimeOffset=et.MSETimeOffset,nt.mediaInfo=v(et.adaptation),nt}return null},getStreamsInfo:function(et,tt){var nt=[],it=rt;if(et&&(S(),it=g(et)),it.length>0){(!tt||tt>it.length)&&(tt=it.length);for(var at=0;at<tt;at++)nt.push(T(it[at]))}return nt},getMediaInfoForType:function(et,nt){if(0===rt.length||!et)return null;var it=E(et,rt);if(!it)return null;var at=tt.getAdaptationsForPeriod(it),ot=l(et.index,nt,et);return ot?v(at[tt.getIndexForAdaptation(ot,rt[0].mpd.manifest,et.index)]):null},getAllMediaInfoForType:d,getAdaptationForType:l,getRealAdaptation:function(et,nt){var it,at,ot=E(et,rt);return it=nt?nt.id:null,rt.length>0&&ot&&(at=it?tt.getAdaptationForId(it,rt[0].mpd.manifest,ot.index):tt.getAdaptationForIndex(nt?nt.index:null,rt[0].mpd.manifest,ot.index)),at},getProducerReferenceTimes:function(et,nt){var it,at,ot=E(et,rt);return it=nt?nt.id:null,rt.length>0&&ot&&(at=it?tt.getAdaptationForId(it,rt[0].mpd.manifest,ot.index):tt.getAdaptationForIndex(nt?nt.index:null,rt[0].mpd.manifest,ot.index)),at?tt.getProducerReferenceTimesForAdaptation(at):[]},getRealPeriodByIndex:function(et){return tt.getRealPeriodForIndex(et,rt[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(et){try{return tt.getEssentialPropertiesForRepresentation(et)}catch(et){return[]}},getVoRepresentations:function(et){var nt=y(et);return tt.getRepresentationsForAdaptation(nt)},getEventsFor:function(et,nt,it){var at=[];if(rt.length>0){var ot=rt[0].mpd.manifest;if(et instanceof vo){var st=E(et,rt);at=tt.getEventsForPeriod(st)}else if(et instanceof Eo){var lt=E(it,rt);at=tt.getEventStreamForAdaptationSet(ot,y(et),lt)}else if(et instanceof yo){var ft=E(it,rt);at=tt.getEventStreamForRepresentation(ot,nt,ft)}}return at},getEvent:function(et,tt,nt,rt){try{if(!et||!tt||isNaN(nt)||!rt)return null;var it=et.scheme_id_uri,at=et.value;if(!tt[it+"/"+at])return null;var ot,st=new xn,lt=et.timescale||1,ft=rt.adaptation.period.start,dt=tt[it+"/"+at],pt=isNaN(rt.presentationTimeOffset)?isNaN(dt.presentationTimeOffset)?0:dt.presentationTimeOffset:rt.presentationTimeOffset,yt=et.presentation_time_delta/lt;ot=0===et.version?ft+nt-pt+yt:ft-pt+yt;var vt=et.event_duration/lt,At=et.id,Rt=et.message_data;return st.eventStream=dt,st.eventStream.value=at,st.eventStream.timescale=lt,st.duration=vt,st.id=At,st.calculatedPresentationTime=ot,st.messageData=Rt,st.presentationTimeDelta=yt,st}catch(et){return null}},getMpd:h,setConfig:function(et){et&&(et.constants&&(at=et.constants),et.cea608parser&&(st=et.cea608parser),et.errHandler&&tt.setConfig({errHandler:et.errHandler}),et.BASE64&&tt.setConfig({BASE64:et.BASE64}))},updatePeriods:function(et){if(!et)return null;S(),rt=g(et)},getIsTextTrack:function(et){return tt.getIsText(et)},getUTCTimingSources:function(){var et=m();return tt.getUTCTimingSources(et)},getSuggestedPresentationDelay:function(){var et=rt.length>0?rt[0].mpd:null;return tt.getSuggestedPresentationDelay(et)},getAvailabilityStartTime:function(et){var nt=h(et);return tt.getAvailabilityStartTime(nt)},getIsTypeOf:function(et,nt){return tt.getIsTypeOf(et,nt)},getIsDynamic:function(et){var nt=m(et);return tt.getIsDynamic(nt)},getDuration:function(et){var nt=m(et);return tt.getDuration(nt)},getRegularPeriods:g,getContentSteering:function(et){return tt.getContentSteering(et)},getLocation:function(et){return tt.getLocation(et)},getPatchLocation:function(et){var nt=tt.getPatchLocation(et),rt=tt.getPublishTime(et);return nt&&0!==nt.length&&rt?nt.filter((function(et){return isNaN(et.ttl)||rt.getTime()+et.ttl>(new Date).getTime()})):[]},getManifestUpdatePeriod:function(et){var nt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return tt.getManifestUpdatePeriod(et,nt)},getPublishTime:function(et){return tt.getPublishTime(et)},getIsDVB:function(et){return tt.hasProfile(et,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(et){return nt.getIsPatch(et)},getBaseURLsFromElement:function(et){return tt.getBaseURLsFromElement(et)},getRepresentationSortFunction:function(){return tt.getRepresentationSortFunction()},getCodec:function(et,nt,rt){return tt.getCodec(et,nt,rt)},getPeriodById:function(et){if(!et||0===rt.length)return null;var tt=rt.filter((function(tt){return tt.id===et}));return tt&&tt.length>0?tt[0]:null},setCurrentMediaInfo:function(et,tt,nt){it[et]=it[et]||{},it[et][tt]=it[et][tt]||{},it[et][tt]=nt},isPatchValid:function(et,rt){var it=tt.getId(et),at=nt.getMpdId(rt),ot=tt.getPublishTime(et),st=nt.getPublishTime(rt),lt=nt.getOriginalPublishTime(rt);return!!(it&&at&&it==at&&ot&&lt&&ot.getTime()==lt.getTime()&&st&&ot.getTime()<st.getTime())},applyPatchToManifest:function(et,tt){nt.getPatchOperations(tt).forEach((function(tt){var nt=tt.getMpdTarget(et);if(null!==nt){var rt=nt.name,it=nt.target,at=nt.leaf;if(tt.xpath.findsAttribute())switch(tt.action){case"add":case"replace":it[rt]=tt.value;break;case"remove":delete it[rt]}else{var ot=(it[rt+"_asArray"]||[]).indexOf(at),st="prepend"===tt.position||"before"===tt.position;if(("remove"===tt.action||"replace"===tt.action)&&(delete it[rt],-1!=ot)){var lt=it[rt+"_asArray"];lt.splice(ot,1),lt.length>1?it[rt]=lt:1==lt.length?it[rt]=lt[0]:delete it[rt+"_asArray"]}"add"!==tt.action&&"replace"!==tt.action||Object.keys(tt.value).forEach((function(et){var nt=tt.value[et],at=it[et+"_asArray"]||[];if(0===at.length&&it[et]&&at.push(it[et]),0===at.length)at=nt;else{var lt=at.length;lt=et==rt&&-1!=ot?ot+(st?0:1)+("replace"==tt.action?-1:0):st?0:at.length,at.splice.apply(at,[lt,0].concat(nt))}it[et+"_asArray"]=at,it[et]=1==at.length?at[0]:at}))}}}))},areMediaInfosEqual:c,reset:p},tt=Tr(lt).getInstance(),nt=bo(lt).getInstance(),p(),et}Wi.__dashjs_factory_name="DashAdapter";const Ao=dt.Z.getSingletonFactory(Wi);var Io=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e)}var et;return(et=[{key:"round10",value:function(et,tt){return function(et,tt,nt){return void 0===nt||0==+nt?Math[et](tt):(nt=+nt,null===(tt=+tt)||isNaN(tt)||"number"!=typeof nt||nt%1!=0?NaN:(tt=tt.toString().split("e"),+((tt=(tt=Math[et](+(tt[0]+"e"+(tt[1]?+tt[1]-nt:-nt)))).toString().split("e"))[0]+"e"+(tt[1]?+tt[1]+nt:nt))))}("round",et,tt)}}])&&function Qi(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e,et),e}();const Ro=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]},wo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null},No=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.level=null},Co=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=null,this.state=st.Z.BUFFER_EMPTY},Do=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.range=null,this.manifestInfo=null},Oo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.droppedFrames=null};function aa(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}var Mo=function e(){aa(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},Po=function e(){aa(this,e),this.id=null,this.index=null,this.start=null,this.duration=null},Lo=function e(){aa(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};const xo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null},Fo=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadingRequests=[],this.executedRequests=[]};function fa(et){var tt,nt,rt=(et=et||{}).settings,it=this.context,ot=(0,lt.Z)(it).getInstance();function c(){ot.trigger(ft.Z.METRICS_CHANGED)}function f(et){ot.trigger(ft.Z.METRIC_CHANGED,{mediaType:et}),c()}function d(et,tt,nt){ot.trigger(ft.Z.METRIC_UPDATED,{mediaType:et,metric:tt,value:nt}),f(et)}function g(et,tt,nt){ot.trigger(ft.Z.METRIC_ADDED,{mediaType:et,metric:tt,value:nt}),f(et)}function h(et,tt){var rt=null;return et?(nt.hasOwnProperty(et)?rt=nt[et]:tt||(rt=new Ro,nt[et]=rt),rt):rt}function p(et,tt,nt){var it=h(et);null!==it&&(it[tt].push(nt),it[tt].length>rt.get().streaming.metrics.maxListDepth&&it[tt].shift())}function m(et,tt,nt){p(et,tt,nt),g(et,tt,nt)}return tt={clearCurrentMetricsForType:function(et){delete nt[et],f(et)},clearAllCurrentMetrics:function(){nt={},c()},getMetricsFor:h,addHttpRequest:function e(et,tt,nt,rt,it,at,ot,lt,ft,dt,pt,yt,vt,At,Rt,Nt,Dt){var Ot=new Ut.w;at&&at!==rt&&(e(et,null,nt,rt,it,null,null,lt,ft,null,null,null,vt,null,null,Nt,Dt),Ot.actualurl=at),Ot.tcpid=tt,Ot.type=nt,Ot.url=rt,Ot.range=lt,Ot.trequest=ft,Ot.tresponse=dt,Ot.responsecode=yt,Ot.cmsd=Dt,Ot._tfinish=pt,Ot._stream=et,Ot._mediaduration=vt,Ot._quality=it,Ot._responseHeaders=At,Ot._serviceLocation=ot,Ot._fileLoaderType=Nt,Rt?Rt.forEach((function(et){!function(et,tt,nt,rt){var it=new Ut.O;it.s=tt,it.d=nt,it.b=rt,et.trace.push(it),et.interval||(et.interval=0),et.interval+=nt}(Ot,et.s,et.d,et.b)})):(delete Ot.interval,delete Ot.trace),m(et,st.Z.HTTP_REQUEST,Ot)},addRepresentationSwitch:function(et,tt,nt,rt,it){var at=new wo;at.t=tt,at.mt=nt,at.to=rt,it?at.lto=it:delete at.lto,m(et,st.Z.TRACK_SWITCH,at)},addBufferLevel:function(et,tt,nt){var rt=new No;rt.t=tt,rt.level=nt,m(et,st.Z.BUFFER_LEVEL,rt)},addBufferState:function(et,tt,nt){var rt=new Co;rt.target=nt,rt.state=tt,m(et,st.Z.BUFFER_STATE,rt)},addDVRInfo:function(et,tt,nt,rt){var it=new Do;it.time=tt,it.range=rt,it.manifestInfo=nt,m(et,st.Z.DVR_INFO,it)},addDroppedFrames:function(et,tt){var nt=new Oo,rt=h(et).DroppedFrames;tt&&(nt.time=tt.creationTime,nt.droppedFrames=tt.droppedVideoFrames,rt.length>0&&rt[rt.length-1]==nt||m(et,st.Z.DROPPED_FRAMES,nt))},addSchedulingInfo:function(et,tt,nt,rt,it,at,ot,lt,ft){var dt=new xo;dt.mediaType=et,dt.t=tt,dt.type=nt,dt.startTime=rt,dt.availabilityStartTime=it,dt.duration=at,dt.quality=ot,dt.range=lt,dt.state=ft,m(et,st.Z.SCHEDULING_INFO,dt)},addRequestsQueue:function(et,tt,nt){var rt=new Fo;rt.loadingRequests=tt,rt.executedRequests=nt,h(et).RequestsQueue=rt,g(et,st.Z.REQUESTS_QUEUE,rt)},addManifestUpdate:function(et,tt,nt,rt,it,ot,lt,ft,dt,pt){var yt=new Mo;yt.mediaType=et,yt.type=tt,yt.requestTime=nt,yt.fetchTime=rt,yt.availabilityStartTime=it,yt.presentationStartTime=ot,yt.clientTimeOffset=lt,yt.currentTime=ft,yt.buffered=dt,yt.latency=pt,p(at.Z.STREAM,st.Z.MANIFEST_UPDATE,yt),g(et,st.Z.MANIFEST_UPDATE,yt)},updateManifestUpdateInfo:function(et,tt){if(et){for(var nt in tt)et[nt]=tt[nt];d(et.mediaType,st.Z.MANIFEST_UPDATE,et)}},addManifestUpdateStreamInfo:function(et,tt,nt,rt,it){if(et){var at=new Po;at.id=tt,at.index=nt,at.start=rt,at.duration=it,et.streamInfo.push(at),d(et.mediaType,st.Z.MANIFEST_UPDATE_STREAM_INFO,et)}},addManifestUpdateRepresentationInfo:function(et,tt,nt,rt,it,at,ot,lt){if(et&&et.representationInfo){var ft=new Lo;ft.id=tt,ft.index=nt,ft.streamIndex=rt,ft.mediaType=it,ft.startNumber=ot,ft.fragmentInfoType=lt,ft.presentationTimeOffset=at,et.representationInfo.push(ft),d(et.mediaType,st.Z.MANIFEST_UPDATE_TRACK_INFO,et)}},addPlayList:function(et){et.trace&&Array.isArray(et.trace)?et.trace.forEach((function(et){et.hasOwnProperty("subreplevel")&&!et.subreplevel&&delete et.subreplevel})):delete et.trace,m(at.Z.STREAM,st.Z.PLAY_LIST,et)},addDVBErrors:function(et){m(at.Z.STREAM,st.Z.DVB_ERRORS,et)}},nt={},tt}fa.__dashjs_factory_name="MetricsModel";const ko=dt.Z.getSingletonFactory(fa);function ga(et){et=et||{};var tt,nt,rt,it,ot=this.context,lt=et.metricsModel;function l(et){var tt=lt.getMetricsFor(et,!0);if(!tt)return null;var nt,rt=tt.HttpList,it=null;if(!rt||rt.length<=0)return null;for(nt=rt.length-1;nt>=0;){if(rt[nt].responsecode){it=rt[nt];break}nt--}return it}function c(et){var tt=lt.getMetricsFor(et,!0);return tt&&tt.HttpList?tt.HttpList:[]}function f(et,tt){if(!et)return null;var nt=et[tt];return nt&&0!==nt.length?nt[nt.length-1]:null}return tt={getCurrentRepresentationSwitch:function(et){return f(lt.getMetricsFor(et,!0),st.Z.TRACK_SWITCH)},getCurrentBufferState:function(et){return f(lt.getMetricsFor(et,!0),st.Z.BUFFER_STATE)},getCurrentBufferLevel:function(et){var tt=f(lt.getMetricsFor(et,!0),st.Z.BUFFER_LEVEL);return tt?Io.round10(tt.level/1e3,-3):0},getCurrentHttpRequest:l,getHttpRequests:c,getCurrentDroppedFrames:function(){return f(lt.getMetricsFor(at.Z.VIDEO,!0),st.Z.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(et){return f(lt.getMetricsFor(et,!0),st.Z.SCHEDULING_INFO)},getCurrentDVRInfo:function(et){return f(et?lt.getMetricsFor(et,!0):lt.getMetricsFor(at.Z.VIDEO,!0)||lt.getMetricsFor(at.Z.AUDIO,!0),st.Z.DVR_INFO)},getCurrentManifestUpdate:function(){return f(lt.getMetricsFor(at.Z.STREAM),st.Z.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(et,tt){if(!tt)return null;var nt={},rt=l(et);rt&&(nt=wr.Z.parseHttpHeaders(rt._responseHeaders));var it=nt[tt.toLowerCase()];return void 0===it?null:it},getLatestMPDRequestHeaderValueByID:function(et){if(!et)return null;var tt,nt,rt,it={};for(rt=(tt=c(at.Z.STREAM)).length-1;rt>=0;rt--)if((nt=tt[rt]).type===Ut.w.MPD_TYPE){it=wr.Z.parseHttpHeaders(nt._responseHeaders);break}var ot=it[et.toLowerCase()];return void 0===ot?null:ot},addRepresentationSwitch:function(et,tt,nt,rt,it){lt.addRepresentationSwitch(et,tt,nt,rt,it)},addDVRInfo:function(et,tt,nt,rt){lt.addDVRInfo(et,tt,nt,rt)},updateManifestUpdateInfo:function(et){var tt=this.getCurrentManifestUpdate();lt.updateManifestUpdateInfo(tt,et)},addManifestUpdateStreamInfo:function(et){if(et){var tt=this.getCurrentManifestUpdate();lt.addManifestUpdateStreamInfo(tt,et.id,et.index,et.start,et.duration)}},addManifestUpdateRepresentationInfo:function(et,tt){if(et){var nt=this.getCurrentManifestUpdate();lt.addManifestUpdateRepresentationInfo(nt,et.id,et.index,et.streamIndex,tt,et.presentationTimeOffset,et.startNumber,et.fragmentInfoType)}},addManifestUpdate:function(et){lt.addManifestUpdate(at.Z.STREAM,et.type,et.requestStartDate,et.requestEndDate)},addHttpRequest:function(et,tt,nt,rt,it,at){lt.addHttpRequest(et.mediaType,null,et.type,et.url,et.quality,tt,et.serviceLocation||null,et.range||null,et.requestStartDate,et.firstByteDate,et.requestEndDate,nt,et.duration,rt,it,et.fileLoaderType,at)},addSchedulingInfo:function(et,tt){lt.addSchedulingInfo(et.mediaType,new Date,et.type,et.startTime,et.availabilityStartTime,et.duration,et.quality,et.range,tt)},addRequestsQueue:function(et,tt,nt){lt.addRequestsQueue(et,tt,nt)},addBufferLevel:function(et,tt,nt){lt.addBufferLevel(et,tt,nt)},addBufferState:function(et,tt,nt){lt.addBufferState(et,tt,nt)},addDroppedFrames:function(et){lt.addDroppedFrames(at.Z.VIDEO,et)},addPlayList:function(){it&&(lt.addPlayList(it),it=null)},addDVBErrors:function(et){lt.addDVBErrors(et)},createPlaylistMetrics:function(et,tt){(it=new dn).start=new Date,it.mstart=et,it.starttype=tt},createPlaylistTraceMetrics:function(et,tt,it){!0===nt&&(nt=!1,(rt=new gn).representationid=et,rt.start=new Date,rt.mstart=tt,rt.playbackspeed=null!==it?it.toString():null)},updatePlayListTraceMetrics:function(et){if(rt)for(var tt in rt)rt[tt]=et[tt]},pushPlayListTraceMetrics:function(et,tt){if(!1===nt&&it&&rt&&rt.start){var at=rt.start,ot=et.getTime()-at.getTime();rt.duration=ot,rt.stopreason=tt,it.trace.push(rt),nt=!0}},clearAllCurrentMetrics:function(){lt.clearAllCurrentMetrics()}},lt=lt||ko(ot).getInstance({settings:et.settings}),nt=!0,rt=null,it=null,tt}ga.__dashjs_factory_name="DashMetrics";const Uo=dt.Z.getSingletonFactory(ga);function pa(){var et,tt,nt,rt,it=this.context,st=(0,lt.Z)(it).getInstance(),dt=(0,kt.Z)(it).getInstance();function f(et){rt=et}function g(et,tt,nt,rt){var it,at=tt.adaptation.period.mpd,ot=at.availabilityStartTime;if(rt)it=nt&&at.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(ot.getTime()+1e3*(et+at.timeShiftBufferDepth)):at.availabilityEndTime;else if(nt){var st=tt.availabilityTimeOffset;it=new Date(ot.getTime()+1e3*(et-st))}else it=ot;return it}function h(et,tt){return(et.getTime()-tt.mpd.availabilityStartTime.getTime()+1e3*rt)/1e3}function p(et,tt){return et+(tt.adaptation.period.start-tt.presentationTimeOffset)}function m(et){var nt={start:NaN,end:NaN},rt=et[0].getAdapter().getRegularPeriods()[0],it=h(new Date,rt);if(!et||0===et.length)return{range:nt,now:it};et.forEach((function(et){var rt=et.getAdapter(),st=rt.getMediaInfoForType(et.getStreamInfo(),at.Z.VIDEO)||rt.getMediaInfoForType(et.getStreamInfo(),at.Z.AUDIO),lt=rt.getVoRepresentations(st)[0],ft={start:NaN,end:NaN};if(lt)if(lt.segmentInfoType===ot.Z.SEGMENT_TIMELINE)ft=function(et){var nt,rt,it,at,ot=et.adaptation.period.mpd.manifest.Period_asArray[et.adaptation.period.index].AdaptationSet_asArray[et.adaptation.index],st=tt.getRepresentationFor(et.index,ot),lt=st.SegmentTemplate.SegmentTimeline,ft=st.SegmentTemplate.timescale,dt=lt.S_asArray,pt={start:0,end:0},yt=dt[0].t,vt=!isNaN(yt),At=vt?yt:0,Rt=0;for(vt&&(pt.start=p(At/ft,et)),it=0,at=dt.length;it<at;it++)rt=0,(nt=dt[it]).hasOwnProperty("r")&&(rt=nt.r),Rt+=nt.d*(1+rt);return pt.end=p((At+Rt)/ft,et),pt}(lt);else{var dt=lt.adaptation.period;ft.start=dt.start,ft.end=Math.max(it,dt.start+dt.duration)}!isNaN(ft.start)&&(isNaN(nt.start)||nt.start>ft.start)&&(nt.start=ft.start),!isNaN(ft.end)&&(isNaN(nt.end)||nt.end<ft.end)&&(nt.end=ft.end)})),nt.end=Math.min(it,nt.end);var st=E(et,nt.end,!0);return nt.end=isNaN(st)?nt.end:st,nt.start=rt&&rt.mpd&&rt.mpd.timeShiftBufferDepth&&!isNaN(rt.mpd.timeShiftBufferDepth)&&!isNaN(nt.end)?Math.max(nt.end-rt.mpd.timeShiftBufferDepth,nt.start):nt.start,nt.start=E(et,nt.start),{range:nt,now:it}}function y(et,tt){nt=et-tt.end}function E(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(var rt=0,it=!1,at=NaN;!it&&rt<et.length;){var ot=et[rt].getStreamInfo();ot.start<=tt&&(!isFinite(ot.duration)||ot.start+ot.duration>=tt)?(at=tt,it=!0):!nt&&ot.start>tt&&(isNaN(at)||ot.start<at)?at=ot.start:nt&&ot.start+ot.duration<tt&&(isNaN(at)||ot.start+ot.duration>at)&&(at=ot.start+ot.duration),rt+=1}return at}catch(et){return tt}}function v(et){void 0===et.offset||isNaN(et.offset)||f(et.offset/1e3)}function _(){rt=0,nt=0}function T(){st.off(ft.Z.UPDATE_TIME_SYNC_OFFSET,v,this),_()}return et={initialize:function(){_(),st.on(ft.Z.UPDATE_TIME_SYNC_OFFSET,v,this)},getClientTimeOffset:function(){return rt},setClientTimeOffset:f,getClientReferenceTime:function(){return Date.now()-1e3*nt+1e3*rt},calcAvailabilityStartTimeFromPresentationTime:function(et,tt,nt){return g(et,tt,nt)},calcAvailabilityEndTimeFromPresentationTime:function(et,tt,nt){return g(et,tt,nt,!0)},calcPresentationTimeFromWallTime:h,calcPresentationTimeFromMediaTime:p,calcPeriodRelativeTimeFromMpdRelativeTime:function(et,tt){return tt-et.adaptation.period.start},calcMediaTimeFromPresentationTime:function(et,tt){return et-tt.adaptation.period.start+tt.presentationTimeOffset},calcWallTimeForSegment:function(et,tt){var nt,rt,it;return tt&&(nt=et.representation.adaptation.period.mpd.suggestedPresentationDelay,rt=et.presentationStartTime+nt,it=new Date(et.availabilityStartTime.getTime()+1e3*rt)),it},calcTimeShiftBufferWindow:function(et,tt){if(!tt)return function(et){var tt={start:NaN,end:NaN},nt=0,rt=NaN;return et.forEach((function(et){var tt=et.getStreamInfo();nt+=tt.duration,(isNaN(rt)||tt.start<rt)&&(rt=tt.start)})),tt.start=rt,tt.end=rt+nt,tt}(et);if(dt.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var nt=m(et);return y(nt.now,nt.range),nt.range}return function(et){var tt={start:NaN,end:NaN};if(!et||0===et.length)return tt;var nt=et[0].getAdapter().getRegularPeriods()[0],rt=h(new Date,nt),it=nt.mpd.timeShiftBufferDepth,at=isNaN(it)?0:rt-it;if(tt.start=E(et,at),tt.end=!isNaN(tt.start)&&rt<tt.start?rt:E(et,rt,!0),!isNaN(it)&&tt.end<rt-it&&(tt.end=NaN),dt.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){var ot=m(et);if(ot.range.end<tt.start)return st.trigger(yt.Z.CONFORMANCE_VIOLATION,{level:Di.LEVELS.WARNING,event:Di.EVENTS.INVALID_DVR_WINDOW}),y(ot.now,ot.range),ot.range}return tt}(et)},reset:T},tt=Tr(it).getInstance(),T(),et}pa.__dashjs_factory_name="TimelineConverter";const Zo=dt.Z.getSingletonFactory(pa);var Bo=nt(4593),Go=nt(6934);function va(et){return(va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function _a(et,tt){return(_a=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function Ta(et,tt){return!tt||"object"!==va(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function Sa(et){return(Sa=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const qo=function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&_a(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=Sa(tt);if(nt){var it=Sa(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return Ta(this,et)});function i(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(et=rt.call(this)).captionData=null,et.label=null,et.defaultTrack=!1,et.kind=null,et.isFragmented=!1,et.isEmbedded=!1,et.isTTML=null,et}return i}(Eo);var Yo=nt(2295);function Ia(){var et=0;function t(et){for(var tt="",nt=0;nt<et.length;++nt)tt+=et[nt].uchar;return tt.length-tt.replace(/^\s+/,"").length}function n(et){return"left: "+3.125*et.x+"%; top: "+6.66*et.y1+"%; width: "+(100-3.125*et.x)+"%; height: "+6.66*Math.max(et.y2-1-et.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function r(et){return"red"===et?"rgb(255, 0, 0)":"green"===et?"rgb(0, 255, 0)":"blue"===et?"rgb(0, 0, 255)":"cyan"===et?"rgb(0, 255, 255)":"magenta"===et?"rgb(255, 0, 255)":"yellow"===et?"rgb(255, 255, 0)":"white"===et?"rgb(255, 255, 255)":"black"===et?"rgb(0, 0, 0)":et}function i(et,tt){var nt=et.videoHeight/15;return tt?"font-size: "+nt+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(tt.foreground?r(tt.foreground):"rgb(255, 255, 255)")+"; font-style: "+(tt.italics?"italic":"normal")+"; text-decoration: "+(tt.underline?"underline":"none")+"; white-space: pre; background-color: "+(tt.background?r(tt.background):"transparent")+";":"font-size: "+nt+"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 a(et){return et.replace(/^\s+/g,"")}function o(et){return et.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(tt,nt,rt,it){var at,ot,st=null,lt=!1,ft=-1,dt={start:nt,end:rt,spans:[]},pt="style_cea608_white_black",yt={},vt={},At=[];for(at=0;at<15;++at){var Rt=it.rows[at],Nt="",Dt=null;if(!1===Rt.isEmpty()){var Ot=t(Rt.chars);null===st&&(st={x:Ot,y1:at,y2:at+1,p:[]}),Ot!==ft&&lt&&(st.p.push(dt),dt={start:nt,end:rt,spans:[]},st.y2=at,st.name="region_"+st.x+"_"+st.y1+"_"+st.y2,!1===yt.hasOwnProperty(st.name)?(At.push(st),yt[st.name]=st):yt[st.name].p.contat(st.p),st={x:Ot,y1:at,y2:at+1,p:[]});for(var Mt=0;Mt<Rt.chars.length;++Mt){var Lt=Rt.chars[Mt],xt=Lt.penState;if(null===Dt||!xt.equals(Dt)){Nt.trim().length>0&&(dt.spans.push({name:pt,line:Nt,row:at}),Nt="");var kt="style_cea608_"+xt.foreground+"_"+xt.background;xt.underline&&(kt+="_underline"),xt.italics&&(kt+="_italics"),vt.hasOwnProperty(kt)||(vt[kt]=JSON.parse(JSON.stringify(xt))),Dt=xt,pt=kt}Nt+=Lt.uchar}Nt.trim().length>0&&dt.spans.push({name:pt,line:Nt,row:at}),lt=!0,ft=Ot}else lt=!1,ft=-1,st&&(st.p.push(dt),dt={start:nt,end:rt,spans:[]},st.y2=at,st.name="region_"+st.x+"_"+st.y1+"_"+st.y2,!1===yt.hasOwnProperty(st.name)?(At.push(st),yt[st.name]=st):yt[st.name].p.contat(st.p),st=null)}st&&(st.p.push(dt),st.y2=at+1,st.name="region_"+st.x+"_"+st.y1+"_"+st.y2,!1===yt.hasOwnProperty(st.name)?(At.push(st),yt[st.name]=st):yt[st.name].p.contat(st.p),st=null);var Ut=[];for(at=0;at<At.length;++at){var Bt=At[at],Gt="sub_cea608_"+et++,qt=document.createElement("div");qt.id=Gt;var jt=n(Bt);qt.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+jt;var Vt=document.createElement("div");Vt.className="paragraph bodyStyle",Vt.style.cssText=i(tt);var zt=document.createElement("div");zt.className="cueUniWrapper",zt.style.cssText="unicode-bidi: normal; direction: ltr;";for(var Xt=0;Xt<Bt.p.length;++Xt){var Qt=Bt.p[Xt],$t=0;for(ot=0;ot<Qt.spans.length;++ot){var tn=Qt.spans[ot];if(tn.line.length>0){if(0!==ot&&$t!=tn.row){var nn=document.createElement("br");nn.className="lineBreak",zt.appendChild(nn)}var on=!1;$t===tn.row&&(on=!0),$t=tn.row;var un=vt[tn.name],cn=document.createElement("span");cn.className="spanPadding "+tn.name+" customSpanColor",cn.style.cssText=i(tt,un),0!==ot&&on?ot===Qt.spans.length-1?cn.textContent=o(tn.line):cn.textContent=tn.line:Qt.spans.length>1&&ot<Qt.spans.length-1&&tn.row===Qt.spans[ot+1].row?cn.textContent=a(tn.line):cn.textContent=tn.line.trim(),zt.appendChild(cn)}}}Vt.appendChild(zt),qt.appendChild(Vt);var fn={bodyStyle:["%",90]};for(var dn in vt)vt.hasOwnProperty(dn)&&(fn[dn]=["%",90]);Ut.push({type:"html",start:nt,end:rt,cueHTMLElement:qt,cueID:Gt,cellResolution:[32,15],isFromCEA608:!0,fontSize:fn,lineHeight:{},linePadding:{}})}return Ut}}}Ia.__dashjs_factory_name="EmbeddedTextHtmlRender";const jo=dt.Z.getSingletonFactory(Ia);function wa(et){var tt,nt,rt,ot,st,dt,yt,vt,At,Rt,Nt,Dt,Ot,Mt,kt,Bt,Gt=et.errHandler,qt=et.manifestModel,jt=et.mediaController,Vt=et.videoModel,zt=et.textTracks,Xt=et.vttParser,Qt=et.vttCustomRenderingParser,$t=et.ttmlParser,tn=et.streamInfo,nn=et.settings,on=this.context,un=(0,lt.Z)(on).getInstance(),cn=!1;function U(){dt=null,vt=NaN,At=[],Rt=null,yt=!1,st=[],ot=null}function Z(et){var tt=new qo;for(var nt in et)tt[nt]=et[nt];tt.labels=et.labels,tt.defaultTrack=function(et){var tt=!1;return Dt.length>1&&et.isEmbedded?tt=et.id&&et.id===at.Z.CC1:1===Dt.length?et.id&&"string"==typeof et.id&&"CC"===et.id.substring(0,2)&&(tt=!0):0===Dt.length&&(tt=et.index===st[0].index),tt}(et),tt.isFragmented=et.isFragmented,tt.isEmbedded=!!et.isEmbedded,tt.isTTML=function(et){return et.codec&&et.codec.search(at.Z.STPP)>=0||et.mimeType&&et.mimeType.search(at.Z.TTML)>=0}(et),tt.kind=function(et,tt){var nt=et.roles&&et.roles.length>0?tt[et.roles[0]]:tt.caption;return nt===tt.caption||nt===tt.subtitle?nt:tt.caption}(et,{subtitle:"subtitles",caption:"captions"}),zt.addTextTrack(tt)}function B(et){var tt=et.chunk;tt.mediaInfo.embeddedCaptions&&q(tt.bytes,tt)}function G(et){Nt=et}function q(et,st){var lt=st.mediaInfo,ft=lt.type,pt=lt.mimeType,At=lt.codec||pt;At?-1!==lt.codec.indexOf("application/mp4")?function(et,it,st){var lt;if("InitializationSegment"===it.segmentType)yt=!0,vt=rt.getMediaTimescaleFromMoov(et);else{if(!yt)return;(lt=rt.getSamplesInfo(et).sampleList).length>0&&(Rt=lt[0].cts-it.start*vt),st.search(at.Z.STPP)>=0?function(et,rt,it){var st,lt;for(ot=null!==ot?ot:H(it),st=0;st<rt.length;st++){var ft=rt[st],pt=ft.cts,yt=j(),At=yt+pt/vt,Rt=At+ft.duration/vt;tt.buffered.add(At,Rt);var Dt=new DataView(et,ft.offset,ft.subSizes[0]),Ot=Go.Utils.dataViewToString(Dt,at.Z.UTF8),Mt=[],Lt=ft.offset+ft.subSizes[0];for(lt=1;lt<ft.subSizes.length;lt++){var xt=new Uint8Array(et,Lt,ft.subSizes[lt]),kt=String.fromCharCode.apply(null,xt);Mt.push(kt),Lt+=ft.subSizes[lt]}try{var Ut=qt.getValue().ttmlTimeIsRelative?pt/vt:0,Bt=ot.parse(Ot,Ut,pt/vt,(pt+ft.duration)/vt,Mt);zt.addCaptions(Nt,yt,Bt)}catch(et){dt.removeExecutedRequestsBeforeTime(),this.remove(),nt.error("TTML parser error: "+et.message)}}}(et,lt,st):function(et,rt){var it,at,ot,st=[];for(it=0;it<rt.length;it++){var lt=rt[it];lt.cts-=Rt;var ft=j()+lt.cts/vt,dt=ft+lt.duration/vt;tt.buffered.add(ft,dt);var pt=et.slice(lt.offset,lt.offset+lt.size),yt=Go.parseBuffer(pt);for(at=0;at<yt.boxes.length;at++){var At=yt.boxes[at];if(nt.debug("VTT box1: "+At.type),"vtte"!==At.type&&"vttc"===At.type){nt.debug("VTT vttc boxes.length = "+At.boxes.length);var Dt={styles:{}};for(ot=0;ot<At.boxes.length;ot++){var Ot=At.boxes[ot];if(nt.debug("VTT box2: "+Ot.type),"payl"===Ot.type)Dt.start=lt.cts/vt,Dt.end=(lt.cts+lt.duration)/vt,Dt.data=Ot.cue_text;else if("sttg"===Ot.type&&Ot.settings&&""!==Ot.settings)try{var Mt=Ot.settings.split(" ");Dt.styles=Xt.getCaptionStyles(Mt)}catch(et){}}Dt&&Dt.data&&(st.push(Dt),nt.debug("VTT ".concat(Dt.start," - ").concat(Dt.end," : ").concat(Dt.data)))}}}st.length>0&&zt.addCaptions(Nt,0,st)}(et,lt)}}(et,st,At):ft===at.Z.VIDEO?function(et,tt){var at,ot;if(tt.segmentType===Ut.w.INIT_SEGMENT_TYPE)0===Ot&&(Ot=rt.getMediaTimescaleFromMoov(et));else if(tt.segmentType===Ut.w.MEDIA_SEGMENT_TYPE){if(0===Ot)return void nt.warn("CEA-608: No timescale for embeddedTextTrack yet");var st=(ot=rt.getSamplesInfo(et)).lastSequenceNumber;if(kt[0]||kt[1]||function(){for(var et,tt=0;tt<Dt.length;tt++){if(-1===(et=zt.getTrackIdxForId(Dt[tt].id)))return void nt.warn("CEA-608: data before track is ready.");var rt=Y(et);kt[tt]=new(it().Cea608Parser)(tt+1,{newCue:rt},null)}}(),Ot){if(null!==Mt&&st!==Mt+ot.numSequences)for(at=0;at<kt.length;at++)kt[at]&&kt[at].reset();for(var lt=function(et,tt){if(0===tt.length)return null;for(var nt={splits:[],fields:[[],[]]},rt=new DataView(et),at=0;at<tt.length;at++)for(var ot=tt[at],st=it().findCea608Nalus(rt,ot.offset,ot.size),lt=null,ft=0,dt=0;dt<st.length;dt++)for(var pt=it().extractCea608DataFromRange(rt,st[dt]),yt=0;yt<2;yt++)if(pt[yt].length>0){ot.cts!==lt?ft=0:ft+=1;var vt=j();nt.fields[yt].push([ot.cts+vt*Ot,pt[yt],ft]),lt=ot.cts}return nt.fields.forEach((function(et){et.sort((function(et,tt){return et[0]===tt[0]?et[2]-tt[2]:et[0]-tt[0]}))})),nt}(et,ot.sampleList),ft=0;ft<kt.length;ft++){var dt=lt.fields[ft],pt=kt[ft];if(pt)for(at=0;at<dt.length;at++)pt.addData(dt[at][0]/Ot,dt[at][1])}Mt=st}}}(et,st):function(et,nt,rt){var it,ot,st=new DataView(et,0,et.byteLength);ot=Go.Utils.dataViewToString(st,at.Z.UTF8);try{it=H(rt).parse(ot,0),zt.addCaptions(zt.getCurrentTrackIdx(),0,it),tt.buffered&&tt.buffered.add(nt.start,nt.end)}catch(et){Gt.error(new Lt.Z(xt.TIMED_TEXT_ERROR_ID_PARSE_CODE,xt.TIMED_TEXT_ERROR_MESSAGE_PARSE+et.message,ot))}}(et,st,At):nt.error("No text type defined")}function Y(et){return function(tt,nt,rt){var it;(it=Vt.getTTMLRenderingDiv()?Bt.createHTMLCaptionsFromScreen(Vt.getElement(),tt,nt,rt):[{start:tt,end:nt,data:rt.getDisplayText(),styles:{}}])&&zt.addCaptions(et,0,it)}}function j(){return isNaN(tt.timestampOffset)?0:tt.timestampOffset}function H(et){var tt;return et.search(at.Z.VTT)>=0?tt=nn.get().streaming.text.webvtt.customRenderingEnabled&&Qt?Qt:Xt:(et.search(at.Z.TTML)>=0||et.search(at.Z.STPP)>=0)&&(tt=$t),tt}function V(et){Dt.forEach((function(tt){var nt=zt.getTrackIdxForId(tt.id);nt>=0&&zt.deleteCuesFromTrackIdx(nt,et.from,et.to)}))}return tt={initialize:function(){cn||(Dt=[],Nt=null,Ot=0,kt=[],Mt=null,cn=!0,Bt=jo(on).getInstance(),un.on(ft.Z.VIDEO_CHUNK_RECEIVED,B,tt),un.on(ft.Z.BUFFER_CLEARED,V,tt))},addMediaInfos:function(et,nt,rt){if(st=st.concat(nt),et===at.Z.TEXT&&nt[0].isFragmented&&!nt[0].isEmbedded){dt=rt,tt.buffered=(0,Yo.Z)(on).create(),At=jt.getTracksFor(at.Z.TEXT,tn.id).filter((function(et){return et.isFragmented}));for(var it=jt.getCurrentTrackFor(at.Z.TEXT,tn.id),ot=0;ot<At.length;ot++)if(At[ot]===it){G(ot);break}}for(var lt=0;lt<nt.length;lt++)Z(nt[lt])},resetMediaInfos:function(){st=[]},getStreamId:function(){return tn.id},append:q,abort:function(){},addEmbeddedTrack:function(et){if(cn&&et)if(et.id===at.Z.CC1||et.id===at.Z.CC3){for(var tt=0;tt<Dt.length;tt++)if(Dt[tt].id===et.id)return;Dt.push(et)}else nt.warn("Embedded track "+et.id+" not supported!")},resetEmbedded:function(){un.off(ft.Z.VIDEO_CHUNK_RECEIVED,B,tt),un.off(ft.Z.BUFFER_CLEARED,V,tt),zt&&zt.deleteAllTextTracks(),cn=!1,Dt=[],kt=[null,null],Mt=null},getConfig:function(){return{fragmentModel:dt,fragmentedTracks:At,videoModel:Vt}},setCurrentFragmentedTrackIdx:G,remove:function(et,nt){void 0===et&&et===nt&&(et=tt.buffered.start(0),nt=tt.buffered.end(tt.buffered.length-1)),tt.buffered.remove(et,nt),zt.deleteCuesFromTrackIdx(Nt,et,nt)},reset:function(){U(),st=[],rt=null}},nt=(0,pt.Z)(on).getInstance().getLogger(tt),rt=(0,hi.Z)(on).getInstance(),U(),tt}wa.__dashjs_factory_name="TextSourceBuffer";const Ho=dt.Z.getClassFactory(wa);var Vo=nt(4403);function Da(et,tt){(null==tt||tt>et.length)&&(tt=et.length);for(var nt=0,rt=new Array(tt);nt<tt;nt++)rt[nt]=et[nt];return rt}var Ko=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function Ma(et){var tt,nt,rt,it,ot,st,dt,vt,At,Rt,Nt,Dt,Ot,Mt,Lt,xt,kt,Ut,Bt=this.context,Gt=(0,lt.Z)(Bt).getInstance(),qt=et.videoModel,jt=et.streamInfo,Vt=et.settings;function C(et,tt,nt,rt,it,at){var ot=0,st=0;et/tt>nt/rt?ot=(st=tt)/rt*nt:st=(ot=et)/nt*rt;var lt,ft,dt=0,pt=0;return ot/st>it?(pt=st,dt=st*it):(dt=ot,pt=ot/it),lt=(et-dt)/2,ft=(tt-pt)/2,at?{x:lt+.1*dt,y:ft+.1*pt,w:.8*dt,h:.8*pt}:{x:lt,y:ft,w:dt,h:pt}}function D(et,tt){var nt=qt.getClientWidth(),rt=qt.getClientHeight(),it=qt.getVideoWidth(),at=qt.getVideoHeight(),ot=qt.getVideoRelativeOffsetTop(),st=qt.getVideoRelativeOffsetLeft();if(0!==it&&0!==at){var lt=it/at,ft=!1;et.isFromCEA608&&(lt=3.5/3,ft=!0);var pt=C.call(this,nt,rt,it,at,lt,ft),Dt=pt.w,Ot=pt.h,xt=pt.x,Ut=pt.y;if(Dt!=At||Ot!=Rt||xt!=dt||Ut!=vt||tt){if(dt=xt+st,vt=Ut+ot,At=Dt,Rt=Ot,Nt){var Bt=Nt.style;Bt&&(Bt.left=dt+"px",Bt.top=vt+"px",Bt.width=At+"px",Bt.height=Rt+"px",Bt.zIndex=Mt&&document[Mt]||Lt?kt:null,Gt.trigger(yt.Z.CAPTION_CONTAINER_RESIZE))}var jt=et.activeCues;if(jt)for(var Vt=jt.length,zt=0;zt<Vt;++zt){var Xt=jt[zt];Xt.scaleCue(Xt)}}}}function O(et){var tt,nt,rt,it,at,ot=At,st=Rt;if(et.cellResolution){var lt=[ot/et.cellResolution[0],st/et.cellResolution[1]];if(et.linePadding)for(tt in et.linePadding)if(et.linePadding.hasOwnProperty(tt)){nt=(et.linePadding[tt]*lt[0]).toString();for(var ft=document.getElementsByClassName("spanPadding"),dt=0;dt<ft.length;dt++)ft[dt].style.cssText=ft[dt].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+nt),ft[dt].style.cssText=ft[dt].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+nt)}if(et.fontSize){for(tt in et.fontSize)if(et.fontSize.hasOwnProperty(tt)){"%"===et.fontSize[tt][0]?rt=et.fontSize[tt][1]/100:"c"===et.fontSize[tt][0]&&(rt=et.fontSize[tt][1]),nt=(rt*lt[1]).toString(),at="defaultFontSize"!==tt?document.getElementsByClassName(tt):document.getElementsByClassName("paragraph");for(var pt=0;pt<at.length;pt++)at[pt].style.cssText=at[pt].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+nt)}if(et.lineHeight)for(tt in et.lineHeight)if(et.lineHeight.hasOwnProperty(tt)){"%"===et.lineHeight[tt][0]?it=et.lineHeight[tt][1]/100:"c"===et.fontSize[tt][0]&&(it=et.lineHeight[tt][1]),nt=(it*lt[1]).toString(),at=document.getElementsByClassName(tt);for(var yt=0;yt<at.length;yt++)at[yt].style.cssText=at[yt].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+nt)}}}if(et.isd){var vt=document.getElementById(et.cueID);vt&&Nt.removeChild(vt),P(et)}}function M(et,tt){var nt=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,rt=/^#(.*)$/;if(nt.test(tt)){var it=nt.exec(tt),at=parseInt(it[4],10)-1;return"data:image/png;base64,"+btoa(et.images[at])}if(rt.test(tt)){var ot=rt.exec(tt)[1];return"data:image/png;base64,"+et.embeddedImages[ot]}return tt}function P(et){if(Nt){var tt=document.createElement("div");Nt.appendChild(tt),xt=(0,Vo.renderHTML)(et.isd,tt,(function(tt){return M(et,tt)}),Nt.clientHeight,Nt.clientWidth,!1,(function(et){nt.info("renderCaption :",et)}),xt,!0),tt.id=et.cueID,Gt.trigger(yt.Z.CAPTION_RENDERED,{captionDiv:tt,currentTrackIdx:st})}}function L(et,tt){if(!Vt.get().streaming.text.extendSegmentedCues)return!1;if(!tt.cues||0===tt.cues.length)return!1;var nt=tt.cues[tt.cues.length-1];return!(nt.endTime<et.startTime||!function(et,tt,nt){for(var rt=0;rt<nt.length;rt++){var it=nt[rt];if(JSON.stringify(et[it])!==JSON.stringify(tt[it]))return!1}return!0}(nt,et,Ko)||(nt.endTime=Math.max(nt.endTime,et.endTime),0))}function F(et,tt,rt){var it=B(et);if(it&&Array.isArray(rt)&&0!==rt.length)for(var at=0;at<rt.length;at++){var ot=void 0,st=rt[at];it.cellResolution=st.cellResolution,it.isFromCEA608=st.isFromCEA608,isNaN(st.start)||isNaN(st.end)||(ot="html"===st.type&&Nt?k(st,tt,it):st.data?U(st,tt,it):null);try{ot?Y(it,ot)||(Vt.get().streaming.text.webvtt.customRenderingEnabled?(it.manualCueList||(it.manualCueList=[]),it.manualCueList.push(ot)):L(ot,it)||it.addCue(ot)):nt.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}catch(et){throw H(it),it.addCue(ot),et}}}function k(et,tt,it){var ot=this,lt=new rt(et.start+tt,et.end+tt,"");return lt.cueHTMLElement=et.cueHTMLElement,lt.isd=et.isd,lt.images=et.images,lt.embeddedImages=et.embeddedImages,lt.cueID=et.cueID,lt.scaleCue=O.bind(ot),lt.cellResolution=et.cellResolution,lt.lineHeight=et.lineHeight,lt.linePadding=et.linePadding,lt.fontSize=et.fontSize,Nt.style.left=dt+"px",Nt.style.top=vt+"px",Nt.style.width=At+"px",Nt.style.height=Rt+"px",lt.isd&&function x(et,tt){tt&&tt.forEach((function(tt){tt.kind&&"image"===tt.kind&&(tt.src=M(et,tt.src)),x(et,tt.contents)}))}(lt,lt.isd.contents),lt.onenter=function(){it.mode===at.Z.TEXT_SHOWING&&(this.isd?(P(this),nt.debug("Cue enter id:"+this.cueID)):(Nt.appendChild(this.cueHTMLElement),O.call(ot,this),Gt.trigger(yt.Z.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:st})))},lt.onexit=function(){if(Nt)for(var et=Nt.childNodes,tt=0;tt<et.length;++tt)et[tt].id===this.cueID&&(nt.debug("Cue exit id:"+et[tt].id),Nt.removeChild(et[tt]),--tt)},lt}function U(et,tt,it){var ot=new rt(et.start-tt,et.end-tt,et.data);if(ot.cueID="".concat(ot.startTime,"_").concat(ot.endTime),ot.isActive=!1,et.styles)try{void 0!==et.styles.align&&"align"in ot&&(ot.align=et.styles.align),void 0!==et.styles.line&&"line"in ot&&(ot.line=et.styles.line),void 0!==et.styles.snapToLines&&"snapToLines"in ot&&(ot.snapToLines=et.styles.snapToLines),void 0!==et.styles.position&&"position"in ot&&(ot.position=et.styles.position),void 0!==et.styles.size&&"size"in ot&&(ot.size=et.styles.size)}catch(et){nt.error(et)}return ot.onenter=function(){it.mode===at.Z.TEXT_SHOWING&&Gt.trigger(yt.Z.CAPTION_RENDERED,{currentTrackIdx:st})},ot}function Z(){var et,tt=[],nt=function(et,tt){var nt;if("undefined"==typeof Symbol||null==et[Symbol.iterator]){if(Array.isArray(et)||(nt=function(et,tt){if(et){if("string"==typeof et)return Da(et,tt);var nt=Object.prototype.toString.call(et).slice(8,-1);return"Object"===nt&&et.constructor&&(nt=et.constructor.name),"Map"===nt||"Set"===nt?Array.from(et):"Arguments"===nt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)?Da(et,tt):void 0}}(et))){nt&&(et=nt);var rt=0,i=function(){};return{s:i,n:function(){return rt>=et.length?{done:!0}:{done:!1,value:et[rt++]}},e:function(et){throw et},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var it,at=!0,ot=!1;return{s:function(){nt=et[Symbol.iterator]()},n:function(){var et=nt.next();return at=et.done,et},e:function(et){ot=!0,it=et},f:function(){try{at||null==nt.return||nt.return()}finally{if(ot)throw it}}}}(qt.getTextTracks());try{for(nt.s();!(et=nt.n()).done;){var rt=et.value;rt.manualMode===at.Z.TEXT_SHOWING&&tt.push(rt)}}catch(et){nt.e(et)}finally{nt.f()}return tt}function B(et){return et>=0&&it[et]?qt.getTextTrack(it[et].kind,it[et].id,it[et].lang,it[et].isTTML,it[et].isEmbedded):null}function G(et){var tt=this;if(et!==st){var nt=B(st=et);q.call(this,nt),Ot&&(clearInterval(Ot),Ot=null),nt&&"html"===nt.renderingType&&(D.call(this,nt,!0),window.ResizeObserver?(Ut=new window.ResizeObserver((function(){D.call(tt,nt,!0)}))).observe(qt.getElement()):Ot=setInterval(D.bind(this,nt),500))}}function q(et){z.call(this),et&&"html"===et.renderingType?V.call(this):K.call(this)}function Y(et,tt){if(!et.cues)return!1;for(var nt=0;nt<et.cues.length;nt++)if(et.cues[nt].startTime===tt.startTime&&et.cues[nt].endTime===tt.endTime)return!0;return!1}function j(et,tt,nt){var rt=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return(isNaN(tt)||(rt?et.startTime:et.endTime)>=tt)&&(isNaN(nt)||(rt?et.endTime:et.startTime)<=nt)}function H(et,tt,nt){var rt=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(et.cues)for(var it=et.cues,at=it.length-1,ot=at;ot>=0;ot--)j(it[ot],tt,nt,rt)&&(it[ot].onexit&&it[ot].onexit(),et.removeCue(it[ot]))}function V(){var et=document.getElementById("native-cue-style");if(!et){(et=document.createElement("style")).id="native-cue-style",document.head.appendChild(et);var tt=et.sheet,rt=qt.getElement();try{rt&&(rt.id?tt.insertRule("#"+rt.id+"::cue {background: transparent}",0):0!==rt.classList.length?tt.insertRule("."+rt.className+"::cue {background: transparent}",0):tt.insertRule("video::cue {background: transparent}",0))}catch(et){nt.info(""+et.message)}}}function K(){var et=document.getElementById("native-cue-style");et&&document.head.removeChild(et)}function z(){if(Nt)for(;Nt.firstChild;)Nt.removeChild(Nt.firstChild)}return tt={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(rt=window.VTTCue||window.TextTrackCue,it=[],ot=[],st=-1,dt=0,vt=0,At=0,Rt=0,Nt=null,Dt=null,Ot=null,Lt=!1,kt=2147483647,xt=null,void 0!==document.fullscreenElement?Mt="fullscreenElement":void 0!==document.webkitIsFullScreen?Mt="webkitIsFullScreen":document.msFullscreenElement?Mt="msFullscreenElement":document.mozFullScreen&&(Mt="mozFullScreen"))},getStreamId:function(){return jt.id},addTextTrack:function(et){it.push(et)},addCaptions:F,createTracks:function(){it.sort((function(et,tt){return et.index-tt.index})),Nt=qt.getTTMLRenderingDiv(),Dt=qt.getVttRenderingDiv();for(var et,tt,nt,rt,lt,dt,pt=-1,vt=0;vt<it.length;vt++){var At=(tt=(et=it[vt]).kind,nt=void 0!==et.id?et.id:et.lang,rt=et.lang,lt=et.isTTML,dt=et.isEmbedded,qt.addTextTrack(tt,nt,rt,lt,dt));ot.push(At),it[vt].defaultTrack&&(At.default=!0,pt=vt);var Rt=B(vt);Rt&&(Rt.mode=at.Z.TEXT_SHOWING,Nt&&(it[vt].isTTML||it[vt].isEmbedded)?Rt.renderingType="html":Rt.renderingType="default"),F(vt,0,it[vt].captionData),Gt.trigger(yt.Z.TEXT_TRACK_ADDED)}if(G.call(this,pt),pt>=0){Gt.on(yt.Z.PLAYBACK_METADATA_LOADED,(function e(){var et=B(pt);et&&"html"===et.renderingType&&D.call(this,et,!0),Gt.off(yt.Z.PLAYBACK_METADATA_LOADED,e,this)}),this);for(var Ot=0;Ot<it.length;Ot++){var Mt=B(Ot);Mt&&(Mt.mode=Ot===pt?at.Z.TEXT_SHOWING:at.Z.TEXT_HIDDEN,Mt.manualMode=Ot===pt?at.Z.TEXT_SHOWING:at.Z.TEXT_HIDDEN)}}Gt.trigger(ft.Z.TEXT_TRACKS_QUEUE_INITIALIZED,{index:st,tracks:it,streamId:jt.id})},getCurrentTrackIdx:function(){return st},setCurrentTrackIdx:G,getTrackIdxForId:function(et){for(var tt=-1,nt=0;nt<it.length;nt++)if(it[nt].id===et){tt=nt;break}return tt},getCurrentTrackInfo:function(){return it[st]},setModeForTrackIdx:function(et,tt){var nt=B(et);nt&&nt.mode!==tt&&(nt.mode=tt),nt&&nt.manualMode!==tt&&(nt.manualMode=tt)},deleteCuesFromTrackIdx:function(et,tt,nt){var rt=B(et);rt&&H(rt,tt,nt)},deleteAllTextTracks:function(){for(var et=ot?ot.length:0,tt=0;tt<et;tt++){var nt=B(tt);nt&&H.call(this,nt,jt.start,jt.start+jt.duration,!1)}ot=[],it=[],Ot&&(clearInterval(Ot),Ot=null),Ut&&qt&&(Ut.unobserve(qt.getElement()),Ut=null),st=-1,z.call(this)},deleteTextTrack:function(et){qt.removeChild(ot[et]),ot.splice(et,1)},manualCueProcessing:function(et){var tt=Z();if(tt&&tt.length>0){var nt=tt[0].manualCueList;nt&&nt.length>0&&nt.forEach((function(tt){if(tt.startTime<=et&&tt.endTime>=et&&!tt.isActive)tt.isActive=!0,WebVTT.processCues(window,[tt],Dt,tt.cueID);else if(tt.isActive&&(tt.startTime>et||tt.endTime<et)&&(tt.isActive=!1,Dt))for(var nt=Dt.childNodes,rt=0;rt<nt.length;++rt)nt[rt].id===tt.cueID&&(Dt.removeChild(nt[rt]),--rt)}))}},disableManualTracks:function(){var et=Z();if(et&&et.length>0){var tt=et[0].manualCueList;tt&&tt.length>0&&tt.forEach((function(et){if(et.isActive&&(et.isActive=!1,Dt))for(var tt=Dt.childNodes,nt=0;nt<tt.length;++nt)tt[nt].id===et.cueID&&(Dt.removeChild(tt[nt]),--nt)}))}}},nt=(0,pt.Z)(Bt).getInstance().getLogger(tt),tt}Ma.__dashjs_factory_name="TextTracks";const zo=dt.Z.getClassFactory(Ma);function La(){var et,tt,nt,rt,it,at,ot=this.context;function s(et){var tt=et.split(":"),nt=tt.length-1;return et=60*parseInt(tt[nt-1],10)+parseFloat(tt[nt]),2===nt&&(et+=3600*parseInt(tt[0],10)),et}function u(et){var tt=et.split(rt),nt=tt[1].split(at);return nt.shift(),tt[1]=nt[0],nt.shift(),{cuePoints:tt,styles:l(nt)}}function l(et){var tt={};return et.forEach((function(et){if(et.split(/:/).length>1){var nt=et.split(/:/)[1],rt=!1;nt&&-1!=nt.search(/%/)&&(rt=!0,nt=parseInt(nt.replace(/%/,""),10)),(et.match(/align/)||et.match(/A/))&&(tt.align=nt),(et.match(/line/)||et.match(/L/))&&(tt.line="auto"===nt?nt:parseInt(nt,10),rt&&(tt.snapToLines=!1)),(et.match(/position/)||et.match(/P/))&&(tt.position=nt),(et.match(/size/)||et.match(/S/))&&(tt.size=nt)}})),tt}function c(et,tt){for(var nt,it=tt,at="",ot="";""!==et[it]&&it<et.length;)it++;if((nt=it-tt)>1)for(var st=0;st<nt;st++){if((ot=et[tt+st]).match(rt)){at="";break}at+=ot,st!==nt-1&&(at+="\n")}else(ot=et[tt]).match(rt)||(at=ot);return at}return et={parse:function(et){var at,ot,st=[];if(!et)return st;at=(et=et.split(nt)).length,ot=-1;for(var lt=0;lt<at;lt++){var ft=et[lt];if(ft.length>0&&"WEBVTT"!==ft&&ft.match(rt)){var dt=u(ft),pt=dt.cuePoints,yt=dt.styles,vt=c(et,lt+1),At=s(pt[0].replace(it,"")),Rt=s(pt[1].replace(it,""));!isNaN(At)&&!isNaN(Rt)&&At>=ot&&Rt>At?""!==vt?(ot=At,st.push({start:At,end:Rt,data:vt,styles:yt})):tt.error("Skipping cue due to empty/malformed cue text"):tt.error("Skipping cue due to incorrect cue timing")}}return st},getCaptionStyles:l},tt=(0,pt.Z)(ot).getInstance().getLogger(et),nt=/(?:\r\n|\r|\n)/gm,rt=/-->/,it=/(^[\s]+|[\s]+$)/g,at=/\s\b/g,et}La.__dashjs_factory_name="VTTParser";const Wo=dt.Z.getSingletonFactory(La);function Fa(){var et,tt;return et={parse:function(et){var nt=[];return tt.oncue=function(et){et.start=et.startTime,et.end=et.endTime,et.data=et.text,et.styles={align:et.align,line:et.line,position:et.position,size:et.size},nt.push(et)},tt.parse(et),nt}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(tt=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch(et){}}(),et}Fa.__dashjs_factory_name="VttCustomRenderingParser";const Xo=dt.Z.getSingletonFactory(Fa);function Ua(){var et,tt,nt=this.context,rt=(0,lt.Z)(nt).getInstance(),it=0;return et={parse:function(et,nt,at,ot,st){var lt,dt,pt,vt="",At=[],Rt={},Nt={},Dt="",Ot="",Mt={onOpenTag:function(et,nt,it){if(it[" imagetype"]&&!it[" imageType"]&&(rt.trigger(yt.Z.CONFORMANCE_VIOLATION,{level:Di.LEVELS.ERROR,event:Di.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),it[" imageType"]=it[" imagetype"]),"image"===nt&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===et||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===et)){if(!it[" imageType"]||"PNG"!==it[" imageType"].value)return void tt.warn("smpte-tt imageType != PNG. Discarded");Dt=it["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){Dt&&(Nt[Dt]=Ot.trim()),Ot="",Dt=""},onText:function(et){Dt&&(Ot+=et)}};if(!et)throw vt="no ttml data to parse",new Error(vt);Rt.data=et,rt.trigger(ft.Z.TTML_TO_PARSE,Rt);var Lt=(0,Vo.fromXML)(Rt.data,(function(et){vt=et}),Mt);rt.trigger(ft.Z.TTML_PARSED,{ttmlString:Rt.data,ttmlDoc:Lt});var xt,kt=Lt.getMediaTimeEvents();for(pt=0;pt<kt.length;pt++){var Ut=(0,Vo.generateISD)(Lt,kt[pt],(function(et){vt=et}));Ut.contents.some((function(et){return et.contents.length}))&&(lt=kt[pt]+nt)<(dt=kt[pt+1]+nt)&&At.push({start:lt,end:dt,type:"html",cueID:(xt="cue_TTML_"+it,it++,xt),isd:Ut,images:st,embeddedImages:Nt})}if(""!==vt)throw tt.error(vt),new Error(vt);return At}},tt=(0,pt.Z)(nt).getInstance().getLogger(et),et}Ua.__dashjs_factory_name="TTMLParser";const Qo=dt.Z.getSingletonFactory(Ua);function Ba(et){var tt,nt,rt,it,ot,st,dt,pt,vt,At,Rt,Nt,Dt=this.context,Ot=et.adapter,Mt=et.errHandler,Lt=et.manifestModel,xt=et.mediaController,kt=et.videoModel,Ut=et.settings;function A(et){var tt=et.tracks,rt=et.index,it=et.streamId;if(!1===Ut.get().streaming.text.defaultEnabled&&!w()||Nt)N(it,-1);else{var ot=xt.getCurrentTrackFor(at.Z.TEXT,it);if(ot){var st={lang:ot.lang,role:ot.roles[0],index:ot.index,codec:ot.codec,accessibility:ot.accessibility[0]};tt.some((function(et,tt){if(xt.matchSettings(st,et))return N(it,tt),rt=tt,!0}))}vt=!1}nt[it].lastEnabledIndex=rt,pt.trigger(yt.Z.TEXT_TRACKS_ADDED,{enabled:w(),index:rt,tracks:tt,streamId:it}),Rt=!0}function I(et){try{var tt=et.streamId;if(!it[tt]||isNaN(et.time))return;it[tt].manualCueProcessing(et.time)}catch(et){}}function R(et){try{var tt=et.streamId;if(!it[tt])return;it[tt].disableManualTracks()}catch(et){}}function w(){var et=!0;return vt&&!At&&(et=!1),et}function N(et,tt){(vt=-1===tt)&&xt&&xt.saveTextSettingsDisabled();var nt=C(et);if(nt!==tt&&it[et]){it[et].disableManualTracks(),it[et].setModeForTrackIdx(nt,at.Z.TEXT_HIDDEN),it[et].setCurrentTrackIdx(tt),it[et].setModeForTrackIdx(tt,at.Z.TEXT_SHOWING);var ot=it[et].getCurrentTrackInfo();ot&&ot.isFragmented&&!ot.isEmbedded?function(et,tt,nt){if(rt[et])for(var ot=rt[et].getConfig().fragmentedTracks,st=0;st<ot.length;st++){var lt=ot[st];if(tt.lang===lt.lang&&(lt.id?tt.id===lt.id:tt.index===lt.index)){var dt=xt.getCurrentTrackFor(at.Z.TEXT,et);(lt.id?dt.id!==lt.id:dt.index!==lt.index)?(it[et].deleteCuesFromTrackIdx(nt),rt[et].setCurrentFragmentedTrackIdx(st)):-1===nt&&pt.trigger(ft.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:et,mediaType:at.Z.TEXT})}}}(et,ot,nt):ot&&!ot.isFragmented&&function(et,tt){pt.trigger(ft.Z.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:tt},{streamId:et,mediaType:at.Z.TEXT})}(et,ot),xt.setTrack(ot)}}function C(et){return it[et].getCurrentTrackIdx()}function D(){rt={},it={},nt={},vt=!0,Rt=!1,Nt=!1}return tt={deactivateStream:function(et){if(et){var tt=et.id;rt[tt]&&rt[tt].resetMediaInfos(),it[tt]&&it[tt].deleteAllTextTracks()}},initialize:function(){pt.on(ft.Z.TEXT_TRACKS_QUEUE_INITIALIZED,A,tt),Ut.get().streaming.text.webvtt.customRenderingEnabled&&(pt.on(ft.Z.PLAYBACK_TIME_UPDATED,I,tt),pt.on(ft.Z.PLAYBACK_SEEKING,R,tt))},initializeForStream:function(et){var tt=et.id,at=zo(Dt).create({videoModel:kt,settings:Ut,streamInfo:et});at.initialize(),it[tt]=at;var lt=Ho(Dt).create({errHandler:Mt,adapter:Ot,manifestModel:Lt,mediaController:xt,videoModel:kt,textTracks:at,vttParser:ot,vttCustomRenderingParser:st,ttmlParser:dt,streamInfo:et,settings:Ut});lt.initialize(),rt[tt]=lt,nt[tt]={},nt[tt].lastEnabledIndex=-1},createTracks:function(et){var tt=et.id;it[tt]&&it[tt].createTracks()},getTextSourceBuffer:function(et){var tt=et.id;if(rt&&rt[tt])return rt[tt]},getAllTracksAreDisabled:function(){return vt},addEmbeddedTrack:function(et,tt){var nt=et.id;rt[nt]&&rt[nt].addEmbeddedTrack(tt)},enableText:function(et,tt){return(0,on.PS)(tt,"boolean"),w()!==tt&&(tt&&N(et,nt[et].lastEnabledIndex),tt||(nt[et].lastEnabledIndex=C(et),Rt?N(et,-1):Nt=!0)),!0},isTextEnabled:w,setTextTrack:N,getCurrentTrackIdx:C,enableForcedTextStreaming:function(et){return(0,on.PS)(et,"boolean"),At=et,!0},addMediaInfosToBuffer:function(et,tt,nt){var it=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,at=et.id;rt[at]&&rt[at].addMediaInfos(tt,nt,it)},reset:function(){D(),pt.off(ft.Z.TEXT_TRACKS_QUEUE_INITIALIZED,A,tt),Ut.get().streaming.text.webvtt.customRenderingEnabled&&(pt.off(ft.Z.PLAYBACK_TIME_UPDATED,I,tt),pt.off(ft.Z.PLAYBACK_SEEKING,R,tt)),Object.keys(rt).forEach((function(et){rt[et].resetEmbedded(),rt[et].reset()}))}},At=!1,Rt=!1,Nt=!1,ot=Wo(Dt).getInstance(),st=Xo(Dt).getInstance(),dt=Qo(Dt).getInstance(),pt=(0,lt.Z)(Dt).getInstance(),D(),tt}Ba.__dashjs_factory_name="TextController";const Jo=dt.Z.getClassFactory(Ba);function qa(){var et,tt,nt,rt,At,Rt,Nt,Dt,Ot,Mt,Bt,Gt,qt,jt,Vt,zt,Xt,Qt,$t,tn,nn,un,dn,gn,pn,mn,yn,En,_n,Tn,Sn,bn,In,wn,Cn,On,Pn,xn,Bn,qn="You must first call initialize() and set a source before calling this method",jn="You must first call initialize() and set a valid source and view before calling this method",Vn="You must first call attachView() to set the video element before calling this method",Wn="You must first call attachSource() with a valid source before calling this method",Qn="MediaPlayer not initialized!",rr=this.context,ur=(0,lt.Z)(rr).getInstance(),lr=(0,kt.Z)(rr).getInstance(),hr=(0,pt.Z)(rr).getInstance({settings:lr});function fe(){Ie(null),be(null),rt=null,jt&&(jt.reset(),jt=null),Vt&&(Vt.reset(),Vt=null),tn&&tn.reset(),lr.reset(),Xt&&(Xt.reset(),Xt=null)}function de(){return!!nt&&!!On.getElement()}function ge(){return(0,co.e)()}function he(){if(!Nt)throw jn;return En.isPaused()}function pe(){if(!Nt)throw jn;return En.getIsDynamic()}function me(et){var tt=pn&&pn.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,nt=bn.getCurrentDVRInfo(tt);if(!nt)return 0;var rt=En.getOriginalLiveDelay(),it=nt.range.start+et;return it>nt.range.end-rt&&(it=nt.range.end-rt),it}function ye(et){if(!Nt)throw jn;var tt=Se().currentTime;if(void 0!==et)tt=pn.getTimeRelativeToStreamId(tt,et);else if(En.getIsDynamic()){var nt=pn&&pn.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,rt=bn.getCurrentDVRInfo(nt);tt=null===rt||0===tt?0:Math.max(0,tt-rt.range.start)}return tt}function Ee(){if(!Nt)throw jn;var et=Se().duration;if(En.getIsDynamic()){var tt=pn&&pn.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,nt=bn.getCurrentDVRInfo(tt);et=nt?nt.range.end-nt.range.start:0}return et}function ve(et){(0,on.PS)(et,"boolean"),Dt=et}function _e(){tn.restoreDefaultUTCTimingSources()}function Te(){return bn}function Se(){if(!On.getElement())throw Vn;return On.getElement()}function be(et){if(!At)throw Qn;On.setElement(et),et&&(De(),function(){if(!Vt){var et=dashjs.MetricsReporting;if("function"==typeof et){var tt=et(rr).create();Vt=tt.createMetricsReporting({debug:hr,eventBus:ur,mediaElement:Se(),adapter:Qt,dashMetrics:bn,mediaPlayerModel:$t,events:ft.Z,constants:at.Z,metricsConstants:st.Z})}}}(),function(){if(!zt){var et=dashjs.MssHandler;"function"==typeof et&&(xt.extend(et.errors),zt=et(rr).create({eventBus:ur,mediaPlayerModel:$t,dashMetrics:bn,manifestModel:In,playbackController:En,streamController:pn,protectionController:jt,baseURLController:un,errHandler:nn,events:ft.Z,constants:at.Z,debug:hr,initSegmentType:Ut.w.INIT_SEGMENT_TYPE,BASE64:Bo,ISOBoxer:Go,settings:lr}))}}(),pn&&pn.switchToVideoElement(Ot)),Nt&&we(),Pe(Ot)}function Ae(et){if(!Rt)throw qn;var tt=pn.getActiveStreamInfo();return tt?qt.getTracksFor(et,tt.id):[]}function Ie(et){var tt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;if(!At)throw Qn;"string"==typeof et&&Pn.initialize(et),null==tt&&(tt=NaN),isNaN(tt)||(tt=Math.max(0,tt)),Ot=tt,nt=et,(Rt||Nt)&&we(),de()&&Pe(Ot)}function Re(){if(!Rt)throw qn;var et=pn.getActiveStreamInfo();return et?pn.getStreamById(et.id):null}function we(){Nt=!1,Rt=!1,Qt.reset(),pn.reset(),yn.reset(),Sn.reset(),En.reset(),_n.reset(),Tn.reset(),Mt.reset(),qt.reset(),Bn.reset(),jt&&(lr.get().streaming.protection.keepProtectionMediaKeys?jt.stop():(jt.reset(),jt=null,De())),mn.reset(),wn.reset(),Cn.reset()}function Ne(){var et=Ce();pn||(pn=Mi(rr).getInstance()),mn||(mn=Jo(rr).create({errHandler:nn,manifestModel:In,adapter:Qt,mediaController:qt,videoModel:On,settings:lr})),gn.setConfig({capabilities:dn,customParametersModel:tn,adapter:Qt,settings:lr,manifestModel:In,errHandler:nn}),pn.setConfig({capabilities:dn,capabilitiesFilter:gn,manifestLoader:et,manifestModel:In,mediaPlayerModel:$t,customParametersModel:tn,protectionController:jt,textController:mn,adapter:Qt,dashMetrics:bn,errHandler:nn,timelineConverter:Gt,videoModel:On,playbackController:En,serviceDescriptionController:_n,contentSteeringController:Tn,abrController:Mt,mediaController:qt,settings:lr,baseURLController:un,uriFragmentModel:Pn,segmentBaseController:Bn}),yn.setConfig({settings:lr,playbackController:En,streamController:pn,videoModel:On,timelineConverter:Gt,adapter:Qt}),En.setConfig({streamController:pn,serviceDescriptionController:_n,dashMetrics:bn,adapter:Qt,videoModel:On,timelineConverter:Gt,settings:lr}),Sn.setConfig({streamController:pn,playbackController:En,mediaPlayerModel:$t,videoModel:On,settings:lr}),Mt.setConfig({streamController:pn,domStorage:xn,mediaPlayerModel:$t,customParametersModel:tn,cmsdModel:Cn,dashMetrics:bn,adapter:Qt,videoModel:On,settings:lr}),wn.setConfig({abrController:Mt,dashMetrics:bn,playbackController:En}),Cn.setConfig({}),Mt.initialize(),pn.initialize(Dt,rt),mn.initialize(),yn.initialize(),Sn.initialize(),wn.initialize(),Cn.initialize(),Tn.initialize(),Bn.initialize()}function Ce(){return xa(rr).create({debug:hr,errHandler:nn,dashMetrics:bn,mediaPlayerModel:$t,requestModifier:(0,cn.Z)(rr).getInstance(),mssHandler:zt,settings:lr})}function De(){if(jt)return jt;var et=dashjs.Protection;if("function"==typeof et){var tt=et(rr).create();return ft.Z.extend(et.events),yt.Z.extend(et.events,{publicOnly:!0}),xt.extend(et.errors),dn||(dn=(0,Za.Z)(rr).getInstance()),jt=tt.createProtectionSystem({debug:hr,errHandler:nn,videoModel:On,customParametersModel:tn,capabilities:dn,eventBus:ur,events:ft.Z,BASE64:Bo,constants:at.Z,cmcdModel:wn,settings:lr})}return null}function Oe(){if(!At)throw Qn;if(Xt)return Xt;var et=dashjs.OfflineController;if("function"==typeof et){ft.Z.extend(et.events),yt.Z.extend(et.events,{publicOnly:!0}),xt.extend(et.errors);var tt=Ce(),nt=Ai(rr).create();return nt.setConfig({manifestModel:In,adapter:Qt,manifestLoader:tt,errHandler:nn,contentSteeringController:Tn}),Xt=et(rr).create({debug:hr,manifestUpdater:nt,baseURLController:un,manifestLoader:tt,manifestModel:In,mediaPlayerModel:$t,abrController:Mt,playbackController:En,adapter:Qt,errHandler:nn,dashMetrics:bn,timelineConverter:Gt,segmentBaseController:Bn,schemeLoaderFactory:Bt,eventBus:ur,events:ft.Z,errors:xt,constants:at.Z,settings:lr,dashConstants:ot.Z,urlUtils:(0,fn.Z)(rr).getInstance()})}return null}function Me(et){var tt=pn&&pn.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,nt=bn.getCurrentDVRInfo(tt);return nt?et+(nt.manifestInfo.availableFrom.getTime()/1e3+nt.range.start):0}function Pe(){var et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN;Xt&&Xt.resetRecords(),!Rt&&nt&&(Rt=!0,tt.info("Streaming Initialized"),Ne(),"string"==typeof nt?pn.load(nt,et):pn.loadWithManifest(nt,et)),!Nt&&de()&&(Nt=!0,tt.info("Playback Initialized"))}return et={initialize:function(et,nt,rt){var ot=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN;dn||(dn=(0,Za.Z)(rr).getInstance()).setConfig({settings:lr}),nn||(nn=ka(rr).getInstance()),dn.supportsMediaSource()?(At||(At=!0,Gt=Zo(rr).getInstance(),Mt||(Mt=eo(rr).getInstance()).setConfig({settings:lr}),Bt||(Bt=$r(rr).getInstance()),En||(En=vt(rr).getInstance()),qt||(qt=Vi(rr).getInstance()),pn||(pn=Mi(rr).getInstance()),yn||(yn=Li(rr).getInstance()),Sn||(Sn=Fi(rr).getInstance()),_n||(_n=Zi(rr).getInstance()),Tn||(Tn=Si(rr).getInstance()),gn||(gn=Ga(rr).getInstance()),Qt=Ao(rr).getInstance(),In=Ha(rr).getInstance(),wn=Cr(rr).getInstance(),Cn=Kr(rr).getInstance(),bn=Uo(rr).getInstance({settings:lr}),xn=lo(rr).getInstance({settings:lr}),Qt.setConfig({constants:at.Z,cea608parser:it(),errHandler:nn,BASE64:Bo}),un||(un=na(rr).create()),un.setConfig({adapter:Qt,contentSteeringController:Tn}),_n.setConfig({adapter:Qt}),Bn||(Bn=mo(rr).getInstance({dashMetrics:bn,mediaPlayerModel:$t,errHandler:nn,baseURLController:un,events:ft.Z,eventBus:ur,debug:hr,boxParser:(0,hi.Z)(rr).getInstance(),requestModifier:(0,cn.Z)(rr).getInstance(),errors:xt})),qt.setConfig({domStorage:xn,settings:lr,customParametersModel:tn}),$t.setConfig({playbackController:En,serviceDescriptionController:_n}),Tn.setConfig({adapter:Qt,errHandler:nn,dashMetrics:bn,mediaPlayerModel:$t,manifestModel:In,serviceDescriptionController:_n,eventBus:ur,requestModifier:(0,cn.Z)(rr).getInstance()}),_e(),ve(void 0===rt||rt),Oe()),et&&be(et),nt&&Ie(nt,ot),tt.info("[dash.js "+ge()+"] MediaPlayer has been initialized")):nn.error(new Lt.Z(xt.CAPABILITY_MEDIASOURCE_ERROR_CODE,xt.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(et){et&&(et.capabilities&&(dn=et.capabilities),et.capabilitiesFilter&&(gn=et.capabilitiesFilter),et.streamController&&(pn=et.streamController),et.textController&&(mn=et.textController),et.gapController&&(yn=et.gapController),et.playbackController&&(En=et.playbackController),et.serviceDescriptionController&&(_n=et.serviceDescriptionController),et.contentSteeringController&&(Tn=et.contentSteeringController),et.catchupController&&(Sn=et.catchupController),et.mediaPlayerModel&&($t=et.mediaPlayerModel),et.customParametersModel&&(tn=et.customParametersModel),et.abrController&&(Mt=et.abrController),et.schemeLoaderFactory&&(Bt=et.schemeLoaderFactory),et.mediaController&&(qt=et.mediaController),et.settings&&(lr=et.settings))},on:function(et,tt,nt,rt){ur.on(et,tt,nt,rt)},off:function(et,tt,nt){ur.off(et,tt,nt)},extend:function(et,tt,nt){dt.Z.extend(et,tt,nt,rr)},attachView:be,attachSource:Ie,isReady:de,preload:function(){if(!On.getElement()&&!Rt){if(!nt)throw Wn;Pe(Ot)}},play:function(){if(!Nt)throw jn;(!Dt||he()&&Nt)&&En.play(!0)},isPaused:he,pause:function(){if(!Nt)throw jn;En.pause()},isSeeking:function(){if(!Nt)throw jn;return En.isSeeking()},isDynamic:pe,getLowLatencyModeEnabled:function(){if(!Nt)throw jn;return En.getLowLatencyModeEnabled()},seek:function(et){if(!Nt)throw jn;if((0,on.PS)(et,"number"),isNaN(et))throw at.Z.BAD_ARGUMENT_ERROR;et<0&&(et=0);var tt=En.getIsDynamic()?me(et):et,nt=Se();!En.getIsDynamic()&&nt.duration&&(tt=Math.min(nt.duration,tt)),En.seek(tt,!1,!1,!0)},seekToOriginalLive:function(){Nt&&pe()&&En.seekToOriginalLive()},setPlaybackRate:function(et){Se().playbackRate=et},getPlaybackRate:function(){return Se().playbackRate},setMute:function(et){(0,on.PS)(et,"boolean"),Se().muted=et},isMuted:function(){return Se().muted},setVolume:function(et){if("number"!=typeof et||isNaN(et)||et<0||et>1)throw at.Z.BAD_ARGUMENT_ERROR;Se().volume=et},getVolume:function(){return Se().volume},time:ye,duration:Ee,timeAsUTC:function(){if(!Nt)throw jn;return ye()<0?NaN:Me(ye())},durationAsUTC:function(){if(!Nt)throw jn;return Me(Ee())},getActiveStream:Re,getDVRWindowSize:function(){var et=pn&&pn.hasVideoTrack()?at.Z.VIDEO:at.Z.AUDIO,tt=bn.getCurrentDVRInfo(et);return tt?tt.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:me,getAvailableBaseUrls:function(){var et=In.getValue();return et?un.getBaseUrls(et):[]},getAvailableLocations:function(){var et=In.getValue();if(!et)return[];var tt=Qt.getLocation(et),nt=Tn.getSynthesizedLocationElements(tt);return tt.concat(nt)},getTargetLiveDelay:function(){if(!Nt)throw jn;return En.getOriginalLiveDelay()},convertToTimeCode:function(et){et=Math.max(et,0);var tt=Math.floor(et/3600),nt=Math.floor(et%3600/60),rt=Math.floor(et%3600%60);return(0===tt?"":tt<10?"0"+tt.toString()+":":tt.toString()+":")+(nt<10?"0"+nt.toString():nt.toString())+":"+(rt<10?"0"+rt.toString():rt.toString())},formatUTC:function(et,tt,nt){var rt=arguments.length>3&&void 0!==arguments[3]&&arguments[3],it=new Date(1e3*et),at=it.toLocaleDateString(tt),ot=it.toLocaleTimeString(tt,{hour12:nt});return rt?ot+" "+at:ot},getVersion:ge,getDebug:function(){return hr},getBufferLength:function(et){var nt=[at.Z.VIDEO,at.Z.AUDIO,at.Z.TEXT];if(et)return-1!==nt.indexOf(et)?Te().getCurrentBufferLevel(et)||NaN:(tt.warn("getBufferLength requested for invalid type"),NaN);var rt=nt.map((function(et){return Ae(et).length>0?Te().getCurrentBufferLevel(et):Number.MAX_VALUE})).reduce((function(et,tt){return Math.min(et,tt)}));return rt===Number.MAX_VALUE?NaN:rt},getTTMLRenderingDiv:function(){return On?On.getTTMLRenderingDiv():null},getVideoElement:Se,getSource:function(){if(!nt)throw Wn;return nt},updateSource:function(et){nt=et,pn.load(nt)},getCurrentLiveLatency:function(){if(!At)throw Qn;return Nt?En.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(et){if(!Rt)throw qn;return Mt.getTopBitrateInfoFor(et)},setAutoPlay:ve,getAutoPlay:function(){return Dt},getDashMetrics:Te,getQualityFor:function(et){if(!Rt)throw qn;if(et===at.Z.IMAGE){var tt=Re();if(!tt)return-1;var nt=tt.getThumbnailController();return nt?nt.getCurrentTrackIndex():-1}return Mt.getQualityFor(et)},setQualityFor:function(et,tt){var nt=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!Rt)throw qn;if(et===at.Z.IMAGE){var rt=Re();if(!rt)return;var it=rt.getThumbnailController();it&&it.setTrackByIndex(tt)}Mt.setPlaybackQuality(et,pn.getActiveStreamInfo(),tt,{forceReplace:nt})},updatePortalSize:function(){Mt.setElementSize(),Mt.setWindowResizeEventCalled(!0)},enableText:function(et){var tt=pn.getActiveStreamInfo();return!(!tt||!mn)&&mn.enableText(tt.id,et)},enableForcedTextStreaming:function(et){return!(!pn.getActiveStreamInfo()||!mn)&&mn.enableForcedTextStreaming(et)},isTextEnabled:function(){var et=pn.getActiveStreamInfo();return!(!et||!mn)&&mn.isTextEnabled(et)},setTextTrack:function(et){if(!Nt)throw jn;var tt=pn.getActiveStreamInfo();tt&&mn&&mn.setTextTrack(tt.id,et)},getBitrateInfoListFor:function(et){if(!Rt)throw qn;var tt=Re();return tt?tt.getBitrateListFor(et):[]},getStreamsFromManifest:function(et){if(!Rt)throw qn;return Qt.getStreamsInfo(et)},getTracksFor:Ae,getTracksForTypeFromManifest:function(et,tt,nt){if(!Rt)throw qn;return(nt=nt||Qt.getStreamsInfo(tt,1)[0])?Qt.getAllMediaInfoForType(nt,et,tt):[]},getCurrentTrackFor:function(et){if(!Rt)throw qn;var tt=pn.getActiveStreamInfo();return qt.getCurrentTrackFor(et,tt.id)},setInitialMediaSettingsFor:function(et,tt){if(!At)throw Qn;qt.setInitialSettings(et,tt)},getInitialMediaSettingsFor:function(et){if(!At)throw Qn;return qt.getInitialSettings(et)},setCurrentTrack:function(et){if(!Rt)throw qn;qt.setTrack(et)},addABRCustomRule:function(et,tt,nt){tn.addAbrCustomRule(et,tt,nt)},removeABRCustomRule:function(et){tn.removeAbrCustomRule(et)},removeAllABRCustomRule:function(){tn.removeAllAbrCustomRule()},getABRCustomRules:function(){return tn.getAbrCustomRules()},getAverageThroughput:function(et){var tt=Mt.getThroughputHistory(),nt=En.getIsDynamic();return tt?tt.getAverageThroughput(et,nt):0},retrieveManifest:function(et,tt){var nt=Ce(),rt=this;ur.on(ft.Z.INTERNAL_MANIFEST_LOADED,(function e(et){et.error?tt(null,et.error):tt(et.manifest),ur.off(ft.Z.INTERNAL_MANIFEST_LOADED,e,rt),nt.reset()}),rt),Pn.initialize(et),nt.load(et)},addUTCTimingSource:function(et,tt){tn.addUTCTimingSource(et,tt)},removeUTCTimingSource:function(et,tt){tn.removeUTCTimingSource(et,tt)},clearDefaultUTCTimingSources:function(){tn.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:_e,setXHRWithCredentialsForType:function(et,tt){tn.setXHRWithCredentialsForType(et,tt)},getXHRWithCredentialsForType:function(et){return tn.getXHRWithCredentialsForType(et)},getProtectionController:function(){return De()},attachProtectionController:function(et){jt=et},setProtectionData:function(et){rt=et,pn&&pn.setProtectionData(rt)},registerLicenseRequestFilter:function(et){tn.registerLicenseRequestFilter(et)},registerLicenseResponseFilter:function(et){tn.registerLicenseResponseFilter(et)},unregisterLicenseRequestFilter:function(et){tn.unregisterLicenseRequestFilter(et)},unregisterLicenseResponseFilter:function(et){tn.unregisterLicenseResponseFilter(et)},registerCustomCapabilitiesFilter:function(et){tn.registerCustomCapabilitiesFilter(et)},unregisterCustomCapabilitiesFilter:function(et){tn.unregisterCustomCapabilitiesFilter(et)},setCustomInitialTrackSelectionFunction:function(et){tn.setCustomInitialTrackSelectionFunction(et)},resetCustomInitialTrackSelectionFunction:function(){tn.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(et){if(!On.getElement())throw Vn;On.setTTMLRenderingDiv(et)},attachVttRenderingDiv:function(et){if(!On.getElement())throw Vn;On.setVttRenderingDiv(et)},getCurrentTextTrackIndex:function(){var et=pn.getActiveStreamInfo();if(et&&mn)return mn.getCurrentTrackIdx(et.id)},provideThumbnail:function(et,tt){if("function"==typeof tt)if(et<0)tt(null);else{var nt=En.getIsDynamic()?me(et):et,rt=pn.getStreamForTime(nt);if(null!==rt){var it=rt.getThumbnailController();if(it)return it.provide(nt,tt);tt(null)}else tt(null)}},getDashAdapter:function(){return Qt},getOfflineController:function(){return Oe()},triggerSteeringRequest:function(){if(Tn)return Tn.loadSteeringData()},getCurrentSteeringResponseData:function(){if(Tn)return Tn.getCurrentSteeringResponseData()},getSettings:function(){return lr.get()},updateSettings:function(et){lr.update(et)},resetSettings:function(){lr.reset()},reset:fe,destroy:function(){fe(),dt.Z.deleteSingletonInstances(rr)}},tt=hr.getLogger(et),At=!1,Nt=!1,Rt=!1,Dt=!0,Ot=NaN,jt=null,Xt=null,rt=null,Qt=null,Bn=null,ft.Z.extend(yt.Z),$t=Va(rr).getInstance(),tn=(0,Xr.Z)(rr).getInstance(),On=no(rr).getInstance(),Pn=ja(rr).getInstance(),et}qa.__dashjs_factory_name="MediaPlayer";var $o=dt.Z.getClassFactory(qa);$o.events=yt.Z,$o.errors=xt,dt.Z.updateClassFactory(qa.__dashjs_factory_name,$o);const es=$o},8825:(et,tt,nt)=>{"use strict";function r(et){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function i(et,tt){return(i=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function a(et,tt){return!tt||"object"!==r(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function o(et){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}nt.d(tt,{Z:()=>rt});const rt=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&i(et,tt)}(s,et);var tt,nt,rt=(tt=s,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=o(tt);if(nt){var it=o(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return a(this,et)});function s(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,s),(et=rt.call(this)).AST_IN_FUTURE="astInFuture",et.BASE_URLS_UPDATED="baseUrlsUpdated",et.BUFFER_EMPTY="bufferStalled",et.BUFFER_LOADED="bufferLoaded",et.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",et.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",et.DYNAMIC_TO_STATIC="dynamicToStatic",et.ERROR="error",et.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",et.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",et.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",et.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",et.LOG="log",et.MANIFEST_LOADING_STARTED="manifestLoadingStarted",et.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",et.MANIFEST_LOADED="manifestLoaded",et.METRICS_CHANGED="metricsChanged",et.METRIC_CHANGED="metricChanged",et.METRIC_ADDED="metricAdded",et.METRIC_UPDATED="metricUpdated",et.PERIOD_SWITCH_STARTED="periodSwitchStarted",et.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",et.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",et.QUALITY_CHANGE_RENDERED="qualityChangeRendered",et.TRACK_CHANGE_RENDERED="trackChangeRendered",et.STREAM_INITIALIZING="streamInitializing",et.STREAM_UPDATED="streamUpdated",et.STREAM_ACTIVATED="streamActivated",et.STREAM_DEACTIVATED="streamDeactivated",et.STREAM_INITIALIZED="streamInitialized",et.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",et.TEXT_TRACKS_ADDED="allTextTracksAdded",et.TEXT_TRACK_ADDED="textTrackAdded",et.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",et.TTML_PARSED="ttmlParsed",et.TTML_TO_PARSE="ttmlToParse",et.CAPTION_RENDERED="captionRendered",et.CAPTION_CONTAINER_RESIZE="captionContainerResize",et.CAN_PLAY="canPlay",et.CAN_PLAY_THROUGH="canPlayThrough",et.PLAYBACK_ENDED="playbackEnded",et.PLAYBACK_ERROR="playbackError",et.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",et.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",et.PLAYBACK_LOADED_DATA="playbackLoadedData",et.PLAYBACK_PAUSED="playbackPaused",et.PLAYBACK_PLAYING="playbackPlaying",et.PLAYBACK_PROGRESS="playbackProgress",et.PLAYBACK_RATE_CHANGED="playbackRateChanged",et.PLAYBACK_SEEKED="playbackSeeked",et.PLAYBACK_SEEKING="playbackSeeking",et.PLAYBACK_STALLED="playbackStalled",et.PLAYBACK_STARTED="playbackStarted",et.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",et.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",et.PLAYBACK_WAITING="playbackWaiting",et.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",et.EVENT_MODE_ON_START="eventModeOnStart",et.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",et.CONFORMANCE_VIOLATION="conformanceViolation",et.REPRESENTATION_SWITCH="representationSwitch",et.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",et.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",et.INBAND_PRFT="inbandPrft",et}return s}(nt(8342).Z))},3393:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=new(function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var et;return(et=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}())},3860:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=new(function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var et;return(et=[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}())},8080:(et,tt,nt)=>{"use strict";nt.d(tt,{default:()=>zt});var rt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};rt.SSL_CONNECTION_FAILED_PREFIX="SSL",rt.DNS_RESOLUTION_FAILED="C00",rt.HOST_UNREACHABLE="C01",rt.CONNECTION_REFUSED="C02",rt.CONNECTION_ERROR="C03",rt.CORRUPT_MEDIA_ISOBMFF="M00",rt.CORRUPT_MEDIA_OTHER="M01",rt.BASE_URL_CHANGED="F00",rt.BECAME_REPORTER="S00";const it=rt;var at=nt(1180);function o(et){var tt,nt,rt=(et=et||{}).eventBus,ot=et.dashMetrics,st=et.metricsConstants,lt=et.events;function l(et){var tt=new it;if(nt){for(var rt in et)et.hasOwnProperty(rt)&&(tt[rt]=et[rt]);tt.mpdurl||(tt.mpdurl=nt.originalUrl||nt.url),tt.terror||(tt.terror=new Date),ot.addDVBErrors(tt)}}function c(et){et.error||(nt=et.manifest)}function f(et){l({errorcode:it.BASE_URL_CHANGED,servicelocation:et.entry})}function d(){l({errorcode:it.BECAME_REPORTER})}function g(et){var tt;et.metric===st.HTTP_REQUEST&&(0===(tt=et.value).responsecode||null==tt.responsecode||tt.responsecode>=400||tt.responsecode<100||tt.responsecode>=600)&&l({errorcode:tt.responsecode||it.CONNECTION_ERROR,url:tt.url,terror:tt.tresponse,servicelocation:tt._serviceLocation})}function h(et){var tt;switch(et.error?et.error.code:0){case MediaError.MEDIA_ERR_NETWORK:tt=it.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:tt=it.CORRUPT_MEDIA_OTHER;break;default:return}l({errorcode:tt})}return tt={initialize:function(){rt.on(lt.MANIFEST_UPDATED,c,tt),rt.on(lt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,tt),rt.on(lt.METRIC_ADDED,g,tt),rt.on(lt.METRIC_UPDATED,g,tt),rt.on(lt.PLAYBACK_ERROR,h,tt),rt.on(at.Z.BECAME_REPORTING_PLAYER,d,tt)},reset:function(){rt.off(lt.MANIFEST_UPDATED,c,tt),rt.off(lt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,tt),rt.off(lt.METRIC_ADDED,g,tt),rt.off(lt.METRIC_UPDATED,g,tt),rt.off(lt.PLAYBACK_ERROR,h,tt),rt.off(at.Z.BECAME_REPORTING_PLAYER,d,tt)}}}o.__dashjs_factory_name="DVBErrorsTranslator";const ot=dashjs.FactoryMaker.getSingletonFactory(o);var st=nt(2295);function l(et){et=et||{};var tt,nt,rt=!1,it=this.context,at=et.mediaElement;return tt={initialize:function(et){et&&et.length&&(et.forEach((function(et){var tt=et.starttime,rt=tt+et.duration;nt.add(tt,rt)})),rt=!!et[0]._useWallClockTime)},reset:function(){nt.clear()},isEnabled:function(){var et,tt=nt.length;if(!tt)return!0;et=rt?(new Date).getTime()/1e3:at.currentTime;for(var it=0;it<tt;it+=1){var ot=nt.start(it),st=nt.end(it);if(ot<=et&&et<st)return!0}return!1}},nt=(0,st.Z)(it).create(),tt}l.__dashjs_factory_name="RangeController";const lt=dashjs.FactoryMaker.getClassFactory(l);function f(){return{serialise:function e(et){var tt,nt,rt=[],it=[];for(tt in et)if(et.hasOwnProperty(tt)&&0!==tt.indexOf("_")){if(null==(nt=et[tt])&&(nt=""),Array.isArray(nt)){if(!nt.length)continue;it=[],nt.forEach((function(et){var tt="Object"!==Object.prototype.toString.call(et).slice(8,-1);it.push(tt?et:e(et))})),nt=it.map(encodeURIComponent).join(",")}else"string"==typeof nt?nt=encodeURIComponent(nt):nt instanceof Date?nt=nt.toISOString():"number"==typeof nt&&(nt=Math.round(nt));rt.push(tt+"="+nt)}return rt.join("&")}}}f.__dashjs_factory_name="MetricSerialiser";const ft=dashjs.FactoryMaker.getSingletonFactory(f);function g(){var et,tt,nt,rt=window.crypto||window.msCrypto,it=Uint32Array,at=Math.pow(2,8*it.BYTES_PER_ELEMENT)-1;function o(){rt&&(et||(et=new it(10)),rt.getRandomValues(et),tt=0)}return nt={random:function(nt,it){var ot;return nt||(nt=0),it||(it=1),rt?(tt===et.length&&o(),ot=et[tt]/at,tt+=1):ot=Math.random(),ot*(it-nt)+nt}},o(),nt}g.__dashjs_factory_name="RNG";const dt=dashjs.FactoryMaker.getSingletonFactory(g);var pt=nt(5717);function m(et){var tt;et=et||{};var nt,rt,it,at,ot,st,lt,yt=this.context,vt=[],At=et.metricsConstants;function g(){at=!1,ot=!1,st=null,lt=null}return tt={report:function(et,tt){Array.isArray(tt)||(tt=[tt]),ot&&lt.isEnabled()&&tt.forEach((function(tt){var it=nt.serialise(tt);et!==At.DVB_ERRORS&&(it="metricname=".concat(et,"&").concat(it)),function(et,tt,nt){var it=new XMLHttpRequest;it.withCredentials=rt.getXHRWithCredentialsForType(At.HTTP_REQUEST_DVB_REPORTING_TYPE);var a=function(){var et=vt.indexOf(it);-1!==et&&(vt.splice(et,1),!(it.status>=200&&it.status<300)&&nt&&nt())};vt.push(it);try{it.open("GET",et),it.onloadend=a,it.onerror=a,it.send()}catch(et){it.onerror()}}(it="".concat(st,"?").concat(it),0,(function(){ot=!1}))}))},initialize:function(et,tt){var nt;if(lt=tt,!(st=et.dvb_reportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");at||((nt=et.dvb_probability)&&(1e3===nt||nt/1e3>=it.random())&&(ot=!0),at=!0)},reset:function(){g()}},nt=ft(yt).getInstance(),it=dt(yt).getInstance(),rt=(0,pt.Z)(yt).getInstance(),g(),tt}m.__dashjs_factory_name="DVBReporting";const yt=dashjs.FactoryMaker.getClassFactory(m);function E(et){et=et||{};var tt={"urn:dvb:dash:reporting:2014":yt},nt=this.context,rt=et.debug?et.debug.getLogger(void 0):{},it=et.metricsConstants,at=et.mediaPlayerModel||{};return{create:function(et,ot){var st;try{(st=tt[et.schemeIdUri](nt).create({metricsConstants:it,mediaPlayerModel:at})).initialize(et,ot)}catch(ot){st=null,rt.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(et.schemeIdUri," (").concat(ot.message,")"))}return st},register:function(et,nt){tt[et]=nt},unregister:function(et){delete tt[et]}}}E.__dashjs_factory_name="ReportingFactory";const vt=dashjs.FactoryMaker.getSingletonFactory(E);function _(et){var tt=[],nt=vt(this.context).getInstance(et);return{initialize:function(et,rt){et.some((function(et){var it=nt.create(et,rt);if(it)return tt.push(it),!0}))},reset:function(){tt.forEach((function(et){return et.reset()})),tt=[]},report:function(et,nt){tt.forEach((function(tt){return tt.report(et,nt)}))}}}_.__dashjs_factory_name="ReportingController";const At=dashjs.FactoryMaker.getClassFactory(_);function S(){return{reconstructFullMetricName:function(et,tt,nt){var rt=et;return tt&&(rt+="("+tt,nt&&nt.length&&(rt+=","+nt),rt+=")"),rt},validateN:function(et){if(!et)throw new Error("missing n");if(isNaN(et))throw new Error("n is NaN");if(et<0)throw new Error("n must be positive");return et}}}S.__dashjs_factory_name="HandlerHelpers";const Rt=dashjs.FactoryMaker.getSingletonFactory(S);function A(et){var tt,nt,rt,it,at;et=et||{};var ot=this.context,st=Rt(ot).getInstance(),lt=[],ft=et.metricsConstants;function c(){var et=function(){try{return Object.keys(lt).map((function(et){return lt[et]})).reduce((function(et,tt){return et.level<tt.level?et:tt}))}catch(et){return}}();et&&at!==et.t&&(at=et.t,tt.report(rt,et))}return{initialize:function(et,at,ot){at&&(nt=st.validateN(ot),tt=at,rt=st.reconstructFullMetricName(et,ot),it=setInterval(c,nt))},reset:function(){clearInterval(it),it=null,nt=0,tt=null,at=null},handleNewMetric:function(et,tt,nt){et===ft.BUFFER_LEVEL&&(lt[nt]=tt)}}}A.__dashjs_factory_name="BufferLevelHandler";const Nt=dashjs.FactoryMaker.getClassFactory(A),Dt=dashjs.FactoryMaker.getClassFactory((function(et){var tt,nt=(et=et||{}).eventBus,rt=et.metricsConstants;function i(){nt.off(at.Z.METRICS_INITIALISATION_COMPLETE,i,this),nt.trigger(at.Z.BECAME_REPORTING_PLAYER)}return{initialize:function(et,rt){rt&&(tt=rt,nt.on(at.Z.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){tt=null},handleNewMetric:function(et,nt){et===rt.DVB_ERRORS&&tt&&tt.report(et,nt)}}}));function w(et){var tt,nt,rt,it,at;et=et||{};var ot=[],st=Rt(this.context).getInstance(),lt=et.metricsConstants;function l(){var et=ot;et.length&&tt&&tt.report(it,et),ot=[]}return{initialize:function(et,ot,lt,ft){ot&&(nt=st.validateN(lt),tt=ot,ft&&ft.length&&(rt=ft),it=st.reconstructFullMetricName(et,lt,ft),at=setInterval(l,nt))},reset:function(){clearInterval(at),at=null,nt=null,rt=null,ot=[],tt=null},handleNewMetric:function(et,tt){et===lt.HTTP_REQUEST&&(rt&&rt!==tt.type||ot.push(tt))}}}w.__dashjs_factory_name="HttpListHandler";const Ot=dashjs.FactoryMaker.getClassFactory(w);function C(){var et,tt;return{initialize:function(nt,rt){et=nt,tt=rt},reset:function(){tt=null,et=void 0},handleNewMetric:function(nt,rt){nt===et&&tt&&tt.report(et,rt)}}}C.__dashjs_factory_name="GenericMetricHandler";const Mt=dashjs.FactoryMaker.getClassFactory(C);function O(et){var tt=(et=et||{}).debug?et.debug.getLogger(void 0):{},nt=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,rt=this.context,it={BufferLevel:Nt,DVBErrors:Dt,HttpList:Ot,PlayList:Mt,RepSwitchList:Mt,TcpList:Mt};return{create:function(at,ot){var st,lt=at.match(nt);if(lt){try{(st=it[lt[1]](rt).create({eventBus:et.eventBus,metricsConstants:et.metricsConstants})).initialize(lt[1],ot,lt[3],lt[5])}catch(et){st=null,tt.error("MetricsHandlerFactory: Could not create handler for type ".concat(lt[1]," with args ").concat(lt[3],", ").concat(lt[5]," (").concat(et.message,")"))}return st}},register:function(et,tt){it[et]=tt},unregister:function(et){delete it[et]}}}O.__dashjs_factory_name="MetricsHandlerFactory";const Lt=dashjs.FactoryMaker.getSingletonFactory(O);function P(et){et=et||{};var tt,nt=[],rt=this.context,it=et.eventBus,at=et.events,ot=Lt(rt).getInstance({debug:et.debug,eventBus:et.eventBus,metricsConstants:et.metricsConstants});function s(et){nt.forEach((function(tt){tt.handleNewMetric(et.metric,et.value,et.mediaType)}))}return tt={initialize:function(et,rt){et.split(",").forEach((function(et,tt,it){var at;if(-1!==et.indexOf("(")&&-1===et.indexOf(")")){var st=it[tt+1];st&&-1===st.indexOf("(")&&-1!==st.indexOf(")")&&(et+=","+st,delete it[tt+1])}(at=ot.create(et,rt))&&nt.push(at)})),it.on(at.METRIC_ADDED,s,tt),it.on(at.METRIC_UPDATED,s,tt)},reset:function(){it.off(at.METRIC_ADDED,s,tt),it.off(at.METRIC_UPDATED,s,tt),nt.forEach((function(et){return et.reset()})),nt=[]}}}P.__dashjs_factory_name="MetricsHandlersController";const xt=dashjs.FactoryMaker.getClassFactory(P);function x(et){var tt,nt,rt;et=et||{};var it=this.context;function a(){tt&&tt.reset(),nt&&nt.reset(),rt&&rt.reset()}return{initialize:function(at){try{(rt=lt(it).create({mediaElement:et.mediaElement})).initialize(at.Range),(nt=At(it).create({debug:et.debug,metricsConstants:et.metricsConstants,mediaPlayerModel:et.mediaPlayerModel})).initialize(at.Reporting,rt),(tt=xt(it).create({debug:et.debug,eventBus:et.eventBus,metricsConstants:et.metricsConstants,events:et.events})).initialize(at.metrics,nt)}catch(et){throw a(),et}},reset:a}}x.__dashjs_factory_name="MetricsController";const kt=dashjs.FactoryMaker.getClassFactory(x),Ut=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]},Bt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1},Gt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value="",this.dvb_reportingUrl="",this.dvb_probability=1e3};function B(et){var tt=(et=et||{}).adapter,nt=et.constants;return{getMetrics:function(et){var rt=[];return et&&et.Metrics_asArray&&et.Metrics_asArray.forEach((function(it){var at=new Ut,ot=tt.getIsDynamic(et);it.hasOwnProperty("metrics")&&(at.metrics=it.metrics,it.Range_asArray&&it.Range_asArray.forEach((function(rt){var it=new Bt;it.starttime=function(et,rt,it){var at,ot,st=0;return rt?st=tt.getAvailabilityStartTime(et)/1e3:(at=tt.getRegularPeriods(et)).length&&(st=at[0].start),ot=st,it&&it.hasOwnProperty(nt.START_TIME)&&(ot+=it.starttime),ot}(et,ot,rt),rt.hasOwnProperty("duration")?it.duration=rt.duration:it.duration=tt.getDuration(et),it._useWallClockTime=ot,at.Range.push(it)})),it.Reporting_asArray&&(it.Reporting_asArray.forEach((function(et){var tt=new Gt;et.hasOwnProperty(nt.SCHEME_ID_URI)&&(tt.schemeIdUri=et.schemeIdUri,et.hasOwnProperty("value")&&(tt.value=et.value),et.hasOwnProperty(nt.DVB_REPORTING_URL)&&(tt.dvb_reportingUrl=et[nt.DVB_REPORTING_URL]),et.hasOwnProperty(nt.DVB_PROBABILITY)&&(tt.dvb_probability=et[nt.DVB_PROBABILITY]),at.Reporting.push(tt))})),rt.push(at)))})),rt}}}B.__dashjs_factory_name="ManifestParsing";const qt=dashjs.FactoryMaker.getSingletonFactory(B);function q(et){var tt;et=et||{};var nt={},rt=this.context,it=et.eventBus,ot=et.events;function s(tt){if(!tt.error){var ot=Object.keys(nt);qt(rt).getInstance({adapter:et.adapter,constants:et.constants}).getMetrics(tt.manifest).forEach((function(tt){var it=JSON.stringify(tt);if(nt.hasOwnProperty(it))ot.splice(it,1);else try{var at=kt(rt).create(et);at.initialize(tt),nt[it]=at}catch(et){}})),ot.forEach((function(et){nt[et].reset(),delete nt[et]})),it.trigger(at.Z.METRICS_INITIALISATION_COMPLETE)}}function u(){Object.keys(nt).forEach((function(et){nt[et].reset()})),nt={}}return tt={reset:function(){it.off(ot.MANIFEST_UPDATED,s,tt),it.off(ot.STREAM_TEARDOWN_COMPLETE,u,tt)}},it.on(ot.MANIFEST_UPDATED,s,tt),it.on(ot.STREAM_TEARDOWN_COMPLETE,u,tt),tt}q.__dashjs_factory_name="MetricsCollectionController";const jt=dashjs.FactoryMaker.getClassFactory(q);function j(){var et=this.context;return{createMetricsReporting:function(tt){return ot(et).getInstance({eventBus:tt.eventBus,dashMetrics:tt.dashMetrics,metricsConstants:tt.metricsConstants,events:tt.events}).initialize(),jt(et).create(tt)},getReportingFactory:function(){return vt(et).getInstance()},getMetricsHandlerFactory:function(){return Lt(et).getInstance()}}}j.__dashjs_factory_name="MetricsReporting";var Vt=dashjs.FactoryMaker.getClassFactory(j);Vt.events=at.Z,dashjs.FactoryMaker.updateClassFactory(j.__dashjs_factory_name,Vt);const zt=Vt},1180:(et,tt,nt)=>{"use strict";function r(et){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function i(et,tt){return(i=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function a(et,tt){return!tt||"object"!==r(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function o(et){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}nt.d(tt,{Z:()=>rt});const rt=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&i(et,tt)}(s,et);var tt,nt,rt=(tt=s,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=o(tt);if(nt){var it=o(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return a(this,et)});function s(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,s),(et=rt.call(this)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",et.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",et.CMCD_DATA_GENERATED="cmcdDataGenerated",et}return s}(nt(8342).Z))},5717:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ft});var rt=nt(2610),it=nt(5448),at=nt(1264),ot=nt(3106),st=nt(1767),lt=nt(3393);function l(){var et,tt,nt,it,ft,dt,pt,yt,vt=this.context,At=(0,at.Z)(vt).getInstance();function p(){it=[],ft=[],dt=[],yt=[],pt=null,tt=[]}function m(et,tt){var nt=-1;et.some((function(et,rt){if(et===tt)return nt=rt,!0})),nt<0||et.splice(nt,1)}function y(et){var tt;for(tt=0;tt<yt.length;tt++)if(yt[tt].rulename===et)return tt;return-1}function E(et,nt){v(et,nt);var it=new rt.Z;it.schemeIdUri=et,it.value=nt,tt.push(it)}function v(et,nt){(0,ot.PS)(et,"string"),(0,ot.PS)(nt,"string"),tt.forEach((function(rt,it){rt.schemeIdUri===et&&rt.value===nt&&tt.splice(it,1)}))}return et={getCustomInitialTrackSelectionFunction:function(){return pt},setCustomInitialTrackSelectionFunction:function(et){pt=et},resetCustomInitialTrackSelectionFunction:function(){pt=null},getLicenseResponseFilters:function(){return ft},getLicenseRequestFilters:function(){return it},getCustomCapabilitiesFilters:function(){return dt},registerCustomCapabilitiesFilter:function(et){dt.push(et)},registerLicenseResponseFilter:function(et){ft.push(et)},registerLicenseRequestFilter:function(et){it.push(et)},unregisterCustomCapabilitiesFilter:function(et){m(dt,et)},unregisterLicenseResponseFilter:function(et){m(ft,et)},unregisterLicenseRequestFilter:function(et){m(it,et)},addAbrCustomRule:function(et,tt,nt){if("string"!=typeof et||et!==st.Z.ABANDON_FRAGMENT_RULES&&et!==st.Z.QUALITY_SWITCH_RULES||"string"!=typeof tt)throw lt.Z.BAD_ARGUMENT_ERROR;var rt=y(tt);-1===rt?yt.push({type:et,rulename:tt,rule:nt}):(yt[rt].type=et,yt[rt].rule=nt)},removeAllAbrCustomRule:function(){yt=[]},removeAbrCustomRule:function(et){if(et){var tt=y(et);-1!==tt&&yt.splice(tt,1)}else yt=[]},getAbrCustomRules:function(){return yt},addUTCTimingSource:E,removeUTCTimingSource:v,getUTCTimingSources:function(){return tt},clearDefaultUTCTimingSources:function(){tt=[]},restoreDefaultUTCTimingSources:function(){var et=At.get().streaming.utcSynchronization.defaultTimingSource;E(et.scheme,et.value)},setXHRWithCredentialsForType:function e(et,tt){et?nt[et]=!!tt:Object.keys(nt).forEach((function(et){e(et,tt)}))},getXHRWithCredentialsForType:function(et){var tt=nt[et];return void 0===tt?nt.default:tt},setConfig:function(){},reset:function(){p()}},nt={default:!1},p(),et}l.__dashjs_factory_name="CustomParametersModel";const ft=it.Z.getSingletonFactory(l)},9032:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(7473);function a(et){var tt=(et=et||{}).requestModifier;function n(et){var nt=new Date,rt=et.request,it=new XMLHttpRequest;if(it.open(et.method,et.url,!0),rt.responseType&&(it.responseType=rt.responseType),rt.range&&it.setRequestHeader("Range","bytes="+rt.range),rt.requestStartDate||(rt.requestStartDate=nt),tt&&tt.modifyRequestHeader&&(it=tt.modifyRequestHeader(it,{url:et.url})),et.headers)for(var at in et.headers){var ot=et.headers[at];ot&&it.setRequestHeader(at,ot)}it.withCredentials=et.withCredentials,it.onload=et.onload,it.onloadend=et.onend,it.onerror=et.onerror,it.onprogress=et.progress,it.onabort=et.onabort,it.ontimeout=et.ontimeout,it.timeout=et.timeout,it.send(),et.response=it}return{load:function(et){tt&&tt.modifyRequest?(0,it.k)(et,tt).then((function(){return n(et)})):n(et)},abort:function(et){var tt=et.response;tt.onloadend=tt.onerror=tt.onprogress=void 0,tt.abort()}}}a.__dashjs_factory_name="XHRLoader";const at=rt.Z.getClassFactory(a)},1737:(et,tt,nt)=>{"use strict";nt.d(tt,{default:()=>Sn});var rt={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]};const it=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e)}var et;return(et=[{key:"findCencContentProtection",value:function(et){for(var tt=null,nt=0;nt<et.length;++nt){var rt=et[nt];"urn:mpeg:dash:mp4protection:2011"!==rt.schemeIdUri.toLowerCase()||"cenc"!==rt.value.toLowerCase()&&"cbcs"!==rt.value.toLowerCase()||(tt=rt)}return tt}},{key:"getPSSHData",value:function(et){var tt=8,nt=new DataView(et),rt=nt.getUint8(tt);return tt+=20,rt>0&&(tt+=4+16*nt.getUint32(tt)),tt+=4,et.slice(tt)}},{key:"getPSSHForKeySystem",value:function(et,tt){var nt=e.parsePSSHList(tt);return et&&nt.hasOwnProperty(et.uuid.toLowerCase())?nt[et.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(et,tt){return"pssh"in et?(et.pssh.__text=et.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),tt.decodeArray(et.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(et){if(null==et)return[];for(var tt=new DataView(et.buffer||et),nt={},rt=0;;){var it,at,ot=void 0,st=rt;if(rt>=tt.buffer.byteLength)break;if(it=rt+tt.getUint32(rt),rt+=4,1886614376===tt.getUint32(rt))if(rt+=4,0===(at=tt.getUint8(rt))||1===at){rt++,rt+=3,ot="";var lt=void 0,ft=void 0;for(lt=0;lt<4;lt++)ot+=1===(ft=tt.getUint8(rt+lt).toString(16)).length?"0"+ft:ft;for(rt+=4,ot+="-",lt=0;lt<2;lt++)ot+=1===(ft=tt.getUint8(rt+lt).toString(16)).length?"0"+ft:ft;for(rt+=2,ot+="-",lt=0;lt<2;lt++)ot+=1===(ft=tt.getUint8(rt+lt).toString(16)).length?"0"+ft:ft;for(rt+=2,ot+="-",lt=0;lt<2;lt++)ot+=1===(ft=tt.getUint8(rt+lt).toString(16)).length?"0"+ft:ft;for(rt+=2,ot+="-",lt=0;lt<6;lt++)ot+=1===(ft=tt.getUint8(rt+lt).toString(16)).length?"0"+ft:ft;rt+=6,rt+=4,nt[ot=ot.toLowerCase()]=tt.buffer.slice(st,it),rt=it}else rt=it;else rt=it}return nt}},{key:"getLicenseServerUrlFromMediaInfo",value:function(et,tt){try{if(!et||0===et.length)return null;for(var nt=0,it=null;nt<et.length&&!it;){var at=et[nt];if(at&&at.contentProtection&&at.contentProtection.length>0){var ot=at.contentProtection.filter((function(et){return et.schemeIdUri&&et.schemeIdUri===tt}));if(ot&&ot.length>0)for(var st=0;st<ot.length&&!it;){for(var lt=ot[st],ft=0;ft<rt.attributes.length&&!it;){for(var dt=0,pt=rt.attributes[ft];dt<rt.prefixes.length&&!it;){var yt=rt.prefixes[dt];lt[pt]&&lt[pt].__prefix&&lt[pt].__prefix===yt&&lt[pt].__text&&(it=lt[pt].__text),dt+=1}ft+=1}st+=1}}nt+=1}return it}catch(et){return null}}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e,et),e}(),at=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=et,this.robustness=tt},ot=function e(et,tt,nt,rt,it){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],et&&et.length&&(this.audioCapabilities=et),tt&&tt.length&&(this.videoCapabilities=tt),this.distinctiveIdentifier=nt,this.persistentState=rt,this.sessionTypes=it};function u(et){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function l(et,tt){return(l=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function c(et,tt){return!tt||"object"!==u(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function f(et){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const st=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&l(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=f(tt);if(nt){var it=f(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return c(this,et)});function i(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(et=rt.call(this)).MEDIA_KEYERR_CODE=100,et.MEDIA_KEYERR_UNKNOWN_CODE=101,et.MEDIA_KEYERR_CLIENT_CODE=102,et.MEDIA_KEYERR_SERVICE_CODE=103,et.MEDIA_KEYERR_OUTPUT_CODE=104,et.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,et.MEDIA_KEYERR_DOMAIN_CODE=106,et.MEDIA_KEY_MESSAGE_ERROR_CODE=107,et.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,et.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,et.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,et.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,et.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,et.KEY_SESSION_CREATED_ERROR_CODE=113,et.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,et.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",et.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",et.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",et.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",et.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",et.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.",et.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",et.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",et.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",et.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",et.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",et.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",et.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",et.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",et}return i}(nt(2230).Z));var lt=nt(5459);const ft=function e(et,tt,nt,rt,it,at,ot,st){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et,this.method=tt,this.responseType=nt,this.headers=rt,this.withCredentials=it,this.messageType=at,this.sessionId=ot,this.data=st},dt=function e(et,tt,nt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=et,this.headers=tt,this.data=nt};var pt=nt(7855),yt=nt(703),vt=nt(3393),At=nt(5448);function _(et){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function T(et){var tt,nt,rt,At,Rt,Nt,Dt,Ot,Mt,Lt,xt,kt=(et=et||{}).protectionKeyController,Ut=et.protectionModel,Bt=et.eventBus,Gt=et.events,qt=et.debug,jt=et.BASE64,Vt=et.constants,zt=[],Xt=et.cmcdModel,Qt=et.settings,$t=et.customParametersModel;function L(){if(!(Bt&&Bt.hasOwnProperty("on")&&kt&&kt.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function x(et,tt){Ot||Mt?Ot&&F():function(et,tt){if(!Mt){Mt=!0;var rt,it=[];et=et.sort((function(tt,nt){return(Rt&&Rt[tt.ks.systemString]&&Rt[tt.ks.systemString].priority>=0?Rt[tt.ks.systemString].priority:et.length)-(Rt&&Rt[nt.ks.systemString]&&Rt[nt.ks.systemString].priority>=0?Rt[nt.ks.systemString].priority:et.length)}));for(var at=0;at<et.length;at++){var ot=Y(et[at]);it.push({ks:et[at].ks,configs:[ot],protData:et[at].protData})}Ut.requestKeySystemAccess(it).then((function(et){var tt=(rt=et.data).mksa&&rt.mksa.selectedSystemString?rt.mksa.selectedSystemString:rt.keySystem.systemString;return nt.info("DRM: KeySystem Access Granted for system string ("+tt+")! Selecting key system..."),Ut.selectKeySystem(rt)})).then((function(et){if(Ot=et,Mt=!1,Ut){Bt.trigger(Gt.KEY_SYSTEM_SELECTED,{data:rt});var tt=B(Ot);tt&&tt.serverCertificate&&tt.serverCertificate.length>0&&Ut.setServerCertificate(jt.decodeArray(tt.serverCertificate).buffer),F()}})).catch((function(et){Ot=null,Mt=!1,tt||Bt.trigger(Gt.KEY_SYSTEM_SELECTED,{data:null,error:new lt.Z(st.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,st.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+et.error)})}))}}(et,tt)}function F(){for(var et,tt=0;tt<rt.length;tt++)for(et=0;et<rt[tt].length;et++)if(Ot===rt[tt][et].ks){k(rt[tt][et]);break}rt=[]}function k(et){if(kt.isClearKey(Ot)&&et.protData&&et.protData.hasOwnProperty("clearkeys")&&0!==Object.keys(et.protData.clearkeys).length){var tt={kids:Object.keys(et.protData.clearkeys)};et.initData=(new TextEncoder).encode(JSON.stringify(tt))}et.sessionId?U(et):null!==et.initData&&Z(et)}function U(et){L(),Ut.loadKeySession(et)}function Z(et){var tt=it.getPSSHForKeySystem(Ot,et?et.initData:null);if(tt){if(function(et){if(!et)return!1;try{for(var tt=Ut.getSessions(),nt=0;nt<tt.length;nt++)if(tt[nt].getKeyId()===et)return!0;return!1}catch(et){return!1}}(et.keyId))return;if(G(tt))return;try{et.initData=tt,Ut.createKeySession(et)}catch(et){Bt.trigger(Gt.KEY_SESSION_CREATED,{data:null,error:new lt.Z(st.KEY_SESSION_CREATED_ERROR_CODE,st.KEY_SESSION_CREATED_ERROR_MESSAGE+et.message)})}}else et&&et.initData?Ut.createKeySession(et):Bt.trigger(Gt.KEY_SESSION_CREATED,{data:null,error:new lt.Z(st.KEY_SESSION_CREATED_ERROR_CODE,st.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(Ot?Ot.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function B(et){if(et){var tt=et.systemString;if(Rt)return tt in Rt?Rt[tt]:null}return null}function G(et){if(!et)return!1;try{for(var tt=Ut.getAllInitData(),rt=0;rt<tt.length;rt++)if(kt.initDataEquals(et,tt[rt]))return nt.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(et){return!1}}function q(et){L(),et?(Ut.setMediaElement(et),Bt.on(Gt.NEED_KEY,J,tt)):null===et&&(Ut.setMediaElement(et),Bt.off(Gt.NEED_KEY,J,tt))}function Y(et){var tt=et.protData,nt=[],rt=[],it=tt&&tt.audioRobustness&&tt.audioRobustness.length>0?tt.audioRobustness:Dt,st=tt&&tt.videoRobustness&&tt.videoRobustness.length>0?tt.videoRobustness:Dt,lt=et.sessionType,ft=tt&&tt.distinctiveIdentifier?tt.distinctiveIdentifier:"optional",dt=tt&&tt.persistentState?tt.persistentState:"temporary"===lt?"optional":"required";return At.forEach((function(et){et.type===Vt.AUDIO?nt.push(new at(et.codec,it)):et.type===Vt.VIDEO&&rt.push(new at(et.codec,st))})),new ot(nt,rt,ft,dt,[lt])}function j(et){et.error?Bt.trigger(Gt.KEY_STATUSES_CHANGED,{data:null,error:et.error}):nt.debug("DRM: key status = "+et.status)}function H(et){nt.debug("DRM: onKeyMessage");var tt=et.data;Bt.trigger(Gt.KEY_MESSAGE,{data:tt});var rt=tt.messageType?tt.messageType:"license-request",at=tt.message,ot=tt.sessionToken,vt=B(Ot),Rt=kt.getLicenseServerModelInstance(Ot,vt,rt),Nt={sessionToken:ot,messageType:rt};if(at&&0!==at.byteLength){if(!Rt)return nt.debug("DRM: License server request not required for this message (type = "+et.data.messageType+"). Session ID = "+ot.getSessionId()),void V(Nt);if(kt.isClearKey(Ot)){var Dt=kt.processClearKeyLicenseRequest(Ot,vt,at);if(Dt&&Dt.keyPairs&&Dt.keyPairs.length>0)return nt.debug("DRM: ClearKey license request handled by application!"),V(Nt),void Ut.updateKeySession(ot,Dt)}!function(et,tt,nt){var rt=et.sessionToken,at=et.messageType?et.messageType:"license-request",ot={sessionToken:rt,messageType:at},vt=Ot?Ot.systemString:null,Rt=function(et,tt,nt,rt,at){var ot=null,st=rt.message;if(et&&et.serverURL){var lt=et.serverURL;"string"==typeof lt&&""!==lt?ot=lt:"object"===_(lt)&&lt.hasOwnProperty(tt)&&(ot=lt[tt])}else if(et&&et.laURL&&""!==et.laURL)ot=et.laURL;else if(!(ot=it.getLicenseServerUrlFromMediaInfo(At,Ot.schemeIdURI))&&!kt.isClearKey(Ot)){var ft=it.getPSSHData(nt.initData);(ot=Ot.getLicenseServerURLFromInitData(ft))||(ot=rt.laURL)}return at.getServerURLFromMessage(ot,st,tt)}(nt,at,rt,et,tt);if(Rt){var Nt={},Dt=!1;nt&&W(Nt,nt.httpRequestHeaders);var Mt=et.message;W(Nt,Ot.getRequestHeadersFromMessage(Mt)),Object.keys(Nt).forEach((function(et){"authorization"===et.toLowerCase()&&(Dt=!0)})),nt&&"boolean"==typeof nt.withCredentials&&(Dt=nt.withCredentials);var T=function(et){if(Ut)if(et.status>=200&&et.status<=299){var nt=yt.Z.parseHttpHeaders(et.getAllResponseHeaders?et.getAllResponseHeaders():null),it=new dt(et.responseURL,nt,et.response);Q($t.getLicenseResponseFilters(),it).then((function(){var nt=tt.getLicenseMessage(it.data,vt,at);null!==nt?(V(ot),Ut.updateKeySession(rt,nt)):X(et,ot,vt,at,tt)}))}else X(et,ot,vt,at,tt)},S=function(et){V(ot,new lt.Z(st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+vt+' update, XHR aborted. status is "'+et.statusText+'" ('+et.status+"), readyState is "+et.readyState))},I=function(et){V(ot,new lt.Z(st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+vt+' update, XHR error. status is "'+et.statusText+'" ('+et.status+"), readyState is "+et.readyState))},Lt=Ot.getLicenseRequestFromMessage(Mt),xt=tt.getHTTPMethod(at),Bt=tt.getResponseType(vt,at),Gt=nt&&!isNaN(nt.httpTimeout)?nt.httpTimeout:8e3,qt=rt.getSessionId()||null,jt=new ft(Rt,xt,Bt,Nt,Dt,at,qt,Lt),Vt=isNaN(Qt.get().streaming.retryAttempts[pt.w.LICENSE])?3:Qt.get().streaming.retryAttempts[pt.w.LICENSE];Q($t.getLicenseRequestFilters(),jt).then((function(){K(jt,Vt,Gt,T,S,I)}))}else V(ot,new lt.Z(st.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,st.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}(tt,Rt,vt)}else V(Nt,new lt.Z(st.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,st.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function V(et,tt){Bt.trigger(Gt.LICENSE_REQUEST_COMPLETE,{data:et,error:tt})}function K(et,tt,rt,it,at,ot){var st=new XMLHttpRequest;if(Qt.get().streaming.cmcd&&Qt.get().streaming.cmcd.enabled&&Qt.get().streaming.cmcd.mode===vt.Z.CMCD_MODE_QUERY){var lt=Xt.getQueryParameter({url:et.url,type:pt.w.LICENSE});lt&&(et.url=yt.Z.addAditionalQueryParameterToUrl(et.url,[lt]))}for(var ft in st.open(et.method,et.url,!0),st.responseType=et.responseType,st.withCredentials=et.withCredentials,rt>0&&(st.timeout=rt),et.headers)st.setRequestHeader(ft,et.headers[ft]);if(Qt.get().streaming.cmcd&&Qt.get().streaming.cmcd.enabled&&Qt.get().streaming.cmcd.mode===vt.Z.CMCD_MODE_HEADER){var dt=Xt.getHeaderParameters({url:et.url,type:pt.w.LICENSE});if(dt)for(var At in dt){var Rt=dt[At];Rt&&st.setRequestHeader(At,Rt)}}var g=function(){tt--;var nt=isNaN(Qt.get().streaming.retryIntervals[pt.w.LICENSE])?1e3:Qt.get().streaming.retryIntervals[pt.w.LICENSE];xt=setTimeout((function(){K(et,tt,rt,it,at,ot)}),nt)};st.onload=function(){Lt=null,this.status>=200&&this.status<=299||tt<=0?it(this):(nt.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+tt),g())},st.ontimeout=st.onerror=function(){Lt=null,tt<=0?ot(this):(nt.warn("License request network request failed . Retrying it... Pending retries: "+tt),g())},st.onabort=function(){at(this)},Bt.trigger(Gt.LICENSE_REQUEST_SENDING,{url:et.url,headers:et.headers,payload:et.data,sessionId:et.sessionId}),Lt=st,st.send(et.data)}function z(){Lt&&(Lt.onloadend=Lt.onerror=Lt.onprogress=void 0,Lt.abort(),Lt=null),xt&&(clearTimeout(xt),xt=null)}function W(et,tt){if(tt)for(var nt in tt)et[nt]=tt[nt]}function X(et,tt,nt,rt,it){var at="NONE",ot=null;et.response&&(at=it.getErrorResponse(et.response,nt,rt),ot={serverResponse:et.response||null,responseCode:et.status||null,responseText:et.statusText||null}),V(tt,new lt.Z(st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,st.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+nt+' update, XHR complete. status is "'+et.statusText+'" ('+et.status+"), readyState is "+et.readyState+". Response is "+at,ot))}function Q(et,tt){return et?et.reduce((function(et,nt){return et.then((function(){return nt(tt)}))}),Promise.resolve()):Promise.resolve()}function J(et,tt){if(!Qt.get().streaming.protection.ignoreEmeEncryptedEvent){if(nt.debug("DRM: onNeedKey"),"cenc"!==et.key.initDataType)return void nt.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+et.key.initDataType);if(0===At.length&&(nt.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(tt=void 0===tt?1:tt+1)<5))return void zt.push(setTimeout((function(){J(et,tt)}),500));var at=et.key.initData;if(ArrayBuffer.isView(at)&&(at=at.buffer),Ot){var ot=it.getPSSHForKeySystem(Ot,at);if(ot&&G(ot))return}nt.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(at)));var st=kt.getSupportedKeySystemsFromSegmentPssh(at,Rt,Nt);if(0===st.length)return void nt.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");!function(et){rt.push(et),x(et,!1)}(st)}}return tt={initializeForMedia:function(et){if(!et)throw new Error("mediaInfo can not be null or undefined");L(),At.push(et)},clearMediaInfoArray:function(){At=[]},handleKeySystemFromManifest:function(){if(At&&0!==At.length){var et=[];At.forEach((function(tt){var nt=kt.getSupportedKeySystemsFromContentProtection(tt.contentProtection,Rt,Nt);nt.length>0&&(0===et.length&&(et=nt),rt.push(nt))})),et&&et.length>0&&x(et,!0)}},createKeySession:Z,loadKeySession:U,removeKeySession:function(et){L(),Ut.removeKeySession(et)},closeKeySession:function(et){L(),Ut.closeKeySession(et)},setServerCertificate:function(et){L(),Ut.setServerCertificate(et)},setMediaElement:q,setSessionType:function(et){Nt=et},setRobustnessLevel:function(et){Dt=et},setProtectionData:function(et){Rt=et,kt.setProtectionData(et)},getSupportedKeySystemsFromContentProtection:function(et){return L(),kt.getSupportedKeySystemsFromContentProtection(et,Rt,Nt)},getKeySystems:function(){return kt?kt.getKeySystems():[]},setKeySystems:function(et){kt&&kt.setKeySystems(et)},stop:function(){z(),Ut&&Ut.stop()},reset:function(){Bt.off(Gt.INTERNAL_KEY_MESSAGE,H,tt),Bt.off(Gt.INTERNAL_KEY_STATUS_CHANGED,j,tt),L(),z(),q(null),Ot=null,Mt=!1,Ut&&(Ut.reset(),Ut=null),zt.forEach((function(et){return clearTimeout(et)})),zt=[],At=[],rt=[]}},nt=qt.getLogger(tt),rt=[],At=[],Nt="temporary",Dt="",Lt=null,xt=null,Bt.on(Gt.INTERNAL_KEY_MESSAGE,H,tt),Bt.on(Gt.INTERNAL_KEY_STATUS_CHANGED,j,tt),tt}T.__dashjs_factory_name="ProtectionController";const Rt=At.Z.getClassFactory(T),Nt=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=et,this.key=tt},Dt=function(){function e(et,tt){if(function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),tt&&"persistent"!==tt&&"temporary"!==tt)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=et,this.type=tt}var et;return(et=[{key:"toJWK",value:function(){var et,tt=this.keyPairs.length,nt={keys:[]};for(et=0;et<tt;et++){var rt={kty:"oct",alg:"A128KW",kid:this.keyPairs[et].keyID,k:this.keyPairs[et].key};nt.keys.push(rt)}this.type&&(nt.type=this.type);var it=JSON.stringify(nt),at=it.length,ot=new ArrayBuffer(at),st=new Uint8Array(ot);for(et=0;et<at;et++)st[et]=it.charCodeAt(et);return ot}}])&&function A(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}(),Ot=new(function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var et;return(et=[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready",this.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING="com.microsoft.playready.recommendation",this.INITIALIZATION_DATA_TYPE_CENC="cenc",this.INITIALIZATION_DATA_TYPE_KEYIDS="keyids",this.INITIALIZATION_DATA_TYPE_WEBM="webm"}}])&&function R(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}());var Mt="e2719d58-a985-b3c9-781a-b030af78d30e",Lt=Ot.CLEARKEY_KEYSTEM_STRING;function O(et){var tt=(et=et||{}).BASE64;return{uuid:Mt,schemeIdURI:"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e",systemString:Lt,getInitData:function(et,nt){try{var rt=it.parseInitDataFromContentProtection(et,tt);if(!rt&&nt){var at={kids:[function(et){try{var tt=et.replace(/-/g,"");return(tt=btoa(tt.match(/\w{2}/g).map((function(et){return String.fromCharCode(parseInt(et,16))})).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch(et){return null}}(nt["cenc:default_KID"])]};rt=(new TextEncoder).encode(JSON.stringify(at))}return rt}catch(et){return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(et){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(et))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(et,tt){var nt=null;if(et){for(var rt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(tt))),it=[],at=0;at<rt.kids.length;at++){var ot=rt.kids[at],st=et.clearkeys&&et.clearkeys.hasOwnProperty(ot)?et.clearkeys[ot]:null;if(!st)throw new Error("DRM: ClearKey keyID ("+ot+") is not known!");it.push(new Nt(ot,st))}nt=new Dt(it)}return nt}}}O.__dashjs_factory_name="KeySystemClearKey";const xt=dashjs.FactoryMaker.getSingletonFactory(O);var kt="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Ut=Ot.CLEARKEY_KEYSTEM_STRING;function F(et){var tt=et.BASE64,nt=et.debug.getLogger(void 0);return{uuid:kt,schemeIdURI:"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",systemString:Ut,getInitData:function(et){return it.parseInitDataFromContentProtection(et,tt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(et){return new Uint8Array(et)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(et,tt){var rt=null;if(et){for(var it=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(tt))),at=[],ot=0;ot<it.kids.length;ot++){var st=it.kids[ot],lt=et.clearkeys&&et.clearkeys.hasOwnProperty(st)?et.clearkeys[st]:null;if(!lt)throw new Error("DRM: ClearKey keyID ("+st+") is not known!");at.push(new Nt(st,lt))}rt=new Dt(at),nt.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 rt}}}F.__dashjs_factory_name="KeySystemW3CClearKey";const Bt=dashjs.FactoryMaker.getSingletonFactory(F);var Gt="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",qt=Ot.WIDEVINE_KEYSTEM_STRING;function G(et){var tt=(et=et||{}).BASE64;return{uuid:Gt,schemeIdURI:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",systemString:qt,getInitData:function(et){return it.parseInitDataFromContentProtection(et,tt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(et){return new Uint8Array(et)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}G.__dashjs_factory_name="KeySystemWidevine";const jt=dashjs.FactoryMaker.getSingletonFactory(G);var Vt="9a04f079-9840-4286-ab92-e65be0885f95",zt=Ot.PLAYREADY_KEYSTEM_STRING;function V(et){var tt="utf-16",nt=(et=et||{}).BASE64,rt=et.settings;function i(){if(!nt||!nt.hasOwnProperty("decodeArray")||!nt.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:Vt,schemeIdURI:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",systemString:zt,getInitData:function(et){var tt,rt,at,ot,st,lt=new Uint8Array([112,115,115,104,0,0,0,0]),ft=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),dt=0,pt=null;if(i(),!et)return null;if("pssh"in et)return it.parseInitDataFromContentProtection(et,nt);if("pro"in et)pt=nt.decodeArray(et.pro.__text);else{if(!("prheader"in et))return null;pt=nt.decodeArray(et.prheader.__text)}return tt=pt.length,rt=4+lt.length+ft.length+4+tt,at=new ArrayBuffer(rt),ot=new Uint8Array(at),(st=new DataView(at)).setUint32(dt,rt),dt+=4,ot.set(lt,dt),dt+=lt.length,ot.set(ft,dt),dt+=ft.length,st.setUint32(dt,tt),dt+=4,ot.set(pt,dt),dt+=tt,ot.buffer},getRequestHeadersFromMessage:function(et){var nt,it,at={},ot=new DOMParser;if(rt&&rt.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===tt&&et&&et.byteLength%2==1)return at["Content-Type"]="text/xml; charset=utf-8",at;var st="utf-16"===tt?new Uint16Array(et):new Uint8Array(et);nt=String.fromCharCode.apply(null,st);for(var lt=(it=ot.parseFromString(nt,"application/xml")).getElementsByTagName("name"),ft=it.getElementsByTagName("value"),dt=0;dt<lt.length;dt++)at[lt[dt].childNodes[0].nodeValue]=ft[dt].childNodes[0].nodeValue;return at.hasOwnProperty("Content")&&(at["Content-Type"]=at.Content,delete at.Content),at.hasOwnProperty("Content-Type")||(at["Content-Type"]="text/xml; charset=utf-8"),at},getLicenseRequestFromMessage:function(et){var it=null,at=new DOMParser;if(rt&&rt.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===tt&&et&&et.byteLength%2==1)return et;var ot="utf-16"===tt?new Uint16Array(et):new Uint8Array(et);i();var st=String.fromCharCode.apply(null,ot),lt=at.parseFromString(st,"application/xml");if(!lt.getElementsByTagName("PlayReadyKeyMessage")[0])return et;var ft=lt.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return ft&&(it=nt.decode(ft)),it},getLicenseServerURLFromInitData:function(et){if(et)for(var tt=new DataView(et),nt=tt.getUint16(4,!0),rt=6,it=new DOMParser,at=0;at<nt;at++){var ot=tt.getUint16(rt,!0);rt+=2;var st=tt.getUint16(rt,!0);if(rt+=2,1===ot){var lt=et.slice(rt,rt+st),ft=String.fromCharCode.apply(null,new Uint16Array(lt)),dt=it.parseFromString(ft,"application/xml");if(dt.getElementsByTagName("LA_URL")[0]){var pt=dt.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(pt)return pt}if(dt.getElementsByTagName("LUI_URL")[0]){var yt=dt.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(yt)return yt}}else rt+=st}return null},getCDMData:function(et){var tt,rt,it,at;if(i(),!et)return null;for(tt=[],at=0;at<et.length;++at)tt.push(et.charCodeAt(at)),tt.push(0);for(tt=String.fromCharCode.apply(null,tt),tt=nt.encode(tt),rt='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",tt),it=[],at=0;at<rt.length;++at)it.push(rt.charCodeAt(at)),it.push(0);return new Uint8Array(it).buffer},setPlayReadyMessageFormat:function(et){if("utf-8"!==et&&"utf-16"!==et)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');tt=et}}}V.__dashjs_factory_name="KeySystemPlayReady";const Xt=dashjs.FactoryMaker.getSingletonFactory(V);function z(et){var tt=(et=et||{}).BASE64,nt={};return nt[Ot.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(et){return tt.decodeArray(et.license)},getErrorResponse:function(et){return et}},nt[Ot.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(et){return et},getErrorResponse:function(et){return String.fromCharCode.apply(null,new Uint8Array(et))}},{getServerURLFromMessage:function(et){return et},getHTTPMethod:function(){return"POST"},getResponseType:function(et){return nt[et].responseType},getLicenseMessage:function(et,rt){return function(){if(!tt||!tt.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),nt[rt].getLicenseMessage(et)},getErrorResponse:function(et,tt){return nt[tt].getErrorResponse(et)}}}z.__dashjs_factory_name="DRMToday";const Qt=dashjs.FactoryMaker.getSingletonFactory(z);function X(){var et="http://schemas.xmlsoap.org/soap/envelope/";function t(et){var tt=String.fromCharCode.apply(null,new Uint8Array(et));return decodeURIComponent(escape(tt))}function n(tt){if(window.DOMParser){var nt=t(tt),rt=(new window.DOMParser).parseFromString(nt,"text/xml"),it=rt?rt.getElementsByTagNameNS(et,"Envelope")[0]:null,at=it?it.getElementsByTagNameNS(et,"Body")[0]:null;if(at&&at.getElementsByTagNameNS(et,"Fault")[0])return null}return tt}function r(tt){var nt="",rt="",it="",at=-1,ot=-1;if(window.DOMParser){var st=t(tt),lt=(new window.DOMParser).parseFromString(st,"text/xml"),ft=lt?lt.getElementsByTagNameNS(et,"Envelope")[0]:null,dt=ft?ft.getElementsByTagNameNS(et,"Body")[0]:null,pt=dt?dt.getElementsByTagNameNS(et,"Fault")[0]:null,yt=pt?pt.getElementsByTagName("detail")[0]:null,vt=yt?yt.getElementsByTagName("Exception")[0]:null,At=null;if(null===pt)return st;nt=(At=pt.getElementsByTagName("faultstring")[0].firstChild)?At.nodeValue:null,null!==vt&&(rt=(At=vt.getElementsByTagName("StatusCode")[0])?At.firstChild.nodeValue:null,at=(it=(At=vt.getElementsByTagName("Message")[0])?At.firstChild.nodeValue:null)?it.lastIndexOf("[")+1:-1,ot=it?it.indexOf("]"):-1,it=it?it.substring(at,ot):"")}var Rt="code: ".concat(rt,", name: ").concat(nt);return it&&(Rt+=", message: ".concat(it)),Rt}return{getServerURLFromMessage:function(et){return et},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(et){return n.call(this,et)},getErrorResponse:function(et){return r.call(this,et)}}}X.__dashjs_factory_name="PlayReady";const $t=At.Z.getSingletonFactory(X);function J(){return{getServerURLFromMessage:function(et){return et},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(et){return et},getErrorResponse:function(et){return String.fromCharCode.apply(null,new Uint8Array(et))}}}J.__dashjs_factory_name="Widevine";const tn=dashjs.FactoryMaker.getSingletonFactory(J);function ee(){return{getServerURLFromMessage:function(et){return et},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(et){if(!et.hasOwnProperty("keys"))return null;for(var tt=[],nt=0;nt<et.keys.length;nt++){var rt=et.keys[nt],it=rt.kid.replace(/=/g,""),at=rt.k.replace(/=/g,"");tt.push(new Nt(it,at))}return new Dt(tt)},getErrorResponse:function(et){return String.fromCharCode.apply(null,new Uint8Array(et))}}}ee.__dashjs_factory_name="ClearKey";const nn=dashjs.FactoryMaker.getSingletonFactory(ee);function ne(){var et,tt,nt,rt,at,ot,st,lt,ft=this.context;function c(et,tt){return tt&&et in tt?tt[et]:null}function f(et,tt){return et&&et.sessionId?et.sessionId:tt&&tt.sessionId?tt.sessionId:null}function d(et,tt){return et&&et.sessionType?et.sessionType:tt}return et={initialize:function(){var et;rt=[],et=Xt(ft).getInstance({BASE64:at,settings:ot}),rt.push(et),et=jt(ft).getInstance({BASE64:at}),rt.push(et),et=xt(ft).getInstance({BASE64:at}),rt.push(et),st=et,et=Bt(ft).getInstance({BASE64:at,debug:tt}),rt.push(et),lt=et},setProtectionData:function(et){for(var tt,nt,it=0;it<rt.length;it++){var at=rt[it];at.hasOwnProperty("init")&&at.init((tt=at.systemString,nt=void 0,nt=null,et&&(nt=tt in et?et[tt]:null),nt))}},isClearKey:function(et){return et===st||et===lt},initDataEquals:function(et,tt){if(et.byteLength===tt.byteLength){for(var nt=new Uint8Array(et),rt=new Uint8Array(tt),it=0;it<nt.length;it++)if(nt[it]!==rt[it])return!1;return!0}return!1},getKeySystems:function(){return rt},setKeySystems:function(et){rt=et},getKeySystemBySystemString:function(et){for(var tt=0;tt<rt.length;tt++)if(rt[tt].systemString===et)return rt[tt];return null},getSupportedKeySystemsFromContentProtection:function(et,tt,nt){var at,ot,st,lt,ft=[];if(et){var dt=it.findCencContentProtection(et);for(st=0;st<rt.length;++st){var pt=c((ot=rt[st]).systemString,tt);for(lt=0;lt<et.length;++lt)if((at=et[lt]).schemeIdUri.toLowerCase()===ot.schemeIdURI){var yt=ot.getInitData(at,dt);ft.push({ks:rt[st],keyId:at.keyId,initData:yt,protData:pt,cdmData:ot.getCDMData(pt?pt.cdmData:null),sessionId:f(pt,at),sessionType:d(pt,nt)})}}}return ft},getSupportedKeySystemsFromSegmentPssh:function(et,tt,nt){for(var at,ot=[],st=it.parsePSSHList(et),lt=0;lt<rt.length;++lt){var ft=c((at=rt[lt]).systemString,tt);at.uuid in st&&ot.push({ks:at,initData:st[at.uuid],protData:ft,cdmData:at.getCDMData(ft?ft.cdmData:null),sessionId:f(ft),sessionType:d(ft,nt)})}return ot},getLicenseServerModelInstance:function(et,tt,nt){if("license-release"===nt||"individualization-request"===nt)return null;var rt=null;return tt&&tt.hasOwnProperty("drmtoday")?rt=Qt(ft).getInstance({BASE64:at}):et.systemString===Ot.WIDEVINE_KEYSTEM_STRING?rt=tn(ft).getInstance():et.systemString===Ot.PLAYREADY_KEYSTEM_STRING?rt=$t(ft).getInstance():et.systemString===Ot.CLEARKEY_KEYSTEM_STRING&&(rt=nn(ft).getInstance()),rt},processClearKeyLicenseRequest:function(et,tt,rt){try{return et.getClearKeysFromProtectionData(tt,rt)}catch(et){return nt.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(rt){rt&&(rt.debug&&(tt=rt.debug,nt=tt.getLogger(et)),rt.BASE64&&(at=rt.BASE64),rt.settings&&(ot=rt.settings))}}}ne.__dashjs_factory_name="ProtectionKeyController";const on=dashjs.FactoryMaker.getSingletonFactory(ne);function ie(et){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function ae(et,tt){return(ae=Object.setPrototypeOf||function(et,tt){return et.__proto__=tt,et})(et,tt)}function oe(et,tt){return!tt||"object"!==ie(tt)&&"function"!=typeof tt?function(et){if(void 0===et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et}(et):tt}function se(et){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(et)}const un=new(function(et){!function(et,tt){if("function"!=typeof tt&&null!==tt)throw new TypeError("Super expression must either be null or a function");et.prototype=Object.create(tt&&tt.prototype,{constructor:{value:et,writable:!0,configurable:!0}}),tt&&ae(et,tt)}(i,et);var tt,nt,rt=(tt=i,nt=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(et){return!1}}(),function(){var et,rt=se(tt);if(nt){var it=se(this).constructor;et=Reflect.construct(rt,arguments,it)}else et=rt.apply(this,arguments);return oe(this,et)});function i(){var et;return function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,i),(et=rt.call(this)).INTERNAL_KEY_MESSAGE="internalKeyMessage",et.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",et.KEY_ADDED="public_keyAdded",et.KEY_ERROR="public_keyError",et.KEY_MESSAGE="public_keyMessage",et.KEY_SESSION_CLOSED="public_keySessionClosed",et.KEY_SESSION_CREATED="public_keySessionCreated",et.KEY_SESSION_REMOVED="public_keySessionRemoved",et.KEY_STATUSES_CHANGED="public_keyStatusesChanged",et.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",et.KEY_SYSTEM_SELECTED="public_keySystemSelected",et.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",et.LICENSE_REQUEST_SENDING="public_licenseRequestSending",et.NEED_KEY="needkey",et.PROTECTION_CREATED="public_protectioncreated",et.PROTECTION_DESTROYED="public_protectiondestroyed",et.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",et.TEARDOWN_COMPLETE="protectionTeardownComplete",et.VIDEO_ELEMENT_SELECTED="videoElementSelected",et.KEY_SESSION_UPDATED="public_keySessionUpdated",et}return i}(nt(8342).Z)),cn=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.initData=et,this.initDataType=tt},fn=function e(et,tt,nt,rt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.sessionToken=et,this.message=tt,this.defaultURL=nt,this.messageType=rt||"license-request"},dn=function e(et,tt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.keySystem=et,this.ksConfiguration=tt};var gn={};function ge(et){et=et||{};var tt,nt,rt,it,at,ot,ft,dt,pt=this.context,yt=et.eventBus,vt=et.events,At=et.debug;function m(et,tt,rt,it,at){var ot=et[rt];nt.debug("Requesting key system access for system string ".concat(ot)),navigator.requestMediaKeySystemAccess(ot,tt).then((function(et){et.selectedSystemString=ot,it(et)})).catch((function(nt){rt+1<et.length?m(et,tt,rt+1,it,at):at(nt)}))}function y(et){var tt=et.session;return tt.removeEventListener("keystatuseschange",et),tt.removeEventListener("message",et),tt.close()}function E(et){for(var tt=0;tt<ot.length;tt++)if(ot[tt]===et){ot.splice(tt,1);break}}function v(et){var tt,nt;return et&&et.length>0&&(et[0]&&("string"==typeof et[0]?tt=et[0]:nt=et[0]),et[1]&&("string"==typeof et[1]?tt=et[1]:nt=et[1])),{status:tt,keyId:nt}}function _(et,tt){var rt={session:et,keyId:tt.keyId,initData:tt.initData,sessionId:tt.sessionId,sessionType:tt.sessionType,handleEvent:function(et){switch(et.type){case"keystatuseschange":yt.trigger(vt.KEY_STATUSES_CHANGED,{data:this}),et.target.keyStatuses.forEach((function(){var et=v(arguments);"expired"===et.status?yt.trigger(vt.INTERNAL_KEY_STATUS_CHANGED,{error:new lt.Z(st.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,st.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):yt.trigger(vt.INTERNAL_KEY_STATUS_CHANGED,et)}));break;case"message":var tt=ArrayBuffer.isView(et.message)?et.message.buffer:et.message;yt.trigger(vt.INTERNAL_KEY_MESSAGE,{data:new fn(this,tt,void 0,et.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(){var tt=!1;return et.keyStatuses.forEach((function(){var et=v(arguments);"usable"===et.status&&(tt=!0)})),tt}};return et.addEventListener("keystatuseschange",rt),et.addEventListener("message",rt),et.closed.then((function(){E(rt),nt.debug("DRM: Session closed. SessionID = "+rt.getSessionId()),yt.trigger(vt.KEY_SESSION_CLOSED,{data:rt.getSessionId()})})),ot.push(rt),rt}return tt={getAllInitData:function(){for(var et=[],tt=0;tt<ot.length;tt++)ot[tt].initData&&et.push(ot[tt].initData);return et},getSessions:function(){return ot},requestKeySystemAccess:function(et){return new Promise((function(tt,nt){!function p(et,tt,nt,rt){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess){var it="Insecure origins are not allowed";return yt.trigger(vt.KEY_SYSTEM_ACCESS_COMPLETE,{error:it}),void rt({error:it})}var at=et[tt].protData&&et[tt].protData.systemStringPriority?et[tt].protData.systemStringPriority:null,ot=et[tt].configs,st=et[tt].ks,lt=st.systemString;(function(et,tt){return new Promise((function(nt,rt){m(et,tt,0,nt,rt)}))})(at||(gn[lt]?gn[lt]:[lt]),ot).then((function(et){var tt="function"==typeof et.getConfiguration?et.getConfiguration():null,rt=new dn(st,tt);rt.mksa=et,yt.trigger(vt.KEY_SYSTEM_ACCESS_COMPLETE,{data:rt}),nt({data:rt})})).catch((function(it){if(tt+1<et.length)p(et,tt+1,nt,rt);else{var at="Key system access denied! ";yt.trigger(vt.KEY_SYSTEM_ACCESS_COMPLETE,{error:at+it.message}),rt({error:at+it.message})}}))}(et,0,tt,nt)}))},selectKeySystem:function(et){return new Promise((function(tt,nt){et.mksa.createMediaKeys().then((function(tt){return rt=et.keySystem,at=tt,it?it.setMediaKeys(at):Promise.resolve()})).then((function(){tt(rt)})).catch((function(){nt({error:"Error selecting keys system ("+et.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(et){it!==et&&(it&&(it.removeEventListener("encrypted",ft),it.setMediaKeys&&it.setMediaKeys(null)),(it=et)&&(it.addEventListener("encrypted",ft),it.setMediaKeys&&at&&it.setMediaKeys(at)))},setServerCertificate:function(et){if(!rt||!at)throw new Error("Can not set server certificate until you have selected a key system");at.setServerCertificate(et).then((function(){nt.info("DRM: License server certificate successfully updated."),yt.trigger(vt.SERVER_CERTIFICATE_UPDATED)})).catch((function(et){yt.trigger(vt.SERVER_CERTIFICATE_UPDATED,{error:new lt.Z(st.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,st.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+et.name)})}))},createKeySession:function(et){if(!rt||!at)throw new Error("Can not create sessions until you have selected a key system");var tt=at.createSession(et.sessionType),it=_(tt,et),ot=rt.systemString===Ot.CLEARKEY_KEYSTEM_STRING&&(et.initData||et.protData&&et.protData.clearkeys)?Ot.INITIALIZATION_DATA_TYPE_KEYIDS:Ot.INITIALIZATION_DATA_TYPE_CENC;tt.generateRequest(ot,et.initData).then((function(){nt.debug("DRM: Session created. SessionID = "+it.getSessionId()),yt.trigger(vt.KEY_SESSION_CREATED,{data:it})})).catch((function(et){E(it),yt.trigger(vt.KEY_SESSION_CREATED,{data:null,error:new lt.Z(st.KEY_SESSION_CREATED_ERROR_CODE,st.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+et.name)})}))},updateKeySession:function(et,tt){var nt=et.session;dt.isClearKey(rt)&&(tt=tt.toJWK()),nt.update(tt).then((function(){yt.trigger(vt.KEY_SESSION_UPDATED)})).catch((function(tt){yt.trigger(vt.KEY_ERROR,{error:new lt.Z(st.MEDIA_KEYERR_CODE,"Error sending update() message! "+tt.name,et)})}))},loadKeySession:function(et){if(!rt||!at)throw new Error("Can not load sessions until you have selected a key system");for(var tt=et.sessionId,it=0;it<ot.length;it++)if(tt===ot[it].sessionId)return void nt.warn("DRM: Ignoring session ID because we have already seen it!");var ft=at.createSession(et.sessionType),dt=_(ft,et);ft.load(tt).then((function(et){et?(nt.debug("DRM: Session loaded. SessionID = "+dt.getSessionId()),yt.trigger(vt.KEY_SESSION_CREATED,{data:dt})):(E(dt),yt.trigger(vt.KEY_SESSION_CREATED,{data:null,error:new lt.Z(st.KEY_SESSION_CREATED_ERROR_CODE,st.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+tt+")")}))})).catch((function(et){E(dt),yt.trigger(vt.KEY_SESSION_CREATED,{data:null,error:new lt.Z(st.KEY_SESSION_CREATED_ERROR_CODE,st.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+tt+")! "+et.name)})}))},removeKeySession:function(et){et.session.remove().then((function(){nt.debug("DRM: Session removed. SessionID = "+et.getSessionId()),yt.trigger(vt.KEY_SESSION_REMOVED,{data:et.getSessionId()})}),(function(tt){yt.trigger(vt.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+et.getSessionId()+"). "+tt.name})}))},closeKeySession:function(et){y(et).catch((function(tt){E(et),yt.trigger(vt.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+et.getSessionId()+") "+tt.name})}))},stop:function(){for(var et,tt=0;tt<ot.length;tt++)(et=ot[tt]).getUsable()||y(et).catch((function(){E(et)}))},reset:function(){var et,tt=ot.length;0!==tt?function(){for(var n=function(et){E(et),0===ot.length&&(it?(it.removeEventListener("encrypted",ft),it.setMediaKeys(null).then((function(){yt.trigger(vt.TEARDOWN_COMPLETE)}))):yt.trigger(vt.TEARDOWN_COMPLETE))},nt=0;nt<tt;nt++)!function(tt){et.session.closed.then((function(){n(tt)})),y(et).catch((function(){n(tt)}))}(et=ot[nt])}():yt.trigger(vt.TEARDOWN_COMPLETE)}},nt=At.getLogger(tt),rt=null,it=null,at=null,ot=[],dt=on(pt).getInstance(),ft={handleEvent:function(et){if("encrypted"===et.type&&et.initData){var tt=ArrayBuffer.isView(et.initData)?et.initData.buffer:et.initData;yt.trigger(vt.NEED_KEY,{key:new cn(tt,et.initDataType)})}}},tt}gn[Ot.PLAYREADY_KEYSTEM_STRING]=[Ot.PLAYREADY_KEYSTEM_STRING,Ot.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],gn[Ot.WIDEVINE_KEYSTEM_STRING]=[Ot.WIDEVINE_KEYSTEM_STRING],gn[Ot.CLEARKEY_KEYSTEM_STRING]=[Ot.CLEARKEY_KEYSTEM_STRING],ge.__dashjs_factory_name="ProtectionModel_21Jan2015";const pn=dashjs.FactoryMaker.getClassFactory(ge);function pe(et){et=et||{};var tt,nt,rt,it,at,ft,dt,pt,yt,vt=this.context,At=et.eventBus,Rt=et.events,Nt=et.debug,Dt=et.api;function E(){try{for(var et=0;et<dt.length;et++)v(dt[et]);rt&&rt.removeEventListener(Dt.needkey,pt),At.trigger(Rt.TEARDOWN_COMPLETE)}catch(et){At.trigger(Rt.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+et.message})}}function v(et){var tt=et.session;tt.removeEventListener(Dt.error,et),tt.removeEventListener(Dt.message,et),tt.removeEventListener(Dt.ready,et),tt.removeEventListener(Dt.close,et);for(var nt=0;nt<dt.length;nt++)if(dt[nt]===et){dt.splice(nt,1);break}tt[Dt.release]()}function _(){var et=null,t=function(){rt.removeEventListener("loadedmetadata",et),rt[Dt.setMediaKeys](at),At.trigger(Rt.VIDEO_ELEMENT_SELECTED)};rt.readyState>=1?t():(et=t.bind(this),rt.addEventListener("loadedmetadata",et))}return tt={getAllInitData:function(){for(var et=[],tt=0;tt<dt.length;tt++)et.push(dt[tt].initData);return et},getSessions:function(){return dt},requestKeySystemAccess:function(et){return new Promise((function(tt,nt){for(var rt=!1,it=0;it<et.length;it++)for(var at=et[it].ks.systemString,st=et[it].configs,lt=null,ft=null,dt=0;dt<st.length;dt++){var pt=st[dt].audioCapabilities,vt=st[dt].videoCapabilities;if(pt&&0!==pt.length){lt=[];for(var Nt=0;Nt<pt.length;Nt++)window[Dt.MediaKeys].isTypeSupported(at,pt[Nt].contentType)&&lt.push(pt[Nt])}if(vt&&0!==vt.length){ft=[];for(var Ot=0;Ot<vt.length;Ot++)window[Dt.MediaKeys].isTypeSupported(at,vt[Ot].contentType)&&ft.push(vt[Ot])}if(!(!lt&&!ft||lt&&0===lt.length||ft&&0===ft.length)){rt=!0;var Mt=new ot(lt,ft),Lt=yt.getKeySystemBySystemString(at),xt=new dn(Lt,Mt);At.trigger(Rt.KEY_SYSTEM_ACCESS_COMPLETE,{data:xt}),tt({data:xt});break}}if(!rt){var kt="Key system access denied! -- No valid audio/video content configurations detected!";At.trigger(Rt.KEY_SYSTEM_ACCESS_COMPLETE,{error:kt}),nt({error:kt})}}))},selectKeySystem:function(et){return new Promise((function(tt,nt){try{at=et.mediaKeys=new window[Dt.MediaKeys](et.keySystem.systemString),it=et.keySystem,ft=et,rt&&_(),tt(it)}catch(et){nt({error:"Error selecting keys system ("+it.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(et){rt!==et&&(rt&&rt.removeEventListener(Dt.needkey,pt),(rt=et)&&(rt.addEventListener(Dt.needkey,pt),at&&_()))},createKeySession:function(et){if(!it||!at||!ft)throw new Error("Can not create sessions until you have selected a key system");var tt=null;if(ft.ksConfiguration.videoCapabilities&&ft.ksConfiguration.videoCapabilities.length>0&&(tt=ft.ksConfiguration.videoCapabilities[0]),null===tt&&ft.ksConfiguration.audioCapabilities&&ft.ksConfiguration.audioCapabilities.length>0&&(tt=ft.ksConfiguration.audioCapabilities[0]),null===tt)throw new Error("Can not create sessions for unknown content types.");var rt=tt.contentType,ot=at.createSession(rt,new Uint8Array(et.initData),et.cdmData?new Uint8Array(et.cdmData):null),pt=function(et,tt){return{session:et,keyId:tt.keyId,initData:tt.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(et){switch(et.type){case Dt.error:At.trigger(Rt.KEY_ERROR,{error:new lt.Z(st.MEDIA_KEYERR_CODE,"KeyError",this)});break;case Dt.message:var tt=ArrayBuffer.isView(et.message)?et.message.buffer:et.message;At.trigger(Rt.INTERNAL_KEY_MESSAGE,{data:new fn(this,tt,et.destinationURL)});break;case Dt.ready:nt.debug("DRM: Key added."),At.trigger(Rt.KEY_ADDED);break;case Dt.close:nt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),At.trigger(Rt.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(ot,et);ot.addEventListener(Dt.error,pt),ot.addEventListener(Dt.message,pt),ot.addEventListener(Dt.ready,pt),ot.addEventListener(Dt.close,pt),dt.push(pt),nt.debug("DRM: Session created. SessionID = "+pt.getSessionId()),At.trigger(Rt.KEY_SESSION_CREATED,{data:pt})},updateKeySession:function(et,tt){var nt=et.session;yt.isClearKey(it)?nt.update(new Uint8Array(tt.toJWK())):nt.update(new Uint8Array(tt)),At.trigger(Rt.KEY_SESSION_UPDATED)},closeKeySession:v,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:E,reset:E},nt=Nt.getLogger(tt),rt=null,it=null,at=null,ft=null,dt=[],yt=on(vt).getInstance(),pt={handleEvent:function(et){if(et.type===Dt.needkey&&et.initData){var tt=ArrayBuffer.isView(et.initData)?et.initData.buffer:et.initData;At.trigger(Rt.NEED_KEY,{key:new cn(tt,"cenc")})}}},tt}pe.__dashjs_factory_name="ProtectionModel_3Feb2014";const mn=dashjs.FactoryMaker.getClassFactory(pe);function ye(et){et=et||{};var tt,nt,rt,it,at,ft,dt,pt,yt,vt=this.context,At=et.eventBus,Rt=et.events,Nt=et.debug,Dt=et.api,Ot=et.errHandler;function v(){rt&&S();for(var et=0;et<dt.length;et++)_(dt[et]);At.trigger(Rt.TEARDOWN_COMPLETE)}function _(et){try{rt[Dt.cancelKeyRequest](it.systemString,et.sessionId)}catch(tt){At.trigger(Rt.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+et.sessionId+") "+tt.message})}}function T(et,tt){if(tt&&et){for(var nt=et.length,rt=0;rt<nt;rt++)if(et[rt].sessionId==tt)return et[rt];return null}return null}function S(){rt.removeEventListener(Dt.keyerror,yt),rt.removeEventListener(Dt.needkey,yt),rt.removeEventListener(Dt.keymessage,yt),rt.removeEventListener(Dt.keyadded,yt)}return tt={getAllInitData:function(){for(var et=[],tt=0;tt<ft.length;tt++)et.push(ft[tt].initData);for(var nt=0;nt<dt.length;nt++)et.push(dt[nt].initData);return et},getSessions:function(){return dt.concat(ft)},requestKeySystemAccess:function(et){return new Promise((function(tt,nt){var it=rt;it||(it=document.createElement("video"));for(var st=!1,lt=0;lt<et.length;lt++)for(var ft=et[lt].ks.systemString,dt=et[lt].configs,pt=null,yt=0;yt<dt.length;yt++){var vt=dt[yt].videoCapabilities;if(vt&&0!==vt.length){pt=[];for(var Nt=0;Nt<vt.length;Nt++)""!==it.canPlayType(vt[Nt].contentType,ft)&&pt.push(vt[Nt])}if(pt&&(!pt||0!==pt.length)){st=!0;var Dt=new ot(null,pt),Ot=at.getKeySystemBySystemString(ft),Mt=new dn(Ot,Dt);At.trigger(Rt.KEY_SYSTEM_ACCESS_COMPLETE,{data:Mt}),tt({data:Mt});break}}if(!st){var Lt="Key system access denied! -- No valid audio/video content configurations detected!";At.trigger(Rt.KEY_SYSTEM_ACCESS_COMPLETE,{error:Lt}),nt({error:Lt})}}))},selectKeySystem:function(et){return it=et.keySystem,Promise.resolve(it)},setMediaElement:function(et){if(rt!==et){if(rt){S();for(var tt=0;tt<dt.length;tt++)_(dt[tt]);dt=[]}(rt=et)&&(rt.addEventListener(Dt.keyerror,yt),rt.addEventListener(Dt.needkey,yt),rt.addEventListener(Dt.keymessage,yt),rt.addEventListener(Dt.keyadded,yt),At.trigger(Rt.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(et){if(!it)throw new Error("Can not create sessions until you have selected a key system");if(pt||0===dt.length){var tt={sessionId:null,keyId:et.keyId,initData:et.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return ft.push(tt),rt[Dt.generateKeyRequest](it.systemString,new Uint8Array(et.initData)),tt}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(et,tt){var nt=et.sessionId;if(at.isClearKey(it))for(var ot=0;ot<tt.keyPairs.length;ot++)rt[Dt.addKey](it.systemString,tt.keyPairs[ot].key,tt.keyPairs[ot].keyID,nt);else rt[Dt.addKey](it.systemString,new Uint8Array(tt),new Uint8Array(et.initData),nt);At.trigger(Rt.KEY_SESSION_UPDATED)},closeKeySession:_,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:v,reset:v},nt=Nt.getLogger(tt),rt=null,it=null,ft=[],dt=[],at=on(vt).getInstance(),yt={handleEvent:function(et){var tt=null;switch(et.type){case Dt.needkey:var rt=ArrayBuffer.isView(et.initData)?et.initData.buffer:et.initData;At.trigger(Rt.NEED_KEY,{key:new cn(rt,"cenc")});break;case Dt.keyerror:if((tt=T(dt,et.sessionId))||(tt=T(ft,et.sessionId)),tt){var it=st.MEDIA_KEYERR_CODE,at="";switch(et.errorCode.code){case 1:it=st.MEDIA_KEYERR_UNKNOWN_CODE,at+="MEDIA_KEYERR_UNKNOWN - "+st.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:it=st.MEDIA_KEYERR_CLIENT_CODE,at+="MEDIA_KEYERR_CLIENT - "+st.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:it=st.MEDIA_KEYERR_SERVICE_CODE,at+="MEDIA_KEYERR_SERVICE - "+st.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:it=st.MEDIA_KEYERR_OUTPUT_CODE,at+="MEDIA_KEYERR_OUTPUT - "+st.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:it=st.MEDIA_KEYERR_HARDWARECHANGE_CODE,at+="MEDIA_KEYERR_HARDWARECHANGE - "+st.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:it=st.MEDIA_KEYERR_DOMAIN_CODE,at+="MEDIA_KEYERR_DOMAIN - "+st.MEDIA_KEYERR_DOMAIN_MESSAGE}at+=" System Code = "+et.systemCode,At.trigger(Rt.KEY_ERROR,{error:new lt.Z(it,at,tt)})}else nt.error("No session token found for key error");break;case Dt.keyadded:(tt=T(dt,et.sessionId))||(tt=T(ft,et.sessionId)),tt?(nt.debug("DRM: Key added."),At.trigger(Rt.KEY_ADDED,{data:tt})):nt.debug("No session token found for key added");break;case Dt.keymessage:if((pt=null!==et.sessionId&&void 0!==et.sessionId)?!(tt=T(dt,et.sessionId))&&ft.length>0&&(tt=ft.shift(),dt.push(tt),tt.sessionId=et.sessionId,At.trigger(Rt.KEY_SESSION_CREATED,{data:tt})):ft.length>0&&(tt=ft.shift(),dt.push(tt),0!==ft.length&&Ot.error(new lt.Z(st.MEDIA_KEY_MESSAGE_ERROR_CODE,st.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),tt){var ot=ArrayBuffer.isView(et.message)?et.message.buffer:et.message;tt.keyMessage=ot,At.trigger(Rt.INTERNAL_KEY_MESSAGE,{data:new fn(tt,ot,et.defaultURL)})}else nt.warn("No session token found for key message")}}},tt}ye.__dashjs_factory_name="ProtectionModel_01b";const yn=dashjs.FactoryMaker.getClassFactory(ye);var En=[{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"}],_n=[{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 Te(){var et,tt=this.context;function n(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];if("function"==typeof et[rt[Object.keys(rt)[0]]])return rt}return null}return et={createProtectionSystem:function(nt){var rt=null,it=on(tt).getInstance();it.setConfig({debug:nt.debug,BASE64:nt.BASE64,settings:nt.settings}),it.initialize();var at=function(nt){var rt=nt.debug,it=rt.getLogger(et),at=nt.eventBus,ot=nt.errHandler,st=nt.videoModel?nt.videoModel.getElement():null;return st&&void 0===st.onencrypted||st&&void 0===st.mediaKeys?n(st,_n)?(it.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),mn(tt).create({debug:rt,eventBus:at,events:nt.events,api:n(st,_n)})):n(st,En)?(it.info("EME detected on this user agent! (ProtectionModel_01b)"),yn(tt).create({debug:rt,eventBus:at,errHandler:ot,events:nt.events,api:n(st,En)})):(it.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(it.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),pn(tt).create({debug:rt,eventBus:at,events:nt.events}))}(nt);return!rt&&at&&(rt=Rt(tt).create({protectionModel:at,protectionKeyController:it,eventBus:nt.eventBus,debug:nt.debug,events:nt.events,BASE64:nt.BASE64,constants:nt.constants,cmcdModel:nt.cmcdModel,customParametersModel:nt.customParametersModel,settings:nt.settings}),nt.capabilities.setEncryptedMediaSupported(!0)),rt}}}Te.__dashjs_factory_name="Protection";var Tn=dashjs.FactoryMaker.getClassFactory(Te);Tn.events=un,Tn.errors=st,dashjs.FactoryMaker.updateClassFactory(Te.__dashjs_factory_name,Tn);const Sn=Tn},2068:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it={DEFAULT:.5,STRONG:1,WEAK:0};function a(et,tt,nt){var rt,at;return rt=void 0===et?-1:et,at=function(et){var tt=it.DEFAULT;return et!==it.DEFAULT&&et!==it.STRONG&&et!==it.WEAK||(tt=et),tt}(nt),{quality:rt,reason:void 0===tt?null:tt,priority:at}}a.__dashjs_factory_name="SwitchRequest";var at=rt.Z.getClassFactory(a);at.NO_CHANGE=-1,at.PRIORITY=it,rt.Z.updateClassFactory(a.__dashjs_factory_name,at);const ot=at},1767:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>Dt});var rt=nt(5628),it=nt(6535),at=nt(7423),ot=nt(895),st=nt(6070),lt=nt(3112),ft=nt(1914),dt=nt(5435),pt=nt(5448),yt=nt(2068),vt=nt(3393),At="qualitySwitchRules",Rt="abandonFragmentRules";function m(et){et=et||{};var tt,nt,pt=this.context,Nt=et.mediaPlayerModel,Dt=et.customParametersModel,Ot=et.dashMetrics,Mt=et.settings;function _(et){return et.filter((function(et){return et.quality>yt.Z.NO_CHANGE}))}function T(et){var tt,nt,rt,it,at,ot={},st=null;if(0!==et.length){for(ot[yt.Z.PRIORITY.STRONG]={quality:yt.Z.NO_CHANGE,reason:null},ot[yt.Z.PRIORITY.WEAK]={quality:yt.Z.NO_CHANGE,reason:null},ot[yt.Z.PRIORITY.DEFAULT]={quality:yt.Z.NO_CHANGE,reason:null},tt=0,nt=et.length;tt<nt;tt+=1)(rt=et[tt]).quality!==yt.Z.NO_CHANGE&&(ot[rt.priority].quality===yt.Z.NO_CHANGE||ot[rt.priority].quality>rt.quality)&&(ot[rt.priority].quality=rt.quality,ot[rt.priority].reason=rt.reason||null);return ot[yt.Z.PRIORITY.WEAK].quality!==yt.Z.NO_CHANGE&&(st=ot[yt.Z.PRIORITY.WEAK]),ot[yt.Z.PRIORITY.DEFAULT].quality!==yt.Z.NO_CHANGE&&(st=ot[yt.Z.PRIORITY.DEFAULT]),ot[yt.Z.PRIORITY.STRONG].quality!==yt.Z.NO_CHANGE&&(st=ot[yt.Z.PRIORITY.STRONG]),st&&(it=st.quality,at=st.reason),(0,yt.Z)(pt).create(it,at)}}return{initialize:function(){tt=[],nt=[],Mt.get().streaming.abr.useDefaultABRRules&&(Mt.get().streaming.abr.ABRStrategy===vt.Z.ABR_STRATEGY_L2A?tt.push((0,ft.Z)(pt).create({dashMetrics:Ot,settings:Mt})):Mt.get().streaming.abr.ABRStrategy===vt.Z.ABR_STRATEGY_LoLP?tt.push((0,dt.Z)(pt).create({dashMetrics:Ot})):(tt.push((0,lt.Z)(pt).create({dashMetrics:Ot,mediaPlayerModel:Nt,settings:Mt})),tt.push((0,rt.Z)(pt).create({dashMetrics:Ot})),Mt.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&tt.push((0,it.Z)(pt).create({dashMetrics:Ot,settings:Mt})),Mt.get().streaming.abr.additionalAbrRules.switchHistoryRule&&tt.push((0,st.Z)(pt).create()),Mt.get().streaming.abr.additionalAbrRules.droppedFramesRule&&tt.push((0,ot.Z)(pt).create()),Mt.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&nt.push((0,at.Z)(pt).create({dashMetrics:Ot,mediaPlayerModel:Nt,settings:Mt})))),Dt.getAbrCustomRules().forEach((function(et){et.type===At&&tt.push(et.rule(pt).create()),et.type===Rt&&nt.push(et.rule(pt).create())}))},reset:function(){[tt,nt].forEach((function(et){et&&et.length&&et.forEach((function(et){return et.reset&&et.reset()}))})),tt=[],nt=[]},getMaxQuality:function(et){return T(_(tt.map((function(tt){return tt.getMaxIndex(et)}))))||(0,yt.Z)(pt).create()},getMinSwitchRequest:T,shouldAbandonFragment:function(et,tt){return T(_(nt.map((function(nt){return nt.shouldAbandon(et,tt)}))))||(0,yt.Z)(pt).create()},getQualitySwitchRules:function(){return tt}}}m.__dashjs_factory_name="ABRRulesCollection";var Nt=pt.Z.getClassFactory(m);Nt.QUALITY_SWITCH_RULES=At,Nt.ABANDON_FRAGMENT_RULES=Rt,pt.Z.updateSingletonFactory(m.__dashjs_factory_name,Nt);const Dt=Nt},7423:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(2068),it=nt(5448),at=nt(6398);function o(et){et=et||{};var tt,nt,it,ot,st,lt=this.context,ft=et.mediaPlayerModel,dt=et.dashMetrics,pt=et.settings;function g(){it={},ot={},st=[]}return tt={shouldAbandon:function(et){var tt=(0,rt.Z)(lt).create(rt.Z.NO_CHANGE,{name:o.__dashjs_factory_name});if(!(et&&et.hasOwnProperty("getMediaInfo")&&et.hasOwnProperty("getMediaType")&&et.hasOwnProperty("getCurrentRequest")&&et.hasOwnProperty("getRepresentationInfo")&&et.hasOwnProperty("getAbrController")))return tt;var at,yt,vt=et.getMediaInfo(),At=et.getMediaType(),Rt=et.getStreamInfo(),Nt=Rt?Rt.id:null,Dt=et.getCurrentRequest();if(!isNaN(Dt.index)){at=At,yt=Dt.index,it[at]=it[at]||{},it[at][yt]=it[at][yt]||{};var Ot=ft.getStableBufferTime();if(dt.getCurrentBufferLevel(At)>Ot)return tt;var Mt=it[At][Dt.index];if(null===Mt||null===Dt.firstByteDate||ot.hasOwnProperty(Mt.id))return tt;if(void 0===Mt.firstByteTime&&(st[At]=[],Mt.firstByteTime=Dt.firstByteDate.getTime(),Mt.segmentDuration=Dt.duration,Mt.bytesTotal=Dt.bytesTotal,Mt.id=Dt.index),Mt.bytesLoaded=Dt.bytesLoaded,Mt.elapsedTime=(new Date).getTime()-Mt.firstByteTime,Mt.bytesLoaded>0&&Mt.elapsedTime>0&&function(et,tt){st[et]=st[et]||[],st[et].push(tt)}(At,Math.round(8*Mt.bytesLoaded/Mt.elapsedTime)),st[At].length>=5&&Mt.elapsedTime>500&&Mt.bytesLoaded<Mt.bytesTotal){var Lt=st[At].reduce((function(et,tt){return et+tt}),0);if(Mt.measuredBandwidthInKbps=Math.round(Lt/st[At].length),Mt.estimatedTimeOfDownload=+(8*Mt.bytesTotal/Mt.measuredBandwidthInKbps/1e3).toFixed(2),Mt.estimatedTimeOfDownload<1.8*Mt.segmentDuration||0===et.getRepresentationInfo().quality)return tt;if(!ot.hasOwnProperty(Mt.id)){var xt=et.getAbrController(),kt=Mt.bytesTotal-Mt.bytesLoaded,Ut=xt.getBitrateList(vt),Bt=xt.getQualityForBitrate(vt,Mt.measuredBandwidthInKbps*pt.get().streaming.abr.bandwidthSafetyFactor,Nt),Gt=xt.getMinAllowedIndexFor(At,Nt),qt=void 0!==Gt?Math.max(Gt,Bt):Bt;kt>Mt.bytesTotal*Ut[qt].bitrate/Ut[xt.getQualityFor(At,Nt)].bitrate&&(tt.quality=qt,tt.reason.throughput=Mt.measuredBandwidthInKbps,tt.reason.fragmentID=Mt.id,tt.reason.rule=this.getClassName(),ot[Mt.id]=Mt,nt.debug("["+At+"] frag id",Mt.id," is asking to abandon and switch to quality to ",qt," measured bandwidth was",Mt.measuredBandwidthInKbps),delete it[At][Mt.id])}}else Mt.bytesLoaded===Mt.bytesTotal&&delete it[At][Mt.id]}return tt},reset:g},nt=(0,at.Z)(lt).getInstance().getLogger(tt),g(),tt}o.__dashjs_factory_name="AbandonRequestsRule";const ot=it.Z.getClassFactory(o)},3112:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>vt});var rt=nt(3860),it=nt(2068),at=nt(5448),ot=nt(7855),st=nt(5595),lt=nt(8512),ft=nt(6398),dt=nt(8825),pt=nt(3393),yt=10;function g(et){et=et||{};var tt,nt,at,vt=this.context,At=et.dashMetrics,Rt=et.mediaPlayerModel,Nt=(0,st.Z)(vt).getInstance();function y(et,tt,nt){var rt=nt.reduce((function(et,tt,rt){return tt>nt[et]?rt:et}),0);if(0===rt)return null;var it=Math.max(et,yt+2*tt.length),at=(nt[rt]-1)/(it/yt-1);return{gp:at,Vp:yt/at}}function E(et){et.placeholderBuffer=0,et.mostAdvancedSegmentStart=NaN,et.lastSegmentWasReplacement=!1,et.lastSegmentStart=NaN,et.lastSegmentDurationS=NaN,et.lastSegmentRequestTimeMs=NaN,et.lastSegmentFinishTimeMs=NaN}function v(et,tt){var nt=Rt.getStableBufferTime();if(et.stableBufferTime!==nt){var rt=y(nt,et.bitrates,et.utilities);if(rt.Vp!==et.Vp||rt.gp!==et.gp){var it=At.getCurrentBufferLevel(tt),at=it+et.placeholderBuffer;at-=yt,at*=rt.Vp/et.Vp,at+=yt,et.stableBufferTime=nt,et.Vp=rt.Vp,et.gp=rt.gp,et.placeholderBuffer=Math.max(0,at-it)}}}function _(et,tt){return et.Vp*(et.utilities[tt]+et.gp)}function T(et,tt){for(var nt=et.bitrates[tt],rt=et.utilities[tt],it=0,at=tt-1;at>=0;--at)if(et.utilities[at]<et.utilities[tt]){var ot=et.bitrates[at],st=et.utilities[at],lt=et.Vp*(et.gp+(nt*st-ot*rt)/(nt-ot));it=Math.max(it,lt)}return it}function S(et){var tt=et.mediaType===pt.Z.AUDIO?[pt.Z.AUDIO]:at;for(var nt in tt)at.hasOwnProperty(nt)&&2===at[nt].state&&(at[nt].placeholderBuffer=0)}function b(){for(var et in at)if(at.hasOwnProperty(et)){var tt=at[et];0!==tt.state&&(tt.state=1,E(tt))}}function A(et){if(et&&et.chunk&&et.chunk.mediaInfo){var tt=at[et.chunk.mediaInfo.type];if(tt&&0!==tt.state){var nt=et.chunk.start;isNaN(tt.mostAdvancedSegmentStart)||nt>tt.mostAdvancedSegmentStart?(tt.mostAdvancedSegmentStart=nt,tt.lastSegmentWasReplacement=!1):tt.lastSegmentWasReplacement=!0,tt.lastSegmentStart=nt,tt.lastSegmentDurationS=et.chunk.duration,tt.lastQuality=et.chunk.quality,R(tt,et.chunk.mediaInfo.type)}}}function I(et){if(et&&et.metric===rt.Z.HTTP_REQUEST&&et.value&&et.value.type===ot.w.MEDIA_SEGMENT_TYPE&&et.value.trace&&et.value.trace.length){var tt=at[et.mediaType];tt&&0!==tt.state&&(tt.lastSegmentRequestTimeMs=et.value.trequest.getTime(),tt.lastSegmentFinishTimeMs=et.value._tfinish.getTime(),R(tt,et.mediaType))}}function R(et,tt){if(!isNaN(et.lastSegmentStart)&&!isNaN(et.lastSegmentRequestTimeMs)&&!isNaN(et.placeholderBuffer)){if(et.placeholderBuffer*=.99,!isNaN(et.lastSegmentFinishTimeMs)){var nt=At.getCurrentBufferLevel(tt)+.001*(et.lastSegmentFinishTimeMs-et.lastSegmentRequestTimeMs),rt=_(et,et.lastQuality),it=Math.max(0,rt-nt);et.placeholderBuffer=Math.min(it,et.placeholderBuffer)}et.lastSegmentWasReplacement&&!isNaN(et.lastSegmentDurationS)&&(et.placeholderBuffer+=et.lastSegmentDurationS),et.lastSegmentStart=NaN,et.lastSegmentRequestTimeMs=NaN}}function w(et){if(et){var tt=at[et.mediaType];tt&&0!==tt.state&&(tt.abrQuality=et.newQuality)}}function N(et){if(et){var tt=at[et.mediaType];if(tt&&0!==tt.state){var nt,rt=At.getCurrentBufferLevel(et.mediaType);nt=tt.abrQuality>0?T(tt,tt.abrQuality):yt;var it=Math.max(0,nt-rt);tt.placeholderBuffer=Math.min(tt.placeholderBuffer,it)}}}function C(){at={}}return tt={getMaxIndex:function(et){var tt=(0,it.Z)(vt).create();if(!(et&&et.hasOwnProperty("getMediaInfo")&&et.hasOwnProperty("getMediaType")&&et.hasOwnProperty("getScheduleController")&&et.hasOwnProperty("getStreamInfo")&&et.hasOwnProperty("getAbrController")&&et.hasOwnProperty("useBufferOccupancyABR")))return tt;var rt=et.getMediaInfo(),ot=et.getMediaType(),st=et.getScheduleController(),lt=et.getStreamInfo(),ft=et.getAbrController(),dt=ft.getThroughputHistory(),pt=lt?lt.id:null,yt=lt&&lt.manifestInfo&&lt.manifestInfo.isDynamic,Nt=et.useBufferOccupancyABR();if(tt.reason=tt.reason||{},!Nt)return tt;st.setTimeToLoadDelay(0);var Dt=function(et){var tt=et.getMediaType(),nt=at[tt];return nt?0!==nt.state&&v(nt,tt):(nt=function(et){var tt={},nt=et.getMediaInfo().bitrateList.map((function(et){return et.bandwidth})),rt=function(et){return et.map((function(et){return Math.log(et)}))}(nt);rt=rt.map((function(et){return et-rt[0]+1}));var it=Rt.getStableBufferTime(),at=y(it,nt,rt);return at?(tt.state=1,tt.bitrates=nt,tt.utilities=rt,tt.stableBufferTime=it,tt.Vp=at.Vp,tt.gp=at.gp,tt.lastQuality=0,E(tt)):tt.state=0,tt}(et),at[tt]=nt),nt}(et);if(0===Dt.state)return tt;var Ot,Mt=At.getCurrentBufferLevel(ot),Lt=dt.getAverageThroughput(ot,yt),xt=dt.getSafeAverageThroughput(ot,yt),kt=dt.getAverageLatency(ot);if(tt.reason.state=Dt.state,tt.reason.throughput=Lt,tt.reason.latency=kt,isNaN(Lt))return tt;switch(Dt.state){case 1:Ot=ft.getQualityForBitrate(rt,xt,pt,kt),tt.quality=Ot,tt.reason.throughput=xt,Dt.placeholderBuffer=Math.max(0,T(Dt,Ot)-Mt),Dt.lastQuality=Ot,!isNaN(Dt.lastSegmentDurationS)&&Mt>=Dt.lastSegmentDurationS&&(Dt.state=2);break;case 2:!function(et,tt){var nt=Date.now();if(isNaN(et.lastSegmentFinishTimeMs)){if(!isNaN(et.lastCallTimeMs)){var rt=.001*(nt-et.lastCallTimeMs);et.placeholderBuffer+=Math.max(0,rt)}}else{var it=.001*(nt-et.lastSegmentFinishTimeMs);et.placeholderBuffer+=Math.max(0,it)}et.lastCallTimeMs=nt,et.lastSegmentStart=NaN,et.lastSegmentRequestTimeMs=NaN,et.lastSegmentFinishTimeMs=NaN,v(et,tt)}(Dt,ot),Ot=function(et,tt){for(var nt=et.bitrates.length,rt=NaN,it=NaN,at=0;at<nt;++at){var ot=(et.Vp*(et.utilities[at]+et.gp)-tt)/et.bitrates[at];(isNaN(it)||ot>=it)&&(it=ot,rt=at)}return rt}(Dt,Mt+Dt.placeholderBuffer);var Ut=ft.getQualityForBitrate(rt,xt,pt,kt);Ot>Dt.lastQuality&&Ot>Ut&&(Ot=Math.max(Ut,Dt.lastQuality));var Bt=Math.max(0,Mt+Dt.placeholderBuffer-_(Dt,Ot));Bt<=Dt.placeholderBuffer?(Dt.placeholderBuffer-=Bt,Bt=0):(Bt-=Dt.placeholderBuffer,Dt.placeholderBuffer=0,Ot<ft.getMaxAllowedIndexFor(ot,pt)?st.setTimeToLoadDelay(1e3*Bt):Bt=0),tt.quality=Ot,tt.reason.throughput=Lt,tt.reason.latency=kt,tt.reason.bufferLevel=Mt,tt.reason.placeholderBuffer=Dt.placeholderBuffer,tt.reason.delay=Bt,Dt.lastQuality=Ot;break;default:nt.debug("BOLA ABR rule invoked in bad state."),tt.quality=ft.getQualityForBitrate(rt,xt,pt,kt),tt.reason.state=Dt.state,tt.reason.throughput=xt,tt.reason.latency=kt,Dt.state=1,E(Dt)}return tt},reset:function(){C(),Nt.off(dt.Z.BUFFER_EMPTY,S,tt),Nt.off(dt.Z.PLAYBACK_SEEKING,b,tt),Nt.off(dt.Z.METRIC_ADDED,I,tt),Nt.off(dt.Z.QUALITY_CHANGE_REQUESTED,w,tt),Nt.off(dt.Z.FRAGMENT_LOADING_ABANDONED,N,tt),Nt.off(lt.Z.MEDIA_FRAGMENT_LOADED,A,tt)}},nt=(0,ft.Z)(vt).getInstance().getLogger(tt),C(),Nt.on(dt.Z.BUFFER_EMPTY,S,tt),Nt.on(dt.Z.PLAYBACK_SEEKING,b,tt),Nt.on(dt.Z.METRIC_ADDED,I,tt),Nt.on(dt.Z.QUALITY_CHANGE_REQUESTED,w,tt),Nt.on(dt.Z.FRAGMENT_LOADING_ABANDONED,N,tt),Nt.on(lt.Z.MEDIA_FRAGMENT_LOADED,A,tt),tt}g.__dashjs_factory_name="BolaRule";const vt=at.Z.getClassFactory(g)},895:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(2068),at=nt(6398);function o(){var et,tt,nt=this.context;return et={getMaxIndex:function(et){var rt=(0,it.Z)(nt).create();if(!et||!et.hasOwnProperty("getDroppedFramesHistory"))return rt;var at=et.getDroppedFramesHistory(),ot=et.getStreamInfo().id;if(at){var st=at.getFrameHistory(ot);if(!st||0===st.length)return rt;for(var lt=0,ft=0,dt=it.Z.NO_CHANGE,pt=1;pt<st.length;pt++)if(st[pt]&&(lt=st[pt].droppedVideoFrames,(ft=st[pt].totalVideoFrames)>375&&lt/ft>.15)){dt=pt-1,tt.debug("index: "+dt+" Dropped Frames: "+lt+" Total Frames: "+ft);break}return(0,it.Z)(nt).create(dt,{droppedFrames:lt})}return rt}},tt=(0,at.Z)(nt).getInstance().getLogger(et),et}o.__dashjs_factory_name="DroppedFramesRule";const ot=rt.Z.getClassFactory(o)},6535:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>pt});var rt=nt(5595),it=nt(8512),at=nt(5448),ot=nt(6398),st=nt(2068),lt=nt(3393),ft=nt(3860),dt=nt(8825);function f(et){et=et||{};var tt,nt,at,pt=this.context,yt=(0,rt.Z)(pt).getInstance(),vt=et.dashMetrics;function h(){(at={})[lt.Z.VIDEO]={ignoreCount:2},at[lt.Z.AUDIO]={ignoreCount:2}}function p(){h()}function m(et){isNaN(et.startTime)||et.mediaType!==lt.Z.AUDIO&&et.mediaType!==lt.Z.VIDEO||at[et.mediaType].ignoreCount>0&&at[et.mediaType].ignoreCount--}return tt={getMaxIndex:function(et){var tt=(0,st.Z)(pt).create();if(!et||!et.hasOwnProperty("getMediaType"))return tt;!function(){if(!vt||!vt.hasOwnProperty("getCurrentBufferLevel")||!vt.hasOwnProperty("getCurrentBufferState"))throw new Error(lt.Z.MISSING_CONFIG_ERROR)}();var rt=et.getMediaType(),it=vt.getCurrentBufferState(rt),ot=et.getRepresentationInfo().fragmentDuration,dt=et.getStreamInfo(),yt=dt?dt.id:null,At=et.getScheduleController(),Rt=dt&&dt.manifestInfo&&dt.manifestInfo.isDynamic;if(function(et,tt){return!et&&at[tt].ignoreCount>0}(At.getPlaybackController().getLowLatencyModeEnabled(),rt)||!ot)return tt;if(it&&it.state===ft.Z.BUFFER_EMPTY)nt.debug("["+rt+"] Switch to index 0; buffer is empty."),tt.quality=0,tt.reason="InsufficientBufferRule: Buffer is empty";else{var Nt=et.getMediaInfo(),Dt=et.getAbrController(),Ot=Dt.getThroughputHistory(),Mt=vt.getCurrentBufferLevel(rt),Lt=Ot.getAverageThroughput(rt,Rt),xt=Ot.getAverageLatency(rt),kt=Lt*(Mt/ot)*.5;tt.quality=Dt.getQualityForBitrate(Nt,kt,yt,xt),tt.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return tt},reset:function(){h(),yt.off(dt.Z.PLAYBACK_SEEKING,p,tt),yt.off(it.Z.BYTES_APPENDED_END_FRAGMENT,m,tt)}},nt=(0,ot.Z)(pt).getInstance().getLogger(tt),h(),yt.on(dt.Z.PLAYBACK_SEEKING,p,tt),yt.on(it.Z.BYTES_APPENDED_END_FRAGMENT,m,tt),tt}f.__dashjs_factory_name="InsufficientBufferRule";const pt=at.Z.getClassFactory(f)},1914:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>pt});var rt=nt(3860),it=nt(2068),at=nt(5448),ot=nt(7855),st=nt(5595),lt=nt(8512),ft=nt(6398),dt=nt(3393);function f(et){et=et||{};var tt,nt,at,pt,yt=this.context,vt=et.dashMetrics,At=(0,st.Z)(yt).getInstance();function p(et){et.placeholderBuffer=0,et.mostAdvancedSegmentStart=NaN,et.lastSegmentWasReplacement=!1,et.lastSegmentStart=NaN,et.lastSegmentDurationS=NaN,et.lastSegmentRequestTimeMs=NaN,et.lastSegmentFinishTimeMs=NaN}function m(){for(var et in nt)if(nt.hasOwnProperty(et)){var tt=nt[et];0!==tt.state&&(tt.state=1,p(tt))}}function y(et){if(et&&et.chunk&&et.chunk.mediaInfo){var tt=nt[et.chunk.mediaInfo.type],rt=at[et.chunk.mediaInfo.type];if(tt&&0!==tt.state){var it=et.chunk.start;isNaN(tt.mostAdvancedSegmentStart)||it>tt.mostAdvancedSegmentStart?(tt.mostAdvancedSegmentStart=it,tt.lastSegmentWasReplacement=!1):tt.lastSegmentWasReplacement=!0,tt.lastSegmentStart=it,tt.lastSegmentDurationS=et.chunk.duration,tt.lastQuality=et.chunk.quality,v(tt,rt)}}}function E(et){if(et&&et.metric===rt.Z.HTTP_REQUEST&&et.value&&et.value.type===ot.w.MEDIA_SEGMENT_TYPE&&et.value.trace&&et.value.trace.length){var tt=nt[et.mediaType],it=at[et.mediaType];tt&&0!==tt.state&&(tt.lastSegmentRequestTimeMs=et.value.trequest.getTime(),tt.lastSegmentFinishTimeMs=et.value._tfinish.getTime(),v(tt,it))}}function v(et,tt){isNaN(et.lastSegmentStart)||isNaN(et.lastSegmentRequestTimeMs)||(tt.segment_request_start_s=.001*et.lastSegmentRequestTimeMs,tt.segment_download_finish_s=.001*et.lastSegmentFinishTimeMs,et.lastSegmentStart=NaN,et.lastSegmentRequestTimeMs=NaN)}function _(et){if(et&&et.mediaType){var tt=nt[et.mediaType];tt&&0!==tt.state&&(tt.abrQuality=et.newQuality)}}function T(et,tt){if(et.length!==tt.length)return-1;for(var nt=0,rt=0;rt<et.length;rt++)nt+=et[rt]*tt[rt];return nt}function S(){nt={},at={}}return tt={getMaxIndex:function(et){var tt,rt=(0,it.Z)(yt).create(),ot=Math.pow(4,.99),st=Math.max(Math.pow(4,1),ot*Math.sqrt(4)),lt=et.getMediaInfo(),ft=et.getMediaType(),At=lt.bitrateList.map((function(et){return et.bandwidth})),Rt=At.length,Nt=et.getScheduleController(),Dt=et.getStreamInfo(),Ot=et.getAbrController(),Mt=Ot.getThroughputHistory(),Lt=Dt&&Dt.manifestInfo&&Dt.manifestInfo.isDynamic,xt=et.useL2AABR(),kt=vt.getCurrentBufferLevel(ft,!0),Ut=Mt.getSafeAverageThroughput(ft,Lt),Bt=Mt.getAverageThroughput(ft,Lt),Gt=Mt.getAverageLatency(ft),qt=et.getVideoModel().getPlaybackRate();if(!(et&&et.hasOwnProperty("getMediaInfo")&&et.hasOwnProperty("getMediaType")&&et.hasOwnProperty("getScheduleController")&&et.hasOwnProperty("getStreamInfo")&&et.hasOwnProperty("getAbrController")&&et.hasOwnProperty("useL2AABR")))return rt;if(rt.reason=rt.reason||{},!xt||ft===dt.Z.AUDIO)return rt;Nt.setTimeToLoadDelay(0);var jt=function(et){var tt=et.getMediaType(),rt=nt[tt];return rt||(rt=function(et){var tt={},nt=et.getMediaInfo(),rt=nt.bitrateList.map((function(et){return et.bandwidth/1e3}));return tt.state=1,tt.bitrates=rt,tt.lastQuality=0,function(et){et&&et.type&&(at[et.type]={},at[et.type].w=[],at[et.type].prev_w=[],at[et.type].Q=0,at[et.type].segment_request_start_s=0,at[et.type].segment_download_finish_s=0,at[et.type].B_target=1.5)}(nt),p(tt),tt}(et),nt[tt]=rt),rt}(et);if(0===jt.state)return rt;var Vt=at[ft];if(!Vt)return rt;if(rt.reason.state=jt.state,rt.reason.throughput=Bt,rt.reason.latency=Gt,isNaN(Bt))return rt;switch(jt.state){case 1:if(tt=Ot.getQualityForBitrate(lt,Ut,Dt.id,Gt),rt.quality=tt,rt.reason.throughput=Ut,jt.lastQuality=tt,!isNaN(jt.lastSegmentDurationS)&&kt>=Vt.B_target){jt.state=2,Vt.Q=ot;for(var zt=0;zt<Rt;++zt)zt===jt.lastQuality?Vt.prev_w[zt]=1:Vt.prev_w[zt]=0}break;case 2:var Xt=[],Qt=vt.getCurrentHttpRequest(ft).trace.reduce((function(et,tt){return et+tt.d}),0),$t=vt.getCurrentHttpRequest(ft).trace.reduce((function(et,tt){return et+tt.b[0]}),0),tn=Math.round(8*$t/Qt);tn<1&&(tn=1);for(var nn=jt.lastSegmentDurationS,on=1,un=0;un<Rt;++un)At[un]=At[un]/1e3,qt*At[un]>tn&&(on=-1),Vt.w[un]=Vt.prev_w[un]+on*(nn/(2*st))*((Vt.Q+ot)*(qt*At[un]/tn));Vt.w=function(et){for(var tt=et.length,nt=!1,rt=[],it=0;it<tt;++it)rt[it]=et[it];for(var at=et.sort((function(et,tt){return tt-et})),ot=0,st=0,lt=[],ft=0;ft<tt-1;++ft)if((st=((ot+=at[ft])-1)/(ft+1))>=at[ft+1]){nt=!0;break}nt||(st=(ot+at[tt-1]-1)/tt);for(var dt=0;dt<tt;++dt)lt[dt]=Math.max(rt[dt]-st,0);return lt}(Vt.w);for(var cn=0;cn<Rt;++cn)Xt[cn]=Vt.w[cn]-Vt.prev_w[cn],Vt.prev_w[cn]=Vt.w[cn];Vt.Q=Math.max(0,Vt.Q-nn+nn*qt*((T(At,Vt.prev_w)+T(At,Xt))/tn));for(var fn=[],dn=0;dn<Rt;++dn)fn[dn]=Math.abs(At[dn]-T(Vt.w,At));(tt=fn.indexOf(Math.min.apply(Math,fn)))>jt.lastQuality&&At[jt.lastQuality+1]<=tn&&(tt=jt.lastQuality+1),At[tt]>=tn&&(Vt.Q=2*Math.max(ot,Vt.Q)),rt.quality=tt,rt.reason.throughput=Bt,rt.reason.latency=Gt,rt.reason.bufferLevel=kt,jt.lastQuality=rt.quality;break;default:pt.debug("L2A ABR rule invoked in bad state."),rt.quality=Ot.getQualityForBitrate(lt,Ut,Dt.id,Gt),rt.reason.state=jt.state,rt.reason.throughput=Ut,rt.reason.latency=Gt,jt.state=1,p(jt)}return rt},reset:function(){S(),At.off(lt.Z.PLAYBACK_SEEKING,m,tt),At.off(lt.Z.MEDIA_FRAGMENT_LOADED,y,tt),At.off(lt.Z.METRIC_ADDED,E,tt),At.off(lt.Z.QUALITY_CHANGE_REQUESTED,_,tt)}},pt=(0,ft.Z)(yt).getInstance().getLogger(tt),S(),At.on(lt.Z.PLAYBACK_SEEKING,m,tt),At.on(lt.Z.MEDIA_FRAGMENT_LOADED,y,tt),At.on(lt.Z.METRIC_ADDED,E,tt),At.on(lt.Z.QUALITY_CHANGE_REQUESTED,_,tt),tt}f.__dashjs_factory_name="L2ARule";const pt=at.Z.getClassFactory(f)},6070:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>ot});var rt=nt(5448),it=nt(6398),at=nt(2068);function o(){var et,tt,nt=this.context;return et={getMaxIndex:function(et){for(var rt=et?et.getSwitchHistory():null,it=rt?rt.getSwitchRequests():[],ot=0,st=0,lt=0,ft=(0,at.Z)(nt).create(),dt=0;dt<it.length;dt++)if(void 0!==it[dt]&&(ot+=it[dt].drops,st+=it[dt].noDrops,lt+=it[dt].dropSize,ot+st>=6&&ot/st>.075)){ft.quality=dt>0&&it[dt].drops>0?dt-1:dt,ft.reason={index:ft.quality,drops:ot,noDrops:st,dropSize:lt},tt.debug("Switch history rule index: "+ft.quality+" samples: "+(ot+st)+" drops: "+ot);break}return ft}},tt=(0,it.Z)(nt).getInstance().getLogger(et),et}o.__dashjs_factory_name="SwitchHistoryRule";const ot=rt.Z.getClassFactory(o)},5628:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>st});var rt=nt(5448),it=nt(2068),at=nt(3393),ot=nt(3860);function s(et){et=et||{};var tt=this.context,nt=et.dashMetrics;return{getMaxIndex:function(et){var rt=(0,it.Z)(tt).create();if(!(et&&et.hasOwnProperty("getMediaInfo")&&et.hasOwnProperty("getMediaType")&&et.hasOwnProperty("useBufferOccupancyABR")&&et.hasOwnProperty("getAbrController")&&et.hasOwnProperty("getScheduleController")))return rt;!function(){if(!nt||!nt.hasOwnProperty("getCurrentBufferState"))throw new Error(at.Z.MISSING_CONFIG_ERROR)}();var st=et.getMediaInfo(),lt=et.getMediaType(),ft=nt.getCurrentBufferState(lt),dt=et.getScheduleController(),pt=et.getAbrController(),yt=et.getStreamInfo(),vt=yt?yt.id:null,At=yt&&yt.manifestInfo?yt.manifestInfo.isDynamic:null,Rt=pt.getThroughputHistory(),Nt=Rt.getSafeAverageThroughput(lt,At),Dt=Rt.getAverageLatency(lt),Ot=et.useBufferOccupancyABR();return isNaN(Nt)||!ft||Ot||pt.getAbandonmentStateFor(vt,lt)!==ot.Z.ABANDON_LOAD&&(ft.state===ot.Z.BUFFER_LOADED||At)&&(rt.quality=pt.getQualityForBitrate(st,Nt,vt,Dt),dt.setTimeToLoadDelay(0),rt.reason={throughput:Nt,latency:Dt}),rt},reset:function(){}}}s.__dashjs_factory_name="ThroughputRule";const st=rt.Z.getClassFactory(s)},4722:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(6398);function a(){var et,tt,nt,rt,at,ot,st,lt,ft,dt=this.context;function f(){nt=null,rt=1,at=100,ot=0,st=null,lt=null,ft="dynamic_weight_selection"}function d(){var et=0;if(nt)for(var tt=0;tt<nt.length;tt++){var rt=nt[tt];rt.state.throughput>et&&(et=rt.state.throughput)}return et}function g(et,tt,nt){var rt=et.map((function(et,rt){return nt[rt]*Math.pow(et-tt[rt],2)})).reduce((function(et,tt){return et+tt}));return(rt<0?-1:1)*Math.sqrt(Math.abs(rt))}function h(et,tt){return g([et.state.throughput,et.state.latency,et.state.rebuffer,et.state.switch],[tt.state.throughput,tt.state.latency,tt.state.rebuffer,tt.state.switch],[1,1,1,1])}function p(et,tt,nt){for(var rt=0;rt<tt.length;rt++){var it=tt[rt],at=h(it,et);m(it,nt,Math.exp(-1*Math.pow(at,2)/(2*Math.pow(.1,2))))}}function m(et,tt,nt){var rt=et.state,it=[.01,.01,.01,.01];rt.throughput=rt.throughput+(tt[0]-rt.throughput)*it[0]*nt,rt.latency=rt.latency+(tt[1]-rt.latency)*it[1]*nt,rt.rebuffer=rt.rebuffer+(tt[2]-rt.rebuffer)*it[2]*nt,rt.switch=rt.switch+(tt[3]-rt.switch)*it[3]*nt}return et={getNextQuality:function(et,it,dt,pt,yt,vt,At){var Rt=dt,Nt=pt,Dt=it,Ot=function(et){if(!nt){nt=[];var tt=et.bitrateList,it=[];ot=tt[0].bandwidth,tt.forEach((function(et){it.push(et.bandwidth),et.bandwidth<ot&&(ot=et.bandwidth)})),ft=it.map((function(et){return Math.pow(et,2)})).reduce((function(et,tt){return et+tt})),rt=Math.sqrt(ft);for(var at=0;at<tt.length;at++){var st={qualityIndex:at,bitrate:tt[at].bandwidth,state:{throughput:tt[at].bandwidth/rt,latency:0,rebuffer:0,switch:0}};nt.push(st)}lt=function(et){var tt=[],nt=function(et){for(var tt=[],nt=0;nt<et;nt++){var rt=[Math.random()*d(),Math.random(),Math.random(),Math.random()];tt.push(rt)}return tt}(Math.pow(et.length,2));tt.push(nt[0]);for(var rt=[1,1,1,1],it=1;it<et.length;it++){for(var at=null,ot=null,st=0;st<nt.length;st++){for(var lt=nt[st],ft=null,dt=0;dt<tt.length;dt++){var pt=g(lt,tt[dt],rt);(null===ft||pt<ft)&&(ft=pt)}(null===ot||ft>ot)&&(at=lt,ot=ft)}tt.push(at)}for(var yt=null,vt=null,At=0;At<tt.length;At++){for(var Rt=0,Nt=0;Nt<tt.length;Nt++)At!==Nt&&(Rt+=g(tt[At],tt[Nt],rt));(null===yt||Rt>yt)&&(yt=Rt,vt=At)}var Dt=[];for(Dt.push(tt[vt]),tt.splice(vt,1);tt.length>0;){for(var Ot=null,Mt=null,Lt=0;Lt<tt.length;Lt++){var xt=g(Dt[0],tt[Lt],rt);(null===Ot||xt<Ot)&&(Ot=xt,Mt=Lt)}Dt.push(tt[Mt]),tt.splice(Mt,1)}return Dt}(nt)}var ft;return nt}(et),Mt=it/rt;Mt>1&&(Mt=d()),dt/=at,tt.debug("getNextQuality called throughput:".concat(Mt," latency:").concat(dt," bufferSize:").concat(pt," currentQualityIndex:").concat(vt," playbackRate:").concat(yt));var Lt=Ot[vt],xt=Lt.bitrate*At.getSegmentDuration()/Dt,kt=Math.max(0,xt-Nt);if(Nt-xt<At.getMinBuffer())return tt.debug("Buffer is low for bitrate= ".concat(Lt.bitrate," downloadTime=").concat(xt," currentBuffer=").concat(Nt," rebuffer=").concat(kt)),function(et,tt){var rt=0,it=et;if(nt)for(var at=0;at<nt.length;at++){var ot=nt[at];ot.bitrate<et.bitrate&&ot.bitrate>rt&&tt>ot.bitrate&&(rt=ot.bitrate,it=ot)}return it}(Lt,Dt).qualityIndex;switch(ft){case"manual_weight_selection":st=[.4,.4,.4,.4];break;case"random_weight_selection":!function(et){st=function(et,tt){for(var nt=[],rt=Math.sqrt(2/et),it=0;it<4;it++)nt.push(Math.random()*rt);return st=nt}(et.length)}(Ot);break;default:!function(et,tt,nt,rt,it,at,ot){st||(st=lt[lt.length-1]);var ft=et.findWeightVector(tt,nt,rt,it,at,ot);null!==ft&&-1!==ft&&(st=ft)}(At,Ot,Rt,Nt,kt,Dt,yt)}for(var Ut=null,Bt=null,Gt=null,qt=0;qt<Ot.length;qt++){var jt=Ot[qt],Vt=jt.state,zt=[Vt.throughput,Vt.latency,Vt.rebuffer,Vt.switch],Xt=st.slice(),Qt=At.getNextBufferWithBitrate(jt.bitrate,Nt,Dt),$t=Qt<At.getMinBuffer();$t&&tt.debug("Buffer is low for bitrate=".concat(jt.bitrate," downloadTime=").concat(xt," currentBuffer=").concat(Nt," nextBuffer=").concat(Qt)),(jt.bitrate>it-1e4||$t)&&jt.bitrate!==ot&&(Xt[0]=100);var tn=g(zt,[Mt,0,0,0],Xt);(null===Ut||tn<Ut)&&(Ut=tn,Bt=jt.qualityIndex,Gt=jt)}var nn=Math.abs(Lt.bitrate-Gt.bitrate)/rt;return p(Lt,Ot,[Mt,dt,kt,nn]),p(Gt,Ot,[Mt,0,0,nn]),Bt},reset:function(){f()}},tt=(0,it.Z)(dt).getInstance().getLogger(et),f(),et}a.__dashjs_factory_name="LearningAbrController";const at=rt.Z.getClassFactory(a)},5317:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(2298);function a(){var et,tt,nt,rt,at;function o(){tt=null,nt=null,rt=null,at=null}function s(et,tt,nt,rt){var at=new it.Z;return at.type=et,at.weights.bitrateReward=tt||1,at.weights.bitrateSwitchPenalty=1,at.weights.rebufferPenalty=nt||1e3,at.weights.latencyPenalty=[],at.weights.latencyPenalty.push({threshold:1.1,penalty:.05*rt}),at.weights.latencyPenalty.push({threshold:1e8,penalty:.1*nt}),at.weights.playbackSpeedPenalty=rt||200,at}function u(et,tt,nt,rt,it){it.bitrateWSum+=it.weights.bitrateReward*et,it.lastBitrate&&(it.bitrateSwitchWSum+=it.weights.bitrateSwitchPenalty*Math.abs(et-it.lastBitrate)),it.lastBitrate=et,it.rebufferWSum+=it.weights.rebufferPenalty*tt;for(var at=0;at<it.weights.latencyPenalty.length;at++){var ot=it.weights.latencyPenalty[at];if(nt<=ot.threshold){it.latencyWSum+=ot.penalty*nt;break}}it.playbackSpeedWSum+=it.weights.playbackSpeedPenalty*Math.abs(1-rt),it.totalQoe=it.bitrateWSum-it.bitrateSwitchWSum-it.rebufferWSum-it.latencyWSum-it.playbackSpeedWSum}return et={setupPerSegmentQoe:function(et,it,ot){tt=s("segment",et,it,ot),nt=et,rt=it,at=ot},logSegmentMetrics:function(et,nt,rt,it){tt&&u(et,nt,rt,it,tt)},getPerSegmentQoe:function(){return tt},calculateSingleUseQoe:function(et,tt,it,ot){var st=null;return nt&&rt&&at&&(st=s("segment",nt,rt,at)),st?(u(et,tt,it,ot,st),st.totalQoe):0},reset:function(){o()}},o(),et}a.__dashjs_factory_name="LoLpQoeEvaluator";const at=rt.Z.getClassFactory(a)},5435:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>pt});var rt=nt(6398),it=nt(5448),at=nt(4722),ot=nt(5317),st=nt(2068),lt=nt(3860),ft=nt(6523),dt=nt(3393);function f(et){var tt,nt,it,pt,yt=(et=et||{}).dashMetrics,vt=this.context;return nt={getMaxIndex:function(et){try{var nt=(0,st.Z)(vt).create(),rt=et.getMediaInfo().type,at=et.getAbrController(),ot=et.getStreamInfo(),At=at.getQualityFor(rt,ot.id),Rt=et.getMediaInfo(),Nt=yt.getCurrentBufferState(rt),Dt=et.getScheduleController(),Ot=yt.getCurrentBufferLevel(rt,!0),Mt=ot&&ot.manifestInfo?ot.manifestInfo.isDynamic:null,Lt=Dt.getPlaybackController(),xt=Lt.getCurrentLiveLatency();if(!et.useLoLPABR()||rt===dt.Z.AUDIO)return nt;xt||(xt=0);var kt=Lt.getPlaybackRate(),Ut=at.getThroughputHistory().getSafeAverageThroughput(rt,Mt);if(tt.debug("Throughput ".concat(Math.round(Ut)," kbps")),isNaN(Ut)||!Nt)return nt;if(at.getAbandonmentStateFor(ot.id,rt)===lt.Z.ABANDON_LOAD)return nt;for(var Bt=Rt.bitrateList,Gt=et.getRepresentationInfo().fragmentDuration,qt=Bt[0].bandwidth/1e3,jt=Bt[Bt.length-1].bandwidth/1e3,Vt=0;Vt<Bt.length;Vt++){var zt=Bt[Vt].bandwidth/1e3;zt>jt?jt=zt:zt<qt&&(qt=zt)}var Xt=Bt[At].bandwidth/1e3,Qt=yt.getCurrentHttpRequest(rt,!0),$t=(Qt.tresponse.getTime()-Qt.trequest.getTime())/1e3,tn=$t>Gt?$t-Gt:0;pt.setupPerSegmentQoe(Gt,jt,qt),pt.logSegmentMetrics(Xt,tn,xt,kt);var nn=(0,ft.Z)(vt).create({targetLatency:1.5,bufferMin:.3,segmentDuration:Gt,qoeEvaluator:pt});return nt.quality=it.getNextQuality(Rt,1e3*Ut,xt,Ot,kt,At,nn),nt.reason={throughput:Ut,latency:xt},nt.priority=st.Z.PRIORITY.STRONG,Dt.setTimeToLoadDelay(0),nt.quality!==At&&console.log("[TgcLearningRule]["+rt+"] requesting switch to index: ",nt.quality,"Average throughput",Math.round(Ut),"kbps"),nt}catch(et){throw et}},reset:function(){it.reset(),pt.reset()}},tt=(0,rt.Z)(vt).getInstance().getLogger(nt),it=(0,at.Z)(vt).create(),pt=(0,ot.Z)(vt).create(),nt}f.__dashjs_factory_name="LoLPRule";const pt=it.Z.getClassFactory(f)},6523:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>it});var rt=nt(5448);function i(et){var tt,nt,rt,it,at=et.targetLatency,ot=et.bufferMin,st=et.segmentDuration,lt=et.qoeEvaluator;function l(){return st}function c(et,tt){var nt=l();return tt>nt?et-nt:et+nt-tt}return tt={getMinBuffer:function(){return ot},getSegmentDuration:l,getNextBufferWithBitrate:function(et,tt,nt){return c(tt,et*st/nt)},getNextBuffer:c,findWeightVector:function(et,tt,it,ft,dt,pt){var yt=null,vt=null,At=null,Rt=Math.abs(tt-rt);return et.forEach((function(et){nt.forEach((function(nt){nt[0];var rt=nt[1],ft=nt[2],Nt=(nt[3],et.bitrate*st/dt),Dt=c(it,Nt),Ot=(0===ft?10:1/ft)*Math.max(1e-5,Nt-Dt),Mt=(0===rt?10:1/rt)*et.state.latency,Lt=lt.calculateSingleUseQoe(et.bitrate,Ot,Mt,pt);(null===yt||Lt>yt)&&function(et,tt,nt){return!(et>at+nt)&&tt>=ot}(tt,Dt,Rt)&&(yt=Lt,vt=nt,At=et.bitrate)}))})),null===vt&&null===At&&(vt=-1),rt=tt,vt}},nt=function e(et,tt,nt){if(nt===tt)return et;for(var rt=et.length,at=0;at<rt;at++)for(var ot=et.shift(),st=0;st<it.length;st++)et.push(ot.concat(it[st]));return e(et,tt,nt+1)}((it=[.2,.4,.6,.8,1]).map((function(et){return[et]})),4,1),rt=0,tt}i.__dashjs_factory_name="LoLpWeightSelector";const it=rt.Z.getClassFactory(i)},2298:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}},7803:(et,tt,nt)=>{"use strict";nt.d(tt,{Y:()=>vt,Z:()=>At});var rt=nt(3393),it=nt(1553),at=nt(5448),ot=nt(2128),st=nt(2594),lt=nt(7387),ft=nt(7417),dt=nt(9032),pt=nt(9326),yt=nt(7802),vt=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function h(et){var tt,nt,at,At,Rt,Nt,Dt,Ot,Mt=this.context,Lt=et.adapter,xt=et.baseURLController,kt=et.streamInfo,Ut=et.timelineConverter,Bt=et.debug,Gt=et.eventBus,qt=et.events,jt=et.dashConstants,Vt=(0,st.Z)(Mt).getInstance();function C(et,tt){var rt=new ot.Z;rt.id=et.id,rt.bitrate=et.bandwidth,rt.width=et.width,rt.height=et.height,rt.tilesHor=1,rt.tilesVert=1,et.essentialProperties&&et.essentialProperties.forEach((function(et){if(vt.indexOf(et.schemeIdUri)>=0&&et.value){var tt=et.value.split("x");2!==tt.length||isNaN(tt[0])||isNaN(tt[1])||(rt.tilesHor=parseInt(tt[0],10),rt.tilesVert=parseInt(tt[1],10))}})),tt?Nt.updateSegmentData(et).then((function(tt){!function(et,tt,nt){var rt=[],it=function(et,tt){var nt,rt,it,at,ot=[],st=0;for(nt=0,rt=et.segments.length;nt<rt;nt++)it=et.segments[nt],(at=(0,lt.TJ)(Ut,Lt.getIsDynamic(),tt,it.startTime,it.duration,it.timescale,it.media,it.mediaRange,st))&&(ot.push(at),at=null,st++);return ot}(nt,tt);tt.segments=it,et.segmentDuration=tt.segments[0].duration,et.readThumbnail=function(et,nt){var it=null;rt.some((function(tt){if(tt.start<=et&&tt.end>et)return it=tt.url,!0})),it?nt(it):tt.segments.some((function(it){if(it.mediaStartTime<=et&&it.mediaStartTime+it.duration>et){var at=xt.resolve(tt.path);return Dt.load({method:"get",url:at.url,request:{range:it.mediaRange,responseType:"arraybuffer"},onload:function(et){var tt=Ot.getSamplesInfo(et.target.response),at=new Blob([et.target.response.slice(tt.sampleList[0].offset,tt.sampleList[0].offset+tt.sampleList[0].size)],{type:"image/jpeg"}),ot=window.URL.createObjectURL(at);rt.push({start:it.mediaStartTime,end:it.mediaStartTime+it.duration,url:ot}),nt&&nt(ot)}}),!0}}))}}(rt,et,tt)})):(rt.startNumber=et.startNumber,rt.segmentDuration=et.segmentDuration,rt.timescale=et.timescale,rt.templateUrl=function(et){var tt=Vt.isRelative(et.media)?Vt.resolve(et.media,xt.resolve(et.path).url):et.media;return tt?(0,lt.Aj)(tt,et.id):""}(et)),rt.tilesHor>0&&rt.tilesVert>0&&(rt.widthPerTile=rt.width/rt.tilesHor,rt.heightPerTile=rt.height/rt.tilesVert,nt.push(rt))}function D(){nt=[],At=-1,Rt=null}return tt={getTracks:function(){return nt},addTracks:function(){if(kt&&Lt&&(Rt=Lt.getMediaInfoForType(kt,rt.Z.IMAGE))){var et=Lt.getVoRepresentations(Rt);et&&et.length>0&&et.forEach((function(et){(et.segmentInfoType===it.Z.SEGMENT_TEMPLATE&&et.segmentDuration>0&&et.media||et.segmentInfoType===it.Z.SEGMENT_TIMELINE)&&C(et),et.segmentInfoType===it.Z.SEGMENT_BASE&&C(et,!0)})),nt.length>0&&nt.sort((function(et,tt){return et.bitrate-tt.bitrate}))}},reset:D,setTrackByIndex:function(et){nt&&0!==nt.length&&(et>=nt.length&&(et=nt.length-1),At=et)},getCurrentTrack:function(){return At<0?null:nt[At]},getCurrentTrackIndex:function(){return At},getThumbnailRequestForTime:function(et){for(var tt,rt=Lt.getVoRepresentations(Rt),it=0;it<rt.length;it++)if(nt[At].id===rt[it].id){tt=rt[it];break}return at.getSegmentRequestForTime(Rt,tt,et)}},D(),Dt=(0,dt.Z)(Mt).create({}),Ot=(0,ft.Z)(Mt).getInstance(),Nt=(0,yt.Z)(Mt).create({events:qt,eventBus:Gt,streamInfo:kt,timelineConverter:Ut,dashConstants:jt,dashMetrics:et.dashMetrics,segmentBaseController:et.segmentBaseController,type:rt.Z.IMAGE}),(at=(0,pt.Z)(Mt).create({streamInfo:kt,type:rt.Z.IMAGE,timelineConverter:Ut,segmentsController:Nt,baseURLController:xt,debug:Bt,eventBus:Gt,events:qt,dashConstants:jt,urlUtils:Vt})).initialize(!!Lt&&Lt.getIsDynamic()),tt}h.__dashjs_factory_name="ThumbnailTracks";const At=at.Z.getClassFactory(h)},7417:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>lt});var rt=nt(6398),it=nt(8260),at=nt(5448),ot=nt(6934),st=nt(9597);function u(){var et,tt,nt=this.context;function a(et){if(!et)return null;void 0===et.fileStart&&(et.fileStart=0);var tt=ot.parseBuffer(et),rt=(0,it.Z)(nt).create();return rt.setData(tt),rt}function u(et,tt){return et[tt+3]>>>0|et[tt+2]<<8>>>0|et[tt+1]<<16>>>0|et[tt]<<24>>>0}function l(et,tt){return String.fromCharCode(et[tt++])+String.fromCharCode(et[tt++])+String.fromCharCode(et[tt++])+String.fromCharCode(et[tt])}return tt={parse:a,findLastTopIsoBoxCompleted:function(et,tt,nt){if(void 0===nt&&(nt=0),!tt||nt+8>=tt.byteLength)return new st.Z(0,!1);for(var rt,it=tt instanceof ArrayBuffer?new Uint8Array(tt):tt,at=0;nt<it.byteLength;){var ot=u(it,nt),lt=l(it,nt+4);if(0===ot)break;nt+ot<=it.byteLength&&(et.indexOf(lt)>=0?rt=new st.Z(nt,!0,ot):at=nt+ot),nt+=ot}return rt||new st.Z(at,!1)},getMediaTimescaleFromMoov:function(et){var tt=a(et),nt=tt?tt.getBox("mdhd"):void 0;return nt?nt.timescale:NaN},getSamplesInfo:function(et){if(!et||0===et.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var tt,nt,rt,it,at,ot,st,lt,ft,dt,pt,yt,vt,At,Rt,Nt,Dt=a(et),Ot=Dt.getBoxes("moof"),Mt=Dt.getBoxes("mfhd");Rt=Dt.getBoxes("moof").length,At=Mt[Mt.length-1].sequence_number,nt=0,at=[];var Lt=-1,xt=-1;for(dt=0;dt<Ot.length;dt++){var kt=Ot[dt],Ut=kt.getChildBoxes("traf");for(lt=0;lt<Ut.length;lt++){var Bt=Ut[lt],Gt=Bt.getChildBox("tfhd"),qt=Bt.getChildBox("tfdt");it=qt.baseMediaDecodeTime;var jt=Bt.getChildBoxes("trun"),Vt=Bt.getChildBoxes("subs");for(ft=0;ft<jt.length;ft++){var zt=jt[ft];for(nt=zt.sample_count,vt=(Gt.base_data_offset||0)+(zt.data_offset||0),st=0;st<nt;st++){tt=void 0!==(ot=zt.samples[st]).sample_duration?ot.sample_duration:Gt.default_sample_duration,rt=void 0!==ot.sample_size?ot.sample_size:Gt.default_sample_size;var Xt={dts:it,cts:it+(void 0!==ot.sample_composition_time_offset?ot.sample_composition_time_offset:0),duration:tt,offset:kt.offset+vt,size:rt,subSizes:[rt]};if(Vt)for(pt=0;pt<Vt.length;pt++){var Qt=Vt[pt];if(Lt<Qt.entry_count-1&&st>xt&&(Lt++,xt+=Qt.entries[Lt].sample_delta),st==xt){Xt.subSizes=[];var $t=Qt.entries[Lt];for(yt=0;yt<$t.subsample_count;yt++)Xt.subSizes.push($t.subsamples[yt].subsample_size)}}at.push(Xt),vt+=rt,it+=tt}}Nt=it-qt.baseMediaDecodeTime}}return{sampleList:at,lastSequenceNumber:At,totalDuration:Nt,numSequences:Rt}},findInitRange:function(tt){var nt=null,rt=a(tt);if(!rt)return nt;var it=rt.getBox("ftyp"),at=rt.getBox("moov");return et.debug("Searching for initialization."),at&&at.isComplete&&(nt=(it?it.offset:at.offset)+"-"+(at.offset+at.size-1),et.debug("Found the initialization. Range: "+nt)),nt},parsePayload:function(et,tt,nt){if(void 0===nt&&(nt=0),!tt||nt+8>=tt.byteLength)return new st.Z(0,!1);for(var rt,it=tt instanceof ArrayBuffer?new Uint8Array(tt):tt,at=0;nt<it.byteLength;){var ot=u(it,nt),lt=l(it,nt+4);if(0===ot)break;nt+ot<=it.byteLength&&(et.indexOf(lt)>=0?rt=new st.Z(nt,!0,ot,lt):at=nt+ot),nt+=ot}return rt||new st.Z(at,!1)}},et=(0,rt.Z)(nt).getInstance().getLogger(tt),tt}u.__dashjs_factory_name="BoxParser";const lt=at.Z.getSingletonFactory(u)},1715:(et,tt,nt)=>{"use strict";nt.d(tt,{B:()=>s,Z:()=>st});var rt=nt(5448),it=nt(7803),at=nt(3393),ot=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function s(){var et="WebKitMediaSource"in window,tt="MediaSource"in window;return et||tt}function u(){var et,tt,nt;return et={setConfig:function(et){et&&et.settings&&(tt=et.settings)},supportsMediaSource:s,supportsEncryptedMedia:function(){return nt},supportsCodec:function(et,nt){return nt!==at.Z.AUDIO&&nt!==at.Z.VIDEO?Promise.resolve(!0):function(et,nt){return tt.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(et.codec&&nt===at.Z.AUDIO||nt===at.Z.VIDEO&&et.codec&&et.width&&et.height&&et.bitrate&&et.framerate)}(et,nt)?function(et,tt){return new Promise((function(nt){if(et&&et.codec){var rt={type:"media-source"};rt[tt]={},rt[tt].contentType=et.codec,rt[tt].width=et.width,rt[tt].height=et.height,rt[tt].bitrate=parseInt(et.bitrate),rt[tt].framerate=parseFloat(et.framerate),navigator.mediaCapabilities.decodingInfo(rt).then((function(et){nt(et.supported)})).catch((function(){nt(!1)}))}else nt(!1)}))}(et,nt):function(et){return new Promise((function(tt){if(et&&et.codec){var nt=et.codec;et.width&&et.height&&(nt+=';width="'+et.width+'";height="'+et.height+'"'),"MediaSource"in window&&MediaSource.isTypeSupported(nt)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(nt)?tt(!0):tt(!1)}else tt(!1)}))}(et)},setEncryptedMediaSupported:function(et){nt=et},supportsEssentialProperty:function(et){try{return-1!==it.Y.indexOf(et.schemeIdUri)}catch(et){return!0}},codecRootCompatibleWithCodec:function(et,tt){for(var nt,rt=et.split(".")[0],it=0===tt.indexOf(rt),at=0;at<ot.length;at++)if(ot[at].codec===rt){nt=ot[at];break}return nt?it||nt.compatibleCodecs.some((function(et){return 0===tt.indexOf(et)})):it}},nt=!1,et}u.__dashjs_factory_name="Capabilities";const st=rt.Z.getSingletonFactory(u)},2295:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(3106);function a(){return{customTimeRangeArray:[],length:0,add:function(et,tt){var nt;for(nt=0;nt<this.customTimeRangeArray.length&&et>this.customTimeRangeArray[nt].start;nt++);for(this.customTimeRangeArray.splice(nt,0,{start:et,end:tt}),nt=0;nt<this.customTimeRangeArray.length-1;nt++)this.mergeRanges(nt,nt+1)&&nt--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(et,tt){for(var nt=0;nt<this.customTimeRangeArray.length;nt++)if(et<=this.customTimeRangeArray[nt].start&&tt>=this.customTimeRangeArray[nt].end)this.customTimeRangeArray.splice(nt,1),nt--;else{if(et>this.customTimeRangeArray[nt].start&&tt<this.customTimeRangeArray[nt].end){this.customTimeRangeArray.splice(nt+1,0,{start:tt,end:this.customTimeRangeArray[nt].end}),this.customTimeRangeArray[nt].end=et;break}et>this.customTimeRangeArray[nt].start&&et<this.customTimeRangeArray[nt].end?this.customTimeRangeArray[nt].end=et:tt>this.customTimeRangeArray[nt].start&&tt<this.customTimeRangeArray[nt].end&&(this.customTimeRangeArray[nt].start=tt)}this.length=this.customTimeRangeArray.length},mergeRanges:function(et,tt){var nt=this.customTimeRangeArray[et],rt=this.customTimeRangeArray[tt];return nt.start<=rt.start&&rt.start<=nt.end&&nt.end<=rt.end?(nt.end=rt.end,this.customTimeRangeArray.splice(tt,1),!0):rt.start<=nt.start&&nt.start<=rt.end&&rt.end<=nt.end?(nt.start=rt.start,this.customTimeRangeArray.splice(tt,1),!0):rt.start<=nt.start&&nt.start<=rt.end&&nt.end<=rt.end?(this.customTimeRangeArray.splice(et,1),!0):nt.start<=rt.start&&rt.start<=nt.end&&rt.end<=nt.end&&(this.customTimeRangeArray.splice(tt,1),!0)},start:function(et){return(0,it.SE)(et),et>=this.customTimeRangeArray.length||et<0?NaN:this.customTimeRangeArray[et].start},end:function(et){return(0,it.SE)(et),et>=this.customTimeRangeArray.length||et<0?NaN:this.customTimeRangeArray[et].end}}}a.__dashjs_factory_name="CustomTimeRanges";const at=rt.Z.getClassFactory(a)},5:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>it});var rt=nt(5448);function i(){var et,tt=/^[a-z][a-z0-9+\-_.]*:/i,nt=/^https?:\/\//i,rt=/^https:\/\//i,it=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=function(et,tt){try{return new window.URL(et,tt).toString()}catch(tt){return et}},o=function(et,tt){var nt=s;if(!tt)return et;if(!c(et))return et;f(et)&&(nt=u),d(et)&&(nt=l);var rt=nt(tt),it="/"!==rt.charAt(rt.length-1)&&"/"!==et.charAt(0)?"/":"";return[rt,et].join(it)};function s(et){var tt=et.indexOf("/"),nt=et.lastIndexOf("/");return-1!==tt?nt===tt+1?et:(-1!==et.indexOf("?")&&(et=et.substring(0,et.indexOf("?"))),et.substring(0,nt+1)):""}function u(et){var tt=et.match(it);return tt?tt[1]:""}function l(et){var nt=et.match(tt);return nt?nt[0]:""}function c(et){return!tt.test(et)}function f(et){return c(et)&&"/"===et.charAt(0)}function d(et){return 0===et.indexOf("//")}return function(){try{new window.URL("x","http://y"),et=a}catch(et){}finally{et=et||o}}(),{parseBaseUrl:s,parseOrigin:u,parseScheme:l,isRelative:c,isPathAbsolute:f,isSchemeRelative:d,isHTTPURL:function(et){return nt.test(et)},isHTTPS:function(et){return rt.test(et)},removeHostname:function(et){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(et)[2].substring(1)},resolve:function(tt,nt){return et(tt,nt)}}}i.__dashjs_factory_name="DefaultURLUtils";const it=rt.Z.getSingletonFactory(i)},8260:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(2839),it=nt(5448);function a(){var et;function t(tt){var nt=[];if(!tt||!et||"function"!=typeof et.fetchAll)return nt;for(var rt,it=et.fetchAll(tt),at=0,ot=it.length;at<ot;at++)(rt=n(it[at]))&&nt.push(rt);return nt}function n(et){if(!et)return null;var tt=new rt.Z(et);return et.hasOwnProperty("_incomplete")&&(tt.isComplete=!et._incomplete),tt}return{getBox:function(tt){return tt&&et&&et.boxes&&0!==et.boxes.length&&"function"==typeof et.fetch?n(et.fetch(tt)):null},getBoxes:t,setData:function(tt){et=tt},getLastBox:function(){if(!et||!et.boxes||!et.boxes.length)return null;var tt=t(et.boxes[et.boxes.length-1].type);return tt.length>0?tt[tt.length-1]:null}}}a.__dashjs_factory_name="IsoFile";const at=it.Z.getClassFactory(a)},7473:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>it,k:()=>i});var rt=nt(5448);function i(et,tt){var nt={url:et.url,method:et.method,headers:Object.assign({},et.headers),credentials:et.withCredentials?"include":void 0};return Promise.resolve(tt.modifyRequest(nt)).then((function(){return Object.assign(et,nt,{withCredentials:"include"===nt.credentials})}))}function a(){return{modifyRequest:null,modifyRequestURL:function(et){return et},modifyRequestHeader:function(et,tt){return tt.url,et}}}a.__dashjs_factory_name="RequestModifier";const it=rt.Z.getSingletonFactory(a)},3106:(et,tt,nt)=>{"use strict";nt.d(tt,{PS:()=>a,SE:()=>o});var rt=nt(3393);function i(et){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(et){return typeof et}:function(et){return et&&"function"==typeof Symbol&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(et)}function a(et,tt){if(i(et)!==tt)throw rt.Z.BAD_ARGUMENT_ERROR}function o(et){if(null===et||isNaN(et)||et%1!=0)throw rt.Z.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2594:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(5448),it=nt(5);function a(){var et,tt=[],nt=this.context;function r(nt,rt,it){var at=function(nt){var rt;for(rt=0;rt<tt.length;rt++)if(tt[rt].regex.test(nt))return tt[rt].utils;return et}(it||rt);return at&&"function"==typeof at[nt]?at[nt](rt,it):et[nt](rt,it)}return et=(0,it.Z)(nt).getInstance(),{registerUrlRegex:function(et,nt){tt.push({regex:et,utils:nt})},parseBaseUrl:function(et){return r("parseBaseUrl",et)},parseOrigin:function(et){return r("parseOrigin",et)},parseScheme:function(et){return r("parseScheme",et)},isRelative:function(et){return r("isRelative",et)},isPathAbsolute:function(et){return r("isPathAbsolute",et)},isSchemeRelative:function(et){return r("isSchemeRelative",et)},isHTTPURL:function(et){return r("isHTTPURL",et)},isHTTPS:function(et){return r("isHTTPS",et)},removeHostname:function(et){return r("removeHostname",et)},resolve:function(et,tt){return r("resolve",et,tt)}}}a.__dashjs_factory_name="URLUtils";const at=rt.Z.getSingletonFactory(a)},5459:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(et,tt,nt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=et||null,this.message=tt||null,this.data=nt||null}},3186:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>at});var rt=nt(7855),it=function(){function e(et){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=e.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=et||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}var et;return(et=[{key:"isInitializationRequest",value:function(){return this.type&&this.type===rt.w.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(et){this.type=et&&et.init?rt.w.INIT_SEGMENT_TYPE:rt.w.MEDIA_SEGMENT_TYPE,this.url=et&&et.url?et.url:null,this.range=et&&et.range?et.range.start+"-"+et.range.end:null,this.mediaType=et&&et.mediaType?et.mediaType:null}}])&&function i(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}();it.ACTION_DOWNLOAD="download",it.ACTION_COMPLETE="complete";const at=it},2839:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function(){function e(et){if(function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=et._offset,this.type=et.type,this.size=et.size,this.boxes=[],et.boxes)for(var tt=0;tt<et.boxes.length;tt++)this.boxes.push(new e(et.boxes[tt]));switch(this.isComplete=!0,et.type){case"sidx":if(this.timescale=et.timescale,this.earliest_presentation_time=et.earliest_presentation_time,this.first_offset=et.first_offset,this.references=et.references,et.references){this.references=[];for(var nt=0;nt<et.references.length;nt++){var rt={reference_type:et.references[nt].reference_type,referenced_size:et.references[nt].referenced_size,subsegment_duration:et.references[nt].subsegment_duration};this.references.push(rt)}}break;case"emsg":this.id=et.id,this.version=1===et.version?1:0,this.value=et.value,this.timescale=et.timescale,this.scheme_id_uri=et.scheme_id_uri,this.presentation_time_delta=1===et.version?et.presentation_time:et.presentation_time_delta,this.event_duration=et.event_duration,this.message_data=et.message_data;break;case"mdhd":this.timescale=et.timescale;break;case"mfhd":this.sequence_number=et.sequence_number;break;case"subs":this.entry_count=et.entry_count,this.entries=et.entries;break;case"tfhd":this.base_data_offset=et.base_data_offset,this.sample_description_index=et.sample_description_index,this.default_sample_duration=et.default_sample_duration,this.default_sample_size=et.default_sample_size,this.default_sample_flags=et.default_sample_flags,this.flags=et.flags;break;case"tfdt":this.version=et.version,this.baseMediaDecodeTime=et.baseMediaDecodeTime,this.flags=et.flags;break;case"trun":if(this.sample_count=et.sample_count,this.first_sample_flags=et.first_sample_flags,this.data_offset=et.data_offset,this.flags=et.flags,this.samples=et.samples,et.samples){this.samples=[];for(var it=0,at=et.samples.length;it<at;it++){var ot={sample_size:et.samples[it].sample_size,sample_duration:et.samples[it].sample_duration,sample_composition_time_offset:et.samples[it].sample_composition_time_offset};this.samples.push(ot)}}break;case"prft":this.version=et.version,this.reference_track_ID=et.reference_track_ID,this.ntp_timestamp_sec=et.ntp_timestamp_sec,this.ntp_timestamp_frac=et.ntp_timestamp_frac,this.media_time=et.media_time,this.flags=et.flags}}var et;return(et=[{key:"getChildBox",value:function(et){for(var tt=0;tt<this.boxes.length;tt++)if(this.boxes[tt].type===et)return this.boxes[tt]}},{key:"getChildBoxes",value:function(et){for(var tt=[],nt=0;nt<this.boxes.length;nt++)this.boxes[nt].type===et&&tt.push(this.boxes[nt]);return tt}}])&&function r(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}()},9597:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(et,tt,nt){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastCompletedOffset=et,this.found=tt,this.size=nt}},2128:(et,tt,nt)=>{"use strict";nt.d(tt,{Z:()=>rt});const rt=function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),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=""}},7855:(et,tt,nt)=>{"use strict";function r(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}nt.d(tt,{O:()=>it,w:()=>rt});var rt=function e(){r(this,e),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._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null},it=function e(){r(this,e),this.s=null,this.d=null,this.b=[]};rt.GET="GET",rt.HEAD="HEAD",rt.MPD_TYPE="MPD",rt.XLINK_EXPANSION_TYPE="XLinkExpansion",rt.INIT_SEGMENT_TYPE="InitializationSegment",rt.INDEX_SEGMENT_TYPE="IndexSegment",rt.MEDIA_SEGMENT_TYPE="MediaSegment",rt.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",rt.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",rt.DVB_REPORTING_TYPE="DVBReporting",rt.LICENSE="license",rt.CONTENT_STEERING_TYPE="ContentSteering",rt.OTHER_TYPE="other"},3039:(et,tt)=>{"use strict";function n(et,tt){return function(nt,rt){for(var it,at,ot,st=r(nt,"tag"),lt=r(null==rt?"*":rt,"range"),ft=[],dt=-1;++dt<lt.length;)if(it=lt[dt].toLowerCase(),tt||"*"!==it){for(at=-1,ot=[];++at<st.length;)if(et(st[at].toLowerCase(),it)){if(!tt)return st[at];ft.push(st[at])}else ot.push(st[at]);st=ot}return tt?ft:void 0}}function r(et,tt){var nt=et&&"string"==typeof et?[et]:et;if(!nt||"object"!=typeof nt||!("length"in nt))throw new Error("Invalid "+tt+" `"+nt+"`, expected non-empty string");return nt}tt.basicFilter=n((function(et,tt){return"*"===tt||et===tt||et.indexOf(tt+"-")>-1}),!0),tt.extendedFilter=n((function(et,tt){var nt=et.split("-"),rt=tt.split("-"),it=0,at=0;if("*"!==rt[at]&&nt[it]!==rt[at])return!1;for(it++,at++;at<rt.length;)if("*"!==rt[at]){if(!nt[it])return!1;if(nt[it]!==rt[at]){if(1===nt[it].length)return!1;it++}else it++,at++}else at++;return!0}),!0),tt.lookup=n((function(et,tt){for(var nt,rt=tt;;){if("*"===rt||et===rt)return!0;if((nt=rt.lastIndexOf("-"))<0)return!1;"-"===rt.charAt(nt-2)&&(nt-=2),rt=rt.slice(0,nt)}}))},3973:(et,tt,nt)=>{"use strict";et.exports=nt(3854)},3854:(et,tt,nt)=>{"use strict";var rt=nt(2415),it=nt(3039),at=nt(7778),ot=nt(5813),st=nt(3165),lt=nt(9460);et.exports=function(et,tt){var nt,dt=tt||{},yt=rt.parse(String(et||"").toLowerCase(),dt),vt=rt.stringify(yt),At=-1;if(!vt)return vt;for(;++At<at.length;)it.extendedFilter(vt,at[At].from).length&&(d(yt,at[At].from,at[At].to),vt=rt.stringify(yt));for(At=-1;++At<ot.length;)g(yt,ot[At].from.field,ot[At].from.value)&&h(yt,ot[At].to.field,ot[At].to.value);for(vt=rt.stringify(Object.assign({},yt,pt)),At=-1;++At<st.length;)vt===st[At]&&(d(yt,st[At],st[At].split("-").slice(0,-1).join("-")),vt=rt.stringify(Object.assign({},yt,pt)));if(yt.extensions.sort(p),dt.warning)for(nt in lt)ft.call(lt[nt],yt[nt])&&dt.warning("Deprecated "+nt+" `"+yt[nt]+"`, expected one of `"+lt[nt][yt[nt]].join("`, `")+"`",null,7);return yt.script&&(yt.script=yt.script.charAt(0).toUpperCase()+yt.script.slice(1)),yt.region&&(yt.region=yt.region.toUpperCase()),rt.stringify(yt)};var ft={}.hasOwnProperty,dt=new Intl.Collator,pt={variants:[],extensions:[],privateuse:[],irregular:null,regular:null};function d(et,tt,nt){var it,at=rt.parse(tt),ot=rt.parse(nt),st=[];for(it in at)at[it]&&at[it].length&&g(et,it,at[it])&&st.push(it);for(it in ot)ot[it]&&ot[it].length&&(st.indexOf(it)>-1||!et[it]||!et[it].length)&&h(et,it,ot[it])}function g(et,tt,nt){var rt,it,at,ot,st=!1;if(nt){if(it=rt=et[tt],rt&&"object"==typeof rt)for(it=[],at=-1;++at<rt.length;)ot=rt[at],nt.indexOf(ot)<0?it.push(ot):st=!0;else rt===nt&&(it=null,st=!0);et[tt]=it}return st}function h(et,tt,nt){var rt,it,at,ot=et[tt];if(ot&&"object"==typeof ot)for(rt=[].concat(nt),it=-1;++it<rt.length;)at=rt[it],ot.indexOf(at)<0&&ot.push(at);else et[tt]=nt}function p(et,tt){return dt.compare(et.singleton,tt.singleton)}},2415:(et,tt,nt)=>{"use strict";tt.parse=nt(6903),tt.stringify=nt(6713)},6903:(et,tt,nt)=>{"use strict";var rt=nt(2219),it=nt(3516),at=nt(395),ot=nt(858),st=nt(8589);et.exports=function e(et,tt){var nt,ft,dt,pt=tt||{},yt={language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null},vt=String(et),At=vt.toLowerCase(),Rt=0;if(null==et)throw new Error("Expected string, got `"+et+"`");if(lt.call(st,At))return(null==pt.normalize||pt.normalize)&&st[At]?e(st[At]):(yt[-1===ot.indexOf(At)?"irregular":"regular"]=vt,yt);for(;it(At.charCodeAt(Rt))&&Rt<9;)Rt++;if(Rt>1&&Rt<9){if(yt.language=vt.slice(0,Rt),Rt<4)for(ft=0;45===At.charCodeAt(Rt)&&it(At.charCodeAt(Rt+1))&&it(At.charCodeAt(Rt+2))&&it(At.charCodeAt(Rt+3))&&!it(At.charCodeAt(Rt+4));){if(ft>2)return y(Rt,3,"Too many extended language subtags, expected at most 3 subtags");yt.extendedLanguageSubtags.push(vt.slice(Rt+1,Rt+4)),Rt+=4,ft++}for(45===At.charCodeAt(Rt)&&it(At.charCodeAt(Rt+1))&&it(At.charCodeAt(Rt+2))&&it(At.charCodeAt(Rt+3))&&it(At.charCodeAt(Rt+4))&&!it(At.charCodeAt(Rt+5))&&(yt.script=vt.slice(Rt+1,Rt+5),Rt+=5),45===At.charCodeAt(Rt)&&(it(At.charCodeAt(Rt+1))&&it(At.charCodeAt(Rt+2))&&!it(At.charCodeAt(Rt+3))?(yt.region=vt.slice(Rt+1,Rt+3),Rt+=3):at(At.charCodeAt(Rt+1))&&at(At.charCodeAt(Rt+2))&&at(At.charCodeAt(Rt+3))&&!at(At.charCodeAt(Rt+4))&&(yt.region=vt.slice(Rt+1,Rt+4),Rt+=4));45===At.charCodeAt(Rt);){for(dt=nt=Rt+1;rt(At.charCodeAt(dt));){if(dt-nt>7)return y(dt,1,"Too long variant, expected at most 8 characters");dt++}if(!(dt-nt>4||dt-nt>3&&at(At.charCodeAt(nt))))break;yt.variants.push(vt.slice(nt,dt)),Rt=dt}for(;45===At.charCodeAt(Rt)&&120!==At.charCodeAt(Rt+1)&&rt(At.charCodeAt(Rt+1))&&45===At.charCodeAt(Rt+2)&&rt(At.charCodeAt(Rt+3));){for(dt=Rt+2,ft=0;45===At.charCodeAt(dt)&&rt(At.charCodeAt(dt+1))&&rt(At.charCodeAt(dt+2));)for(dt=(nt=dt+1)+2,ft++;rt(At.charCodeAt(dt));){if(dt-nt>7)return y(dt,2,"Too long extension, expected at most 8 characters");dt++}if(!ft)return y(dt,4,"Empty extension, extensions must have at least 2 characters of content");yt.extensions.push({singleton:vt.charAt(Rt+1),extensions:vt.slice(Rt+3,dt).split("-")}),Rt=dt}}else Rt=0;if(0===Rt&&120===At.charCodeAt(Rt)||45===At.charCodeAt(Rt)&&120===At.charCodeAt(Rt+1))for(dt=Rt=Rt?Rt+2:1;45===At.charCodeAt(dt)&&rt(At.charCodeAt(dt+1));){for(dt=nt=Rt+1;rt(At.charCodeAt(dt));){if(dt-nt>7)return y(dt,5,"Too long private-use area, expected at most 8 characters");dt++}yt.privateuse.push(vt.slice(Rt+1,dt)),Rt=dt}return Rt!==vt.length?y(Rt,6,"Found superfluous content after tag"):yt;function y(et,tt,nt){return pt.warning&&pt.warning(nt,tt,et),pt.forgiving?yt:{language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null}}};var lt={}.hasOwnProperty},6713:et=>{"use strict";et.exports=function(et){var tt,nt,rt,it=et||{},at=[];if(it.irregular||it.regular)return it.irregular||it.regular;if(it.language)for(at=at.concat(it.language,it.extendedLanguageSubtags||[],it.script||[],it.region||[],it.variants||[]),tt=it.extensions||[],nt=-1;++nt<tt.length;)(rt=tt[nt]).singleton&&rt.extensions&&rt.extensions.length&&(at=at.concat(rt.singleton,rt.extensions));return it.privateuse&&it.privateuse.length&&(at=at.concat("x",it.privateuse)),at.join("-")}},1549:(et,tt,nt)=>{"use strict";var rt=nt(6693),it=nt(2165),at="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=u,tt.SlowBuffer=function(et){return+et!=et&&(et=0),u.alloc(+et)},tt.INSPECT_MAX_BYTES=50;var ot=2147483647;function s(et){if(et>ot)throw new RangeError('The value "'+et+'" is invalid for option "size"');var tt=new Uint8Array(et);return Object.setPrototypeOf(tt,u.prototype),tt}function u(et,tt,nt){if("number"==typeof et){if("string"==typeof tt)throw new TypeError('The "string" argument must be of type string. Received type number');return f(et)}return l(et,tt,nt)}function l(et,tt,nt){if("string"==typeof et)return function(et,tt){if("string"==typeof tt&&""!==tt||(tt="utf8"),!u.isEncoding(tt))throw new TypeError("Unknown encoding: "+tt);var nt=0|p(et,tt),rt=s(nt),it=rt.write(et,tt);return it!==nt&&(rt=rt.slice(0,it)),rt}(et,tt);if(ArrayBuffer.isView(et))return function(et){if(G(et,Uint8Array)){var tt=new Uint8Array(et);return g(tt.buffer,tt.byteOffset,tt.byteLength)}return d(et)}(et);if(null==et)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof et);if(G(et,ArrayBuffer)||et&&G(et.buffer,ArrayBuffer))return g(et,tt,nt);if("undefined"!=typeof SharedArrayBuffer&&(G(et,SharedArrayBuffer)||et&&G(et.buffer,SharedArrayBuffer)))return g(et,tt,nt);if("number"==typeof et)throw new TypeError('The "value" argument must not be of type number. Received type number');var rt=et.valueOf&&et.valueOf();if(null!=rt&&rt!==et)return u.from(rt,tt,nt);var it=function(et){if(u.isBuffer(et)){var tt=0|h(et.length),nt=s(tt);return 0===nt.length||et.copy(nt,0,0,tt),nt}return void 0!==et.length?"number"!=typeof et.length||q(et.length)?s(0):d(et):"Buffer"===et.type&&Array.isArray(et.data)?d(et.data):void 0}(et);if(it)return it;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof et[Symbol.toPrimitive])return u.from(et[Symbol.toPrimitive]("string"),tt,nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof et)}function c(et){if("number"!=typeof et)throw new TypeError('"size" argument must be of type number');if(et<0)throw new RangeError('The value "'+et+'" is invalid for option "size"')}function f(et){return c(et),s(et<0?0:0|h(et))}function d(et){for(var tt=et.length<0?0:0|h(et.length),nt=s(tt),rt=0;rt<tt;rt+=1)nt[rt]=255&et[rt];return nt}function g(et,tt,nt){if(tt<0||et.byteLength<tt)throw new RangeError('"offset" is outside of buffer bounds');if(et.byteLength<tt+(nt||0))throw new RangeError('"length" is outside of buffer bounds');var rt;return rt=void 0===tt&&void 0===nt?new Uint8Array(et):void 0===nt?new Uint8Array(et,tt):new Uint8Array(et,tt,nt),Object.setPrototypeOf(rt,u.prototype),rt}function h(et){if(et>=ot)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ot.toString(16)+" bytes");return 0|et}function p(et,tt){if(u.isBuffer(et))return et.length;if(ArrayBuffer.isView(et)||G(et,ArrayBuffer))return et.byteLength;if("string"!=typeof et)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof et);var nt=et.length,rt=arguments.length>2&&!0===arguments[2];if(!rt&&0===nt)return 0;for(var it=!1;;)switch(tt){case"ascii":case"latin1":case"binary":return nt;case"utf8":case"utf-8":return U(et).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*nt;case"hex":return nt>>>1;case"base64":return Z(et).length;default:if(it)return rt?-1:U(et).length;tt=(""+tt).toLowerCase(),it=!0}}function m(et,tt,nt){var rt=!1;if((void 0===tt||tt<0)&&(tt=0),tt>this.length)return"";if((void 0===nt||nt>this.length)&&(nt=this.length),nt<=0)return"";if((nt>>>=0)<=(tt>>>=0))return"";for(et||(et="utf8");;)switch(et){case"hex":return D(this,tt,nt);case"utf8":case"utf-8":return R(this,tt,nt);case"ascii":return N(this,tt,nt);case"latin1":case"binary":return C(this,tt,nt);case"base64":return I(this,tt,nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,tt,nt);default:if(rt)throw new TypeError("Unknown encoding: "+et);et=(et+"").toLowerCase(),rt=!0}}function y(et,tt,nt){var rt=et[tt];et[tt]=et[nt],et[nt]=rt}function E(et,tt,nt,rt,it){if(0===et.length)return-1;if("string"==typeof nt?(rt=nt,nt=0):nt>2147483647?nt=2147483647:nt<-2147483648&&(nt=-2147483648),q(nt=+nt)&&(nt=it?0:et.length-1),nt<0&&(nt=et.length+nt),nt>=et.length){if(it)return-1;nt=et.length-1}else if(nt<0){if(!it)return-1;nt=0}if("string"==typeof tt&&(tt=u.from(tt,rt)),u.isBuffer(tt))return 0===tt.length?-1:v(et,tt,nt,rt,it);if("number"==typeof tt)return tt&=255,"function"==typeof Uint8Array.prototype.indexOf?it?Uint8Array.prototype.indexOf.call(et,tt,nt):Uint8Array.prototype.lastIndexOf.call(et,tt,nt):v(et,[tt],nt,rt,it);throw new TypeError("val must be string, number or Buffer")}function v(et,tt,nt,rt,it){var at,ot=1,st=et.length,lt=tt.length;if(void 0!==rt&&("ucs2"===(rt=String(rt).toLowerCase())||"ucs-2"===rt||"utf16le"===rt||"utf-16le"===rt)){if(et.length<2||tt.length<2)return-1;ot=2,st/=2,lt/=2,nt/=2}function l(et,tt){return 1===ot?et[tt]:et.readUInt16BE(tt*ot)}if(it){var ft=-1;for(at=nt;at<st;at++)if(l(et,at)===l(tt,-1===ft?0:at-ft)){if(-1===ft&&(ft=at),at-ft+1===lt)return ft*ot}else-1!==ft&&(at-=at-ft),ft=-1}else for(nt+lt>st&&(nt=st-lt),at=nt;at>=0;at--){for(var dt=!0,pt=0;pt<lt;pt++)if(l(et,at+pt)!==l(tt,pt)){dt=!1;break}if(dt)return at}return-1}function _(et,tt,nt,rt){nt=Number(nt)||0;var it=et.length-nt;rt?(rt=Number(rt))>it&&(rt=it):rt=it;var at=tt.length;rt>at/2&&(rt=at/2);for(var ot=0;ot<rt;++ot){var st=parseInt(tt.substr(2*ot,2),16);if(q(st))return ot;et[nt+ot]=st}return ot}function T(et,tt,nt,rt){return B(U(tt,et.length-nt),et,nt,rt)}function S(et,tt,nt,rt){return B(function(et){for(var tt=[],nt=0;nt<et.length;++nt)tt.push(255&et.charCodeAt(nt));return tt}(tt),et,nt,rt)}function b(et,tt,nt,rt){return B(Z(tt),et,nt,rt)}function A(et,tt,nt,rt){return B(function(et,tt){for(var nt,rt,it,at=[],ot=0;ot<et.length&&!((tt-=2)<0);++ot)rt=(nt=et.charCodeAt(ot))>>8,it=nt%256,at.push(it),at.push(rt);return at}(tt,et.length-nt),et,nt,rt)}function I(et,tt,nt){return 0===tt&&nt===et.length?rt.fromByteArray(et):rt.fromByteArray(et.slice(tt,nt))}function R(et,tt,nt){nt=Math.min(et.length,nt);for(var rt=[],it=tt;it<nt;){var at,ot,lt,ft,dt=et[it],pt=null,yt=dt>239?4:dt>223?3:dt>191?2:1;if(it+yt<=nt)switch(yt){case 1:dt<128&&(pt=dt);break;case 2:128==(192&(at=et[it+1]))&&(ft=(31&dt)<<6|63&at)>127&&(pt=ft);break;case 3:at=et[it+1],ot=et[it+2],128==(192&at)&&128==(192&ot)&&(ft=(15&dt)<<12|(63&at)<<6|63&ot)>2047&&(ft<55296||ft>57343)&&(pt=ft);break;case 4:at=et[it+1],ot=et[it+2],lt=et[it+3],128==(192&at)&&128==(192&ot)&&128==(192&lt)&&(ft=(15&dt)<<18|(63&at)<<12|(63&ot)<<6|63&lt)>65535&&ft<1114112&&(pt=ft)}null===pt?(pt=65533,yt=1):pt>65535&&(pt-=65536,rt.push(pt>>>10&1023|55296),pt=56320|1023&pt),rt.push(pt),it+=yt}return function(et){var tt=et.length;if(tt<=st)return String.fromCharCode.apply(String,et);for(var nt="",rt=0;rt<tt;)nt+=String.fromCharCode.apply(String,et.slice(rt,rt+=st));return nt}(rt)}tt.kMaxLength=ot,u.TYPED_ARRAY_SUPPORT=function(){try{var et=new Uint8Array(1),tt={foo:function(){return 42}};return Object.setPrototypeOf(tt,Uint8Array.prototype),Object.setPrototypeOf(et,tt),42===et.foo()}catch(et){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(et,tt,nt){return l(et,tt,nt)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(et,tt,nt){return function(et,tt,nt){return c(et),et<=0?s(et):void 0!==tt?"string"==typeof nt?s(et).fill(tt,nt):s(et).fill(tt):s(et)}(et,tt,nt)},u.allocUnsafe=function(et){return f(et)},u.allocUnsafeSlow=function(et){return f(et)},u.isBuffer=function(et){return null!=et&&!0===et._isBuffer&&et!==u.prototype},u.compare=function(et,tt){if(G(et,Uint8Array)&&(et=u.from(et,et.offset,et.byteLength)),G(tt,Uint8Array)&&(tt=u.from(tt,tt.offset,tt.byteLength)),!u.isBuffer(et)||!u.isBuffer(tt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(et===tt)return 0;for(var nt=et.length,rt=tt.length,it=0,at=Math.min(nt,rt);it<at;++it)if(et[it]!==tt[it]){nt=et[it],rt=tt[it];break}return nt<rt?-1:rt<nt?1:0},u.isEncoding=function(et){switch(String(et).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}},u.concat=function(et,tt){if(!Array.isArray(et))throw new TypeError('"list" argument must be an Array of Buffers');if(0===et.length)return u.alloc(0);var nt;if(void 0===tt)for(tt=0,nt=0;nt<et.length;++nt)tt+=et[nt].length;var rt=u.allocUnsafe(tt),it=0;for(nt=0;nt<et.length;++nt){var at=et[nt];if(G(at,Uint8Array))it+at.length>rt.length?u.from(at).copy(rt,it):Uint8Array.prototype.set.call(rt,at,it);else{if(!u.isBuffer(at))throw new TypeError('"list" argument must be an Array of Buffers');at.copy(rt,it)}it+=at.length}return rt},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var et=this.length;if(et%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var tt=0;tt<et;tt+=2)y(this,tt,tt+1);return this},u.prototype.swap32=function(){var et=this.length;if(et%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var tt=0;tt<et;tt+=4)y(this,tt,tt+3),y(this,tt+1,tt+2);return this},u.prototype.swap64=function(){var et=this.length;if(et%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var tt=0;tt<et;tt+=8)y(this,tt,tt+7),y(this,tt+1,tt+6),y(this,tt+2,tt+5),y(this,tt+3,tt+4);return this},u.prototype.toString=function(){var et=this.length;return 0===et?"":0===arguments.length?R(this,0,et):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(et){if(!u.isBuffer(et))throw new TypeError("Argument must be a Buffer");return this===et||0===u.compare(this,et)},u.prototype.inspect=function(){var et="",nt=tt.INSPECT_MAX_BYTES;return et=this.toString("hex",0,nt).replace(/(.{2})/g,"$1 ").trim(),this.length>nt&&(et+=" ... "),"<Buffer "+et+">"},at&&(u.prototype[at]=u.prototype.inspect),u.prototype.compare=function(et,tt,nt,rt,it){if(G(et,Uint8Array)&&(et=u.from(et,et.offset,et.byteLength)),!u.isBuffer(et))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof et);if(void 0===tt&&(tt=0),void 0===nt&&(nt=et?et.length:0),void 0===rt&&(rt=0),void 0===it&&(it=this.length),tt<0||nt>et.length||rt<0||it>this.length)throw new RangeError("out of range index");if(rt>=it&&tt>=nt)return 0;if(rt>=it)return-1;if(tt>=nt)return 1;if(this===et)return 0;for(var at=(it>>>=0)-(rt>>>=0),ot=(nt>>>=0)-(tt>>>=0),st=Math.min(at,ot),lt=this.slice(rt,it),ft=et.slice(tt,nt),dt=0;dt<st;++dt)if(lt[dt]!==ft[dt]){at=lt[dt],ot=ft[dt];break}return at<ot?-1:ot<at?1:0},u.prototype.includes=function(et,tt,nt){return-1!==this.indexOf(et,tt,nt)},u.prototype.indexOf=function(et,tt,nt){return E(this,et,tt,nt,!0)},u.prototype.lastIndexOf=function(et,tt,nt){return E(this,et,tt,nt,!1)},u.prototype.write=function(et,tt,nt,rt){if(void 0===tt)rt="utf8",nt=this.length,tt=0;else if(void 0===nt&&"string"==typeof tt)rt=tt,nt=this.length,tt=0;else{if(!isFinite(tt))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");tt>>>=0,isFinite(nt)?(nt>>>=0,void 0===rt&&(rt="utf8")):(rt=nt,nt=void 0)}var it=this.length-tt;if((void 0===nt||nt>it)&&(nt=it),et.length>0&&(nt<0||tt<0)||tt>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var at=!1;;)switch(rt){case"hex":return _(this,et,tt,nt);case"utf8":case"utf-8":return T(this,et,tt,nt);case"ascii":case"latin1":case"binary":return S(this,et,tt,nt);case"base64":return b(this,et,tt,nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,et,tt,nt);default:if(at)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),at=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var st=4096;function N(et,tt,nt){var rt="";nt=Math.min(et.length,nt);for(var it=tt;it<nt;++it)rt+=String.fromCharCode(127&et[it]);return rt}function C(et,tt,nt){var rt="";nt=Math.min(et.length,nt);for(var it=tt;it<nt;++it)rt+=String.fromCharCode(et[it]);return rt}function D(et,tt,nt){var rt=et.length;(!tt||tt<0)&&(tt=0),(!nt||nt<0||nt>rt)&&(nt=rt);for(var it="",at=tt;at<nt;++at)it+=ft[et[at]];return it}function O(et,tt,nt){for(var rt=et.slice(tt,nt),it="",at=0;at<rt.length-1;at+=2)it+=String.fromCharCode(rt[at]+256*rt[at+1]);return it}function M(et,tt,nt){if(et%1!=0||et<0)throw new RangeError("offset is not uint");if(et+tt>nt)throw new RangeError("Trying to access beyond buffer length")}function P(et,tt,nt,rt,it,at){if(!u.isBuffer(et))throw new TypeError('"buffer" argument must be a Buffer instance');if(tt>it||tt<at)throw new RangeError('"value" argument is out of bounds');if(nt+rt>et.length)throw new RangeError("Index out of range")}function L(et,tt,nt,rt,it,at){if(nt+rt>et.length)throw new RangeError("Index out of range");if(nt<0)throw new RangeError("Index out of range")}function x(et,tt,nt,rt,at){return tt=+tt,nt>>>=0,at||L(et,0,nt,4),it.write(et,tt,nt,rt,23,4),nt+4}function F(et,tt,nt,rt,at){return tt=+tt,nt>>>=0,at||L(et,0,nt,8),it.write(et,tt,nt,rt,52,8),nt+8}u.prototype.slice=function(et,tt){var nt=this.length;(et=~~et)<0?(et+=nt)<0&&(et=0):et>nt&&(et=nt),(tt=void 0===tt?nt:~~tt)<0?(tt+=nt)<0&&(tt=0):tt>nt&&(tt=nt),tt<et&&(tt=et);var rt=this.subarray(et,tt);return Object.setPrototypeOf(rt,u.prototype),rt},u.prototype.readUintLE=u.prototype.readUIntLE=function(et,tt,nt){et>>>=0,tt>>>=0,nt||M(et,tt,this.length);for(var rt=this[et],it=1,at=0;++at<tt&&(it*=256);)rt+=this[et+at]*it;return rt},u.prototype.readUintBE=u.prototype.readUIntBE=function(et,tt,nt){et>>>=0,tt>>>=0,nt||M(et,tt,this.length);for(var rt=this[et+--tt],it=1;tt>0&&(it*=256);)rt+=this[et+--tt]*it;return rt},u.prototype.readUint8=u.prototype.readUInt8=function(et,tt){return et>>>=0,tt||M(et,1,this.length),this[et]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(et,tt){return et>>>=0,tt||M(et,2,this.length),this[et]|this[et+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(et,tt){return et>>>=0,tt||M(et,2,this.length),this[et]<<8|this[et+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),(this[et]|this[et+1]<<8|this[et+2]<<16)+16777216*this[et+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),16777216*this[et]+(this[et+1]<<16|this[et+2]<<8|this[et+3])},u.prototype.readIntLE=function(et,tt,nt){et>>>=0,tt>>>=0,nt||M(et,tt,this.length);for(var rt=this[et],it=1,at=0;++at<tt&&(it*=256);)rt+=this[et+at]*it;return rt>=(it*=128)&&(rt-=Math.pow(2,8*tt)),rt},u.prototype.readIntBE=function(et,tt,nt){et>>>=0,tt>>>=0,nt||M(et,tt,this.length);for(var rt=tt,it=1,at=this[et+--rt];rt>0&&(it*=256);)at+=this[et+--rt]*it;return at>=(it*=128)&&(at-=Math.pow(2,8*tt)),at},u.prototype.readInt8=function(et,tt){return et>>>=0,tt||M(et,1,this.length),128&this[et]?-1*(255-this[et]+1):this[et]},u.prototype.readInt16LE=function(et,tt){et>>>=0,tt||M(et,2,this.length);var nt=this[et]|this[et+1]<<8;return 32768&nt?4294901760|nt:nt},u.prototype.readInt16BE=function(et,tt){et>>>=0,tt||M(et,2,this.length);var nt=this[et+1]|this[et]<<8;return 32768&nt?4294901760|nt:nt},u.prototype.readInt32LE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),this[et]|this[et+1]<<8|this[et+2]<<16|this[et+3]<<24},u.prototype.readInt32BE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),this[et]<<24|this[et+1]<<16|this[et+2]<<8|this[et+3]},u.prototype.readFloatLE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),it.read(this,et,!0,23,4)},u.prototype.readFloatBE=function(et,tt){return et>>>=0,tt||M(et,4,this.length),it.read(this,et,!1,23,4)},u.prototype.readDoubleLE=function(et,tt){return et>>>=0,tt||M(et,8,this.length),it.read(this,et,!0,52,8)},u.prototype.readDoubleBE=function(et,tt){return et>>>=0,tt||M(et,8,this.length),it.read(this,et,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(et,tt,nt,rt){et=+et,tt>>>=0,nt>>>=0,rt||P(this,et,tt,nt,Math.pow(2,8*nt)-1,0);var it=1,at=0;for(this[tt]=255&et;++at<nt&&(it*=256);)this[tt+at]=et/it&255;return tt+nt},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(et,tt,nt,rt){et=+et,tt>>>=0,nt>>>=0,rt||P(this,et,tt,nt,Math.pow(2,8*nt)-1,0);var it=nt-1,at=1;for(this[tt+it]=255&et;--it>=0&&(at*=256);)this[tt+it]=et/at&255;return tt+nt},u.prototype.writeUint8=u.prototype.writeUInt8=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,1,255,0),this[tt]=255&et,tt+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,2,65535,0),this[tt]=255&et,this[tt+1]=et>>>8,tt+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,2,65535,0),this[tt]=et>>>8,this[tt+1]=255&et,tt+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,4,4294967295,0),this[tt+3]=et>>>24,this[tt+2]=et>>>16,this[tt+1]=et>>>8,this[tt]=255&et,tt+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,4,4294967295,0),this[tt]=et>>>24,this[tt+1]=et>>>16,this[tt+2]=et>>>8,this[tt+3]=255&et,tt+4},u.prototype.writeIntLE=function(et,tt,nt,rt){if(et=+et,tt>>>=0,!rt){var it=Math.pow(2,8*nt-1);P(this,et,tt,nt,it-1,-it)}var at=0,ot=1,st=0;for(this[tt]=255&et;++at<nt&&(ot*=256);)et<0&&0===st&&0!==this[tt+at-1]&&(st=1),this[tt+at]=(et/ot>>0)-st&255;return tt+nt},u.prototype.writeIntBE=function(et,tt,nt,rt){if(et=+et,tt>>>=0,!rt){var it=Math.pow(2,8*nt-1);P(this,et,tt,nt,it-1,-it)}var at=nt-1,ot=1,st=0;for(this[tt+at]=255&et;--at>=0&&(ot*=256);)et<0&&0===st&&0!==this[tt+at+1]&&(st=1),this[tt+at]=(et/ot>>0)-st&255;return tt+nt},u.prototype.writeInt8=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,1,127,-128),et<0&&(et=255+et+1),this[tt]=255&et,tt+1},u.prototype.writeInt16LE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,2,32767,-32768),this[tt]=255&et,this[tt+1]=et>>>8,tt+2},u.prototype.writeInt16BE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,2,32767,-32768),this[tt]=et>>>8,this[tt+1]=255&et,tt+2},u.prototype.writeInt32LE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,4,2147483647,-2147483648),this[tt]=255&et,this[tt+1]=et>>>8,this[tt+2]=et>>>16,this[tt+3]=et>>>24,tt+4},u.prototype.writeInt32BE=function(et,tt,nt){return et=+et,tt>>>=0,nt||P(this,et,tt,4,2147483647,-2147483648),et<0&&(et=4294967295+et+1),this[tt]=et>>>24,this[tt+1]=et>>>16,this[tt+2]=et>>>8,this[tt+3]=255&et,tt+4},u.prototype.writeFloatLE=function(et,tt,nt){return x(this,et,tt,!0,nt)},u.prototype.writeFloatBE=function(et,tt,nt){return x(this,et,tt,!1,nt)},u.prototype.writeDoubleLE=function(et,tt,nt){return F(this,et,tt,!0,nt)},u.prototype.writeDoubleBE=function(et,tt,nt){return F(this,et,tt,!1,nt)},u.prototype.copy=function(et,tt,nt,rt){if(!u.isBuffer(et))throw new TypeError("argument should be a Buffer");if(nt||(nt=0),rt||0===rt||(rt=this.length),tt>=et.length&&(tt=et.length),tt||(tt=0),rt>0&&rt<nt&&(rt=nt),rt===nt)return 0;if(0===et.length||0===this.length)return 0;if(tt<0)throw new RangeError("targetStart out of bounds");if(nt<0||nt>=this.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),et.length-tt<rt-nt&&(rt=et.length-tt+nt);var it=rt-nt;return this===et&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(tt,nt,rt):Uint8Array.prototype.set.call(et,this.subarray(nt,rt),tt),it},u.prototype.fill=function(et,tt,nt,rt){if("string"==typeof et){if("string"==typeof tt?(rt=tt,tt=0,nt=this.length):"string"==typeof nt&&(rt=nt,nt=this.length),void 0!==rt&&"string"!=typeof rt)throw new TypeError("encoding must be a string");if("string"==typeof rt&&!u.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);if(1===et.length){var it=et.charCodeAt(0);("utf8"===rt&&it<128||"latin1"===rt)&&(et=it)}}else"number"==typeof et?et&=255:"boolean"==typeof et&&(et=Number(et));if(tt<0||this.length<tt||this.length<nt)throw new RangeError("Out of range index");if(nt<=tt)return this;var at;if(tt>>>=0,nt=void 0===nt?this.length:nt>>>0,et||(et=0),"number"==typeof et)for(at=tt;at<nt;++at)this[at]=et;else{var ot=u.isBuffer(et)?et:u.from(et,rt),st=ot.length;if(0===st)throw new TypeError('The value "'+et+'" is invalid for argument "value"');for(at=0;at<nt-tt;++at)this[at+tt]=ot[at%st]}return this};var lt=/[^+/0-9A-Za-z-_]/g;function U(et,tt){var nt;tt=tt||1/0;for(var rt=et.length,it=null,at=[],ot=0;ot<rt;++ot){if((nt=et.charCodeAt(ot))>55295&&nt<57344){if(!it){if(nt>56319){(tt-=3)>-1&&at.push(239,191,189);continue}if(ot+1===rt){(tt-=3)>-1&&at.push(239,191,189);continue}it=nt;continue}if(nt<56320){(tt-=3)>-1&&at.push(239,191,189),it=nt;continue}nt=65536+(it-55296<<10|nt-56320)}else it&&(tt-=3)>-1&&at.push(239,191,189);if(it=null,nt<128){if((tt-=1)<0)break;at.push(nt)}else if(nt<2048){if((tt-=2)<0)break;at.push(nt>>6|192,63&nt|128)}else if(nt<65536){if((tt-=3)<0)break;at.push(nt>>12|224,nt>>6&63|128,63&nt|128)}else{if(!(nt<1114112))throw new Error("Invalid code point");if((tt-=4)<0)break;at.push(nt>>18|240,nt>>12&63|128,nt>>6&63|128,63&nt|128)}}return at}function Z(et){return rt.toByteArray(function(et){if((et=(et=et.split("=")[0]).trim().replace(lt,"")).length<2)return"";for(;et.length%4!=0;)et+="=";return et}(et))}function B(et,tt,nt,rt){for(var it=0;it<rt&&!(it+nt>=tt.length||it>=et.length);++it)tt[it+nt]=et[it];return it}function G(et,tt){return et instanceof tt||null!=et&&null!=et.constructor&&null!=et.constructor.name&&et.constructor.name===tt.name}function q(et){return et!=et}var ft=function(){for(var et="0123456789abcdef",tt=new Array(256),nt=0;nt<16;++nt)for(var rt=16*nt,it=0;it<16;++it)tt[rt+it]=et[nt]+et[it];return tt}()},6693:(et,tt)=>{"use strict";tt.byteLength=function(et){var tt=u(et),nt=tt[0],rt=tt[1];return 3*(nt+rt)/4-rt},tt.toByteArray=function(et){var tt,nt,at=u(et),ot=at[0],st=at[1],lt=new it(function(et,tt,nt){return 3*(tt+nt)/4-nt}(0,ot,st)),ft=0,dt=st>0?ot-4:ot;for(nt=0;nt<dt;nt+=4)tt=rt[et.charCodeAt(nt)]<<18|rt[et.charCodeAt(nt+1)]<<12|rt[et.charCodeAt(nt+2)]<<6|rt[et.charCodeAt(nt+3)],lt[ft++]=tt>>16&255,lt[ft++]=tt>>8&255,lt[ft++]=255&tt;return 2===st&&(tt=rt[et.charCodeAt(nt)]<<2|rt[et.charCodeAt(nt+1)]>>4,lt[ft++]=255&tt),1===st&&(tt=rt[et.charCodeAt(nt)]<<10|rt[et.charCodeAt(nt+1)]<<4|rt[et.charCodeAt(nt+2)]>>2,lt[ft++]=tt>>8&255,lt[ft++]=255&tt),lt},tt.fromByteArray=function(et){for(var tt,rt=et.length,it=rt%3,at=[],ot=16383,st=0,lt=rt-it;st<lt;st+=ot)at.push(l(et,st,st+ot>lt?lt:st+ot));return 1===it?(tt=et[rt-1],at.push(nt[tt>>2]+nt[tt<<4&63]+"==")):2===it&&(tt=(et[rt-2]<<8)+et[rt-1],at.push(nt[tt>>10]+nt[tt>>4&63]+nt[tt<<2&63]+"=")),at.join("")};for(var nt=[],rt=[],it="undefined"!=typeof Uint8Array?Uint8Array:Array,at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ot=0,st=at.length;ot<st;++ot)nt[ot]=at[ot],rt[at.charCodeAt(ot)]=ot;function u(et){var tt=et.length;if(tt%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=et.indexOf("=");return-1===nt&&(nt=tt),[nt,nt===tt?0:4-nt%4]}function l(et,tt,rt){for(var it,at,ot=[],st=tt;st<rt;st+=3)it=(et[st]<<16&16711680)+(et[st+1]<<8&65280)+(255&et[st+2]),ot.push(nt[(at=it)>>18&63]+nt[at>>12&63]+nt[at>>6&63]+nt[63&at]);return ot.join("")}rt["-".charCodeAt(0)]=62,rt["_".charCodeAt(0)]=63},2165:(et,tt)=>{tt.read=function(et,tt,nt,rt,it){var at,ot,st=8*it-rt-1,lt=(1<<st)-1,ft=lt>>1,dt=-7,pt=nt?it-1:0,yt=nt?-1:1,vt=et[tt+pt];for(pt+=yt,at=vt&(1<<-dt)-1,vt>>=-dt,dt+=st;dt>0;at=256*at+et[tt+pt],pt+=yt,dt-=8);for(ot=at&(1<<-dt)-1,at>>=-dt,dt+=rt;dt>0;ot=256*ot+et[tt+pt],pt+=yt,dt-=8);if(0===at)at=1-ft;else{if(at===lt)return ot?NaN:1/0*(vt?-1:1);ot+=Math.pow(2,rt),at-=ft}return(vt?-1:1)*ot*Math.pow(2,at-rt)},tt.write=function(et,tt,nt,rt,it,at){var ot,st,lt,ft=8*at-it-1,dt=(1<<ft)-1,pt=dt>>1,yt=23===it?Math.pow(2,-24)-Math.pow(2,-77):0,vt=rt?0:at-1,At=rt?1:-1,Rt=tt<0||0===tt&&1/tt<0?1:0;for(tt=Math.abs(tt),isNaN(tt)||tt===1/0?(st=isNaN(tt)?1:0,ot=dt):(ot=Math.floor(Math.log(tt)/Math.LN2),tt*(lt=Math.pow(2,-ot))<1&&(ot--,lt*=2),(tt+=ot+pt>=1?yt/lt:yt*Math.pow(2,1-pt))*lt>=2&&(ot++,lt/=2),ot+pt>=dt?(st=0,ot=dt):ot+pt>=1?(st=(tt*lt-1)*Math.pow(2,it),ot+=pt):(st=tt*Math.pow(2,pt-1)*Math.pow(2,it),ot=0));it>=8;et[nt+vt]=255&st,vt+=At,st/=256,it-=8);for(ot=ot<<it|st,ft+=it;ft>0;et[nt+vt]=255&ot,vt+=At,ot/=256,ft-=8);et[nt+vt-At]|=128*Rt}},6934:(et,tt)=>{var nt={parseBuffer:function(et){return new r(et).parse()},addBoxProcessor:function(et,tt){"string"==typeof et&&"function"==typeof tt&&(i.prototype._boxProcessors[et]=tt)},createFile:function(){return new r},createBox:function(et,tt,nt){var rt=i.create(et);return tt&&tt.append(rt,nt),rt},createFullBox:function(et,tt,rt){var it=nt.createBox(et,tt,rt);return it.version=0,it.flags=0,it},Utils:{}};nt.Utils.dataViewToString=function(et,tt){var nt=tt||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(nt).decode(et);var rt=[],it=0;if("utf-8"===nt)for(;it<et.byteLength;){var at=et.getUint8(it++);at<128||(at<224?(at=(31&at)<<6,at|=63&et.getUint8(it++)):at<240?(at=(15&at)<<12,at|=(63&et.getUint8(it++))<<6,at|=63&et.getUint8(it++)):(at=(7&at)<<18,at|=(63&et.getUint8(it++))<<12,at|=(63&et.getUint8(it++))<<6,at|=63&et.getUint8(it++))),rt.push(String.fromCharCode(at))}else for(;it<et.byteLength;)rt.push(String.fromCharCode(et.getUint8(it++)));return rt.join("")},nt.Utils.utf8ToByteArray=function(et){var tt,nt;if("undefined"!=typeof TextEncoder)tt=(new TextEncoder).encode(et);else for(tt=[],nt=0;nt<et.length;++nt){var rt=et.charCodeAt(nt);rt<128?tt.push(rt):rt<2048?(tt.push(192|rt>>6),tt.push(128|63&rt)):rt<65536?(tt.push(224|rt>>12),tt.push(128|63&rt>>6),tt.push(128|63&rt)):(tt.push(240|rt>>18),tt.push(128|63&rt>>12),tt.push(128|63&rt>>6),tt.push(128|63&rt))}return tt},nt.Utils.appendBox=function(et,tt,nt){if(tt._offset=et._cursor.offset,tt._root=et._root?et._root:et,tt._raw=et._raw,tt._parent=et,-1!==nt)if(null!=nt){var rt,it=-1;if("number"==typeof nt)it=nt;else{if("string"==typeof nt)rt=nt;else{if("object"!=typeof nt||!nt.type)return void et.boxes.push(tt);rt=nt.type}for(var at=0;at<et.boxes.length;at++)if(rt===et.boxes[at].type){it=at+1;break}}et.boxes.splice(it,0,tt)}else et.boxes.push(tt)},tt.parseBuffer=nt.parseBuffer,tt.addBoxProcessor=nt.addBoxProcessor,tt.createFile=nt.createFile,tt.createBox=nt.createBox,tt.createFullBox=nt.createFullBox,tt.Utils=nt.Utils,nt.Cursor=function(et){this.offset=void 0===et?0:et};var r=function(et){this._cursor=new nt.Cursor,this.boxes=[],et&&(this._raw=new DataView(et))};r.prototype.fetch=function(et){var tt=this.fetchAll(et,!0);return tt.length?tt[0]:null},r.prototype.fetchAll=function(et,tt){var nt=[];return r._sweep.call(this,et,nt,tt),nt},r.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var et=i.parse(this);if(void 0===et.type)break;this.boxes.push(et)}return this},r._sweep=function(et,tt,nt){for(var rt in this.type&&this.type==et&&tt.push(this),this.boxes){if(tt.length&&nt)return;r._sweep.call(this.boxes[rt],et,tt,nt)}},r.prototype.write=function(){var et,tt=0;for(et=0;et<this.boxes.length;et++)tt+=this.boxes[et].getLength(!1);var nt=new Uint8Array(tt);for(this._rawo=new DataView(nt.buffer),this.bytes=nt,this._cursor.offset=0,et=0;et<this.boxes.length;et++)this.boxes[et].write();return nt.buffer},r.prototype.append=function(et,tt){nt.Utils.appendBox(this,et,tt)};var i=function(){this._cursor=new nt.Cursor};i.parse=function(et){var tt=new i;return tt._offset=et._cursor.offset,tt._root=et._root?et._root:et,tt._raw=et._raw,tt._parent=et,tt._parseBox(),et._cursor.offset=tt._raw.byteOffset+tt._raw.byteLength,tt},i.create=function(et){var tt=new i;return tt.type=et,tt.boxes=[],tt},i.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],i.prototype._boxProcessors={},i.prototype._procField=function(et,tt,nt){this._parsing?this[et]=this._readField(tt,nt):this._writeField(tt,nt,this[et])},i.prototype._procFieldArray=function(et,tt,nt,rt){var it;if(this._parsing)for(this[et]=[],it=0;it<tt;it++)this[et][it]=this._readField(nt,rt);else for(it=0;it<this[et].length;it++)this._writeField(nt,rt,this[et][it])},i.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},i.prototype._procEntries=function(et,tt,nt){var rt;if(this._parsing)for(this[et]=[],rt=0;rt<tt;rt++)this[et].push({}),nt.call(this,this[et][rt]);else for(rt=0;rt<tt;rt++)nt.call(this,this[et][rt])},i.prototype._procSubEntries=function(et,tt,nt,rt){var it;if(this._parsing)for(et[tt]=[],it=0;it<nt;it++)et[tt].push({}),rt.call(this,et[tt][it]);else for(it=0;it<nt;it++)rt.call(this,et[tt][it])},i.prototype._procEntryField=function(et,tt,nt,rt){this._parsing?et[tt]=this._readField(nt,rt):this._writeField(nt,rt,et[tt])},i.prototype._procSubBoxes=function(et,tt){var nt;if(this._parsing)for(this[et]=[],nt=0;nt<tt;nt++)this[et].push(i.parse(this));else for(nt=0;nt<tt;nt++)this._rawo?this[et][nt].write():this.size+=this[et][nt].getLength()},i.prototype._readField=function(et,tt){switch(et){case"uint":return this._readUint(tt);case"int":return this._readInt(tt);case"template":return this._readTemplate(tt);case"string":return-1===tt?this._readTerminatedString():this._readString(tt);case"data":return this._readData(tt);case"utf8":return this._readUTF8String();default:return-1}},i.prototype._readInt=function(et){var tt=null,nt=this._cursor.offset-this._raw.byteOffset;switch(et){case 8:tt=this._raw.getInt8(nt);break;case 16:tt=this._raw.getInt16(nt);break;case 32:tt=this._raw.getInt32(nt);break;case 64:var rt=this._raw.getInt32(nt),it=this._raw.getInt32(nt+4);tt=rt*Math.pow(2,32)+it}return this._cursor.offset+=et>>3,tt},i.prototype._readUint=function(et){var tt,nt,rt=null,it=this._cursor.offset-this._raw.byteOffset;switch(et){case 8:rt=this._raw.getUint8(it);break;case 16:rt=this._raw.getUint16(it);break;case 24:rt=((tt=this._raw.getUint16(it))<<8)+(nt=this._raw.getUint8(it+2));break;case 32:rt=this._raw.getUint32(it);break;case 64:tt=this._raw.getUint32(it),nt=this._raw.getUint32(it+4),rt=tt*Math.pow(2,32)+nt}return this._cursor.offset+=et>>3,rt},i.prototype._readString=function(et){for(var tt="",nt=0;nt<et;nt++){var rt=this._readUint(8);tt+=String.fromCharCode(rt)}return tt},i.prototype._readTemplate=function(et){return this._readUint(et/2)+this._readUint(et/2)/Math.pow(2,et/2)},i.prototype._readTerminatedString=function(){for(var et="";this._cursor.offset-this._offset<this._raw.byteLength;){var tt=this._readUint(8);if(0===tt)break;et+=String.fromCharCode(tt)}return et},i.prototype._readData=function(et){var tt=et>0?et:this._raw.byteLength-(this._cursor.offset-this._offset);if(tt>0){var nt=new Uint8Array(this._raw.buffer,this._cursor.offset,tt);return this._cursor.offset+=tt,nt}return null},i.prototype._readUTF8String=function(){var et=this._raw.byteLength-(this._cursor.offset-this._offset),tt=null;return et>0&&(tt=new DataView(this._raw.buffer,this._cursor.offset,et),this._cursor.offset+=et),tt?nt.Utils.dataViewToString(tt):tt},i.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),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&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),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(i.parse(this))},i.prototype.append=function(et,tt){nt.Utils.appendBox(this,et,tt)},i.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var et=0;et<this.boxes.length;et++)this.size+=this.boxes[et].getLength();return this._data&&this._writeData(this._data),this.size},i.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),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var et=0;et<this.boxes.length;et++)this.boxes[et].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},i.prototype._writeInt=function(et,tt){if(this._rawo){var nt=this._cursor.offset-this._rawo.byteOffset;switch(et){case 8:this._rawo.setInt8(nt,tt);break;case 16:this._rawo.setInt16(nt,tt);break;case 32:this._rawo.setInt32(nt,tt);break;case 64:var rt=Math.floor(tt/Math.pow(2,32)),it=tt-rt*Math.pow(2,32);this._rawo.setUint32(nt,rt),this._rawo.setUint32(nt+4,it)}this._cursor.offset+=et>>3}else this.size+=et>>3},i.prototype._writeUint=function(et,tt){if(this._rawo){var nt,rt,it=this._cursor.offset-this._rawo.byteOffset;switch(et){case 8:this._rawo.setUint8(it,tt);break;case 16:this._rawo.setUint16(it,tt);break;case 24:nt=(16776960&tt)>>8,rt=255&tt,this._rawo.setUint16(it,nt),this._rawo.setUint8(it+2,rt);break;case 32:this._rawo.setUint32(it,tt);break;case 64:rt=tt-(nt=Math.floor(tt/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(it,nt),this._rawo.setUint32(it+4,rt)}this._cursor.offset+=et>>3}else this.size+=et>>3},i.prototype._writeString=function(et,tt){for(var nt=0;nt<et;nt++)this._writeUint(8,tt.charCodeAt(nt))},i.prototype._writeTerminatedString=function(et){if(0!==et.length){for(var tt=0;tt<et.length;tt++)this._writeUint(8,et.charCodeAt(tt));this._writeUint(8,0)}},i.prototype._writeTemplate=function(et,tt){var nt=Math.floor(tt),rt=(tt-nt)*Math.pow(2,et/2);this._writeUint(et/2,nt),this._writeUint(et/2,rt)},i.prototype._writeData=function(et){if(et)if(this._rawo){if(et instanceof Array){for(var tt=this._cursor.offset-this._rawo.byteOffset,nt=0;nt<et.length;nt++)this._rawo.setInt8(tt+nt,et[nt]);this._cursor.offset+=et.length}et instanceof Uint8Array&&(this._root.bytes.set(et,this._cursor.offset),this._cursor.offset+=et.length)}else this.size+=et.length},i.prototype._writeUTF8String=function(et){var tt=nt.Utils.utf8ToByteArray(et);if(this._rawo)for(var rt=new DataView(this._rawo.buffer,this._cursor.offset,tt.length),it=0;it<tt.length;it++)rt.setUint8(it,tt[it]);else this.size+=tt.length},i.prototype._writeField=function(et,tt,nt){switch(et){case"uint":this._writeUint(tt,nt);break;case"int":this._writeInt(tt,nt);break;case"template":this._writeTemplate(tt,nt);break;case"string":-1==tt?this._writeTerminatedString(nt):this._writeString(tt,nt);break;case"data":this._writeData(nt);break;case"utf8":this._writeUTF8String(nt)}},i.prototype._boxProcessors.avc1=i.prototype._boxProcessors.avc2=i.prototype._boxProcessors.avc3=i.prototype._boxProcessors.avc4=i.prototype._boxProcessors.hvc1=i.prototype._boxProcessors.hev1=i.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)},i.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(et){this._procEntryField(et,"sample_count","uint",32),this._procEntryField(et,"sample_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(et){this._procEntryField(et,"segment_duration","uint",1===this.version?64:32),this._procEntryField(et,"media_time","int",1===this.version?64:32),this._procEntryField(et,"media_rate_integer","int",16),this._procEntryField(et,"media_rate_fraction","int",16)}))},i.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(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)},i.prototype._boxProcessors.free=i.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},i.prototype._boxProcessors.ftyp=i.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var et=-1;this._parsing&&(et=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",et,"string",4)},i.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)},i.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(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)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.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)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?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)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.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",1==this.version?64:32)},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.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)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var et=-1;this._parsing&&(et=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",et,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(et){this._parsing||(et.reference=(1&et.reference_type)<<31,et.reference|=2147483647&et.referenced_size,et.sap=(1&et.starts_with_SAP)<<31,et.sap|=(3&et.SAP_type)<<28,et.sap|=268435455&et.SAP_delta_time),this._procEntryField(et,"reference","uint",32),this._procEntryField(et,"subsegment_duration","uint",32),this._procEntryField(et,"sap","uint",32),this._parsing&&(et.reference_type=et.reference>>31&1,et.referenced_size=2147483647&et.reference,et.starts_with_SAP=et.sap>>31&1,et.SAP_type=et.sap>>28&7,et.SAP_delta_time=268435455&et.sap)}))},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(et){this._procEntryField(et,"ranges_count","uint",32),this._procSubEntries(et,"ranges",et.ranges_count,(function(et){this._procEntryField(et,"level","uint",8),this._procEntryField(et,"range_size","uint",24)}))}))},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},i.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(et){this._procEntryField(et,"sample_count","uint",32),this._procEntryField(et,"sample_delta","uint",32)}))},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(et){this._procEntryField(et,"sample_delta","uint",32),this._procEntryField(et,"subsample_count","uint",16),this._procSubEntries(et,"subsamples",et.subsample_count,(function(et){this._procEntryField(et,"subsample_size","uint",1===this.version?32:16),this._procEntryField(et,"subsample_priority","uint",8),this._procEntryField(et,"discardable","uint",8),this._procEntryField(et,"codec_specific_parameters","uint",32)}))}))},i.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)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},i.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)},i.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(et){this._procEntryField(et,"time","uint",1===this.version?64:32),this._procEntryField(et,"moof_offset","uint",1===this.version?64:32),this._procEntryField(et,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(et,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(et,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?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)},i.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)},i.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(et){256&this.flags&&this._procEntryField(et,"sample_duration","uint",32),512&this.flags&&this._procEntryField(et,"sample_size","uint",32),1024&this.flags&&this._procEntryField(et,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(et,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},5530:(et,tt,nt)=>{"use strict";et.exports=nt(6146).polyfill()},6146:function(et,nt,rt){et.exports=function(){"use strict";function e(et){return"function"==typeof et}var et=Array.isArray?Array.isArray:function(et){return"[object Array]"===Object.prototype.toString.call(et)},nt=0,it=void 0,at=void 0,o=function(et,tt){pt[nt]=et,pt[nt+1]=tt,2===(nt+=2)&&(at?at(h):Nt())},ot="undefined"!=typeof window?window:void 0,st=ot||{},lt=st.MutationObserver||st.WebKitMutationObserver,ft="undefined"==typeof self&&void 0!==tt&&"[object process]"==={}.toString.call(tt),dt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var et=setTimeout;return function(){return et(h,1)}}var pt=new Array(1e3);function h(){for(var et=0;et<nt;et+=2)(0,pt[et])(pt[et+1]),pt[et]=void 0,pt[et+1]=void 0;nt=0}var yt,vt,At,Rt,Nt=void 0;function _(et,tt){var nt=this,rt=new this.constructor(b);void 0===rt[Dt]&&L(rt);var it=nt._state;if(it){var at=arguments[it-1];o((function(){return M(it,rt,at,nt._result)}))}else D(nt,rt,et,tt);return rt}function T(et){if(et&&"object"==typeof et&&et.constructor===this)return et;var tt=new this(b);return R(tt,et),tt}Nt=ft?function(){return tt.nextTick(h)}:lt?(vt=0,At=new lt(h),Rt=document.createTextNode(""),At.observe(Rt,{characterData:!0}),function(){Rt.data=vt=++vt%2}):dt?((yt=new MessageChannel).port1.onmessage=h,function(){return yt.port2.postMessage(0)}):void 0===ot?function(){try{var et=Function("return this")().require("vertx");return void 0!==(it=et.runOnLoop||et.runOnContext)?function(){it(h)}:d()}catch(et){return d()}}():d();var Dt=Math.random().toString(36).substring(2);function b(){}var Ot=void 0;function I(et,tt,nt){tt.constructor===et.constructor&&nt===_&&tt.constructor.resolve===T?function(et,tt){1===tt._state?N(et,tt._result):2===tt._state?C(et,tt._result):D(tt,void 0,(function(tt){return R(et,tt)}),(function(tt){return C(et,tt)}))}(et,tt):void 0===nt?N(et,tt):e(nt)?function(et,tt,nt){o((function(et){var rt=!1,it=function(et,tt,nt,rt){try{et.call(tt,nt,rt)}catch(et){return et}}(nt,tt,(function(nt){rt||(rt=!0,tt!==nt?R(et,nt):N(et,nt))}),(function(tt){rt||(rt=!0,C(et,tt))}),et._label);!rt&&it&&(rt=!0,C(et,it))}),et)}(et,tt,nt):N(et,tt)}function R(et,tt){if(et===tt)C(et,new TypeError("You cannot resolve a promise with itself"));else if(it=typeof(rt=tt),null===rt||"object"!==it&&"function"!==it)N(et,tt);else{var nt=void 0;try{nt=tt.then}catch(tt){return void C(et,tt)}I(et,tt,nt)}var rt,it}function w(et){et._onerror&&et._onerror(et._result),O(et)}function N(et,tt){et._state===Ot&&(et._result=tt,et._state=1,0!==et._subscribers.length&&o(O,et))}function C(et,tt){et._state===Ot&&(et._state=2,et._result=tt,o(w,et))}function D(et,tt,nt,rt){var it=et._subscribers,at=it.length;et._onerror=null,it[at]=tt,it[at+1]=nt,it[at+2]=rt,0===at&&et._state&&o(O,et)}function O(et){var tt=et._subscribers,nt=et._state;if(0!==tt.length){for(var rt=void 0,it=void 0,at=et._result,ot=0;ot<tt.length;ot+=3)rt=tt[ot],it=tt[ot+nt],rt?M(nt,rt,it,at):it(at);et._subscribers.length=0}}function M(et,tt,nt,rt){var it=e(nt),at=void 0,ot=void 0,st=!0;if(it){try{at=nt(rt)}catch(et){st=!1,ot=et}if(tt===at)return void C(tt,new TypeError("A promises callback cannot return that same promise."))}else at=rt;tt._state!==Ot||(it&&st?R(tt,at):!1===st?C(tt,ot):1===et?N(tt,at):2===et&&C(tt,at))}var Mt=0;function L(et){et[Dt]=Mt++,et._state=void 0,et._result=void 0,et._subscribers=[]}var Lt=function(){function e(tt,nt){this._instanceConstructor=tt,this.promise=new tt(b),this.promise[Dt]||L(this.promise),et(nt)?(this.length=nt.length,this._remaining=nt.length,this._result=new Array(this.length),0===this.length?N(this.promise,this._result):(this.length=this.length||0,this._enumerate(nt),0===this._remaining&&N(this.promise,this._result))):C(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(et){for(var tt=0;this._state===Ot&&tt<et.length;tt++)this._eachEntry(et[tt],tt)},e.prototype._eachEntry=function(et,tt){var nt=this._instanceConstructor,rt=nt.resolve;if(rt===T){var it=void 0,at=void 0,ot=!1;try{it=et.then}catch(et){ot=!0,at=et}if(it===_&&et._state!==Ot)this._settledAt(et._state,tt,et._result);else if("function"!=typeof it)this._remaining--,this._result[tt]=et;else if(nt===xt){var st=new nt(b);ot?C(st,at):I(st,et,it),this._willSettleAt(st,tt)}else this._willSettleAt(new nt((function(tt){return tt(et)})),tt)}else this._willSettleAt(rt(et),tt)},e.prototype._settledAt=function(et,tt,nt){var rt=this.promise;rt._state===Ot&&(this._remaining--,2===et?C(rt,nt):this._result[tt]=nt),0===this._remaining&&N(rt,this._result)},e.prototype._willSettleAt=function(et,tt){var nt=this;D(et,void 0,(function(et){return nt._settledAt(1,tt,et)}),(function(et){return nt._settledAt(2,tt,et)}))},e}(),xt=function(){function t(et){this[Dt]=Mt++,this._result=this._state=void 0,this._subscribers=[],b!==et&&("function"!=typeof et&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(et,tt){try{tt((function(tt){R(et,tt)}),(function(tt){C(et,tt)}))}catch(tt){C(et,tt)}}(this,et):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(et){return this.then(null,et)},t.prototype.finally=function(et){var tt=this,nt=tt.constructor;return e(et)?tt.then((function(tt){return nt.resolve(et()).then((function(){return tt}))}),(function(tt){return nt.resolve(et()).then((function(){throw tt}))})):tt.then(et,et)},t}();return xt.prototype.then=_,xt.all=function(et){return new Lt(this,et).promise},xt.race=function(tt){var nt=this;return et(tt)?new nt((function(et,rt){for(var it=tt.length,at=0;at<it;at++)nt.resolve(tt[at]).then(et,rt)})):new nt((function(et,tt){return tt(new TypeError("You must pass an array to race."))}))},xt.resolve=T,xt.reject=function(et){var tt=new this(b);return C(tt,et),tt},xt._setScheduler=function(et){at=et},xt._setAsap=function(et){o=et},xt._asap=o,xt.polyfill=function(){var et=void 0;if(void 0!==rt.g)et=rt.g;else if("undefined"!=typeof self)et=self;else try{et=Function("return this")()}catch(et){throw new Error("polyfill failed because global object is unavailable in this environment")}var tt=et.Promise;if(tt){var nt=null;try{nt=Object.prototype.toString.call(tt.resolve())}catch(et){}if("[object Promise]"===nt&&!tt.cast)return}et.Promise=xt},xt.Promise=xt,xt}()},1159:et=>{"use strict";var tt,nt="object"==typeof Reflect?Reflect:null,rt=nt&&"function"==typeof nt.apply?nt.apply:function(et,tt,nt){return Function.prototype.apply.call(et,tt,nt)};tt=nt&&"function"==typeof nt.ownKeys?nt.ownKeys:Object.getOwnPropertySymbols?function(et){return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et))}:function(et){return Object.getOwnPropertyNames(et)};var it=Number.isNaN||function(et){return et!=et};function a(){a.init.call(this)}et.exports=a,et.exports.once=function(et,tt){return new Promise((function(nt,rt){function i(nt){et.removeListener(tt,a),rt(nt)}function a(){"function"==typeof et.removeListener&&et.removeListener("error",i),nt([].slice.call(arguments))}p(et,tt,a,{once:!0}),"error"!==tt&&function(et,tt,nt){"function"==typeof et.on&&p(et,"error",tt,{once:!0})}(et,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var at=10;function s(et){if("function"!=typeof et)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof et)}function u(et){return void 0===et._maxListeners?a.defaultMaxListeners:et._maxListeners}function l(et,tt,nt,rt){var it,at,ot,st;if(s(nt),void 0===(at=et._events)?(at=et._events=Object.create(null),et._eventsCount=0):(void 0!==at.newListener&&(et.emit("newListener",tt,nt.listener?nt.listener:nt),at=et._events),ot=at[tt]),void 0===ot)ot=at[tt]=nt,++et._eventsCount;else if("function"==typeof ot?ot=at[tt]=rt?[nt,ot]:[ot,nt]:rt?ot.unshift(nt):ot.push(nt),(it=u(et))>0&&ot.length>it&&!ot.warned){ot.warned=!0;var lt=new Error("Possible EventEmitter memory leak detected. "+ot.length+" "+String(tt)+" listeners added. Use emitter.setMaxListeners() to increase limit");lt.name="MaxListenersExceededWarning",lt.emitter=et,lt.type=tt,lt.count=ot.length,st=lt,console&&console.warn&&console.warn(st)}return et}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(et,tt,nt){var rt={fired:!1,wrapFn:void 0,target:et,type:tt,listener:nt},it=c.bind(rt);return it.listener=nt,rt.wrapFn=it,it}function d(et,tt,nt){var rt=et._events;if(void 0===rt)return[];var it=rt[tt];return void 0===it?[]:"function"==typeof it?nt?[it.listener||it]:[it]:nt?function(et){for(var tt=new Array(et.length),nt=0;nt<tt.length;++nt)tt[nt]=et[nt].listener||et[nt];return tt}(it):h(it,it.length)}function g(et){var tt=this._events;if(void 0!==tt){var nt=tt[et];if("function"==typeof nt)return 1;if(void 0!==nt)return nt.length}return 0}function h(et,tt){for(var nt=new Array(tt),rt=0;rt<tt;++rt)nt[rt]=et[rt];return nt}function p(et,tt,nt,rt){if("function"==typeof et.on)rt.once?et.once(tt,nt):et.on(tt,nt);else{if("function"!=typeof et.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof et);et.addEventListener(tt,(function i(it){rt.once&&et.removeEventListener(tt,i),nt(it)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return at},set:function(et){if("number"!=typeof et||et<0||it(et))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+et+".");at=et}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(et){if("number"!=typeof et||et<0||it(et))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+et+".");return this._maxListeners=et,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(et){for(var tt=[],nt=1;nt<arguments.length;nt++)tt.push(arguments[nt]);var it="error"===et,at=this._events;if(void 0!==at)it=it&&void 0===at.error;else if(!it)return!1;if(it){var ot;if(tt.length>0&&(ot=tt[0]),ot instanceof Error)throw ot;var st=new Error("Unhandled error."+(ot?" ("+ot.message+")":""));throw st.context=ot,st}var lt=at[et];if(void 0===lt)return!1;if("function"==typeof lt)rt(lt,this,tt);else{var ft=lt.length,dt=h(lt,ft);for(nt=0;nt<ft;++nt)rt(dt[nt],this,tt)}return!0},a.prototype.addListener=function(et,tt){return l(this,et,tt,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(et,tt){return l(this,et,tt,!0)},a.prototype.once=function(et,tt){return s(tt),this.on(et,f(this,et,tt)),this},a.prototype.prependOnceListener=function(et,tt){return s(tt),this.prependListener(et,f(this,et,tt)),this},a.prototype.removeListener=function(et,tt){var nt,rt,it,at,ot;if(s(tt),void 0===(rt=this._events))return this;if(void 0===(nt=rt[et]))return this;if(nt===tt||nt.listener===tt)0==--this._eventsCount?this._events=Object.create(null):(delete rt[et],rt.removeListener&&this.emit("removeListener",et,nt.listener||tt));else if("function"!=typeof nt){for(it=-1,at=nt.length-1;at>=0;at--)if(nt[at]===tt||nt[at].listener===tt){ot=nt[at].listener,it=at;break}if(it<0)return this;0===it?nt.shift():function(et,tt){for(;tt+1<et.length;tt++)et[tt]=et[tt+1];et.pop()}(nt,it),1===nt.length&&(rt[et]=nt[0]),void 0!==rt.removeListener&&this.emit("removeListener",et,ot||tt)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(et){var tt,nt,rt;if(void 0===(nt=this._events))return this;if(void 0===nt.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==nt[et]&&(0==--this._eventsCount?this._events=Object.create(null):delete nt[et]),this;if(0===arguments.length){var it,at=Object.keys(nt);for(rt=0;rt<at.length;++rt)"removeListener"!==(it=at[rt])&&this.removeAllListeners(it);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(tt=nt[et]))this.removeListener(et,tt);else if(void 0!==tt)for(rt=tt.length-1;rt>=0;rt--)this.removeListener(et,tt[rt]);return this},a.prototype.listeners=function(et){return d(this,et,!0)},a.prototype.rawListeners=function(et){return d(this,et,!1)},a.listenerCount=function(et,tt){return"function"==typeof et.listenerCount?et.listenerCount(tt):g.call(et,tt)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?tt(this._events):[]}},3101:et=>{"use strict";var tt=Array.isArray,nt=Object.keys,rt=Object.prototype.hasOwnProperty;et.exports=function e(et,it){if(et===it)return!0;if(et&&it&&"object"==typeof et&&"object"==typeof it){var at,ot,st,lt=tt(et),ft=tt(it);if(lt&&ft){if((ot=et.length)!=it.length)return!1;for(at=ot;0!=at--;)if(!e(et[at],it[at]))return!1;return!0}if(lt!=ft)return!1;var dt=et instanceof Date,pt=it instanceof Date;if(dt!=pt)return!1;if(dt&&pt)return et.getTime()==it.getTime();var yt=et instanceof RegExp,vt=it instanceof RegExp;if(yt!=vt)return!1;if(yt&&vt)return et.toString()==it.toString();var At=nt(et);if((ot=At.length)!==nt(it).length)return!1;for(at=ot;0!=at--;)if(!rt.call(it,At[at]))return!1;for(at=ot;0!=at--;)if(!e(et[st=At[at]],it[st]))return!1;return!0}return et!=et&&it!=it}},3362:(et,tt,nt)=>{!function(et,tt,nt,rt,it){function o(et,tt,nt,rt){var it=rt&&"seq"===rt.timeContainer,at=0;rt&&(at=it&&nt?nt.end:rt.begin),tt.begin=tt.explicit_begin?tt.explicit_begin+at:at;var ot=tt.begin,st=null;if("sets"in tt)for(var lt=0;lt<tt.sets.length;lt++)o(et,tt.sets[lt],st,tt),ot="seq"===tt.timeContainer?tt.sets[lt].end:Math.max(ot,tt.sets[lt].end),st=tt.sets[lt];if("contents"in tt){if("contents"in tt)for(var ft=0;ft<tt.contents.length;ft++)o(et,tt.contents[ft],st,tt),ot="seq"===tt.timeContainer?tt.contents[ft].end:Math.max(ot,tt.contents[ft].end),st=tt.contents[ft]}else ot=it?tt.begin:Number.POSITIVE_INFINITY;null!==tt.explicit_end&&null!==tt.explicit_dur?tt.end=Math.min(tt.begin+tt.explicit_dur,at+tt.explicit_end):null===tt.explicit_end&&null!==tt.explicit_dur?tt.end=tt.begin+tt.explicit_dur:null!==tt.explicit_end&&null===tt.explicit_dur?tt.end=at+tt.explicit_end:tt.end=ot,delete tt.explicit_begin,delete tt.explicit_dur,delete tt.explicit_end,et._registerEvent(tt)}function s(et){this.node=et}function u(){this.events=[],this.head=new l,this.body=null}function l(){this.styling=new c,this.layout=new g}function c(){this.styles={},this.initials={}}function f(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function d(){this.styleAttrs=null}function g(){this.regions={}}function h(et,tt){p.call(this,"image"),this.src=et,this.type=tt}function p(et){this.kind=et}function m(et){this.id=et}function y(et){this.regionID=et}function E(et){this.styleAttrs=et}function v(et){this.sets=et}function _(et){this.contents=et}function T(et,tt,nt){this.explicit_begin=et,this.explicit_end=tt,this.explicit_dur=nt}function S(){p.call(this,"body")}function b(){p.call(this,"div")}function A(){p.call(this,"p")}function I(){p.call(this,"span")}function R(){p.call(this,"span")}function w(){p.call(this,"br")}function N(){}function C(){}function D(et){return et&&"xml:id"in et.attributes&&et.attributes["xml:id"].value||null}function O(et){return et&&"style"in et.attributes?et.attributes.style.value.split(" "):[]}function M(et,tt){var nt={};if(null!==et)for(var it in et.attributes){var at=et.attributes[it].uri+" "+et.attributes[it].local,ot=rt.byQName[at];if(void 0!==ot){var st=ot.parse(et.attributes[it].value);null!==st?(nt[at]=st,ot===rt.byName.zIndex&&U(tt,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):Z(tt,"Cannot parse styling attribute "+at+" --\x3e "+et.attributes[it].value)}}return nt}function P(et,tt,nt){for(var rt in et.attributes)if(et.attributes[rt].uri===tt&&et.attributes[rt].local===nt)return et.attributes[rt].value;return null}function L(et,tt,nt){var rt,it=null;return null!==(rt=/^(\d+(?:\.\d+)?)f$/.exec(nt))?null!==tt&&(it=parseFloat(rt[1])/tt):null!==(rt=/^(\d+(?:\.\d+)?)t$/.exec(nt))?null!==et&&(it=parseFloat(rt[1])/et):null!==(rt=/^(\d+(?:\.\d+)?)ms$/.exec(nt))?it=parseFloat(rt[1])/1e3:null!==(rt=/^(\d+(?:\.\d+)?)s$/.exec(nt))?it=parseFloat(rt[1]):null!==(rt=/^(\d+(?:\.\d+)?)h$/.exec(nt))?it=3600*parseFloat(rt[1]):null!==(rt=/^(\d+(?:\.\d+)?)m$/.exec(nt))?it=60*parseFloat(rt[1]):null!==(rt=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(nt))?it=3600*parseInt(rt[1])+60*parseInt(rt[2])+parseFloat(rt[3]):null!==(rt=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(nt))&&null!==tt&&(it=3600*parseInt(rt[1])+60*parseInt(rt[2])+parseInt(rt[3])+(null===rt[4]?0:parseInt(rt[4])/tt)),it}function x(et,tt,nt){for(;tt.styleRefs.length>0;){var rt=tt.styleRefs.pop();rt in et.styles?(x(et,et.styles[rt],nt),k(et.styles[rt].styleAttrs,tt.styleAttrs)):Z(nt,"Non-existant style id referenced")}}function F(et,tt,nt,rt){for(var it=tt.length-1;it>=0;it--){var at=tt[it];at in et.styles?k(et.styles[at].styleAttrs,nt):Z(rt,"Non-existant style id referenced")}}function k(et,tt){for(var nt in et)et.hasOwnProperty(nt)&&(nt in tt||(tt[nt]=et[nt]))}function U(et,tt){if(et&&et.warn&&et.warn(tt))throw tt}function Z(et,tt){if(et&&et.error&&et.error(tt))throw tt}function B(et,tt){throw et&&et.fatal&&et.fatal(tt),tt}function G(et,tt){for(var nt,rt=0,it=et.length-1;rt<=it;){var at=et[nt=Math.floor((rt+it)/2)];if(at<tt)rt=nt+1;else{if(!(at>tt))return{found:!0,index:nt};it=nt-1}}return{found:!1,index:rt}}et.fromXML=function(et,it,at){var ot=tt.parser(!0,{xmlns:!0}),st=[],lt=[],ft=[],dt=0,pt=null;ot.onclosetag=function(et){if(st[0]instanceof N)null!==pt.head&&null!==pt.head.styling&&F(pt.head.styling,st[0].styleRefs,st[0].styleAttrs,it),delete st[0].styleRefs;else if(st[0]instanceof c)for(var tt in st[0].styles)st[0].styles.hasOwnProperty(tt)&&x(st[0],st[0].styles[tt],it);else if(st[0]instanceof A||st[0]instanceof I){if(st[0].contents.length>1){var rt,ot=[st[0].contents[0]];for(rt=1;rt<st[0].contents.length;rt++)st[0].contents[rt]instanceof R&&ot[ot.length-1]instanceof R?ot[ot.length-1].text+=st[0].contents[rt].text:ot.push(st[0].contents[rt]);st[0].contents=ot}st[0]instanceof I&&1===st[0].contents.length&&st[0].contents[0]instanceof R&&(st[0].text=st[0].contents[0].text,delete st[0].contents)}else st[0]instanceof s&&(st[0].node.uri===nt.ns_tt&&"metadata"===st[0].node.local?dt--:dt>0&&at&&"onCloseTag"in at&&at.onCloseTag());ft.shift(),lt.shift(),st.shift()},ot.ontext=function(et){if(void 0===st[0]);else if(st[0]instanceof I||st[0]instanceof A){if(st[0]instanceof I){var tt=st[0].styleAttrs[rt.byName.ruby.qname];if("container"===tt||"textContainer"===tt||"baseContainer"===tt)return}var nt=new R;nt.initFromText(pt,st[0],et,lt[0],ft[0],it),st[0].contents.push(nt)}else st[0]instanceof s&&dt>0&&at&&"onText"in at&&at.onText(et)},ot.onopentag=function(et){var tt=et.attributes["xml:space"];tt?ft.unshift(tt.value):0===ft.length?ft.unshift("default"):ft.unshift(ft[0]);var ot=et.attributes["xml:lang"];if(ot?lt.unshift(ot.value):0===lt.length?lt.unshift(""):lt.unshift(lt[0]),et.uri===nt.ns_tt)if("tt"===et.local)null!==pt&&B(it,"Two <tt> elements at ("+this.line+","+this.column+")"),(pt=new u).initFromNode(et,lt[0],it),st.unshift(pt);else if("head"===et.local)st[0]instanceof u||B(it,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),st.unshift(pt.head);else if("styling"===et.local)st[0]instanceof l||B(it,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),st.unshift(pt.head.styling);else if("style"===et.local){var yt;st[0]instanceof c?((yt=new f).initFromNode(et,it),yt.id?pt.head.styling.styles[yt.id]=yt:Z(it,"<style> element missing @id attribute"),st.unshift(yt)):st[0]instanceof N?((yt=new f).initFromNode(et,it),k(yt.styleAttrs,st[0].styleAttrs),st.unshift(yt)):B(it,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===et.local){var vt;if(st[0]instanceof c){for(var At in(vt=new d).initFromNode(et,it),vt.styleAttrs)vt.styleAttrs.hasOwnProperty(At)&&(pt.head.styling.initials[At]=vt.styleAttrs[At]);st.unshift(vt)}else B(it,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===et.local)st[0]instanceof l||B(it,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),st.unshift(pt.head.layout);else if("region"===et.local){st[0]instanceof g||B(it,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var Rt=new N;Rt.initFromNode(pt,et,lt[0],it),!Rt.id||Rt.id in pt.head.layout.regions?Z(it,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):pt.head.layout.regions[Rt.id]=Rt,st.unshift(Rt)}else if("body"===et.local){st[0]instanceof u||B(it,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==pt.body&&B(it,"Second <body> element at "+this.line+","+this.column+")");var Nt=new S;Nt.initFromNode(pt,et,lt[0],it),pt.body=Nt,st.unshift(Nt)}else if("div"===et.local){st[0]instanceof b||st[0]instanceof S||B(it,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var Dt=new b;Dt.initFromNode(pt,st[0],et,lt[0],it);var Ot=Dt.styleAttrs[rt.byName.backgroundImage.qname];Ot&&(Dt.contents.push(new h(Ot)),delete Dt.styleAttrs[rt.byName.backgroundImage.qname]),st[0].contents.push(Dt),st.unshift(Dt)}else if("image"===et.local){st[0]instanceof b||B(it,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var Mt=new h;Mt.initFromNode(pt,st[0],et,lt[0],it),st[0].contents.push(Mt),st.unshift(Mt)}else if("p"===et.local){st[0]instanceof b||B(it,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var Lt=new A;Lt.initFromNode(pt,st[0],et,lt[0],it),st[0].contents.push(Lt),st.unshift(Lt)}else if("span"===et.local){st[0]instanceof I||st[0]instanceof A||B(it,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var xt=new I;xt.initFromNode(pt,st[0],et,lt[0],ft[0],it),st[0].contents.push(xt),st.unshift(xt)}else if("br"===et.local){st[0]instanceof I||st[0]instanceof A||B(it,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var kt=new w;kt.initFromNode(pt,st[0],et,lt[0],it),st[0].contents.push(kt),st.unshift(kt)}else if("set"===et.local){st[0]instanceof I||st[0]instanceof A||st[0]instanceof b||st[0]instanceof S||st[0]instanceof N||st[0]instanceof w||B(it,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var Ut=new C;Ut.initFromNode(pt,st[0],et,it),st[0].sets.push(Ut),st.unshift(Ut)}else st.unshift(new s(et));else st.unshift(new s(et));if(st[0]instanceof s)if(et.uri===nt.ns_tt&&"metadata"===et.local)dt++;else if(dt>0&&at&&"onOpenTag"in at){var Bt=[];for(var Gt in et.attributes)Bt[et.attributes[Gt].uri+" "+et.attributes[Gt].local]={uri:et.attributes[Gt].uri,local:et.attributes[Gt].local,value:et.attributes[Gt].value};at.onOpenTag(et.uri,et.local,Bt)}},ot.write(et).close(),delete pt.head.styling.styles;var yt=!1;for(var vt in pt.head.layout.regions)if(pt.head.layout.regions.hasOwnProperty(vt)){yt=!0;break}if(!yt){var At=N.prototype.createDefaultRegion(pt.lang);pt.head.layout.regions[At.id]=At}for(var Rt in pt.head.layout.regions)pt.head.layout.regions.hasOwnProperty(Rt)&&o(pt,pt.head.layout.regions[Rt],null,null);return pt.body&&o(pt,pt.body,null,null),pt.body&&function a(et){if("contents"in et)for(var tt=("styleAttrs"in et?et.styleAttrs[rt.byName.ruby.qname]:null),nt="span"===et.kind&&("container"===tt||"textContainer"===tt||"baseContainer"===tt),it=et.contents.length-1;it>=0;it--)!nt||"styleAttrs"in et.contents[it]&&rt.byName.ruby.qname in et.contents[it].styleAttrs?a(et.contents[it]):delete et.contents[it]}(pt.body),pt},u.prototype.initFromNode=function(et,tt,rt){var at=function(et,tt){var rt=P(et,nt.ns_ttp,"cellResolution"),it=15,at=32;if(null!==rt){var ot=/(\d+) (\d+)/.exec(rt);null!==ot?(at=parseInt(ot[1]),it=parseInt(ot[2])):U(tt,"Malformed cellResolution value (using initial value instead)")}return{w:at,h:it}}(et,rt);this.cellLength={h:new it.ComputedLength(0,1/at.h),w:new it.ComputedLength(1/at.w,0)};var ot=function(et,tt){var rt,it=P(et,nt.ns_ttp,"frameRate"),at=30;null!==it&&(null!==(rt=/(\d+)/.exec(it))?at=parseInt(rt[1]):U(tt,"Malformed frame rate attribute (using initial value instead)"));var ot=P(et,nt.ns_ttp,"frameRateMultiplier"),st=1;null!==ot&&(null!==(rt=/(\d+) (\d+)/.exec(ot))?st=parseInt(rt[1])/parseInt(rt[2]):U(tt,"Malformed frame rate multiplier attribute (using initial value instead)"));var lt=st*at,ft=1,dt=P(et,nt.ns_ttp,"tickRate");return null===dt?null!==it&&(ft=lt):null!==(rt=/(\d+)/.exec(dt))?ft=parseInt(rt[1]):U(tt,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:lt,tickRate:ft}}(et,rt);this.effectiveFrameRate=ot.effectiveFrameRate,this.tickRate=ot.tickRate,this.aspectRatio=function(et,tt){var rt=P(et,nt.ns_ittp,"aspectRatio");null===rt&&(rt=P(et,nt.ns_ttp,"displayAspectRatio"));var it=null;if(null!==rt){var at=/(\d+)\s+(\d+)/.exec(rt);if(null!==at){var ot=parseInt(at[1]),st=parseInt(at[2]);0!==ot&&0!==st?it=ot/st:Z(tt,"Illegal aspectRatio values (ignoring)")}else Z(tt,"Malformed aspectRatio attribute (ignoring)")}return it}(et,rt);var st=P(et,nt.ns_ttp,"timeBase");null!==st&&"media"!==st&&B(rt,"Unsupported time base");var lt=function(et,tt){var rt=P(et,nt.ns_tts,"extent");if(null===rt)return null;var at=rt.split(" ");if(2!==at.length)return U(tt,"Malformed extent (ignoring)"),null;var ot=it.parseLength(at[0]),st=it.parseLength(at[1]);return st&&ot?{h:st,w:ot}:(U(tt,"Malformed extent values (ignoring)"),null)}(et,rt);null===lt?this.pxLength={h:null,w:null}:("px"===lt.h.unit&&"px"===lt.w.unit||B(rt,"Extent on TT must be in px or absent"),this.pxLength={h:new it.ComputedLength(0,1/lt.h.value),w:new it.ComputedLength(1/lt.w.value,0)}),this.dimensions={h:new it.ComputedLength(0,1),w:new it.ComputedLength(1,0)},this.lang=tt},u.prototype._registerEvent=function(et){if(!(et.end<=et.begin)){var tt=G(this.events,et.begin);if(tt.found||this.events.splice(tt.index,0,et.begin),et.end!==Number.POSITIVE_INFINITY){var nt=G(this.events,et.end);nt.found||this.events.splice(nt.index,0,et.end)}}},u.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},u.prototype.getMediaTimeEvents=function(){return this.events},f.prototype.initFromNode=function(et,tt){this.id=D(et),this.styleAttrs=M(et,tt),this.styleRefs=O(et)},d.prototype.initFromNode=function(et,tt){for(var rt in this.styleAttrs={},et.attributes)if(et.attributes[rt].uri===nt.ns_itts||et.attributes[rt].uri===nt.ns_ebutts||et.attributes[rt].uri===nt.ns_tts){var it=et.attributes[rt].uri+" "+et.attributes[rt].local;this.styleAttrs[it]=et.attributes[rt].value}},h.prototype.initFromNode=function(et,tt,nt,rt,it){this.src="src"in nt.attributes?nt.attributes.src.value:null,this.src||Z(it,"Invalid image@src attribute"),this.type="type"in nt.attributes?nt.attributes.type.value:null,this.type||Z(it,"Invalid image@type attribute"),E.prototype.initFromNode.call(this,et,tt,nt,it),T.prototype.initFromNode.call(this,et,tt,nt,it),v.prototype.initFromNode.call(this,et,tt,nt,it),y.prototype.initFromNode.call(this,et,tt,nt,it),this.lang=rt},m.prototype.initFromNode=function(et,tt,nt,rt){this.id=D(nt)},y.prototype.initFromNode=function(et,tt,nt,rt){this.regionID=function(et){return et&&"region"in et.attributes?et.attributes.region.value:""}(nt)},E.prototype.initFromNode=function(et,tt,nt,rt){this.styleAttrs=M(nt,rt),null!==et.head&&null!==et.head.styling&&F(et.head.styling,O(nt),this.styleAttrs,rt)},v.prototype.initFromNode=function(et,tt,nt,rt){this.sets=[]},_.prototype.initFromNode=function(et,tt,nt,rt){this.contents=[]},T.prototype.initFromNode=function(et,tt,nt,rt){var it=function(et,tt,nt,rt){var it=null;nt&&"begin"in nt.attributes&&null===(it=L(et.tickRate,et.effectiveFrameRate,nt.attributes.begin.value))&&U(rt,"Malformed begin value "+nt.attributes.begin.value+" (using 0)");var at=null;nt&&"dur"in nt.attributes&&null===(at=L(et.tickRate,et.effectiveFrameRate,nt.attributes.dur.value))&&U(rt,"Malformed dur value "+nt.attributes.dur.value+" (ignoring)");var ot=null;return nt&&"end"in nt.attributes&&null===(ot=L(et.tickRate,et.effectiveFrameRate,nt.attributes.end.value))&&U(rt,"Malformed end value (ignoring)"),{explicit_begin:it,explicit_end:ot,explicit_dur:at}}(et,0,nt,rt);this.explicit_begin=it.explicit_begin,this.explicit_end=it.explicit_end,this.explicit_dur=it.explicit_dur,this.timeContainer=function(et,tt){var nt=et&&"timeContainer"in et.attributes?et.attributes.timeContainer.value:null;return nt&&"par"!==nt?"seq"===nt?"seq":(Z(tt,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(nt,rt)},S.prototype.initFromNode=function(et,tt,nt,rt){E.prototype.initFromNode.call(this,et,null,tt,rt),T.prototype.initFromNode.call(this,et,null,tt,rt),v.prototype.initFromNode.call(this,et,null,tt,rt),y.prototype.initFromNode.call(this,et,null,tt,rt),_.prototype.initFromNode.call(this,et,null,tt,rt),this.lang=nt},b.prototype.initFromNode=function(et,tt,nt,rt,it){E.prototype.initFromNode.call(this,et,tt,nt,it),T.prototype.initFromNode.call(this,et,tt,nt,it),v.prototype.initFromNode.call(this,et,tt,nt,it),y.prototype.initFromNode.call(this,et,tt,nt,it),_.prototype.initFromNode.call(this,et,tt,nt,it),this.lang=rt},A.prototype.initFromNode=function(et,tt,nt,rt,it){E.prototype.initFromNode.call(this,et,tt,nt,it),T.prototype.initFromNode.call(this,et,tt,nt,it),v.prototype.initFromNode.call(this,et,tt,nt,it),y.prototype.initFromNode.call(this,et,tt,nt,it),_.prototype.initFromNode.call(this,et,tt,nt,it),this.lang=rt},I.prototype.initFromNode=function(et,tt,nt,rt,it,at){E.prototype.initFromNode.call(this,et,tt,nt,at),T.prototype.initFromNode.call(this,et,tt,nt,at),v.prototype.initFromNode.call(this,et,tt,nt,at),y.prototype.initFromNode.call(this,et,tt,nt,at),_.prototype.initFromNode.call(this,et,tt,nt,at),this.space=it,this.lang=rt},R.prototype.initFromText=function(et,tt,nt,rt,it,at){T.prototype.initFromNode.call(this,et,tt,null,at),this.text=nt,this.space=it,this.lang=rt},w.prototype.initFromNode=function(et,tt,nt,rt,it){y.prototype.initFromNode.call(this,et,tt,nt,it),T.prototype.initFromNode.call(this,et,tt,nt,it),this.lang=rt},N.prototype.createDefaultRegion=function(et){var tt=new N;return m.call(tt,""),E.call(tt,{}),v.call(tt,[]),T.call(tt,0,Number.POSITIVE_INFINITY,null),this.lang=et,tt},N.prototype.initFromNode=function(et,tt,nt,rt){m.prototype.initFromNode.call(this,et,null,tt,rt),T.prototype.initFromNode.call(this,et,null,tt,rt),v.prototype.initFromNode.call(this,et,null,tt,rt),this.styleAttrs=M(tt,rt),this.styleRefs=O(tt),this.lang=nt},C.prototype.initFromNode=function(et,tt,nt,rt){T.prototype.initFromNode.call(this,et,tt,nt,rt);var it=M(nt,rt);for(var at in this.qname=null,this.value=null,it)if(it.hasOwnProperty(at)){if(this.qname){Z(rt,"More than one style specified on set");break}this.qname=at,this.value=it[at]}}}(tt,"undefined"==typeof sax?nt(5378):sax,"undefined"==typeof imscNames?nt(210):imscNames,"undefined"==typeof imscStyles?nt(6811):imscStyles,"undefined"==typeof imscUtils?nt(5926):imscUtils)},506:(et,tt,nt)=>{!function(et,tt,nt){function r(et,tt,it,at){var lt;if("region"===it.kind)(lt=document.createElement("div")).style.position="absolute";else if("body"===it.kind)lt=document.createElement("div");else if("div"===it.kind)lt=document.createElement("div");else if("image"===it.kind){if(lt=document.createElement("img"),null!==et.imgResolver&&null!==it.src){var dt=et.imgResolver(it.src,lt);dt&&(lt.src=dt),lt.height=et.regionH,lt.width=et.regionW}}else if("p"===it.kind)lt=document.createElement("p");else if("span"===it.kind)if("container"===it.styleAttrs[nt.byName.ruby.qname])lt=document.createElement("ruby"),et.ruby=!0;else if("base"===it.styleAttrs[nt.byName.ruby.qname])lt=document.createElement("rb");else if("text"===it.styleAttrs[nt.byName.ruby.qname])lt=document.createElement("rt");else if("baseContainer"===it.styleAttrs[nt.byName.ruby.qname])lt=document.createElement("rbc");else if("textContainer"===it.styleAttrs[nt.byName.ruby.qname])lt=document.createElement("rtc");else{if("delimiter"===it.styleAttrs[nt.byName.ruby.qname])return;lt=document.createElement("span")}else"br"===it.kind&&(lt=document.createElement("br"));if(lt){if(it.lang&&("region"!==it.kind&&it.lang===at.lang||(lt.lang=it.lang)),tt.appendChild(lt),lt.style.margin="0","region"===it.kind){var pt=it.styleAttrs[nt.byName.writingMode.qname];"lrtb"===pt||"lr"===pt?(et.ipd="lr",et.bpd="tb"):"rltb"===pt||"rl"===pt?(et.ipd="rl",et.bpd="tb"):"tblr"===pt?(et.ipd="tb",et.bpd="lr"):"tbrl"!==pt&&"tb"!==pt||(et.ipd="tb",et.bpd="rl")}else if("p"===it.kind&&"tb"===et.bpd){var yt=it.styleAttrs[nt.byName.direction.qname];et.ipd="ltr"===yt?"lr":"rl"}for(var vt=0;vt<rt.length;vt++){var At=rt[vt],Rt=it.styleAttrs[At.qname];void 0!==Rt&&null!==At.map&&At.map(et,lt,it,Rt)}var Nt=lt,Dt=it.styleAttrs[nt.byName.linePadding.qname];if(Dt&&!Dt.isZero()){var Ot=Dt.toUsedLength(et.w,et.h);if(Ot>0){var Mt=Math.ceil(Ot)+"px";"tb"===et.bpd?(Nt.style.paddingLeft=Mt,Nt.style.paddingRight=Mt):(Nt.style.paddingTop=Mt,Nt.style.paddingBottom=Mt),et.lp=Dt}}var Lt=it.styleAttrs[nt.byName.multiRowAlign.qname];if(Lt&&"auto"!==Lt){var xt=document.createElement("span");xt.style.display="inline-block",xt.style.textAlign=Lt,lt.appendChild(xt),Nt=xt,et.mra=Lt}var kt=it.styleAttrs[nt.byName.rubyReserve.qname];if(kt&&"none"!==kt[0]&&(et.rubyReserve=kt),it.styleAttrs[nt.byName.fillLineGap.qname]&&(et.flg=!0),"span"===it.kind&&it.text){var Ut=it.styleAttrs[nt.byName.textEmphasis.qname];if(Ut&&"none"!==Ut.style&&(et.textEmphasis=!0),nt.byName.textCombine.qname in it.styleAttrs&&"all"===it.styleAttrs[nt.byName.textCombine.qname])lt.textContent=it.text,Ut&&l(et,lt,0,Ut);else for(var Bt="",Gt=0;Gt<it.text.length;Gt++){Bt+=it.text.charAt(Gt);var qt=it.text.charCodeAt(Gt);if(qt<55296||qt>56319||Gt===it.text.length-1){var jt=document.createElement("span");jt.textContent=Bt,Ut&&l(et,jt,0,Ut),lt.appendChild(jt),Bt="",jt._isd_element=it}}}if("contents"in it)for(var Vt=0;Vt<it.contents.length;Vt++)r(et,Nt,it.contents[Vt],it);var zt=[];if("p"===it.kind&&(u(et,Nt,zt,null),et.rubyReserve&&(function(et,tt){for(var nt=0;nt<et.length;nt++){var rt,it,at=document.createElement("ruby"),lt=document.createElement("rb");lt.textContent="​",at.appendChild(lt);var ft,dt=tt.rubyReserve[1].toUsedLength(tt.w,tt.h)+"px";"both"===tt.rubyReserve[0]||"outside"===tt.rubyReserve[0]&&1==et.length?((rt=document.createElement("rtc")).style[st]=ot?"after":"under",rt.textContent="​",rt.style.fontSize=dt,(it=document.createElement("rtc")).style[st]=ot?"before":"over",it.textContent="​",it.style.fontSize=dt,at.appendChild(rt),at.appendChild(it)):((rt=document.createElement("rtc")).textContent="​",rt.style.fontSize=dt,ft="after"===tt.rubyReserve[0]||"outside"===tt.rubyReserve[0]&&nt>0?ot?"after":"tb"===tt.bpd||"rl"===tt.bpd?"under":"over":ot?"before":"tb"===tt.bpd||"rl"===tt.bpd?"over":"under",rt.style[st]=ft,at.appendChild(rt));for(var pt=null,yt=0;yt<et[nt].rbc.length;yt++)if("ruby"===et[nt].rbc[yt].localName){pt=et[nt].rbc[yt];for(var vt=0;vt<pt.style.length;vt++)at.style.setProperty(pt.style.item(vt),pt.style.getPropertyValue(pt.style.item(vt)));break}(pt=pt||et[nt].elements[0].node).parentElement.insertBefore(at,pt)}}(zt,et),et.rubyReserve=null),(et.ruby||et.rubyReserve)&&(function(et,tt){for(var nt=0;nt<et.length;nt++)for(var rt=0;rt<et[nt].rbc.length;rt++){var it;et[nt].rbc[rt].style[st]||(it=ot?0===nt?"before":"after":"tb"===tt.bpd||"rl"===tt.bpd?0===nt?"over":"under":0===nt?"under":"over",et[nt].rbc[rt].style[st]=it)}}(zt,et),et.ruby=null),et.textEmphasis&&(function(et,tt){for(var nt=0;nt<et.length;nt++)for(var rt=0;rt<et[nt].te.length;rt++){var it;et[nt].te[rt].style[ft]&&"none"!==et[nt].te[rt].style[ft]||(it="tb"===tt.bpd?0===nt?"left over":"left under":"rl"===tt.bpd?0===nt?"right under":"left under":0===nt?"left under":"right under",et[nt].te[rt].style[ft]=it)}}(zt,et),et.textEmphasis=null),et.mra&&(function(et){for(var tt=0;tt<et.length-1;tt++){var nt=et[tt].elements.length;if(0!==nt&&!1===et[tt].br){var rt=document.createElement("br"),it=et[tt].elements[nt-1].node;it.parentElement.insertBefore(rt,it.nextSibling)}}}(zt),et.mra=null),et.lp&&(function(et,tt,nt){if(null!==et)for(var rt=0;rt<et.length;rt++){var it=et[rt].elements.length,at=Math.ceil(tt)+"px",ot="-"+Math.ceil(tt)+"px";if(0!==it){var st=et[rt].elements[et[rt].start_elem],lt=et[rt].elements[et[rt].end_elem];if(st===lt&&(elementBoundingRect=st.node.getBoundingClientRect(),0==elementBoundingRect.width||0==elementBoundingRect.height))continue;"lr"===nt.ipd?(st.node.style.marginLeft=ot,st.node.style.paddingLeft=at):"rl"===nt.ipd?(st.node.style.paddingRight=at,st.node.style.marginRight=ot):"tb"===nt.ipd&&(st.node.style.paddingTop=at,st.node.style.marginTop=ot),"lr"===nt.ipd?(lt.node.style.marginRight=ot,lt.node.style.paddingRight=at):"rl"===nt.ipd?(lt.node.style.paddingLeft=at,lt.node.style.marginLeft=ot):"tb"===nt.ipd&&(lt.node.style.paddingBottom=at,lt.node.style.marginBottom=ot)}}}(zt,et.lp.toUsedLength(et.w,et.h),et),et.lp=null),function(et){for(var tt=0;tt<et.length;tt++)for(var nt=et[tt],rt=1;rt<nt.elements.length;){var it=nt.elements[rt-1],at=nt.elements[rt];a(it.node,at.node)?nt.elements.splice(rt,1):rt++}for(var ot,st,lt=[],ft=0;ft<et.length;ft++)for(var dt=0;dt<et[ft].elements.length;dt++)(st=i(ot=et[ft].elements[dt].node,lt,!1))&&(ot.style.backgroundColor=st);for(var pt=0;pt<lt.length;pt++)lt[pt].style.backgroundColor=""}(zt),et.flg)){var Xt=s(Nt.getBoundingClientRect(),et);!function(et,tt,nt,rt,it){for(var at=Math.sign(nt-tt),ot=0;ot<=et.length;ot++){var st,lt,ft,dt;if(st=0===ot?Math.round(tt):ot===et.length?Math.round(nt):Math.round((et[ot-1].after+et[ot].before)/2),ot>0&&et[ot-1])for(ft=0;ft<et[ot-1].elements.length;ft++)lt=at*(st-(dt=et[ot-1].elements[ft]).after)+"px","lr"===rt.bpd?dt.node.style.paddingRight=lt:"rl"===rt.bpd?dt.node.style.paddingLeft=lt:"tb"===rt.bpd&&(dt.node.style.paddingBottom=lt);if(ot<et.length)for(ft=0;ft<et[ot].elements.length;ft++)lt=at*((dt=et[ot].elements[ft]).before-st)+"px","lr"===rt.bpd?dt.node.style.paddingLeft=lt:"rl"===rt.bpd?dt.node.style.paddingRight=lt:"tb"===rt.bpd&&(dt.node.style.paddingTop=lt)}}(zt,Xt.before,Xt.after,et),et.flg=null}if("region"===it.kind&&"tb"===et.bpd&&et.enableRollUp&&it.contents.length>0&&"after"===it.styleAttrs[nt.byName.displayAlign.qname]){u(et,Nt,zt,null);var Qt=new o(""===it.id?"_":it.id,zt);if(et.currentISDState[Qt.id]=Qt,et.previousISDState&&Qt.id in et.previousISDState&&et.previousISDState[Qt.id].plist.length>0&&Qt.plist.length>1&&Qt.plist[Qt.plist.length-2].text===et.previousISDState[Qt.id].plist[et.previousISDState[Qt.id].plist.length-1].text){var $t=lt.firstElementChild,tn=Qt.plist[Qt.plist.length-1].after-Qt.plist[Qt.plist.length-1].before;$t.style.bottom="-"+tn+"px",$t.style.transition="transform 0.4s",$t.style.position="relative",$t.style.transform="translateY(-"+tn+"px)"}}}else!function(et,tt){if(et&&et.error&&et.error(tt))throw tt}(et.errorHandler,"Error processing ISD element kind: "+it.kind)}function i(et,tt,nt){return et.style.backgroundColor?(nt&&!tt.includes(et)&&tt.push(et),et.style.backgroundColor):"SPAN"===et.parentElement.nodeName?i(et.parentElement,tt,!0):void 0}function a(et,tt){if("SPAN"===et.tagName&&"SPAN"===tt.tagName&&et._isd_element===tt._isd_element){et.textContent+=tt.textContent;for(var nt=0;nt<tt.style.length;nt++){var rt=tt.style[nt];(rt.indexOf("border")>=0||rt.indexOf("padding")>=0||rt.indexOf("margin")>=0)&&(et.style[rt]=tt.style[rt])}return tt.parentElement.removeChild(tt),!0}return!1}function o(et,tt){this.id=et,this.plist=tt}function s(et,tt){var nt={before:null,after:null,start:null,end:null};return"tb"===tt.bpd?(nt.before=et.top,nt.after=et.bottom,"lr"===tt.ipd?(nt.start=et.left,nt.end=et.right):(nt.start=et.right,nt.end=et.left)):"lr"===tt.bpd?(nt.before=et.left,nt.after=et.right,nt.start=et.top,nt.end=et.bottom):"rl"===tt.bpd&&(nt.before=et.right,nt.after=et.left,nt.start=et.top,nt.end=et.bottom),nt}function u(et,tt,nt,rt){if("rt"!==tt.localName&&"rtc"!==tt.localName){var it,at,ot,st,ft=tt.style.backgroundColor||rt;if(0===tt.childElementCount)if("span"===tt.localName||"rb"===tt.localName){var dt=s(tt.getBoundingClientRect(),et);if(0!==nt.length&&(it=dt.before,at=dt.after,ot=nt[nt.length-1].before,at<(st=nt[nt.length-1].after)&&it>ot||st<=at&&ot>=it)){var pt=Math.sign(dt.after-dt.before),yt=Math.sign(dt.end-dt.start);pt*(dt.before-nt[nt.length-1].before)<0&&(nt[nt.length-1].before=dt.before),pt*(dt.after-nt[nt.length-1].after)>0&&(nt[nt.length-1].after=dt.after),yt*(dt.start-nt[nt.length-1].start)<0&&(nt[nt.length-1].start=dt.start,nt[nt.length-1].start_elem=nt[nt.length-1].elements.length),yt*(dt.end-nt[nt.length-1].end)>0&&(nt[nt.length-1].end=dt.end,nt[nt.length-1].end_elem=nt[nt.length-1].elements.length)}else nt.push({before:dt.before,after:dt.after,start:dt.start,end:dt.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});nt[nt.length-1].text+=tt.textContent,nt[nt.length-1].elements.push({node:tt,bgcolor:ft,before:dt.before,after:dt.after})}else"br"===tt.localName&&0!==nt.length&&(nt[nt.length-1].br=!0);else for(var vt=tt.firstChild;vt;)vt.nodeType===Node.ELEMENT_NODE&&(u(et,vt,nt,ft),"ruby"===vt.localName||"rtc"===vt.localName?nt.length>0&&nt[nt.length-1].rbc.push(vt):"span"===vt.localName&&vt.style[lt]&&"none"!==vt.style[lt]&&nt.length>0&&nt[nt.length-1].te.push(vt)),vt=vt.nextSibling}}function l(et,tt,nt,rt){var it;"none"!==rt.style&&("auto"===rt.style?tt.style[lt]="filled":tt.style[lt]=rt.style+" "+rt.symbol,("before"===rt.position||"after"===rt.position)&&(it="tb"===et.bpd?"before"===rt.position?"left over":"left under":"rl"===et.bpd?"before"===rt.position?"right under":"left under":"before"===rt.position?"left under":"right under",tt.style[ft]=it))}function c(et,tt){this.qname=et,this.map=tt}et.render=function(et,tt,nt,rt,it,at,ot,st,lt){var ft=rt||tt.clientHeight,dt=it||tt.clientWidth;if(null!==et.aspectRatio){var pt=ft*et.aspectRatio;pt>dt?ft=Math.round(dt/et.aspectRatio):dt=pt}var yt=document.createElement("div");yt.style.position="relative",yt.style.width=dt+"px",yt.style.height=ft+"px",yt.style.margin="auto",yt.style.top=0,yt.style.bottom=0,yt.style.left=0,yt.style.right=0,yt.style.zIndex=0;var vt={h:ft,w:dt,regionH:null,regionW:null,imgResolver:nt,displayForcedOnlyMode:at||!1,isd:et,errorHandler:ot,previousISDState:st,enableRollUp:lt||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(tt.appendChild(yt),"contents"in et)for(var At=0;At<et.contents.length;At++)r(vt,yt,et.contents[At],et);return vt.currentISDState};for(var rt=[new c("http://www.w3.org/ns/ttml#styling backgroundColor",(function(et,tt,nt,rt){0!==rt[3]&&(tt.style.backgroundColor="rgba("+rt[0].toString()+","+rt[1].toString()+","+rt[2].toString()+","+(rt[3]/255).toString()+")")})),new c("http://www.w3.org/ns/ttml#styling color",(function(et,tt,nt,rt){tt.style.color="rgba("+rt[0].toString()+","+rt[1].toString()+","+rt[2].toString()+","+(rt[3]/255).toString()+")"})),new c("http://www.w3.org/ns/ttml#styling direction",(function(et,tt,nt,rt){tt.style.direction=rt})),new c("http://www.w3.org/ns/ttml#styling display",(function(et,tt,nt,rt){})),new c("http://www.w3.org/ns/ttml#styling displayAlign",(function(et,tt,nt,rt){tt.style.display="flex",tt.style.flexDirection="column","before"===rt?tt.style.justifyContent="flex-start":"center"===rt?tt.style.justifyContent="center":"after"===rt&&(tt.style.justifyContent="flex-end")})),new c("http://www.w3.org/ns/ttml#styling extent",(function(et,tt,nt,rt){et.regionH=rt.h.toUsedLength(et.w,et.h),et.regionW=rt.w.toUsedLength(et.w,et.h);var it=0,at=0,ot=nt.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];ot&&(it=ot[0].toUsedLength(et.w,et.h)+ot[2].toUsedLength(et.w,et.h),at=ot[1].toUsedLength(et.w,et.h)+ot[3].toUsedLength(et.w,et.h)),tt.style.height=et.regionH-it+"px",tt.style.width=et.regionW-at+"px"})),new c("http://www.w3.org/ns/ttml#styling fontFamily",(function(et,tt,nt,rt){for(var it=[],at=0;at<rt.length;at++)"monospaceSerif"===rt[at]?(it.push("Courier New"),it.push('"Liberation Mono"'),it.push("Courier"),it.push("monospace")):"proportionalSansSerif"===rt[at]?(it.push("Arial"),it.push("Helvetica"),it.push('"Liberation Sans"'),it.push("sans-serif")):"monospace"===rt[at]?it.push("monospace"):"sansSerif"===rt[at]?it.push("sans-serif"):"serif"===rt[at]?it.push("serif"):"monospaceSansSerif"===rt[at]?(it.push("Consolas"),it.push("monospace")):"proportionalSerif"===rt[at]?it.push("serif"):it.push(rt[at]);if(it.length>0){for(var ot=[it[0]],st=1;st<it.length;st++)-1==ot.indexOf(it[st])&&ot.push(it[st]);it=ot}tt.style.fontFamily=it.join(",")})),new c("http://www.w3.org/ns/ttml#styling shear",(function(et,tt,nt,rt){if(0!==rt){var it=-.9*rt;"tb"===et.bpd?tt.style.transform="skewX("+it+"deg)":tt.style.transform="skewY("+it+"deg)"}})),new c("http://www.w3.org/ns/ttml#styling fontSize",(function(et,tt,nt,rt){tt.style.fontSize=rt.toUsedLength(et.w,et.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling fontStyle",(function(et,tt,nt,rt){tt.style.fontStyle=rt})),new c("http://www.w3.org/ns/ttml#styling fontWeight",(function(et,tt,nt,rt){tt.style.fontWeight=rt})),new c("http://www.w3.org/ns/ttml#styling lineHeight",(function(et,tt,nt,rt){tt.style.lineHeight="normal"===rt?"normal":rt.toUsedLength(et.w,et.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling opacity",(function(et,tt,nt,rt){tt.style.opacity=rt})),new c("http://www.w3.org/ns/ttml#styling origin",(function(et,tt,nt,rt){tt.style.top=rt.h.toUsedLength(et.w,et.h)+"px",tt.style.left=rt.w.toUsedLength(et.w,et.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling overflow",(function(et,tt,nt,rt){tt.style.overflow=rt})),new c("http://www.w3.org/ns/ttml#styling padding",(function(et,tt,nt,rt){var it=[];it[0]=rt[0].toUsedLength(et.w,et.h)+"px",it[1]=rt[3].toUsedLength(et.w,et.h)+"px",it[2]=rt[2].toUsedLength(et.w,et.h)+"px",it[3]=rt[1].toUsedLength(et.w,et.h)+"px",tt.style.padding=it.join(" ")})),new c("http://www.w3.org/ns/ttml#styling position",(function(et,tt,nt,rt){tt.style.top=rt.h.toUsedLength(et.w,et.h)+"px",tt.style.left=rt.w.toUsedLength(et.w,et.h)+"px"})),new c("http://www.w3.org/ns/ttml#styling rubyAlign",(function(et,tt,nt,rt){tt.style.rubyAlign="spaceAround"===rt?"space-around":"center"})),new c("http://www.w3.org/ns/ttml#styling rubyPosition",(function(et,tt,nt,rt){var it;"before"!==rt&&"after"!==rt||(it=ot?rt:"tb"===et.bpd||"rl"===et.bpd?"before"===rt?"over":"under":"before"===rt?"under":"over",tt.parentElement.style[st]=it)})),new c("http://www.w3.org/ns/ttml#styling showBackground",null),new c("http://www.w3.org/ns/ttml#styling textAlign",(function(et,tt,nt,rt){var it;it="start"===rt?"rl"===et.ipd?"right":"left":"end"===rt?"rl"===et.ipd?"left":"right":rt,tt.style.textAlign=it})),new c("http://www.w3.org/ns/ttml#styling textDecoration",(function(et,tt,nt,rt){tt.style.textDecoration=rt.join(" ").replace("lineThrough","line-through")})),new c("http://www.w3.org/ns/ttml#styling textOutline",(function(et,tt,nt,rt){})),new c("http://www.w3.org/ns/ttml#styling textShadow",(function(et,tt,rt,it){var at=rt.styleAttrs[nt.byName.textOutline.qname];if("none"===it&&"none"===at)tt.style.textShadow="";else{var ot=[];if("none"!==at){var st="rgba("+at.color[0].toString()+","+at.color[1].toString()+","+at.color[2].toString()+","+(at.color[3]/255).toString()+")";ot.push("1px 1px 1px "+st),ot.push("-1px 1px 1px "+st),ot.push("1px -1px 1px "+st),ot.push("-1px -1px 1px "+st)}if("none"!==it)for(var lt=0;lt<it.length;lt++)ot.push(it[lt].x_off.toUsedLength(et.w,et.h)+"px "+it[lt].y_off.toUsedLength(et.w,et.h)+"px "+it[lt].b_radius.toUsedLength(et.w,et.h)+"px rgba("+it[lt].color[0].toString()+","+it[lt].color[1].toString()+","+it[lt].color[2].toString()+","+(it[lt].color[3]/255).toString()+")");tt.style.textShadow=ot.join(",")}})),new c("http://www.w3.org/ns/ttml#styling textCombine",(function(et,tt,nt,rt){tt.style.textCombineUpright=rt})),new c("http://www.w3.org/ns/ttml#styling textEmphasis",(function(et,tt,nt,rt){})),new c("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(et,tt,nt,rt){var it;it="bidiOverride"===rt?"bidi-override":rt,tt.style.unicodeBidi=it})),new c("http://www.w3.org/ns/ttml#styling visibility",(function(et,tt,nt,rt){tt.style.visibility=rt})),new c("http://www.w3.org/ns/ttml#styling wrapOption",(function(et,tt,nt,rt){"wrap"===rt?"preserve"===nt.space?tt.style.whiteSpace="pre-wrap":tt.style.whiteSpace="normal":"preserve"===nt.space?tt.style.whiteSpace="pre":tt.style.whiteSpace="noWrap"})),new c("http://www.w3.org/ns/ttml#styling writingMode",(function(et,tt,nt,rt){"lrtb"===rt||"lr"===rt||"rltb"===rt||"rl"===rt?tt.style.writingMode="horizontal-tb":"tblr"===rt?tt.style.writingMode="vertical-lr":"tbrl"!==rt&&"tb"!==rt||(tt.style.writingMode="vertical-rl")})),new c("http://www.w3.org/ns/ttml#styling zIndex",(function(et,tt,nt,rt){tt.style.zIndex=rt})),new c("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(et,tt,nt,rt){et.displayForcedOnlyMode&&!1===rt&&(tt.style.visibility="hidden")}))],it={},at=0;at<rt.length;at++)it[rt[at].qname]=rt[at];var ot="webkitRubyPosition"in window.getComputedStyle(document.documentElement),st=ot?"webkitRubyPosition":"rubyPosition",lt="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",ft="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition"}(tt,"undefined"==typeof imscNames?nt(210):imscNames,"undefined"==typeof imscStyles?nt(6811):imscStyles,"undefined"==typeof imscUtils?nt(5926):imscUtils)},4080:(et,tt,nt)=>{!function(et,tt,nt,rt){et.generateISD=function(et,tt,rt){var it,at=new u(et),ot={},st={},lt=et.head.styling.initials[nt.byName.showBackground.qname],ft=et.head.styling.initials[nt.byName.backgroundColor.qname];for(var dt in et.head.layout.regions)if(et.head.layout.regions.hasOwnProperty(dt)){var pt=et.head.layout.regions[dt],yt=pt.styleAttrs[nt.byName.showBackground.qname]||lt,vt=pt.styleAttrs[nt.byName.backgroundColor.qname]||ft;st[pt.id]=("always"===yt||void 0===yt)&&void 0!==vt&&!(tt<pt.begin||tt>=pt.end)}for(var At in et.body&&et.body.regionID&&(st[et.body.regionID]=!0),it=null!==et.body?function e(et,tt){if(tt.contents){var nt={};for(var rt in tt)tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]);return nt.contents=[],tt.contents.filter((function(tt){return!(et<tt.begin||et>=tt.end)})).forEach((function(tt){var rt=e(et,tt);rt.regionID&&(st[rt.regionID]=!0),null!==rt&&nt.contents.push(rt)})),nt}return tt}(tt,et.body):null,void 0!==st[""]&&(st[""]=!0),st)if(st[At]){var Rt=a(et,tt,et.head.layout.regions[At],it,null,"",et.head.layout.regions[At],rt,ot);null!==Rt&&at.contents.push(Rt.element)}return at};var it=[nt.byName.color.qname,nt.byName.textCombine.qname,nt.byName.textDecoration.qname,nt.byName.textEmphasis.qname,nt.byName.textOutline.qname,nt.byName.textShadow.qname];function a(et,tt,at,ot,st,lt,ft,dt,pt){if(tt<ft.begin||tt>=ft.end)return null;var yt="regionID"in ft&&""!==ft.regionID?ft.regionID:lt;if(null!==st&&yt!==at.id&&(!("contents"in ft)||"contents"in ft&&0===ft.contents.length||""!==yt))return null;var vt=new l(ft);if("sets"in ft)for(var At=0;At<ft.sets.length;At++)tt<ft.sets[At].begin||tt>=ft.sets[At].end||(vt.styleAttrs[ft.sets[At].qname]=ft.sets[At].value);var Rt={};for(var Nt in vt.styleAttrs)if(vt.styleAttrs.hasOwnProperty(Nt)&&(Rt[Nt]=!0,"region"===vt.kind&&Nt===nt.byName.writingMode.qname&&!(nt.byName.direction.qname in vt.styleAttrs))){var Dt=vt.styleAttrs[Nt];"lrtb"===Dt||"lr"===Dt?vt.styleAttrs[nt.byName.direction.qname]="ltr":"rltb"!==Dt&&"rl"!==Dt||(vt.styleAttrs[nt.byName.direction.qname]="rtl")}if(null!==st)for(var Ot=0;Ot<nt.all.length;Ot++){var Mt=nt.all[Ot];if(Mt.qname===nt.byName.textDecoration.qname){var Lt=st.styleAttrs[Mt.qname],xt=vt.styleAttrs[Mt.qname],kt=[];void 0===xt?kt=Lt:-1===xt.indexOf("none")?((-1===xt.indexOf("noUnderline")&&-1!==Lt.indexOf("underline")||-1!==xt.indexOf("underline"))&&kt.push("underline"),(-1===xt.indexOf("noLineThrough")&&-1!==Lt.indexOf("lineThrough")||-1!==xt.indexOf("lineThrough"))&&kt.push("lineThrough"),(-1===xt.indexOf("noOverline")&&-1!==Lt.indexOf("overline")||-1!==xt.indexOf("overline"))&&kt.push("overline")):kt.push("none"),vt.styleAttrs[Mt.qname]=kt}else if(Mt.qname!==nt.byName.fontSize.qname||Mt.qname in vt.styleAttrs||"span"!==vt.kind||"textContainer"!==vt.styleAttrs[nt.byName.ruby.qname])if(Mt.qname!==nt.byName.fontSize.qname||Mt.qname in vt.styleAttrs||"span"!==vt.kind||"text"!==vt.styleAttrs[nt.byName.ruby.qname])Mt.inherit&&Mt.qname in st.styleAttrs&&!(Mt.qname in vt.styleAttrs)&&(vt.styleAttrs[Mt.qname]=st.styleAttrs[Mt.qname]);else{var Ut=st.styleAttrs[nt.byName.fontSize.qname];"textContainer"===st.styleAttrs[nt.byName.ruby.qname]?vt.styleAttrs[Mt.qname]=Ut:vt.styleAttrs[Mt.qname]=new rt.ComputedLength(.5*Ut.rw,.5*Ut.rh)}else{var Bt=st.styleAttrs[nt.byName.fontSize.qname];vt.styleAttrs[Mt.qname]=new rt.ComputedLength(.5*Bt.rw,.5*Bt.rh)}}for(var Gt=0;Gt<nt.all.length;Gt++){var qt=nt.all[Gt];if(!(qt.qname in vt.styleAttrs)&&!(qt.qname===nt.byName.position.qname&&nt.byName.origin.qname in vt.styleAttrs||qt.qname===nt.byName.origin.qname&&nt.byName.position.qname in vt.styleAttrs)){var jt=et.head.styling.initials[qt.qname]||qt.initial;if(null!==jt&&("region"===vt.kind||!1===qt.inherit&&null!==jt)){var Vt=qt.parse(jt);null!==Vt?(vt.styleAttrs[qt.qname]=Vt,Rt[qt.qname]=!0):c(dt,"Invalid initial value for '"+qt.qname+"' on element '"+vt.kind)}}}for(var zt=0;zt<nt.all.length;zt++){var Xt=nt.all[zt];if(Xt.qname in Rt&&null!==Xt.compute){var Qt=Xt.compute(et,st,vt,vt.styleAttrs[Xt.qname],pt);null!==Qt?vt.styleAttrs[Xt.qname]=Qt:(vt.styleAttrs[Xt.qname]=Xt.compute(et,st,vt,Xt.parse(Xt.initial),pt),c(dt,"Style '"+Xt.qname+"' on element '"+vt.kind+"' cannot be computed"))}}if("none"===vt.styleAttrs[nt.byName.display.qname])return null;var $t=null;null===st?$t=null===ot?[]:[ot]:"contents"in ft&&($t=ft.contents);for(var tn=0;null!==$t&&tn<$t.length;tn++){var nn=a(et,tt,at,ot,vt,yt,$t[tn],dt,pt);null!==nn&&vt.contents.push(nn.element)}for(var on in vt.styleAttrs)if(vt.styleAttrs.hasOwnProperty(on)){var un=!1;if("span"===vt.kind){var cn=vt.styleAttrs[nt.byName.ruby.qname];(un=("container"===cn||"textContainer"===cn||"baseContainer"===cn)&&-1!==it.indexOf(on))||(un="container"!==cn&&on===nt.byName.rubyAlign.qname),un||(un=!("textContainer"===cn||"text"===cn)&&on===nt.byName.rubyPosition.qname)}if(!un){var fn=nt.byQName[on];"applies"in fn&&(un=-1===fn.applies.indexOf(vt.kind))}un&&delete vt.styleAttrs[on]}var dn=vt.styleAttrs[nt.byName.ruby.qname];if("p"===vt.kind||"span"===vt.kind&&("textContainer"===dn||"text"===dn)){var gn=[];(function o(et,tt){if("contents"in et)for(var rt=0;rt<et.contents.length;rt++){var it=et.contents[rt],at=it.styleAttrs[nt.byName.ruby.qname];("span"!==it.kind||"textContainer"!==at&&"text"!==at)&&("contents"in it?o(it,tt):("span"===it.kind&&0!==it.text.length||"br"===it.kind)&&tt.push(it))}})(vt,gn),function(et){for(var tt,nt=0;nt<et.length;)if("br"!==(tt=et[nt]).kind&&"preserve"!==tt.space){var rt=tt.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(rt)&&(0===nt||"br"===(it=et[nt-1]).kind||/[\r\n\t ]$/.test(it.text))&&(rt=rt.substring(1)),tt.text=rt,0===rt.length?et.splice(nt,1):nt++}else nt++;var it,at;for(nt=0;nt<et.length;nt++)"br"!==(tt=et[nt]).kind&&"preserve"!==tt.space?/[ ]$/.test(tt.text)&&(nt===et.length-1||"br"===(at=et[nt+1]).kind||"preserve"===at.space&&/^[\r\n]/.test(at.text))&&(tt.text=tt.text.slice(0,-1)):nt++}(gn),function s(et){if("br"===et.kind)return!1;if("text"in et)return 0===et.text.length;if("contents"in et){for(var tt=et.contents.length;tt--;)s(et.contents[tt])&&et.contents.splice(tt,1);return 0===et.contents.length}}(vt)}return"div"===vt.kind&&nt.byName.backgroundImage.qname in vt.styleAttrs||"br"===vt.kind||"image"===vt.kind||"contents"in vt&&vt.contents.length>0||"span"===vt.kind&&null!==vt.text||"region"===vt.kind&&"always"===vt.styleAttrs[nt.byName.showBackground.qname]?{region_id:yt,element:vt}:null}function u(et){this.contents=[],this.aspectRatio=et.aspectRatio,this.lang=et.lang}function l(et){for(var tt in this.kind=et.kind||"region",this.lang=et.lang,et.id&&(this.id=et.id),this.styleAttrs={},et.styleAttrs)et.styleAttrs.hasOwnProperty(tt)&&(this.styleAttrs[tt]=et.styleAttrs[tt]);"src"in et&&(this.src=et.src),"type"in et&&(this.type=et.type),"text"in et?this.text=et.text:("region"===this.kind||"contents"in et)&&(this.contents=[]),"space"in et&&(this.space=et.space)}function c(et,tt){if(et&&et.error&&et.error(tt))throw tt}}(tt,"undefined"==typeof imscNames?nt(210):imscNames,"undefined"==typeof imscStyles?nt(6811):imscStyles,"undefined"==typeof imscUtils?nt(5926):imscUtils)},4403:(et,tt,nt)=>{tt.generateISD=nt(4080).generateISD,tt.fromXML=nt(3362).fromXML,tt.renderHTML=nt(506).render},210:(et,tt)=>{!function(et){et.ns_tt="http://www.w3.org/ns/ttml",et.ns_tts="http://www.w3.org/ns/ttml#styling",et.ns_ttp="http://www.w3.org/ns/ttml#parameter",et.ns_xml="http://www.w3.org/XML/1998/namespace",et.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",et.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",et.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",et.ns_ebutts="urn:ebu:tt:style"}(tt)},6811:(et,tt,nt)=>{!function(et,tt,nt){function r(et,tt,nt,rt,it,at,ot,st){this.name=tt,this.ns=et,this.qname=et+" "+tt,this.inherit=it,this.animatable=at,this.initial=nt,this.applies=rt,this.parse=ot,this.compute=st}for(var rt in et.all=[new r(tt.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,nt.parseColor,null),new r(tt.ns_tts,"color","white",["span"],!0,!0,nt.parseColor,null),new r(tt.ns_tts,"direction","ltr",["p","span"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"displayAlign","before",["region"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"extent","auto",["tt","region"],!1,!0,(function(et){if("auto"===et)return et;var tt=et.split(" ");if(2!==tt.length)return null;var rt=nt.parseLength(tt[0]),it=nt.parseLength(tt[1]);return it&&rt?{h:it,w:rt}:null}),(function(et,tt,rt,it,at){var ot,st;if("auto"===it)ot=new nt.ComputedLength(0,1);else if(null===(ot=nt.toComputedLength(it.h.value,it.h.unit,null,et.dimensions.h,null,et.pxLength.h)))return null;if("auto"===it)st=new nt.ComputedLength(1,0);else if(null===(st=nt.toComputedLength(it.w.value,it.w.unit,null,et.dimensions.w,null,et.pxLength.w)))return null;return{h:ot,w:st}})),new r(tt.ns_tts,"fontFamily","default",["span","p"],!0,!0,(function(et){for(var tt=et.split(","),nt=[],rt=0;rt<tt.length;rt++)"'"!==tt[rt].charAt(0)&&'"'!==tt[rt].charAt(0)&&"default"===tt[rt]?nt.push("monospaceSerif"):nt.push(tt[rt]);return nt}),null),new r(tt.ns_tts,"shear","0%",["p"],!0,!0,nt.parseLength,(function(et,tt,nt,rt){return"%"!==rt.unit?null:Math.abs(rt.value)>100?100*Math.sign(rt.value):rt.value})),new r(tt.ns_tts,"fontSize","1c",["span","p"],!0,!0,nt.parseLength,(function(tt,rt,it,at,ot){return nt.toComputedLength(at.value,at.unit,null!==rt?rt.styleAttrs[et.byName.fontSize.qname]:tt.cellLength.h,null!==rt?rt.styleAttrs[et.byName.fontSize.qname]:tt.cellLength.h,tt.cellLength.h,tt.pxLength.h)})),new r(tt.ns_tts,"fontStyle","normal",["span","p"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"fontWeight","normal",["span","p"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"lineHeight","normal",["p"],!0,!0,(function(et){return"normal"===et?et:nt.parseLength(et)}),(function(tt,rt,it,at,ot){var st;if("normal"===at)st=at;else if(null===(st=nt.toComputedLength(at.value,at.unit,it.styleAttrs[et.byName.fontSize.qname],it.styleAttrs[et.byName.fontSize.qname],tt.cellLength.h,tt.pxLength.h)))return null;return st})),new r(tt.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new r(tt.ns_tts,"origin","auto",["region"],!1,!0,(function(et){if("auto"===et)return et;var tt=et.split(" ");if(2!==tt.length)return null;var rt=nt.parseLength(tt[0]),it=nt.parseLength(tt[1]);return it&&rt?{h:it,w:rt}:null}),(function(et,tt,rt,it,at){var ot,st;if("auto"===it)ot=new nt.ComputedLength(0,0);else if(null===(ot=nt.toComputedLength(it.h.value,it.h.unit,null,et.dimensions.h,null,et.pxLength.h)))return null;if("auto"===it)st=new nt.ComputedLength(0,0);else if(null===(st=nt.toComputedLength(it.w.value,it.w.unit,null,et.dimensions.w,null,et.pxLength.w)))return null;return{h:ot,w:st}})),new r(tt.ns_tts,"overflow","hidden",["region"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"padding","0px",["region"],!1,!0,(function(et){var tt=et.split(" ");if(tt.length>4)return null;for(var rt=[],it=0;it<tt.length;it++){var at=nt.parseLength(tt[it]);if(!at)return null;rt.push(at)}return rt}),(function(tt,rt,it,at,ot){var st;if(1===at.length)st=[at[0],at[0],at[0],at[0]];else if(2===at.length)st=[at[0],at[1],at[0],at[1]];else if(3===at.length)st=[at[0],at[1],at[2],at[1]];else{if(4!==at.length)return null;st=[at[0],at[1],at[2],at[3]]}var lt=it.styleAttrs[et.byName.writingMode.qname];if("lrtb"===lt||"lr"===lt)st=[st[0],st[3],st[2],st[1]];else if("rltb"===lt||"rl"===lt)st=[st[0],st[1],st[2],st[3]];else if("tblr"===lt)st=[st[3],st[0],st[1],st[2]];else{if("tbrl"!==lt&&"tb"!==lt)return null;st=[st[3],st[2],st[1],st[0]]}for(var ft=[],dt=0;dt<st.length;dt++)if(0===st[dt].value)ft[dt]=new nt.ComputedLength(0,0);else if(ft[dt]=nt.toComputedLength(st[dt].value,st[dt].unit,it.styleAttrs[et.byName.fontSize.qname],0===dt||2===dt?it.styleAttrs[et.byName.extent.qname].h:it.styleAttrs[et.byName.extent.qname].w,0===dt||2===dt?tt.cellLength.h:tt.cellLength.w,0===dt||2===dt?tt.pxLength.h:tt.pxLength.w),null===ft[dt])return null;return ft})),new r(tt.ns_tts,"position","top left",["region"],!1,!0,(function(et){return nt.parsePosition(et)}),(function(tt,rt,it,at){var ot,st;return null===(ot=nt.toComputedLength(at.v.offset.value,at.v.offset.unit,null,new nt.ComputedLength(-it.styleAttrs[et.byName.extent.qname].h.rw,tt.dimensions.h.rh-it.styleAttrs[et.byName.extent.qname].h.rh),null,tt.pxLength.h))?null:("bottom"===at.v.edge&&(ot=new nt.ComputedLength(-ot.rw-it.styleAttrs[et.byName.extent.qname].h.rw,tt.dimensions.h.rh-ot.rh-it.styleAttrs[et.byName.extent.qname].h.rh)),st=nt.toComputedLength(at.h.offset.value,at.h.offset.unit,null,new nt.ComputedLength(tt.dimensions.w.rw-it.styleAttrs[et.byName.extent.qname].w.rw,-it.styleAttrs[et.byName.extent.qname].w.rh),null,tt.pxLength.w),null===ot?null:("right"===at.h.edge&&(st=new nt.ComputedLength(tt.dimensions.w.rw-st.rw-it.styleAttrs[et.byName.extent.qname].w.rw,-st.rh-it.styleAttrs[et.byName.extent.qname].w.rh)),{h:ot,w:st}))})),new r(tt.ns_tts,"ruby","none",["span"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"rubyAlign","center",["span"],!0,!0,(function(et){return"center"!==et&&"spaceAround"!==et?null:et}),null),new r(tt.ns_tts,"rubyPosition","outside",["span"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"rubyReserve","none",["p"],!0,!0,(function(et){var tt=et.split(" "),rt=[null,null];if(0===tt.length||tt.length>2)return null;if("none"!==tt[0]&&"both"!==tt[0]&&"after"!==tt[0]&&"before"!==tt[0]&&"outside"!==tt[0])return null;if(rt[0]=tt[0],2===tt.length&&"none"!==tt[0]){var it=nt.parseLength(tt[1]);if(!it)return null;rt[1]=it}return rt}),(function(tt,rt,it,at,ot){return"none"===at[0]?at:null===(st=null===at[1]?new nt.ComputedLength(.5*it.styleAttrs[et.byName.fontSize.qname].rw,.5*it.styleAttrs[et.byName.fontSize.qname].rh):nt.toComputedLength(at[1].value,at[1].unit,it.styleAttrs[et.byName.fontSize.qname],it.styleAttrs[et.byName.fontSize.qname],tt.cellLength.h,tt.pxLength.h))?null:[at[0],st];var st})),new r(tt.ns_tts,"showBackground","always",["region"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"textAlign","start",["p"],!0,!0,(function(et){return et}),(function(et,tt,nt,rt,it){return"left"===rt?"start":"right"===rt?"end":rt})),new r(tt.ns_tts,"textCombine","none",["span"],!0,!0,(function(et){return"none"===et||"all"===et?et:null}),null),new r(tt.ns_tts,"textDecoration","none",["span"],!0,!0,(function(et){return et.split(" ")}),null),new r(tt.ns_tts,"textEmphasis","none",["span"],!0,!0,(function(et){for(var tt=et.split(" "),rt={style:null,symbol:null,color:null,position:null},it=0;it<tt.length;it++)if("none"===tt[it]||"auto"===tt[it])rt.style=tt[it];else if("filled"===tt[it]||"open"===tt[it])rt.style=tt[it];else if("circle"===tt[it]||"dot"===tt[it]||"sesame"===tt[it])rt.symbol=tt[it];else if("current"===tt[it])rt.color=tt[it];else if("outside"===tt[it]||"before"===tt[it]||"after"===tt[it])rt.position=tt[it];else if(rt.color=nt.parseColor(tt[it]),null===rt.color)return null;return null==rt.style&&null==rt.symbol?rt.style="auto":(rt.symbol=rt.symbol||"circle",rt.style=rt.style||"filled"),rt.position=rt.position||"outside",rt.color=rt.color||"current",rt}),null),new r(tt.ns_tts,"textOutline","none",["span"],!0,!0,(function(et){if("none"===et)return et;var tt={},rt=et.split(" ");if(0===rt.length||rt.length>2)return null;var it=nt.parseColor(rt[0]);if(tt.color=it,null!==it&&rt.shift(),1!==rt.length)return null;var at=nt.parseLength(rt[0]);return at?(tt.thickness=at,tt):null}),(function(tt,rt,it,at,ot){if("none"===at)return at;var st={};return null===at.color?st.color=it.styleAttrs[et.byName.color.qname]:st.color=at.color,st.thickness=nt.toComputedLength(at.thickness.value,at.thickness.unit,it.styleAttrs[et.byName.fontSize.qname],it.styleAttrs[et.byName.fontSize.qname],tt.cellLength.h,tt.pxLength.h),null===st.thickness?null:st})),new r(tt.ns_tts,"textShadow","none",["span"],!0,!0,nt.parseTextShadow,(function(tt,rt,it,at){if("none"===at)return at;for(var ot=[],st=0;st<at.length;st++){var lt={};if(lt.x_off=nt.toComputedLength(at[st][0].value,at[st][0].unit,null,it.styleAttrs[et.byName.fontSize.qname],null,tt.pxLength.w),null===lt.x_off)return null;if(lt.y_off=nt.toComputedLength(at[st][1].value,at[st][1].unit,null,it.styleAttrs[et.byName.fontSize.qname],null,tt.pxLength.h),null===lt.y_off)return null;if(null===at[st][2])lt.b_radius=0;else if(lt.b_radius=nt.toComputedLength(at[st][2].value,at[st][2].unit,null,it.styleAttrs[et.byName.fontSize.qname],null,tt.pxLength.h),null===lt.b_radius)return null;null===at[st][3]?lt.color=it.styleAttrs[et.byName.color.qname]:lt.color=at[st][3],ot.push(lt)}return ot})),new r(tt.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"wrapOption","wrap",["span"],!0,!0,(function(et){return et}),null),new r(tt.ns_tts,"writingMode","lrtb",["region"],!1,!0,(function(et){return et}),null),new r(tt.ns_tts,"zIndex","auto",["region"],!1,!0,(function(et){var tt;return"auto"===et?tt=et:(tt=parseInt(et),isNaN(tt)&&(tt=null)),tt}),null),new r(tt.ns_ebutts,"linePadding","0c",["p"],!0,!1,nt.parseLength,(function(et,tt,rt,it,at){return nt.toComputedLength(it.value,it.unit,null,null,et.cellLength.w,null)})),new r(tt.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,(function(et){return et}),null),new r(tt.ns_smpte,"backgroundImage",null,["div"],!1,!1,(function(et){return et}),null),new r(tt.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,(function(et){return"true"===et}),null),new r(tt.ns_itts,"fillLineGap","false",["p"],!0,!0,(function(et){return"true"===et}),null)],et.byQName={},et.all)et.byQName[et.all[rt].qname]=et.all[rt];for(var it in et.byName={},et.all)et.byName[et.all[it].name]=et.all[it]}(tt,"undefined"==typeof imscNames?nt(210):imscNames,"undefined"==typeof imscUtils?nt(5926):imscUtils)},5926:(et,tt)=>{!function(et){var tt=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,nt=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,rt=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,it={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};et.parseColor=function(et){var at,ot=null,st=it[et.toLowerCase()];return void 0!==st?ot=st:null!==(at=tt.exec(et))?ot=[parseInt(at[1],16),parseInt(at[2],16),parseInt(at[3],16),void 0!==at[4]?parseInt(at[4],16):255]:null!==(at=nt.exec(et))?ot=[parseInt(at[1]),parseInt(at[2]),parseInt(at[3]),255]:null!==(at=rt.exec(et))&&(ot=[parseInt(at[1]),parseInt(at[2]),parseInt(at[3]),parseInt(at[4])]),ot};var at=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;et.parseLength=function(et){var tt,nt=null;return null!==(tt=at.exec(et))&&(nt={value:parseFloat(tt[1]),unit:tt[2]}),nt},et.parseTextShadow=function(tt){for(var nt=tt.match(/([^\(,\)]|\([^\)]+\))+/g),rt=[],it=0;it<nt.length;it++){var at=nt[it].split(" ");if(1===at.length&&"none"===at[0])return"none";if(at.length>1&&at.length<5){var ot=[null,null,null,null],st=et.parseLength(at.shift());if(null===st)return null;if(ot[0]=st,null===(st=et.parseLength(at.shift())))return null;if(ot[1]=st,0===at.length){rt.push(ot);continue}if(null!==(st=et.parseLength(at[0]))&&(ot[2]=st,at.shift()),0===at.length){rt.push(ot);continue}var lt=et.parseColor(at[0]);if(null===lt)return null;ot[3]=lt,rt.push(ot)}}return rt},et.parsePosition=function(tt){var nt=tt.split(" "),r=function(et){return"center"===et||"left"===et||"top"===et||"bottom"===et||"right"===et};if(nt.length>4)return null;for(var rt=0;rt<nt.length;rt++)if(!r(nt[rt])){var it=et.parseLength(nt[rt]);if(null===it)return null;nt[rt]=it}for(var at={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},ot=0;ot<nt.length;){var st=nt[ot++];if(r(st)){var lt={value:0,unit:"%"};2!==nt.length&&ot<nt.length&&!r(nt[ot])&&(lt=nt[ot++]),"right"===st?(at.h.edge=st,at.h.offset=lt):"bottom"===st?(at.v.edge=st,at.v.offset=lt):"left"===st?at.h.offset=lt:"top"===st&&(at.v.offset=lt)}else{if(1!==nt.length&&2!==nt.length)return null;1===ot?at.h.offset=st:at.v.offset=st}}return at},et.ComputedLength=function(et,tt){this.rw=et,this.rh=tt},et.ComputedLength.prototype.toUsedLength=function(et,tt){return et*this.rw+tt*this.rh},et.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},et.toComputedLength=function(tt,nt,rt,it,at,ot){return"%"===nt&&it?new et.ComputedLength(it.rw*tt/100,it.rh*tt/100):"em"===nt&&rt?new et.ComputedLength(rt.rw*tt,rt.rh*tt):"c"===nt&&at?new et.ComputedLength(tt*at.rw,tt*at.rh):"px"===nt&&ot?new et.ComputedLength(tt*ot.rw,tt*ot.rh):"rh"===nt?new et.ComputedLength(0,tt/100):"rw"===nt?new et.ComputedLength(tt/100,0):null}}(tt)},3516:et=>{"use strict";et.exports=function(et){var tt="string"==typeof et?et.charCodeAt(0):et;return tt>=97&&tt<=122||tt>=65&&tt<=90}},2219:(et,tt,nt)=>{"use strict";var rt=nt(3516),it=nt(395);et.exports=function(et){return rt(et)||it(et)}},395:et=>{"use strict";et.exports=function(et){var tt="string"==typeof et?et.charCodeAt(0):et;return tt>=48&&tt<=57}},3875:et=>{"use strict";function t(et){if("string"!=typeof et)throw new TypeError("Path must be a string. Received "+JSON.stringify(et))}function n(et,tt){for(var nt,rt="",it=0,at=-1,ot=0,st=0;st<=et.length;++st){if(st<et.length)nt=et.charCodeAt(st);else{if(47===nt)break;nt=47}if(47===nt){if(at===st-1||1===ot);else if(at!==st-1&&2===ot){if(rt.length<2||2!==it||46!==rt.charCodeAt(rt.length-1)||46!==rt.charCodeAt(rt.length-2))if(rt.length>2){var lt=rt.lastIndexOf("/");if(lt!==rt.length-1){-1===lt?(rt="",it=0):it=(rt=rt.slice(0,lt)).length-1-rt.lastIndexOf("/"),at=st,ot=0;continue}}else if(2===rt.length||1===rt.length){rt="",it=0,at=st,ot=0;continue}tt&&(rt.length>0?rt+="/..":rt="..",it=2)}else rt.length>0?rt+="/"+et.slice(at+1,st):rt=et.slice(at+1,st),it=st-at-1;at=st,ot=0}else 46===nt&&-1!==ot?++ot:ot=-1}return rt}var nt={resolve:function(){for(var et,nt="",rt=!1,it=arguments.length-1;it>=-1&&!rt;it--){var at;it>=0?at=arguments[it]:(void 0===et&&(et=tt.cwd()),at=et),t(at),0!==at.length&&(nt=at+"/"+nt,rt=47===at.charCodeAt(0))}return nt=n(nt,!rt),rt?nt.length>0?"/"+nt:"/":nt.length>0?nt:"."},normalize:function(et){if(t(et),0===et.length)return".";var tt=47===et.charCodeAt(0),nt=47===et.charCodeAt(et.length-1);return 0!==(et=n(et,!tt)).length||tt||(et="."),et.length>0&&nt&&(et+="/"),tt?"/"+et:et},isAbsolute:function(et){return t(et),et.length>0&&47===et.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var et,tt=0;tt<arguments.length;++tt){var rt=arguments[tt];t(rt),rt.length>0&&(void 0===et?et=rt:et+="/"+rt)}return void 0===et?".":nt.normalize(et)},relative:function(et,tt){if(t(et),t(tt),et===tt)return"";if((et=nt.resolve(et))===(tt=nt.resolve(tt)))return"";for(var rt=1;rt<et.length&&47===et.charCodeAt(rt);++rt);for(var it=et.length,at=it-rt,ot=1;ot<tt.length&&47===tt.charCodeAt(ot);++ot);for(var st=tt.length-ot,lt=at<st?at:st,ft=-1,dt=0;dt<=lt;++dt){if(dt===lt){if(st>lt){if(47===tt.charCodeAt(ot+dt))return tt.slice(ot+dt+1);if(0===dt)return tt.slice(ot+dt)}else at>lt&&(47===et.charCodeAt(rt+dt)?ft=dt:0===dt&&(ft=0));break}var pt=et.charCodeAt(rt+dt);if(pt!==tt.charCodeAt(ot+dt))break;47===pt&&(ft=dt)}var yt="";for(dt=rt+ft+1;dt<=it;++dt)dt!==it&&47!==et.charCodeAt(dt)||(0===yt.length?yt+="..":yt+="/..");return yt.length>0?yt+tt.slice(ot+ft):(ot+=ft,47===tt.charCodeAt(ot)&&++ot,tt.slice(ot))},_makeLong:function(et){return et},dirname:function(et){if(t(et),0===et.length)return".";for(var tt=et.charCodeAt(0),nt=47===tt,rt=-1,it=!0,at=et.length-1;at>=1;--at)if(47===(tt=et.charCodeAt(at))){if(!it){rt=at;break}}else it=!1;return-1===rt?nt?"/":".":nt&&1===rt?"//":et.slice(0,rt)},basename:function(et,tt){if(void 0!==tt&&"string"!=typeof tt)throw new TypeError('"ext" argument must be a string');t(et);var nt,rt=0,it=-1,at=!0;if(void 0!==tt&&tt.length>0&&tt.length<=et.length){if(tt.length===et.length&&tt===et)return"";var ot=tt.length-1,st=-1;for(nt=et.length-1;nt>=0;--nt){var lt=et.charCodeAt(nt);if(47===lt){if(!at){rt=nt+1;break}}else-1===st&&(at=!1,st=nt+1),ot>=0&&(lt===tt.charCodeAt(ot)?-1==--ot&&(it=nt):(ot=-1,it=st))}return rt===it?it=st:-1===it&&(it=et.length),et.slice(rt,it)}for(nt=et.length-1;nt>=0;--nt)if(47===et.charCodeAt(nt)){if(!at){rt=nt+1;break}}else-1===it&&(at=!1,it=nt+1);return-1===it?"":et.slice(rt,it)},extname:function(et){t(et);for(var tt=-1,nt=0,rt=-1,it=!0,at=0,ot=et.length-1;ot>=0;--ot){var st=et.charCodeAt(ot);if(47!==st)-1===rt&&(it=!1,rt=ot+1),46===st?-1===tt?tt=ot:1!==at&&(at=1):-1!==tt&&(at=-1);else if(!it){nt=ot+1;break}}return-1===tt||-1===rt||0===at||1===at&&tt===rt-1&&tt===nt+1?"":et.slice(tt,rt)},format:function(et){if(null===et||"object"!=typeof et)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof et);return function(et,tt){var nt=tt.dir||tt.root,rt=tt.base||(tt.name||"")+(tt.ext||"");return nt?nt===tt.root?nt+rt:nt+"/"+rt:rt}(0,et)},parse:function(et){t(et);var tt={root:"",dir:"",base:"",ext:"",name:""};if(0===et.length)return tt;var nt,rt=et.charCodeAt(0),it=47===rt;it?(tt.root="/",nt=1):nt=0;for(var at=-1,ot=0,st=-1,lt=!0,ft=et.length-1,dt=0;ft>=nt;--ft)if(47!==(rt=et.charCodeAt(ft)))-1===st&&(lt=!1,st=ft+1),46===rt?-1===at?at=ft:1!==dt&&(dt=1):-1!==at&&(dt=-1);else if(!lt){ot=ft+1;break}return-1===at||-1===st||0===dt||1===dt&&at===st-1&&at===ot+1?-1!==st&&(tt.base=tt.name=0===ot&&it?et.slice(1,st):et.slice(ot,st)):(0===ot&&it?(tt.name=et.slice(1,at),tt.base=et.slice(1,st)):(tt.name=et.slice(ot,at),tt.base=et.slice(ot,st)),tt.ext=et.slice(at,st)),ot>0?tt.dir=et.slice(0,ot-1):it&&(tt.dir="/"),tt},sep:"/",delimiter:":",win32:null,posix:null};nt.posix=nt,et.exports=nt},8387:(et,tt,nt)=>{var rt=nt(1549),it=rt.Buffer;function a(et,tt){for(var nt in et)tt[nt]=et[nt]}function o(et,tt,nt){return it(et,tt,nt)}it.from&&it.alloc&&it.allocUnsafe&&it.allocUnsafeSlow?et.exports=rt:(a(rt,tt),tt.Buffer=o),a(it,o),o.from=function(et,tt,nt){if("number"==typeof et)throw new TypeError("Argument must not be a number");return it(et,tt,nt)},o.alloc=function(et,tt,nt){if("number"!=typeof et)throw new TypeError("Argument must be a number");var rt=it(et);return void 0!==tt?"string"==typeof nt?rt.fill(tt,nt):rt.fill(tt):rt.fill(0),rt},o.allocUnsafe=function(et){if("number"!=typeof et)throw new TypeError("Argument must be a number");return it(et)},o.allocUnsafeSlow=function(et){if("number"!=typeof et)throw new TypeError("Argument must be a number");return rt.SlowBuffer(et)}},5378:(et,tt,rt)=>{!function(et){et.parser=function(et,tt){return new i(et,tt)},et.SAXParser=i,et.SAXStream=o,et.createStream=function(et,tt){return new o(et,tt)},et.MAX_BUFFER_LENGTH=65536;var tt,it=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(tt,nt){if(!(this instanceof i))return new i(tt,nt);var rt=this;!function(et){for(var tt=0,nt=it.length;tt<nt;tt++)et[it[tt]]=""}(rt),rt.q=rt.c="",rt.bufferCheckPosition=et.MAX_BUFFER_LENGTH,rt.opt=nt||{},rt.opt.lowercase=rt.opt.lowercase||rt.opt.lowercasetags,rt.looseCase=rt.opt.lowercase?"toLowerCase":"toUpperCase",rt.tags=[],rt.closed=rt.closedRoot=rt.sawRoot=!1,rt.tag=rt.error=null,rt.strict=!!tt,rt.noscript=!(!tt&&!rt.opt.noscript),rt.state=xt.BEGIN,rt.strictEntities=rt.opt.strictEntities,rt.ENTITIES=rt.strictEntities?Object.create(et.XML_ENTITIES):Object.create(et.ENTITIES),rt.attribList=[],rt.opt.xmlns&&(rt.ns=Object.create(vt)),rt.trackPosition=!1!==rt.opt.position,rt.trackPosition&&(rt.position=rt.line=rt.column=0),w(rt,"onready")}et.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(et){function t(){}return t.prototype=et,new t}),Object.keys||(Object.keys=function(et){var tt=[];for(var nt in et)et.hasOwnProperty(nt)&&tt.push(nt);return tt}),i.prototype={end:function(){M(this)},write:function(tt){var nt=this;if(this.error)throw this.error;if(nt.closed)return O(nt,"Cannot write after close. Assign an onready handler.");if(null===tt)return M(nt);"object"==typeof tt&&(tt=tt.toString());for(var rt=0,at="";at=G(tt,rt++),nt.c=at,at;)switch(nt.trackPosition&&(nt.position++,"\n"===at?(nt.line++,nt.column=0):nt.column++),nt.state){case xt.BEGIN:if(nt.state=xt.BEGIN_WHITESPACE,"\ufeff"===at)continue;B(nt,at);continue;case xt.BEGIN_WHITESPACE:B(nt,at);continue;case xt.TEXT:if(nt.sawRoot&&!nt.closedRoot){for(var st=rt-1;at&&"<"!==at&&"&"!==at;)(at=G(tt,rt++))&&nt.trackPosition&&(nt.position++,"\n"===at?(nt.line++,nt.column=0):nt.column++);nt.textNode+=tt.substring(st,rt-1)}"<"!==at||nt.sawRoot&&nt.closedRoot&&!nt.strict?(!T(ot,at)||nt.sawRoot&&!nt.closedRoot||P(nt,"Text data outside of root node."),"&"===at?nt.state=xt.TEXT_ENTITY:nt.textNode+=at):(nt.state=xt.OPEN_WAKA,nt.startTagPosition=nt.position);continue;case xt.SCRIPT:"<"===at?nt.state=xt.SCRIPT_ENDING:nt.script+=at;continue;case xt.SCRIPT_ENDING:"/"===at?nt.state=xt.CLOSE_TAG:(nt.script+="<"+at,nt.state=xt.SCRIPT);continue;case xt.OPEN_WAKA:if("!"===at)nt.state=xt.SGML_DECL,nt.sgmlDecl="";else if(_(ot,at));else if(_(At,at))nt.state=xt.OPEN_TAG,nt.tagName=at;else if("/"===at)nt.state=xt.CLOSE_TAG,nt.tagName="";else if("?"===at)nt.state=xt.PROC_INST,nt.procInstName=nt.procInstBody="";else{if(P(nt,"Unencoded <"),nt.startTagPosition+1<nt.position){var lt=nt.position-nt.startTagPosition;at=new Array(lt).join(" ")+at}nt.textNode+="<"+at,nt.state=xt.TEXT}continue;case xt.SGML_DECL:"[CDATA["===(nt.sgmlDecl+at).toUpperCase()?(N(nt,"onopencdata"),nt.state=xt.CDATA,nt.sgmlDecl="",nt.cdata=""):nt.sgmlDecl+at==="--"?(nt.state=xt.COMMENT,nt.comment="",nt.sgmlDecl=""):"DOCTYPE"===(nt.sgmlDecl+at).toUpperCase()?(nt.state=xt.DOCTYPE,(nt.doctype||nt.sawRoot)&&P(nt,"Inappropriately located doctype declaration"),nt.doctype="",nt.sgmlDecl=""):">"===at?(N(nt,"onsgmldeclaration",nt.sgmlDecl),nt.sgmlDecl="",nt.state=xt.TEXT):_(ft,at)?(nt.state=xt.SGML_DECL_QUOTED,nt.sgmlDecl+=at):nt.sgmlDecl+=at;continue;case xt.SGML_DECL_QUOTED:at===nt.q&&(nt.state=xt.SGML_DECL,nt.q=""),nt.sgmlDecl+=at;continue;case xt.DOCTYPE:">"===at?(nt.state=xt.TEXT,N(nt,"ondoctype",nt.doctype),nt.doctype=!0):(nt.doctype+=at,"["===at?nt.state=xt.DOCTYPE_DTD:_(ft,at)&&(nt.state=xt.DOCTYPE_QUOTED,nt.q=at));continue;case xt.DOCTYPE_QUOTED:nt.doctype+=at,at===nt.q&&(nt.q="",nt.state=xt.DOCTYPE);continue;case xt.DOCTYPE_DTD:nt.doctype+=at,"]"===at?nt.state=xt.DOCTYPE:_(ft,at)&&(nt.state=xt.DOCTYPE_DTD_QUOTED,nt.q=at);continue;case xt.DOCTYPE_DTD_QUOTED:nt.doctype+=at,at===nt.q&&(nt.state=xt.DOCTYPE_DTD,nt.q="");continue;case xt.COMMENT:"-"===at?nt.state=xt.COMMENT_ENDING:nt.comment+=at;continue;case xt.COMMENT_ENDING:"-"===at?(nt.state=xt.COMMENT_ENDED,nt.comment=D(nt.opt,nt.comment),nt.comment&&N(nt,"oncomment",nt.comment),nt.comment=""):(nt.comment+="-"+at,nt.state=xt.COMMENT);continue;case xt.COMMENT_ENDED:">"!==at?(P(nt,"Malformed comment"),nt.comment+="--"+at,nt.state=xt.COMMENT):nt.state=xt.TEXT;continue;case xt.CDATA:"]"===at?nt.state=xt.CDATA_ENDING:nt.cdata+=at;continue;case xt.CDATA_ENDING:"]"===at?nt.state=xt.CDATA_ENDING_2:(nt.cdata+="]"+at,nt.state=xt.CDATA);continue;case xt.CDATA_ENDING_2:">"===at?(nt.cdata&&N(nt,"oncdata",nt.cdata),N(nt,"onclosecdata"),nt.cdata="",nt.state=xt.TEXT):"]"===at?nt.cdata+="]":(nt.cdata+="]]"+at,nt.state=xt.CDATA);continue;case xt.PROC_INST:"?"===at?nt.state=xt.PROC_INST_ENDING:_(ot,at)?nt.state=xt.PROC_INST_BODY:nt.procInstName+=at;continue;case xt.PROC_INST_BODY:if(!nt.procInstBody&&_(ot,at))continue;"?"===at?nt.state=xt.PROC_INST_ENDING:nt.procInstBody+=at;continue;case xt.PROC_INST_ENDING:">"===at?(N(nt,"onprocessinginstruction",{name:nt.procInstName,body:nt.procInstBody}),nt.procInstName=nt.procInstBody="",nt.state=xt.TEXT):(nt.procInstBody+="?"+at,nt.state=xt.PROC_INST_BODY);continue;case xt.OPEN_TAG:_(Rt,at)?nt.tagName+=at:(L(nt),">"===at?k(nt):"/"===at?nt.state=xt.OPEN_TAG_SLASH:(T(ot,at)&&P(nt,"Invalid character in tag name"),nt.state=xt.ATTRIB));continue;case xt.OPEN_TAG_SLASH:">"===at?(k(nt,!0),U(nt)):(P(nt,"Forward-slash in opening tag not followed by >"),nt.state=xt.ATTRIB);continue;case xt.ATTRIB:if(_(ot,at))continue;">"===at?k(nt):"/"===at?nt.state=xt.OPEN_TAG_SLASH:_(At,at)?(nt.attribName=at,nt.attribValue="",nt.state=xt.ATTRIB_NAME):P(nt,"Invalid attribute name");continue;case xt.ATTRIB_NAME:"="===at?nt.state=xt.ATTRIB_VALUE:">"===at?(P(nt,"Attribute without value"),nt.attribValue=nt.attribName,F(nt),k(nt)):_(ot,at)?nt.state=xt.ATTRIB_NAME_SAW_WHITE:_(Rt,at)?nt.attribName+=at:P(nt,"Invalid attribute name");continue;case xt.ATTRIB_NAME_SAW_WHITE:if("="===at)nt.state=xt.ATTRIB_VALUE;else{if(_(ot,at))continue;P(nt,"Attribute without value"),nt.tag.attributes[nt.attribName]="",nt.attribValue="",N(nt,"onattribute",{name:nt.attribName,value:""}),nt.attribName="",">"===at?k(nt):_(At,at)?(nt.attribName=at,nt.state=xt.ATTRIB_NAME):(P(nt,"Invalid attribute name"),nt.state=xt.ATTRIB)}continue;case xt.ATTRIB_VALUE:if(_(ot,at))continue;_(ft,at)?(nt.q=at,nt.state=xt.ATTRIB_VALUE_QUOTED):(P(nt,"Unquoted attribute value"),nt.state=xt.ATTRIB_VALUE_UNQUOTED,nt.attribValue=at);continue;case xt.ATTRIB_VALUE_QUOTED:if(at!==nt.q){"&"===at?nt.state=xt.ATTRIB_VALUE_ENTITY_Q:nt.attribValue+=at;continue}F(nt),nt.q="",nt.state=xt.ATTRIB_VALUE_CLOSED;continue;case xt.ATTRIB_VALUE_CLOSED:_(ot,at)?nt.state=xt.ATTRIB:">"===at?k(nt):"/"===at?nt.state=xt.OPEN_TAG_SLASH:_(At,at)?(P(nt,"No whitespace between attributes"),nt.attribName=at,nt.attribValue="",nt.state=xt.ATTRIB_NAME):P(nt,"Invalid attribute name");continue;case xt.ATTRIB_VALUE_UNQUOTED:if(T(dt,at)){"&"===at?nt.state=xt.ATTRIB_VALUE_ENTITY_U:nt.attribValue+=at;continue}F(nt),">"===at?k(nt):nt.state=xt.ATTRIB;continue;case xt.CLOSE_TAG:if(nt.tagName)">"===at?U(nt):_(Rt,at)?nt.tagName+=at:nt.script?(nt.script+="</"+nt.tagName,nt.tagName="",nt.state=xt.SCRIPT):(T(ot,at)&&P(nt,"Invalid tagname in closing tag"),nt.state=xt.CLOSE_TAG_SAW_WHITE);else{if(_(ot,at))continue;T(At,at)?nt.script?(nt.script+="</"+at,nt.state=xt.SCRIPT):P(nt,"Invalid tagname in closing tag."):nt.tagName=at}continue;case xt.CLOSE_TAG_SAW_WHITE:if(_(ot,at))continue;">"===at?U(nt):P(nt,"Invalid characters in closing tag");continue;case xt.TEXT_ENTITY:case xt.ATTRIB_VALUE_ENTITY_Q:case xt.ATTRIB_VALUE_ENTITY_U:var pt,yt;switch(nt.state){case xt.TEXT_ENTITY:pt=xt.TEXT,yt="textNode";break;case xt.ATTRIB_VALUE_ENTITY_Q:pt=xt.ATTRIB_VALUE_QUOTED,yt="attribValue";break;case xt.ATTRIB_VALUE_ENTITY_U:pt=xt.ATTRIB_VALUE_UNQUOTED,yt="attribValue"}";"===at?(nt[yt]+=Z(nt),nt.entity="",nt.state=pt):_(nt.entity.length?Dt:Nt,at)?nt.entity+=at:(P(nt,"Invalid character in entity name"),nt[yt]+="&"+nt.entity+at,nt.entity="",nt.state=pt);continue;default:throw new Error(nt,"Unknown state: "+nt.state)}return nt.position>=nt.bufferCheckPosition&&function(tt){for(var nt=Math.max(et.MAX_BUFFER_LENGTH,10),rt=0,at=0,ot=it.length;at<ot;at++){var st=tt[it[at]].length;if(st>nt)switch(it[at]){case"textNode":C(tt);break;case"cdata":N(tt,"oncdata",tt.cdata),tt.cdata="";break;case"script":N(tt,"onscript",tt.script),tt.script="";break;default:O(tt,"Max buffer length exceeded: "+it[at])}rt=Math.max(rt,st)}var lt=et.MAX_BUFFER_LENGTH-rt;tt.bufferCheckPosition=lt+tt.position}(nt),nt},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var et;C(et=this),""!==et.cdata&&(N(et,"oncdata",et.cdata),et.cdata=""),""!==et.script&&(N(et,"onscript",et.script),et.script="")}};try{tt=rt(182).Stream}catch(et){tt=function(){}}var at=et.EVENTS.filter((function(et){return"error"!==et&&"end"!==et}));function o(et,nt){if(!(this instanceof o))return new o(et,nt);tt.apply(this),this._parser=new i(et,nt),this.writable=!0,this.readable=!0;var rt=this;this._parser.onend=function(){rt.emit("end")},this._parser.onerror=function(et){rt.emit("error",et),rt._parser.error=null},this._decoder=null,at.forEach((function(et){Object.defineProperty(rt,"on"+et,{get:function(){return rt._parser["on"+et]},set:function(tt){if(!tt)return rt.removeAllListeners(et),rt._parser["on"+et]=tt,tt;rt.on(et,tt)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(tt.prototype,{constructor:{value:o}}),o.prototype.write=function(et){if("function"==typeof nt&&"function"==typeof nt.isBuffer&&nt.isBuffer(et)){if(!this._decoder){var tt=rt(7503).s;this._decoder=new tt("utf8")}et=this._decoder.write(et)}return this._parser.write(et.toString()),this.emit("data",et),!0},o.prototype.end=function(et){return et&&et.length&&this.write(et),this._parser.end(),!0},o.prototype.on=function(et,nt){var rt=this;return rt._parser["on"+et]||-1===at.indexOf(et)||(rt._parser["on"+et]=function(){var tt=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);tt.splice(0,0,et),rt.emit.apply(rt,tt)}),tt.prototype.on.call(rt,et,nt)};var ot="\r\n\t ",st="0124356789",lt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",ft="'\"",dt=ot+">",pt="http://www.w3.org/XML/1998/namespace",yt="http://www.w3.org/2000/xmlns/",vt={xml:pt,xmlns:yt};ot=v(ot),st=v(st),lt=v(lt);var At=/[:_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]/,Rt=/[:_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-]/,Nt=/[#:_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]/,Dt=/[#:_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 v(et){return et.split("").reduce((function(et,tt){return et[tt]=!0,et}),{})}function _(et,tt){return function(et){return"[object RegExp]"===Object.prototype.toString.call(et)}(et)?!!tt.match(et):et[tt]}function T(et,tt){return!_(et,tt)}ft=v(ft),dt=v(dt);var Ot,Mt,Lt,xt=0;for(var kt in et.STATE={BEGIN:xt++,BEGIN_WHITESPACE:xt++,TEXT:xt++,TEXT_ENTITY:xt++,OPEN_WAKA:xt++,SGML_DECL:xt++,SGML_DECL_QUOTED:xt++,DOCTYPE:xt++,DOCTYPE_QUOTED:xt++,DOCTYPE_DTD:xt++,DOCTYPE_DTD_QUOTED:xt++,COMMENT_STARTING:xt++,COMMENT:xt++,COMMENT_ENDING:xt++,COMMENT_ENDED:xt++,CDATA:xt++,CDATA_ENDING:xt++,CDATA_ENDING_2:xt++,PROC_INST:xt++,PROC_INST_BODY:xt++,PROC_INST_ENDING:xt++,OPEN_TAG:xt++,OPEN_TAG_SLASH:xt++,ATTRIB:xt++,ATTRIB_NAME:xt++,ATTRIB_NAME_SAW_WHITE:xt++,ATTRIB_VALUE:xt++,ATTRIB_VALUE_QUOTED:xt++,ATTRIB_VALUE_CLOSED:xt++,ATTRIB_VALUE_UNQUOTED:xt++,ATTRIB_VALUE_ENTITY_Q:xt++,ATTRIB_VALUE_ENTITY_U:xt++,CLOSE_TAG:xt++,CLOSE_TAG_SAW_WHITE:xt++,SCRIPT:xt++,SCRIPT_ENDING:xt++},et.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},et.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(et.ENTITIES).forEach((function(tt){var nt=et.ENTITIES[tt],rt="number"==typeof nt?String.fromCharCode(nt):nt;et.ENTITIES[tt]=rt})),et.STATE)et.STATE[et.STATE[kt]]=kt;function w(et,tt,nt){et[tt]&&et[tt](nt)}function N(et,tt,nt){et.textNode&&C(et),w(et,tt,nt)}function C(et){et.textNode=D(et.opt,et.textNode),et.textNode&&w(et,"ontext",et.textNode),et.textNode=""}function D(et,tt){return et.trim&&(tt=tt.trim()),et.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function O(et,tt){return C(et),et.trackPosition&&(tt+="\nLine: "+et.line+"\nColumn: "+et.column+"\nChar: "+et.c),tt=new Error(tt),et.error=tt,w(et,"onerror",tt),et}function M(et){return et.sawRoot&&!et.closedRoot&&P(et,"Unclosed root tag"),et.state!==xt.BEGIN&&et.state!==xt.BEGIN_WHITESPACE&&et.state!==xt.TEXT&&O(et,"Unexpected end"),C(et),et.c="",et.closed=!0,w(et,"onend"),i.call(et,et.strict,et.opt),et}function P(et,tt){if("object"!=typeof et||!(et instanceof i))throw new Error("bad call to strictFail");et.strict&&O(et,tt)}function L(et){et.strict||(et.tagName=et.tagName[et.looseCase]());var tt=et.tags[et.tags.length-1]||et,nt=et.tag={name:et.tagName,attributes:{}};et.opt.xmlns&&(nt.ns=tt.ns),et.attribList.length=0,N(et,"onopentagstart",nt)}function x(et,tt){var nt=et.indexOf(":")<0?["",et]:et.split(":"),rt=nt[0],it=nt[1];return tt&&"xmlns"===et&&(rt="xmlns",it=""),{prefix:rt,local:it}}function F(et){if(et.strict||(et.attribName=et.attribName[et.looseCase]()),-1!==et.attribList.indexOf(et.attribName)||et.tag.attributes.hasOwnProperty(et.attribName))et.attribName=et.attribValue="";else{if(et.opt.xmlns){var tt=x(et.attribName,!0),nt=tt.prefix,rt=tt.local;if("xmlns"===nt)if("xml"===rt&&et.attribValue!==pt)P(et,"xml: prefix must be bound to "+pt+"\nActual: "+et.attribValue);else if("xmlns"===rt&&et.attribValue!==yt)P(et,"xmlns: prefix must be bound to "+yt+"\nActual: "+et.attribValue);else{var it=et.tag,at=et.tags[et.tags.length-1]||et;it.ns===at.ns&&(it.ns=Object.create(at.ns)),it.ns[rt]=et.attribValue}et.attribList.push([et.attribName,et.attribValue])}else et.tag.attributes[et.attribName]=et.attribValue,N(et,"onattribute",{name:et.attribName,value:et.attribValue});et.attribName=et.attribValue=""}}function k(et,tt){if(et.opt.xmlns){var nt=et.tag,rt=x(et.tagName);nt.prefix=rt.prefix,nt.local=rt.local,nt.uri=nt.ns[rt.prefix]||"",nt.prefix&&!nt.uri&&(P(et,"Unbound namespace prefix: "+JSON.stringify(et.tagName)),nt.uri=rt.prefix);var it=et.tags[et.tags.length-1]||et;nt.ns&&it.ns!==nt.ns&&Object.keys(nt.ns).forEach((function(tt){N(et,"onopennamespace",{prefix:tt,uri:nt.ns[tt]})}));for(var at=0,ot=et.attribList.length;at<ot;at++){var st=et.attribList[at],lt=st[0],ft=st[1],dt=x(lt,!0),pt=dt.prefix,yt=dt.local,vt=""===pt?"":nt.ns[pt]||"",At={name:lt,value:ft,prefix:pt,local:yt,uri:vt};pt&&"xmlns"!==pt&&!vt&&(P(et,"Unbound namespace prefix: "+JSON.stringify(pt)),At.uri=pt),et.tag.attributes[lt]=At,N(et,"onattribute",At)}et.attribList.length=0}et.tag.isSelfClosing=!!tt,et.sawRoot=!0,et.tags.push(et.tag),N(et,"onopentag",et.tag),tt||(et.noscript||"script"!==et.tagName.toLowerCase()?et.state=xt.TEXT:et.state=xt.SCRIPT,et.tag=null,et.tagName=""),et.attribName=et.attribValue="",et.attribList.length=0}function U(et){if(!et.tagName)return P(et,"Weird empty close tag."),et.textNode+="</>",void(et.state=xt.TEXT);if(et.script){if("script"!==et.tagName)return et.script+="</"+et.tagName+">",et.tagName="",void(et.state=xt.SCRIPT);N(et,"onscript",et.script),et.script=""}var tt=et.tags.length,nt=et.tagName;et.strict||(nt=nt[et.looseCase]());for(var rt=nt;tt--&&et.tags[tt].name!==rt;)P(et,"Unexpected close tag");if(tt<0)return P(et,"Unmatched closing tag: "+et.tagName),et.textNode+="</"+et.tagName+">",void(et.state=xt.TEXT);et.tagName=nt;for(var it=et.tags.length;it-- >tt;){var at=et.tag=et.tags.pop();et.tagName=et.tag.name,N(et,"onclosetag",et.tagName);var ot={};for(var st in at.ns)ot[st]=at.ns[st];var lt=et.tags[et.tags.length-1]||et;et.opt.xmlns&&at.ns!==lt.ns&&Object.keys(at.ns).forEach((function(tt){var nt=at.ns[tt];N(et,"onclosenamespace",{prefix:tt,uri:nt})}))}0===tt&&(et.closedRoot=!0),et.tagName=et.attribValue=et.attribName="",et.attribList.length=0,et.state=xt.TEXT}function Z(et){var tt,nt=et.entity,rt=nt.toLowerCase(),it="";return et.ENTITIES[nt]?et.ENTITIES[nt]:et.ENTITIES[rt]?et.ENTITIES[rt]:("#"===(nt=rt).charAt(0)&&("x"===nt.charAt(1)?(nt=nt.slice(2),it=(tt=parseInt(nt,16)).toString(16)):(nt=nt.slice(1),it=(tt=parseInt(nt,10)).toString(10))),nt=nt.replace(/^0+/,""),it.toLowerCase()!==nt?(P(et,"Invalid character entity"),"&"+et.entity+";"):String.fromCodePoint(tt))}function B(et,tt){"<"===tt?(et.state=xt.OPEN_WAKA,et.startTagPosition=et.position):T(ot,tt)&&(P(et,"Non-whitespace before first tag."),et.textNode=tt,et.state=xt.TEXT)}function G(et,tt){var nt="";return tt<et.length&&(nt=et.charAt(tt)),nt}xt=et.STATE,String.fromCodePoint||(Ot=String.fromCharCode,Mt=Math.floor,Lt=function(){var et,tt,nt=16384,rt=[],it=-1,at=arguments.length;if(!at)return"";for(var ot="";++it<at;){var st=Number(arguments[it]);if(!isFinite(st)||st<0||st>1114111||Mt(st)!==st)throw RangeError("Invalid code point: "+st);st<=65535?rt.push(st):(et=55296+((st-=65536)>>10),tt=st%1024+56320,rt.push(et,tt)),(it+1===at||rt.length>nt)&&(ot+=Ot.apply(null,rt),rt.length=0)}return ot},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Lt,configurable:!0,writable:!0}):String.fromCodePoint=Lt)}(tt)},182:(et,tt,nt)=>{et.exports=i;var rt=nt(1159).EventEmitter;function i(){rt.call(this)}nt(1765)(i,rt),i.Readable=nt(2846),i.Writable=nt(8318),i.Duplex=nt(6138),i.Transform=nt(9798),i.PassThrough=nt(5472),i.finished=nt(8800),i.pipeline=nt(7295),i.Stream=i,i.prototype.pipe=function(et,tt){var nt=this;function i(tt){et.writable&&!1===et.write(tt)&&nt.pause&&nt.pause()}function a(){nt.readable&&nt.resume&&nt.resume()}nt.on("data",i),et.on("drain",a),et._isStdio||tt&&!1===tt.end||(nt.on("end",s),nt.on("close",u));var it=!1;function s(){it||(it=!0,et.end())}function u(){it||(it=!0,"function"==typeof et.destroy&&et.destroy())}function l(et){if(c(),0===rt.listenerCount(this,"error"))throw et}function c(){nt.removeListener("data",i),et.removeListener("drain",a),nt.removeListener("end",s),nt.removeListener("close",u),nt.removeListener("error",l),et.removeListener("error",l),nt.removeListener("end",c),nt.removeListener("close",c),et.removeListener("close",c)}return nt.on("error",l),et.on("error",l),nt.on("end",c),nt.on("close",c),et.on("close",c),et.emit("pipe",nt),et}},1765:et=>{"function"==typeof Object.create?et.exports=function(et,tt){tt&&(et.super_=tt,et.prototype=Object.create(tt.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}))}:et.exports=function(et,tt){if(tt){et.super_=tt;var n=function(){};n.prototype=tt.prototype,et.prototype=new n,et.prototype.constructor=et}}},3690:et=>{"use strict";var tt={};function n(et,nt,rt){rt||(rt=Error);var it=function(et){var tt,rt;function i(tt,rt,it){return et.call(this,function(et,tt,rt){return"string"==typeof nt?nt:nt(et,tt,rt)}(tt,rt,it))||this}return rt=et,(tt=i).prototype=Object.create(rt.prototype),tt.prototype.constructor=tt,tt.__proto__=rt,i}(rt);it.prototype.name=rt.name,it.prototype.code=et,tt[et]=it}function r(et,tt){if(Array.isArray(et)){var nt=et.length;return et=et.map((function(et){return String(et)})),nt>2?"one of ".concat(tt," ").concat(et.slice(0,nt-1).join(", "),", or ")+et[nt-1]:2===nt?"one of ".concat(tt," ").concat(et[0]," or ").concat(et[1]):"of ".concat(tt," ").concat(et[0])}return"of ".concat(tt," ").concat(String(et))}n("ERR_INVALID_OPT_VALUE",(function(et,tt){return'The value "'+tt+'" is invalid for option "'+et+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(et,tt,nt){var rt,it,at,ot,st;if("string"==typeof tt&&(it="not ",tt.substr(0,it.length)===it)?(rt="must not be",tt=tt.replace(/^not /,"")):rt="must be",function(et,tt,nt){return(void 0===nt||nt>et.length)&&(nt=et.length),et.substring(nt-tt.length,nt)===tt}(et," argument"))at="The ".concat(et," ").concat(rt," ").concat(r(tt,"type"));else{var lt=("number"!=typeof st&&(st=0),st+".".length>(ot=et).length||-1===ot.indexOf(".",st)?"argument":"property");at='The "'.concat(et,'" ').concat(lt," ").concat(rt," ").concat(r(tt,"type"))}return at+". Received type ".concat(typeof nt)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(et){return"The "+et+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(et){return"Cannot call "+et+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(et){return"Unknown encoding: "+et}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),et.exports.q=tt},6138:(et,nt,rt)=>{"use strict";var it=Object.keys||function(et){var tt=[];for(var nt in et)tt.push(nt);return tt};et.exports=l;var at=rt(2846),ot=rt(8318);rt(1765)(l,at);for(var st=it(ot.prototype),lt=0;lt<st.length;lt++){var ft=st[lt];l.prototype[ft]||(l.prototype[ft]=ot.prototype[ft])}function l(et){if(!(this instanceof l))return new l(et);at.call(this,et),ot.call(this,et),this.allowHalfOpen=!0,et&&(!1===et.readable&&(this.readable=!1),!1===et.writable&&(this.writable=!1),!1===et.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||tt.nextTick(f,this)}function f(et){et.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(et){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=et,this._writableState.destroyed=et)}})},5472:(et,tt,nt)=>{"use strict";et.exports=i;var rt=nt(9798);function i(et){if(!(this instanceof i))return new i(et);rt.call(this,et)}nt(1765)(i,rt),i.prototype._transform=function(et,tt,nt){nt(null,et)}},2846:(et,nt,rt)=>{"use strict";var it;et.exports=A,A.ReadableState=b,rt(1159).EventEmitter;var at,a=function(et,tt){return et.listeners(tt).length},ot=rt(9299),st=rt(1549).Buffer,lt=rt.g.Uint8Array||function(){},ft=rt(964);at=ft&&ft.debuglog?ft.debuglog("stream"):function(){};var dt,pt,yt,vt=rt(8393),At=rt(6163),Rt=rt(7269).getHighWaterMark,Nt=rt(3690).q,Dt=Nt.ERR_INVALID_ARG_TYPE,Ot=Nt.ERR_STREAM_PUSH_AFTER_EOF,Mt=Nt.ERR_METHOD_NOT_IMPLEMENTED,Lt=Nt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;rt(1765)(A,ot);var xt=At.errorOrDestroy,kt=["error","close","destroy","pause","resume"];function b(et,tt,nt){it=it||rt(6138),et=et||{},"boolean"!=typeof nt&&(nt=tt instanceof it),this.objectMode=!!et.objectMode,nt&&(this.objectMode=this.objectMode||!!et.readableObjectMode),this.highWaterMark=Rt(this,et,"readableHighWaterMark",nt),this.buffer=new vt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==et.emitClose,this.autoDestroy=!!et.autoDestroy,this.destroyed=!1,this.defaultEncoding=et.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,et.encoding&&(dt||(dt=rt(7503).s),this.decoder=new dt(et.encoding),this.encoding=et.encoding)}function A(et){if(it=it||rt(6138),!(this instanceof A))return new A(et);var tt=this instanceof it;this._readableState=new b(et,this,tt),this.readable=!0,et&&("function"==typeof et.read&&(this._read=et.read),"function"==typeof et.destroy&&(this._destroy=et.destroy)),ot.call(this)}function I(et,tt,nt,rt,it){at("readableAddChunk",tt);var ot,ft=et._readableState;if(null===tt)ft.reading=!1,function(et,tt){if(at("onEofChunk"),!tt.ended){if(tt.decoder){var nt=tt.decoder.end();nt&&nt.length&&(tt.buffer.push(nt),tt.length+=tt.objectMode?1:nt.length)}tt.ended=!0,tt.sync?C(et):(tt.needReadable=!1,tt.emittedReadable||(tt.emittedReadable=!0,D(et)))}}(et,ft);else if(it||(ot=function(et,tt){var nt,rt;return rt=tt,st.isBuffer(rt)||rt instanceof lt||"string"==typeof tt||void 0===tt||et.objectMode||(nt=new Dt("chunk",["string","Buffer","Uint8Array"],tt)),nt}(ft,tt)),ot)xt(et,ot);else if(ft.objectMode||tt&&tt.length>0)if("string"==typeof tt||ft.objectMode||Object.getPrototypeOf(tt)===st.prototype||(tt=function(et){return st.from(et)}(tt)),rt)ft.endEmitted?xt(et,new Lt):R(et,ft,tt,!0);else if(ft.ended)xt(et,new Ot);else{if(ft.destroyed)return!1;ft.reading=!1,ft.decoder&&!nt?(tt=ft.decoder.write(tt),ft.objectMode||0!==tt.length?R(et,ft,tt,!1):O(et,ft)):R(et,ft,tt,!1)}else rt||(ft.reading=!1,O(et,ft));return!ft.ended&&(ft.length<ft.highWaterMark||0===ft.length)}function R(et,tt,nt,rt){tt.flowing&&0===tt.length&&!tt.sync?(tt.awaitDrain=0,et.emit("data",nt)):(tt.length+=tt.objectMode?1:nt.length,rt?tt.buffer.unshift(nt):tt.buffer.push(nt),tt.needReadable&&C(et)),O(et,tt)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(et){this._readableState&&(this._readableState.destroyed=et)}}),A.prototype.destroy=At.destroy,A.prototype._undestroy=At.undestroy,A.prototype._destroy=function(et,tt){tt(et)},A.prototype.push=function(et,tt){var nt,rt=this._readableState;return rt.objectMode?nt=!0:"string"==typeof et&&((tt=tt||rt.defaultEncoding)!==rt.encoding&&(et=st.from(et,tt),tt=""),nt=!0),I(this,et,tt,!1,nt)},A.prototype.unshift=function(et){return I(this,et,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(et){dt||(dt=rt(7503).s);var tt=new dt(et);this._readableState.decoder=tt,this._readableState.encoding=this._readableState.decoder.encoding;for(var nt=this._readableState.buffer.head,it="";null!==nt;)it+=tt.write(nt.data),nt=nt.next;return this._readableState.buffer.clear(),""!==it&&this._readableState.buffer.push(it),this._readableState.length=it.length,this};var Ut=1073741824;function N(et,tt){return et<=0||0===tt.length&&tt.ended?0:tt.objectMode?1:et!=et?tt.flowing&&tt.length?tt.buffer.head.data.length:tt.length:(et>tt.highWaterMark&&(tt.highWaterMark=function(et){return et>=Ut?et=Ut:(et--,et|=et>>>1,et|=et>>>2,et|=et>>>4,et|=et>>>8,et|=et>>>16,et++),et}(et)),et<=tt.length?et:tt.ended?tt.length:(tt.needReadable=!0,0))}function C(et){var nt=et._readableState;at("emitReadable",nt.needReadable,nt.emittedReadable),nt.needReadable=!1,nt.emittedReadable||(at("emitReadable",nt.flowing),nt.emittedReadable=!0,tt.nextTick(D,et))}function D(et){var tt=et._readableState;at("emitReadable_",tt.destroyed,tt.length,tt.ended),tt.destroyed||!tt.length&&!tt.ended||(et.emit("readable"),tt.emittedReadable=!1),tt.needReadable=!tt.flowing&&!tt.ended&&tt.length<=tt.highWaterMark,F(et)}function O(et,nt){nt.readingMore||(nt.readingMore=!0,tt.nextTick(M,et,nt))}function M(et,tt){for(;!tt.reading&&!tt.ended&&(tt.length<tt.highWaterMark||tt.flowing&&0===tt.length);){var nt=tt.length;if(at("maybeReadMore read 0"),et.read(0),nt===tt.length)break}tt.readingMore=!1}function P(et){var tt=et._readableState;tt.readableListening=et.listenerCount("readable")>0,tt.resumeScheduled&&!tt.paused?tt.flowing=!0:et.listenerCount("data")>0&&et.resume()}function L(et){at("readable nexttick read 0"),et.read(0)}function x(et,tt){at("resume",tt.reading),tt.reading||et.read(0),tt.resumeScheduled=!1,et.emit("resume"),F(et),tt.flowing&&!tt.reading&&et.read(0)}function F(et){var tt=et._readableState;for(at("flow",tt.flowing);tt.flowing&&null!==et.read(););}function k(et,tt){return 0===tt.length?null:(tt.objectMode?nt=tt.buffer.shift():!et||et>=tt.length?(nt=tt.decoder?tt.buffer.join(""):1===tt.buffer.length?tt.buffer.first():tt.buffer.concat(tt.length),tt.buffer.clear()):nt=tt.buffer.consume(et,tt.decoder),nt);var nt}function U(et){var nt=et._readableState;at("endReadable",nt.endEmitted),nt.endEmitted||(nt.ended=!0,tt.nextTick(Z,nt,et))}function Z(et,tt){if(at("endReadableNT",et.endEmitted,et.length),!et.endEmitted&&0===et.length&&(et.endEmitted=!0,tt.readable=!1,tt.emit("end"),et.autoDestroy)){var nt=tt._writableState;(!nt||nt.autoDestroy&&nt.finished)&&tt.destroy()}}function B(et,tt){for(var nt=0,rt=et.length;nt<rt;nt++)if(et[nt]===tt)return nt;return-1}A.prototype.read=function(et){at("read",et),et=parseInt(et,10);var tt=this._readableState,nt=et;if(0!==et&&(tt.emittedReadable=!1),0===et&&tt.needReadable&&((0!==tt.highWaterMark?tt.length>=tt.highWaterMark:tt.length>0)||tt.ended))return at("read: emitReadable",tt.length,tt.ended),0===tt.length&&tt.ended?U(this):C(this),null;if(0===(et=N(et,tt))&&tt.ended)return 0===tt.length&&U(this),null;var rt,it=tt.needReadable;return at("need readable",it),(0===tt.length||tt.length-et<tt.highWaterMark)&&at("length less than watermark",it=!0),tt.ended||tt.reading?at("reading or ended",it=!1):it&&(at("do read"),tt.reading=!0,tt.sync=!0,0===tt.length&&(tt.needReadable=!0),this._read(tt.highWaterMark),tt.sync=!1,tt.reading||(et=N(nt,tt))),null===(rt=et>0?k(et,tt):null)?(tt.needReadable=tt.length<=tt.highWaterMark,et=0):(tt.length-=et,tt.awaitDrain=0),0===tt.length&&(tt.ended||(tt.needReadable=!0),nt!==et&&tt.ended&&U(this)),null!==rt&&this.emit("data",rt),rt},A.prototype._read=function(et){xt(this,new Mt("_read()"))},A.prototype.pipe=function(et,nt){var rt=this,it=this._readableState;switch(it.pipesCount){case 0:it.pipes=et;break;case 1:it.pipes=[it.pipes,et];break;default:it.pipes.push(et)}it.pipesCount+=1,at("pipe count=%d opts=%j",it.pipesCount,nt);var ot=nt&&!1===nt.end||et===tt.stdout||et===tt.stderr?h:s;function s(){at("onend"),et.end()}it.endEmitted?tt.nextTick(ot):rt.once("end",ot),et.on("unpipe",(function t(tt,nt){at("onunpipe"),tt===rt&&nt&&!1===nt.hasUnpiped&&(nt.hasUnpiped=!0,at("cleanup"),et.removeListener("close",d),et.removeListener("finish",g),et.removeListener("drain",st),et.removeListener("error",f),et.removeListener("unpipe",t),rt.removeListener("end",s),rt.removeListener("end",h),rt.removeListener("data",c),lt=!0,!it.awaitDrain||et._writableState&&!et._writableState.needDrain||st())}));var st=function(et){return function(){var tt=et._readableState;at("pipeOnDrain",tt.awaitDrain),tt.awaitDrain&&tt.awaitDrain--,0===tt.awaitDrain&&a(et,"data")&&(tt.flowing=!0,F(et))}}(rt);et.on("drain",st);var lt=!1;function c(tt){at("ondata");var nt=et.write(tt);at("dest.write",nt),!1===nt&&((1===it.pipesCount&&it.pipes===et||it.pipesCount>1&&-1!==B(it.pipes,et))&&!lt&&(at("false write response, pause",it.awaitDrain),it.awaitDrain++),rt.pause())}function f(tt){at("onerror",tt),h(),et.removeListener("error",f),0===a(et,"error")&&xt(et,tt)}function d(){et.removeListener("finish",g),h()}function g(){at("onfinish"),et.removeListener("close",d),h()}function h(){at("unpipe"),rt.unpipe(et)}return rt.on("data",c),function(et,tt,nt){if("function"==typeof et.prependListener)return et.prependListener(tt,nt);et._events&&et._events[tt]?Array.isArray(et._events[tt])?et._events[tt].unshift(nt):et._events[tt]=[nt,et._events[tt]]:et.on(tt,nt)}(et,"error",f),et.once("close",d),et.once("finish",g),et.emit("pipe",rt),it.flowing||(at("pipe resume"),rt.resume()),et},A.prototype.unpipe=function(et){var tt=this._readableState,nt={hasUnpiped:!1};if(0===tt.pipesCount)return this;if(1===tt.pipesCount)return et&&et!==tt.pipes||(et||(et=tt.pipes),tt.pipes=null,tt.pipesCount=0,tt.flowing=!1,et&&et.emit("unpipe",this,nt)),this;if(!et){var rt=tt.pipes,it=tt.pipesCount;tt.pipes=null,tt.pipesCount=0,tt.flowing=!1;for(var at=0;at<it;at++)rt[at].emit("unpipe",this,{hasUnpiped:!1});return this}var ot=B(tt.pipes,et);return-1===ot||(tt.pipes.splice(ot,1),tt.pipesCount-=1,1===tt.pipesCount&&(tt.pipes=tt.pipes[0]),et.emit("unpipe",this,nt)),this},A.prototype.on=function(et,nt){var rt=ot.prototype.on.call(this,et,nt),it=this._readableState;return"data"===et?(it.readableListening=this.listenerCount("readable")>0,!1!==it.flowing&&this.resume()):"readable"===et&&(it.endEmitted||it.readableListening||(it.readableListening=it.needReadable=!0,it.flowing=!1,it.emittedReadable=!1,at("on readable",it.length,it.reading),it.length?C(this):it.reading||tt.nextTick(L,this))),rt},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(et,nt){var rt=ot.prototype.removeListener.call(this,et,nt);return"readable"===et&&tt.nextTick(P,this),rt},A.prototype.removeAllListeners=function(et){var nt=ot.prototype.removeAllListeners.apply(this,arguments);return"readable"!==et&&void 0!==et||tt.nextTick(P,this),nt},A.prototype.resume=function(){var et=this._readableState;return et.flowing||(at("resume"),et.flowing=!et.readableListening,function(et,nt){nt.resumeScheduled||(nt.resumeScheduled=!0,tt.nextTick(x,et,nt))}(this,et)),et.paused=!1,this},A.prototype.pause=function(){return at("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(at("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(et){var tt=this,nt=this._readableState,rt=!1;for(var it in et.on("end",(function(){if(at("wrapped end"),nt.decoder&&!nt.ended){var et=nt.decoder.end();et&&et.length&&tt.push(et)}tt.push(null)})),et.on("data",(function(it){at("wrapped data"),nt.decoder&&(it=nt.decoder.write(it)),nt.objectMode&&null==it||(nt.objectMode||it&&it.length)&&(tt.push(it)||(rt=!0,et.pause()))})),et)void 0===this[it]&&"function"==typeof et[it]&&(this[it]=function(tt){return function(){return et[tt].apply(et,arguments)}}(it));for(var ot=0;ot<kt.length;ot++)et.on(kt[ot],this.emit.bind(this,kt[ot]));return this._read=function(tt){at("wrapped _read",tt),rt&&(rt=!1,et.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===pt&&(pt=rt(7299)),pt(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(et){this._readableState&&(this._readableState.flowing=et)}}),A._fromList=k,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(et,tt){return void 0===yt&&(yt=rt(6233)),yt(A,et,tt)})},9798:(et,tt,nt)=>{"use strict";et.exports=c;var rt=nt(3690).q,it=rt.ERR_METHOD_NOT_IMPLEMENTED,at=rt.ERR_MULTIPLE_CALLBACK,ot=rt.ERR_TRANSFORM_ALREADY_TRANSFORMING,st=rt.ERR_TRANSFORM_WITH_LENGTH_0,lt=nt(6138);function l(et,tt){var nt=this._transformState;nt.transforming=!1;var rt=nt.writecb;if(null===rt)return this.emit("error",new at);nt.writechunk=null,nt.writecb=null,null!=tt&&this.push(tt),rt(et);var it=this._readableState;it.reading=!1,(it.needReadable||it.length<it.highWaterMark)&&this._read(it.highWaterMark)}function c(et){if(!(this instanceof c))return new c(et);lt.call(this,et),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,et&&("function"==typeof et.transform&&(this._transform=et.transform),"function"==typeof et.flush&&(this._flush=et.flush)),this.on("prefinish",f)}function f(){var et=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(tt,nt){d(et,tt,nt)}))}function d(et,tt,nt){if(tt)return et.emit("error",tt);if(null!=nt&&et.push(nt),et._writableState.length)throw new st;if(et._transformState.transforming)throw new ot;return et.push(null)}nt(1765)(c,lt),c.prototype.push=function(et,tt){return this._transformState.needTransform=!1,lt.prototype.push.call(this,et,tt)},c.prototype._transform=function(et,tt,nt){nt(new it("_transform()"))},c.prototype._write=function(et,tt,nt){var rt=this._transformState;if(rt.writecb=nt,rt.writechunk=et,rt.writeencoding=tt,!rt.transforming){var it=this._readableState;(rt.needTransform||it.needReadable||it.length<it.highWaterMark)&&this._read(it.highWaterMark)}},c.prototype._read=function(et){var tt=this._transformState;null===tt.writechunk||tt.transforming?tt.needTransform=!0:(tt.transforming=!0,this._transform(tt.writechunk,tt.writeencoding,tt.afterTransform))},c.prototype._destroy=function(et,tt){lt.prototype._destroy.call(this,et,(function(et){tt(et)}))}},8318:(et,nt,rt)=>{"use strict";function r(et){var tt=this;this.next=null,this.entry=null,this.finish=function(){!function(et,tt,nt){var rt=et.entry;for(et.entry=null;rt;){var it=rt.callback;tt.pendingcb--,it(void 0),rt=rt.next}tt.corkedRequestsFree.next=et}(tt,et)}}var it;et.exports=A,A.WritableState=b;var at,ot={deprecate:rt(7839)},st=rt(9299),lt=rt(1549).Buffer,ft=rt.g.Uint8Array||function(){},dt=rt(6163),pt=rt(7269).getHighWaterMark,yt=rt(3690).q,vt=yt.ERR_INVALID_ARG_TYPE,At=yt.ERR_METHOD_NOT_IMPLEMENTED,Rt=yt.ERR_MULTIPLE_CALLBACK,Nt=yt.ERR_STREAM_CANNOT_PIPE,Dt=yt.ERR_STREAM_DESTROYED,Ot=yt.ERR_STREAM_NULL_VALUES,Mt=yt.ERR_STREAM_WRITE_AFTER_END,Lt=yt.ERR_UNKNOWN_ENCODING,xt=dt.errorOrDestroy;function S(){}function b(et,nt,at){it=it||rt(6138),et=et||{},"boolean"!=typeof at&&(at=nt instanceof it),this.objectMode=!!et.objectMode,at&&(this.objectMode=this.objectMode||!!et.writableObjectMode),this.highWaterMark=pt(this,et,"writableHighWaterMark",at),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ot=!1===et.decodeStrings;this.decodeStrings=!ot,this.defaultEncoding=et.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(et){!function(et,nt){var rt=et._writableState,it=rt.sync,at=rt.writecb;if("function"!=typeof at)throw new Rt;if(function(et){et.writing=!1,et.writecb=null,et.length-=et.writelen,et.writelen=0}(rt),nt)!function(et,nt,rt,it,at){--nt.pendingcb,rt?(tt.nextTick(at,it),tt.nextTick(D,et,nt),et._writableState.errorEmitted=!0,xt(et,it)):(at(it),et._writableState.errorEmitted=!0,xt(et,it),D(et,nt))}(et,rt,it,nt,at);else{var ot=N(rt)||et.destroyed;ot||rt.corked||rt.bufferProcessing||!rt.bufferedRequest||w(et,rt),it?tt.nextTick(R,et,rt,ot,at):R(et,rt,ot,at)}}(nt,et)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==et.emitClose,this.autoDestroy=!!et.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function A(et){var tt=this instanceof(it=it||rt(6138));if(!tt&&!at.call(A,this))return new A(et);this._writableState=new b(et,this,tt),this.writable=!0,et&&("function"==typeof et.write&&(this._write=et.write),"function"==typeof et.writev&&(this._writev=et.writev),"function"==typeof et.destroy&&(this._destroy=et.destroy),"function"==typeof et.final&&(this._final=et.final)),st.call(this)}function I(et,tt,nt,rt,it,at,ot){tt.writelen=rt,tt.writecb=ot,tt.writing=!0,tt.sync=!0,tt.destroyed?tt.onwrite(new Dt("write")):nt?et._writev(it,tt.onwrite):et._write(it,at,tt.onwrite),tt.sync=!1}function R(et,tt,nt,rt){nt||function(et,tt){0===tt.length&&tt.needDrain&&(tt.needDrain=!1,et.emit("drain"))}(et,tt),tt.pendingcb--,rt(),D(et,tt)}function w(et,tt){tt.bufferProcessing=!0;var nt=tt.bufferedRequest;if(et._writev&&nt&&nt.next){var rt=tt.bufferedRequestCount,it=new Array(rt),at=tt.corkedRequestsFree;at.entry=nt;for(var ot=0,st=!0;nt;)it[ot]=nt,nt.isBuf||(st=!1),nt=nt.next,ot+=1;it.allBuffers=st,I(et,tt,!0,tt.length,it,"",at.finish),tt.pendingcb++,tt.lastBufferedRequest=null,at.next?(tt.corkedRequestsFree=at.next,at.next=null):tt.corkedRequestsFree=new r(tt),tt.bufferedRequestCount=0}else{for(;nt;){var lt=nt.chunk,ft=nt.encoding,dt=nt.callback;if(I(et,tt,!1,tt.objectMode?1:lt.length,lt,ft,dt),nt=nt.next,tt.bufferedRequestCount--,tt.writing)break}null===nt&&(tt.lastBufferedRequest=null)}tt.bufferedRequest=nt,tt.bufferProcessing=!1}function N(et){return et.ending&&0===et.length&&null===et.bufferedRequest&&!et.finished&&!et.writing}function C(et,tt){et._final((function(nt){tt.pendingcb--,nt&&xt(et,nt),tt.prefinished=!0,et.emit("prefinish"),D(et,tt)}))}function D(et,nt){var rt=N(nt);if(rt&&(function(et,nt){nt.prefinished||nt.finalCalled||("function"!=typeof et._final||nt.destroyed?(nt.prefinished=!0,et.emit("prefinish")):(nt.pendingcb++,nt.finalCalled=!0,tt.nextTick(C,et,nt)))}(et,nt),0===nt.pendingcb&&(nt.finished=!0,et.emit("finish"),nt.autoDestroy))){var it=et._readableState;(!it||it.autoDestroy&&it.endEmitted)&&et.destroy()}return rt}rt(1765)(A,st),b.prototype.getBuffer=function(){for(var et=this.bufferedRequest,tt=[];et;)tt.push(et),et=et.next;return tt},function(){try{Object.defineProperty(b.prototype,"buffer",{get:ot.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(et){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(at=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(et){return!!at.call(this,et)||this===A&&et&&et._writableState instanceof b}})):at=function(et){return et instanceof this},A.prototype.pipe=function(){xt(this,new Nt)},A.prototype.write=function(et,nt,rt){var it,at=this._writableState,ot=!1,st=!at.objectMode&&(it=et,lt.isBuffer(it)||it instanceof ft);return st&&!lt.isBuffer(et)&&(et=function(et){return lt.from(et)}(et)),"function"==typeof nt&&(rt=nt,nt=null),st?nt="buffer":nt||(nt=at.defaultEncoding),"function"!=typeof rt&&(rt=S),at.ending?function(et,nt){var rt=new Mt;xt(et,rt),tt.nextTick(nt,rt)}(this,rt):(st||function(et,nt,rt,it){var at;return null===rt?at=new Ot:"string"==typeof rt||nt.objectMode||(at=new vt("chunk",["string","Buffer"],rt)),!at||(xt(et,at),tt.nextTick(it,at),!1)}(this,at,et,rt))&&(at.pendingcb++,ot=function(et,tt,nt,rt,it,at){if(!nt){var ot=function(et,tt,nt){return et.objectMode||!1===et.decodeStrings||"string"!=typeof tt||(tt=lt.from(tt,nt)),tt}(tt,rt,it);rt!==ot&&(nt=!0,it="buffer",rt=ot)}var st=tt.objectMode?1:rt.length;tt.length+=st;var ft=tt.length<tt.highWaterMark;if(ft||(tt.needDrain=!0),tt.writing||tt.corked){var dt=tt.lastBufferedRequest;tt.lastBufferedRequest={chunk:rt,encoding:it,isBuf:nt,callback:at,next:null},dt?dt.next=tt.lastBufferedRequest:tt.bufferedRequest=tt.lastBufferedRequest,tt.bufferedRequestCount+=1}else I(et,tt,!1,st,rt,it,at);return ft}(this,at,st,et,nt,rt)),ot},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var et=this._writableState;et.corked&&(et.corked--,et.writing||et.corked||et.bufferProcessing||!et.bufferedRequest||w(this,et))},A.prototype.setDefaultEncoding=function(et){if("string"==typeof et&&(et=et.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((et+"").toLowerCase())>-1))throw new Lt(et);return this._writableState.defaultEncoding=et,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(et,tt,nt){nt(new At("_write()"))},A.prototype._writev=null,A.prototype.end=function(et,nt,rt){var it=this._writableState;return"function"==typeof et?(rt=et,et=null,nt=null):"function"==typeof nt&&(rt=nt,nt=null),null!=et&&this.write(et,nt),it.corked&&(it.corked=1,this.uncork()),it.ending||function(et,nt,rt){nt.ending=!0,D(et,nt),rt&&(nt.finished?tt.nextTick(rt):et.once("finish",rt)),nt.ended=!0,et.writable=!1}(this,it,rt),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(et){this._writableState&&(this._writableState.destroyed=et)}}),A.prototype.destroy=dt.destroy,A.prototype._undestroy=dt.undestroy,A.prototype._destroy=function(et,tt){tt(et)}},7299:(et,nt,rt)=>{"use strict";var it;function i(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}var at=rt(8800),ot=Symbol("lastResolve"),st=Symbol("lastReject"),lt=Symbol("error"),ft=Symbol("ended"),dt=Symbol("lastPromise"),pt=Symbol("handlePromise"),yt=Symbol("stream");function g(et,tt){return{value:et,done:tt}}function h(et){var tt=et[ot];if(null!==tt){var nt=et[yt].read();null!==nt&&(et[dt]=null,et[ot]=null,et[st]=null,tt(g(nt,!1)))}}function p(et){tt.nextTick(h,et)}var vt=Object.getPrototypeOf((function(){})),At=Object.setPrototypeOf((i(it={get stream(){return this[yt]},next:function(){var et=this,nt=this[lt];if(null!==nt)return Promise.reject(nt);if(this[ft])return Promise.resolve(g(void 0,!0));if(this[yt].destroyed)return new Promise((function(nt,rt){tt.nextTick((function(){et[lt]?rt(et[lt]):nt(g(void 0,!0))}))}));var rt,it=this[dt];if(it)rt=new Promise(function(et,tt){return function(nt,rt){et.then((function(){tt[ft]?nt(g(void 0,!0)):tt[pt](nt,rt)}),rt)}}(it,this));else{var at=this[yt].read();if(null!==at)return Promise.resolve(g(at,!1));rt=new Promise(this[pt])}return this[dt]=rt,rt}},Symbol.asyncIterator,(function(){return this})),i(it,"return",(function(){var et=this;return new Promise((function(tt,nt){et[yt].destroy(null,(function(et){et?nt(et):tt(g(void 0,!0))}))}))})),it),vt);et.exports=function(et){var tt,nt=Object.create(At,(i(tt={},yt,{value:et,writable:!0}),i(tt,ot,{value:null,writable:!0}),i(tt,st,{value:null,writable:!0}),i(tt,lt,{value:null,writable:!0}),i(tt,ft,{value:et._readableState.endEmitted,writable:!0}),i(tt,pt,{value:function(et,tt){var rt=nt[yt].read();rt?(nt[dt]=null,nt[ot]=null,nt[st]=null,et(g(rt,!1))):(nt[ot]=et,nt[st]=tt)},writable:!0}),tt));return nt[dt]=null,at(et,(function(et){if(et&&"ERR_STREAM_PREMATURE_CLOSE"!==et.code){var tt=nt[st];return null!==tt&&(nt[dt]=null,nt[ot]=null,nt[st]=null,tt(et)),void(nt[lt]=et)}var rt=nt[ot];null!==rt&&(nt[dt]=null,nt[ot]=null,nt[st]=null,rt(g(void 0,!0))),nt[ft]=!0})),et.on("readable",p.bind(null,nt)),nt}},8393:(et,tt,nt)=>{"use strict";function r(et,tt){var nt=Object.keys(et);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(et);tt&&(rt=rt.filter((function(tt){return Object.getOwnPropertyDescriptor(et,tt).enumerable}))),nt.push.apply(nt,rt)}return nt}function i(et,tt,nt){return tt in et?Object.defineProperty(et,tt,{value:nt,enumerable:!0,configurable:!0,writable:!0}):et[tt]=nt,et}var rt=nt(1549).Buffer,it=nt(9862).inspect,at=it&&it.custom||"inspect";et.exports=function(){function e(){!function(et,tt){if(!(et instanceof tt))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var et;return(et=[{key:"push",value:function(et){var tt={data:et,next:null};this.length>0?this.tail.next=tt:this.head=tt,this.tail=tt,++this.length}},{key:"unshift",value:function(et){var tt={data:et,next:this.head};0===this.length&&(this.tail=tt),this.head=tt,++this.length}},{key:"shift",value:function(){if(0!==this.length){var et=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,et}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(et){if(0===this.length)return"";for(var tt=this.head,nt=""+tt.data;tt=tt.next;)nt+=et+tt.data;return nt}},{key:"concat",value:function(et){if(0===this.length)return rt.alloc(0);for(var tt,nt,it,at=rt.allocUnsafe(et>>>0),ot=this.head,st=0;ot;)tt=ot.data,nt=at,it=st,rt.prototype.copy.call(tt,nt,it),st+=ot.data.length,ot=ot.next;return at}},{key:"consume",value:function(et,tt){var nt;return et<this.head.data.length?(nt=this.head.data.slice(0,et),this.head.data=this.head.data.slice(et)):nt=et===this.head.data.length?this.shift():tt?this._getString(et):this._getBuffer(et),nt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(et){var tt=this.head,nt=1,rt=tt.data;for(et-=rt.length;tt=tt.next;){var it=tt.data,at=et>it.length?it.length:et;if(at===it.length?rt+=it:rt+=it.slice(0,et),0==(et-=at)){at===it.length?(++nt,tt.next?this.head=tt.next:this.head=this.tail=null):(this.head=tt,tt.data=it.slice(at));break}++nt}return this.length-=nt,rt}},{key:"_getBuffer",value:function(et){var tt=rt.allocUnsafe(et),nt=this.head,it=1;for(nt.data.copy(tt),et-=nt.data.length;nt=nt.next;){var at=nt.data,ot=et>at.length?at.length:et;if(at.copy(tt,tt.length-et,0,ot),0==(et-=ot)){ot===at.length?(++it,nt.next?this.head=nt.next:this.head=this.tail=null):(this.head=nt,nt.data=at.slice(ot));break}++it}return this.length-=it,tt}},{key:at,value:function(et,tt){return it(this,function(et){for(var tt=1;tt<arguments.length;tt++){var nt=null!=arguments[tt]?arguments[tt]:{};tt%2?r(Object(nt),!0).forEach((function(tt){i(et,tt,nt[tt])})):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(nt)):r(Object(nt)).forEach((function(tt){Object.defineProperty(et,tt,Object.getOwnPropertyDescriptor(nt,tt))}))}return et}({},tt,{depth:0,customInspect:!1}))}}])&&function a(et,tt){for(var nt=0;nt<tt.length;nt++){var rt=tt[nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,rt.key,rt)}}(e.prototype,et),e}()},6163:et=>{"use strict";function t(et,tt){r(et,tt),n(et)}function n(et){et._writableState&&!et._writableState.emitClose||et._readableState&&!et._readableState.emitClose||et.emit("close")}function r(et,tt){et.emit("error",tt)}et.exports={destroy:function(et,nt){var rt=this,it=this._readableState&&this._readableState.destroyed,at=this._writableState&&this._writableState.destroyed;return it||at?(nt?nt(et):et&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,tt.nextTick(r,this,et)):tt.nextTick(r,this,et)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(et||null,(function(et){!nt&&et?rt._writableState?rt._writableState.errorEmitted?tt.nextTick(n,rt):(rt._writableState.errorEmitted=!0,tt.nextTick(t,rt,et)):tt.nextTick(t,rt,et):nt?(tt.nextTick(n,rt),nt(et)):tt.nextTick(n,rt)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(et,tt){var nt=et._readableState,rt=et._writableState;nt&&nt.autoDestroy||rt&&rt.autoDestroy?et.destroy(tt):et.emit("error",tt)}}},8800:(et,tt,nt)=>{"use strict";var rt=nt(3690).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}et.exports=function e(et,tt,nt){if("function"==typeof tt)return e(et,null,tt);tt||(tt={}),nt=function(et){var tt=!1;return function(){if(!tt){tt=!0;for(var nt=arguments.length,rt=new Array(nt),it=0;it<nt;it++)rt[it]=arguments[it];et.apply(this,rt)}}}(nt||i);var it=tt.readable||!1!==tt.readable&&et.readable,at=tt.writable||!1!==tt.writable&&et.writable,u=function(){et.writable||c()},ot=et._writableState&&et._writableState.finished,c=function(){at=!1,ot=!0,it||nt.call(et)},st=et._readableState&&et._readableState.endEmitted,d=function(){it=!1,st=!0,at||nt.call(et)},g=function(tt){nt.call(et,tt)},h=function(){var tt;return it&&!st?(et._readableState&&et._readableState.ended||(tt=new rt),nt.call(et,tt)):at&&!ot?(et._writableState&&et._writableState.ended||(tt=new rt),nt.call(et,tt)):void 0},p=function(){et.req.on("finish",c)};return function(et){return et.setHeader&&"function"==typeof et.abort}(et)?(et.on("complete",c),et.on("abort",h),et.req?p():et.on("request",p)):at&&!et._writableState&&(et.on("end",u),et.on("close",u)),et.on("end",d),et.on("finish",c),!1!==tt.error&&et.on("error",g),et.on("close",h),function(){et.removeListener("complete",c),et.removeListener("abort",h),et.removeListener("request",p),et.req&&et.req.removeListener("finish",c),et.removeListener("end",u),et.removeListener("close",u),et.removeListener("finish",c),et.removeListener("end",d),et.removeListener("error",g),et.removeListener("close",h)}}},6233:et=>{et.exports=function(){throw new Error("Readable.from is not available in the browser")}},7295:(et,tt,nt)=>{"use strict";var rt,it=nt(3690).q,at=it.ERR_MISSING_ARGS,ot=it.ERR_STREAM_DESTROYED;function s(et){if(et)throw et}function u(et,tt,it,at){at=function(et){var tt=!1;return function(){tt||(tt=!0,et.apply(void 0,arguments))}}(at);var st=!1;et.on("close",(function(){st=!0})),void 0===rt&&(rt=nt(8800)),rt(et,{readable:tt,writable:it},(function(et){if(et)return at(et);st=!0,at()}));var lt=!1;return function(tt){if(!st&&!lt)return lt=!0,function(et){return et.setHeader&&"function"==typeof et.abort}(et)?et.abort():"function"==typeof et.destroy?et.destroy():void at(tt||new ot("pipe"))}}function l(et){et()}function c(et,tt){return et.pipe(tt)}function f(et){return et.length?"function"!=typeof et[et.length-1]?s:et.pop():s}et.exports=function(){for(var et=arguments.length,tt=new Array(et),nt=0;nt<et;nt++)tt[nt]=arguments[nt];var rt,it=f(tt);if(Array.isArray(tt[0])&&(tt=tt[0]),tt.length<2)throw new at("streams");var ot=tt.map((function(et,nt){var at=nt<tt.length-1;return u(et,at,nt>0,(function(et){rt||(rt=et),et&&ot.forEach(l),at||(ot.forEach(l),it(rt))}))}));return tt.reduce(c)}},7269:(et,tt,nt)=>{"use strict";var rt=nt(3690).q.ERR_INVALID_OPT_VALUE;et.exports={getHighWaterMark:function(et,tt,nt,it){var at=function(et,tt,nt){return null!=et.highWaterMark?et.highWaterMark:tt?et[nt]:null}(tt,it,nt);if(null!=at){if(!isFinite(at)||Math.floor(at)!==at||at<0)throw new rt(it?nt:"highWaterMark",at);return Math.floor(at)}return et.objectMode?16:16384}}},9299:(et,tt,nt)=>{et.exports=nt(1159).EventEmitter},7503:(et,tt,nt)=>{"use strict";var rt=nt(8387).Buffer,it=rt.isEncoding||function(et){switch((et=""+et)&&et.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(et){var tt;switch(this.encoding=function(et){var tt=function(et){if(!et)return"utf8";for(var tt;;)switch(et){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return et;default:if(tt)return;et=(""+et).toLowerCase(),tt=!0}}(et);if("string"!=typeof tt&&(rt.isEncoding===it||!it(et)))throw new Error("Unknown encoding: "+et);return tt||et}(et),this.encoding){case"utf16le":this.text=u,this.end=l,tt=4;break;case"utf8":this.fillLast=s,tt=4;break;case"base64":this.text=c,this.end=f,tt=3;break;default:return this.write=d,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=rt.allocUnsafe(tt)}function o(et){return et<=127?0:et>>5==6?2:et>>4==14?3:et>>3==30?4:et>>6==2?-1:-2}function s(et){var tt=this.lastTotal-this.lastNeed,nt=function(et,tt,nt){if(128!=(192&tt[0]))return et.lastNeed=0,"�";if(et.lastNeed>1&&tt.length>1){if(128!=(192&tt[1]))return et.lastNeed=1,"�";if(et.lastNeed>2&&tt.length>2&&128!=(192&tt[2]))return et.lastNeed=2,"�"}}(this,et);return void 0!==nt?nt:this.lastNeed<=et.length?(et.copy(this.lastChar,tt,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(et.copy(this.lastChar,tt,0,et.length),void(this.lastNeed-=et.length))}function u(et,tt){if((et.length-tt)%2==0){var nt=et.toString("utf16le",tt);if(nt){var rt=nt.charCodeAt(nt.length-1);if(rt>=55296&&rt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=et[et.length-2],this.lastChar[1]=et[et.length-1],nt.slice(0,-1)}return nt}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=et[et.length-1],et.toString("utf16le",tt,et.length-1)}function l(et){var tt=et&&et.length?this.write(et):"";if(this.lastNeed){var nt=this.lastTotal-this.lastNeed;return tt+this.lastChar.toString("utf16le",0,nt)}return tt}function c(et,tt){var nt=(et.length-tt)%3;return 0===nt?et.toString("base64",tt):(this.lastNeed=3-nt,this.lastTotal=3,1===nt?this.lastChar[0]=et[et.length-1]:(this.lastChar[0]=et[et.length-2],this.lastChar[1]=et[et.length-1]),et.toString("base64",tt,et.length-nt))}function f(et){var tt=et&&et.length?this.write(et):"";return this.lastNeed?tt+this.lastChar.toString("base64",0,3-this.lastNeed):tt}function d(et){return et.toString(this.encoding)}function g(et){return et&&et.length?this.write(et):""}tt.s=a,a.prototype.write=function(et){if(0===et.length)return"";var tt,nt;if(this.lastNeed){if(void 0===(tt=this.fillLast(et)))return"";nt=this.lastNeed,this.lastNeed=0}else nt=0;return nt<et.length?tt?tt+this.text(et,nt):this.text(et,nt):tt||""},a.prototype.end=function(et){var tt=et&&et.length?this.write(et):"";return this.lastNeed?tt+"�":tt},a.prototype.text=function(et,tt){var nt=function(et,tt,nt){var rt=tt.length-1;if(rt<nt)return 0;var it=o(tt[rt]);return it>=0?(it>0&&(et.lastNeed=it-1),it):--rt<nt||-2===it?0:(it=o(tt[rt]))>=0?(it>0&&(et.lastNeed=it-2),it):--rt<nt||-2===it?0:(it=o(tt[rt]))>=0?(it>0&&(2===it?it=0:et.lastNeed=it-3),it):0}(this,et,tt);if(!this.lastNeed)return et.toString("utf8",tt);this.lastTotal=nt;var rt=et.length-(nt-this.lastNeed);return et.copy(this.lastChar,0,rt),et.toString("utf8",tt,rt)},a.prototype.fillLast=function(et){if(this.lastNeed<=et.length)return et.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);et.copy(this.lastChar,this.lastTotal-this.lastNeed,0,et.length),this.lastNeed-=et.length}},1067:function(et,tt,nt){var rt;!function(it,at){"use strict";var ot="function",st="undefined",lt="object",ft="string",dt="model",pt="name",yt="type",vt="vendor",At="version",Rt="architecture",Nt="console",Dt="mobile",Ot="tablet",Mt="smarttv",Lt="wearable",xt="embedded",kt="Amazon",Ut="Apple",Bt="ASUS",Gt="BlackBerry",qt="Browser",jt="Chrome",Vt="Firefox",zt="Google",Xt="Huawei",Qt="LG",$t="Microsoft",tn="Motorola",nn="Opera",on="Samsung",un="Sony",cn="Xiaomi",fn="Zebra",dn="Facebook",B=function(et){for(var tt={},nt=0;nt<et.length;nt++)tt[et[nt].toUpperCase()]=et[nt];return tt},G=function(et,tt){return typeof et===ft&&-1!==q(tt).indexOf(q(et))},q=function(et){return et.toLowerCase()},Y=function(et,tt){if(typeof et===ft)return et=et.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof tt===st?et:et.substring(0,255)},j=function(et,tt){for(var nt,rt,it,st,ft,dt,pt=0;pt<tt.length&&!ft;){var yt=tt[pt],vt=tt[pt+1];for(nt=rt=0;nt<yt.length&&!ft;)if(ft=yt[nt++].exec(et))for(it=0;it<vt.length;it++)dt=ft[++rt],typeof(st=vt[it])===lt&&st.length>0?2===st.length?typeof st[1]==ot?this[st[0]]=st[1].call(this,dt):this[st[0]]=st[1]:3===st.length?typeof st[1]!==ot||st[1].exec&&st[1].test?this[st[0]]=dt?dt.replace(st[1],st[2]):at:this[st[0]]=dt?st[1].call(this,dt,st[2]):at:4===st.length&&(this[st[0]]=dt?st[3].call(this,dt.replace(st[1],st[2])):at):this[st]=dt||at;pt+=2}},H=function(et,tt){for(var nt in tt)if(typeof tt[nt]===lt&&tt[nt].length>0){for(var rt=0;rt<tt[nt].length;rt++)if(G(tt[nt][rt],et))return"?"===nt?at:nt}else if(G(tt[nt],et))return"?"===nt?at:nt;return et},gn={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},pn={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[At,[pt,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[At,[pt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[pt,At],[/opios[\/ ]+([\w\.]+)/i],[At,[pt,nn+" Mini"]],[/\bopr\/([\w\.]+)/i],[At,[pt,nn]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[pt,At],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[At,[pt,"UC"+qt]],[/\bqbcore\/([\w\.]+)/i],[At,[pt,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[At,[pt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[At,[pt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[At,[pt,"IE"]],[/yabrowser\/([\w\.]+)/i],[At,[pt,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[pt,/(.+)/,"$1 Secure "+qt],At],[/\bfocus\/([\w\.]+)/i],[At,[pt,Vt+" Focus"]],[/\bopt\/([\w\.]+)/i],[At,[pt,nn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[At,[pt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[At,[pt,"Dolphin"]],[/coast\/([\w\.]+)/i],[At,[pt,nn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[At,[pt,"MIUI "+qt]],[/fxios\/([-\w\.]+)/i],[At,[pt,Vt]],[/\bqihu|(qi?ho?o?|360)browser/i],[[pt,"360 "+qt]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[pt,/(.+)/,"$1 "+qt],At],[/(comodo_dragon)\/([\w\.]+)/i],[[pt,/_/g," "],At],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[pt,At],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[pt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[pt,dn],At],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[pt,At],[/\bgsa\/([\w\.]+) .*safari\//i],[At,[pt,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[At,[pt,jt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[pt,jt+" WebView"],At],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[At,[pt,"Android "+qt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[pt,At],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[At,[pt,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[At,pt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[pt,[At,H,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[pt,At],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[pt,"Netscape"],At],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[At,[pt,Vt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[pt,At]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[Rt,"amd64"]],[/(ia32(?=;))/i],[[Rt,q]],[/((?:i[346]|x)86)[;\)]/i],[[Rt,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[Rt,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[Rt,"armhf"]],[/windows (ce|mobile); ppc;/i],[[Rt,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[Rt,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[Rt,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[Rt,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[dt,[vt,on],[yt,Ot]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[dt,[vt,on],[yt,Dt]],[/\((ip(?:hone|od)[\w ]*);/i],[dt,[vt,Ut],[yt,Dt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[dt,[vt,Ut],[yt,Ot]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[dt,[vt,Xt],[yt,Ot]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[dt,[vt,Xt],[yt,Dt]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[dt,/_/g," "],[vt,cn],[yt,Dt]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[dt,/_/g," "],[vt,cn],[yt,Ot]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[dt,[vt,"OPPO"],[yt,Dt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[dt,[vt,"Vivo"],[yt,Dt]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[dt,[vt,"Realme"],[yt,Dt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[dt,[vt,tn],[yt,Dt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[dt,[vt,tn],[yt,Ot]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[dt,[vt,Qt],[yt,Ot]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[dt,[vt,Qt],[yt,Dt]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[dt,[vt,"Lenovo"],[yt,Ot]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[dt,/_/g," "],[vt,"Nokia"],[yt,Dt]],[/(pixel c)\b/i],[dt,[vt,zt],[yt,Ot]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[dt,[vt,zt],[yt,Dt]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[dt,[vt,un],[yt,Dt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[dt,"Xperia Tablet"],[vt,un],[yt,Ot]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[dt,[vt,"OnePlus"],[yt,Dt]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[dt,[vt,kt],[yt,Ot]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[dt,/(.+)/g,"Fire Phone $1"],[vt,kt],[yt,Dt]],[/(playbook);[-\w\),; ]+(rim)/i],[dt,vt,[yt,Ot]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[dt,[vt,Gt],[yt,Dt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[dt,[vt,Bt],[yt,Ot]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[dt,[vt,Bt],[yt,Dt]],[/(nexus 9)/i],[dt,[vt,"HTC"],[yt,Ot]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[vt,[dt,/_/g," "],[yt,Dt]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[dt,[vt,"Acer"],[yt,Ot]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[dt,[vt,"Meizu"],[yt,Dt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[dt,[vt,"Sharp"],[yt,Dt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[vt,dt,[yt,Dt]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[vt,dt,[yt,Ot]],[/(surface duo)/i],[dt,[vt,$t],[yt,Ot]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[dt,[vt,"Fairphone"],[yt,Dt]],[/(u304aa)/i],[dt,[vt,"AT&T"],[yt,Dt]],[/\bsie-(\w*)/i],[dt,[vt,"Siemens"],[yt,Dt]],[/\b(rct\w+) b/i],[dt,[vt,"RCA"],[yt,Ot]],[/\b(venue[\d ]{2,7}) b/i],[dt,[vt,"Dell"],[yt,Ot]],[/\b(q(?:mv|ta)\w+) b/i],[dt,[vt,"Verizon"],[yt,Ot]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[dt,[vt,"Barnes & Noble"],[yt,Ot]],[/\b(tm\d{3}\w+) b/i],[dt,[vt,"NuVision"],[yt,Ot]],[/\b(k88) b/i],[dt,[vt,"ZTE"],[yt,Ot]],[/\b(nx\d{3}j) b/i],[dt,[vt,"ZTE"],[yt,Dt]],[/\b(gen\d{3}) b.+49h/i],[dt,[vt,"Swiss"],[yt,Dt]],[/\b(zur\d{3}) b/i],[dt,[vt,"Swiss"],[yt,Ot]],[/\b((zeki)?tb.*\b) b/i],[dt,[vt,"Zeki"],[yt,Ot]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[vt,"Dragon Touch"],dt,[yt,Ot]],[/\b(ns-?\w{0,9}) b/i],[dt,[vt,"Insignia"],[yt,Ot]],[/\b((nxa|next)-?\w{0,9}) b/i],[dt,[vt,"NextBook"],[yt,Ot]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[vt,"Voice"],dt,[yt,Dt]],[/\b(lvtel\-)?(v1[12]) b/i],[[vt,"LvTel"],dt,[yt,Dt]],[/\b(ph-1) /i],[dt,[vt,"Essential"],[yt,Dt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[dt,[vt,"Envizen"],[yt,Ot]],[/\b(trio[-\w\. ]+) b/i],[dt,[vt,"MachSpeed"],[yt,Ot]],[/\btu_(1491) b/i],[dt,[vt,"Rotor"],[yt,Ot]],[/(shield[\w ]+) b/i],[dt,[vt,"Nvidia"],[yt,Ot]],[/(sprint) (\w+)/i],[vt,dt,[yt,Dt]],[/(kin\.[onetw]{3})/i],[[dt,/\./g," "],[vt,$t],[yt,Dt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[dt,[vt,fn],[yt,Ot]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[dt,[vt,fn],[yt,Dt]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[vt,dt,[yt,Nt]],[/droid.+; (shield) bui/i],[dt,[vt,"Nvidia"],[yt,Nt]],[/(playstation [345portablevi]+)/i],[dt,[vt,un],[yt,Nt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[dt,[vt,$t],[yt,Nt]],[/smart-tv.+(samsung)/i],[vt,[yt,Mt]],[/hbbtv.+maple;(\d+)/i],[[dt,/^/,"SmartTV"],[vt,on],[yt,Mt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[vt,Qt],[yt,Mt]],[/(apple) ?tv/i],[vt,[dt,Ut+" TV"],[yt,Mt]],[/crkey/i],[[dt,jt+"cast"],[vt,zt],[yt,Mt]],[/droid.+aft(\w)( bui|\))/i],[dt,[vt,kt],[yt,Mt]],[/\(dtv[\);].+(aquos)/i],[dt,[vt,"Sharp"],[yt,Mt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[vt,Y],[dt,Y],[yt,Mt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[yt,Mt]],[/((pebble))app/i],[vt,dt,[yt,Lt]],[/droid.+; (glass) \d/i],[dt,[vt,zt],[yt,Lt]],[/droid.+; (wt63?0{2,3})\)/i],[dt,[vt,fn],[yt,Lt]],[/(quest( 2)?)/i],[dt,[vt,dn],[yt,Lt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[vt,[yt,xt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[dt,[yt,Dt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[dt,[yt,Ot]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[yt,Ot]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[yt,Dt]],[/(android[-\w\. ]{0,9});.+buil/i],[dt,[vt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[At,[pt,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[At,[pt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[pt,At],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[At,pt]],os:[[/microsoft (windows) (vista|xp)/i],[pt,At],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[pt,[At,H,gn]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[pt,"Windows"],[At,H,gn]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[At,/_/g,"."],[pt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[pt,"Mac OS"],[At,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[At,pt],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[pt,At],[/\(bb(10);/i],[At,[pt,Gt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[At,[pt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[At,[pt,Vt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[At,[pt,"webOS"]],[/crkey\/([\d\.]+)/i],[At,[pt,jt+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[pt,"Chromium OS"],At],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[pt,At],[/(sunos) ?([\w\.\d]*)/i],[[pt,"Solaris"],At],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[pt,At]]},z=function(et,tt){if(typeof et===lt&&(tt=et,et=at),!(this instanceof z))return new z(et,tt).getResult();var nt=et||(typeof it!==st&&it.navigator&&it.navigator.userAgent?it.navigator.userAgent:""),rt=tt?function(et,tt){var nt={};for(var rt in et)tt[rt]&&tt[rt].length%2==0?nt[rt]=tt[rt].concat(et[rt]):nt[rt]=et[rt];return nt}(pn,tt):pn;return this.getBrowser=function(){var et,tt={};return tt[pt]=at,tt[At]=at,j.call(tt,nt,rt.browser),tt.major=typeof(et=tt.version)===ft?et.replace(/[^\d\.]/g,"").split(".")[0]:at,tt},this.getCPU=function(){var et={};return et[Rt]=at,j.call(et,nt,rt.cpu),et},this.getDevice=function(){var et={};return et[vt]=at,et[dt]=at,et[yt]=at,j.call(et,nt,rt.device),et},this.getEngine=function(){var et={};return et[pt]=at,et[At]=at,j.call(et,nt,rt.engine),et},this.getOS=function(){var et={};return et[pt]=at,et[At]=at,j.call(et,nt,rt.os),et},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return nt},this.setUA=function(et){return nt=typeof et===ft&&et.length>255?Y(et,255):et,this},this.setUA(nt),this};z.VERSION="1.0.2",z.BROWSER=B([pt,At,"major"]),z.CPU=B([Rt]),z.DEVICE=B([dt,vt,yt,Nt,Dt,Mt,Ot,Lt,xt]),z.ENGINE=z.OS=B([pt,At]),typeof tt!==st?(et.exports&&(tt=et.exports=z),tt.UAParser=z):nt.amdO?(rt=function(){return z}.call(tt,nt,tt,et))===at||(et.exports=rt):typeof it!==st&&(it.UAParser=z);var mn=typeof it!==st&&(it.jQuery||it.Zepto);if(mn&&!mn.ua){var yn=new z;mn.ua=yn.getResult(),mn.ua.get=function(){return yn.getUA()},mn.ua.set=function(et){yn.setUA(et);var tt=yn.getResult();for(var nt in tt)mn.ua[nt]=tt[nt]}}}("object"==typeof window?window:this)},7839:(et,tt,nt)=>{function r(et){try{if(!nt.g.localStorage)return!1}catch(et){return!1}var tt=nt.g.localStorage[et];return null!=tt&&"true"===String(tt).toLowerCase()}et.exports=function(et,tt){if(r("noDeprecation"))return et;var nt=!1;return function(){if(!nt){if(r("throwDeprecation"))throw new Error(tt);r("traceDeprecation")?console.trace(tt):console.warn(tt),nt=!0}return et.apply(this,arguments)}}},9862:()=>{},964:()=>{},3165:et=>{"use strict";et.exports=JSON.parse('["mni-beng-in","mni-mtei-in","sat-deva-in","sat-olck-in","shi-latn-ma","shi-tfng-ma","vai-latn-lr","vai-vaii-lr","yue-hans-cn","yue-hant-hk","az-arab-ir","az-cyrl-az","az-latn-az","bm-nkoo-ml","bs-cyrl-ba","bs-latn-ba","en-dsrt-us","ff-adlm-gn","ff-latn-sn","ha-arab-ng","hi-latn-in","iu-latn-ca","ks-arab-in","ks-deva-in","mn-mong-cn","ms-arab-my","pa-arab-pk","pa-guru-in","sd-arab-pk","sd-deva-in","sr-cyrl-rs","sr-latn-rs","su-latn-id","uz-arab-af","uz-cyrl-uz","uz-latn-uz","zh-hans-cn","zh-hant-tw","mni-beng","sat-olck","shi-tfng","vai-vaii","yue-hant","az-latn","bs-latn","ff-latn","jbo-001","ks-arab","pa-guru","prg-001","sd-arab","sr-cyrl","su-latn","uz-latn","zh-hans","agq-cm","ar-001","arn-cl","asa-tz","ast-es","bas-cm","bem-zm","bez-tz","bgn-pk","blt-vn","brx-in","bss-cm","byn-er","cad-us","cch-ng","ccp-bd","ceb-ph","cgg-ug","chr-us","cic-us","ckb-iq","dav-ke","dje-ne","doi-in","dsb-de","dua-cm","dyo-sn","ebu-ke","eo-001","ewo-cm","fil-ph","fur-it","gaa-gh","gez-et","gsw-ch","guz-ke","haw-us","hsb-de","ia-001","ife-tg","io-001","jgo-cm","jmc-tz","kab-dz","kaj-ng","kam-ke","kcg-ng","kde-tz","kea-cv","ken-cm","khq-ml","kkj-cm","kln-ke","kok-in","kpe-lr","ksb-tz","ksf-cm","ksh-de","lag-tz","lkt-us","lrc-ir","luo-ke","luy-ke","mai-in","mas-ke","mer-ke","mfe-mu","mgh-mz","mgo-cm","moh-ca","mua-cm","mus-us","myv-ru","mzn-ir","naq-na","nds-de","nmg-cm","nnh-cm","nqo-gn","nso-za","nus-ss","nyn-ug","osa-us","pcm-ng","quc-gt","rof-tz","rwk-tz","sah-ru","saq-ke","sbp-tz","scn-it","sdh-ir","seh-mz","ses-ml","sid-et","sma-se","smj-se","smn-fi","sms-fi","ssy-er","syr-iq","szl-pl","teo-ug","tig-er","trv-tw","trw-pk","twq-ne","tzm-ma","vo-001","vun-tz","wae-ch","wal-et","wbp-au","xog-ug","yav-cm","yi-001","zgh-ma","aa-et","af-za","ak-gh","am-et","an-es","as-in","ba-ru","be-by","bg-bg","bm-ml","bn-bd","bo-cn","br-fr","ca-es","ce-ru","co-fr","cs-cz","cu-ru","cv-ru","cy-gb","da-dk","de-de","dv-mv","dz-bt","ee-gh","el-gr","en-us","es-es","et-ee","eu-es","fa-ir","fi-fi","fo-fo","fr-fr","fy-nl","ga-ie","gd-gb","gl-es","gn-py","gu-in","gv-im","ha-ng","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","ig-ng","ii-cn","is-is","it-it","iu-ca","ja-jp","jv-id","ka-ge","ki-ke","kk-kz","kl-gl","km-kh","kn-in","ko-kr","ku-tr","kw-gb","ky-kg","lb-lu","lg-ug","ln-cd","lo-la","lt-lt","lu-cd","lv-lv","mg-mg","mi-nz","mk-mk","ml-in","mn-mn","mr-in","ms-my","mt-mt","my-mm","nb-no","nd-zw","ne-np","nl-nl","nn-no","nr-za","nv-us","ny-mw","oc-fr","om-et","or-in","os-ge","pl-pl","ps-af","pt-br","qu-pe","rm-ch","rn-bi","ro-ro","ru-ru","rw-rw","sa-in","sc-it","se-no","sg-cf","si-lk","sk-sk","sl-si","sn-zw","so-so","sq-al","ss-za","st-za","sv-se","sw-tz","ta-in","te-in","tg-tj","th-th","ti-et","tk-tm","tn-za","to-to","tr-tr","ts-za","tt-ru","ug-cn","uk-ua","ur-pk","ve-za","vi-vn","wa-be","wo-sn","xh-za","yo-ng","zu-za"]')},5813:et=>{"use strict";et.exports=JSON.parse('[{"from":{"field":"script","value":"qaai"},"to":{"field":"script","value":"zinh"}},{"from":{"field":"region","value":"bu"},"to":{"field":"region","value":"mm"}},{"from":{"field":"region","value":"ct"},"to":{"field":"region","value":"ki"}},{"from":{"field":"region","value":"dd"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"dy"},"to":{"field":"region","value":"bj"}},{"from":{"field":"region","value":"fx"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"hv"},"to":{"field":"region","value":"bf"}},{"from":{"field":"region","value":"jt"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"mi"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"nh"},"to":{"field":"region","value":"vu"}},{"from":{"field":"region","value":"nq"},"to":{"field":"region","value":"aq"}},{"from":{"field":"region","value":"pu"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"pz"},"to":{"field":"region","value":"pa"}},{"from":{"field":"region","value":"qu"},"to":{"field":"region","value":"eu"}},{"from":{"field":"region","value":"rh"},"to":{"field":"region","value":"zw"}},{"from":{"field":"region","value":"tp"},"to":{"field":"region","value":"tl"}},{"from":{"field":"region","value":"uk"},"to":{"field":"region","value":"gb"}},{"from":{"field":"region","value":"vd"},"to":{"field":"region","value":"vn"}},{"from":{"field":"region","value":"wk"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"yd"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"zr"},"to":{"field":"region","value":"cd"}},{"from":{"field":"region","value":"230"},"to":{"field":"region","value":"et"}},{"from":{"field":"region","value":"280"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"736"},"to":{"field":"region","value":"sd"}},{"from":{"field":"region","value":"886"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"958"},"to":{"field":"region","value":"aa"}},{"from":{"field":"region","value":"020"},"to":{"field":"region","value":"ad"}},{"from":{"field":"region","value":"784"},"to":{"field":"region","value":"ae"}},{"from":{"field":"region","value":"004"},"to":{"field":"region","value":"af"}},{"from":{"field":"region","value":"028"},"to":{"field":"region","value":"ag"}},{"from":{"field":"region","value":"660"},"to":{"field":"region","value":"ai"}},{"from":{"field":"region","value":"008"},"to":{"field":"region","value":"al"}},{"from":{"field":"region","value":"051"},"to":{"field":"region","value":"am"}},{"from":{"field":"region","value":"024"},"to":{"field":"region","value":"ao"}},{"from":{"field":"region","value":"010"},"to":{"field":"region","value":"aq"}},{"from":{"field":"region","value":"032"},"to":{"field":"region","value":"ar"}},{"from":{"field":"region","value":"016"},"to":{"field":"region","value":"as"}},{"from":{"field":"region","value":"040"},"to":{"field":"region","value":"at"}},{"from":{"field":"region","value":"036"},"to":{"field":"region","value":"au"}},{"from":{"field":"region","value":"533"},"to":{"field":"region","value":"aw"}},{"from":{"field":"region","value":"248"},"to":{"field":"region","value":"ax"}},{"from":{"field":"region","value":"031"},"to":{"field":"region","value":"az"}},{"from":{"field":"region","value":"070"},"to":{"field":"region","value":"ba"}},{"from":{"field":"region","value":"052"},"to":{"field":"region","value":"bb"}},{"from":{"field":"region","value":"050"},"to":{"field":"region","value":"bd"}},{"from":{"field":"region","value":"056"},"to":{"field":"region","value":"be"}},{"from":{"field":"region","value":"854"},"to":{"field":"region","value":"bf"}},{"from":{"field":"region","value":"100"},"to":{"field":"region","value":"bg"}},{"from":{"field":"region","value":"048"},"to":{"field":"region","value":"bh"}},{"from":{"field":"region","value":"108"},"to":{"field":"region","value":"bi"}},{"from":{"field":"region","value":"204"},"to":{"field":"region","value":"bj"}},{"from":{"field":"region","value":"652"},"to":{"field":"region","value":"bl"}},{"from":{"field":"region","value":"060"},"to":{"field":"region","value":"bm"}},{"from":{"field":"region","value":"096"},"to":{"field":"region","value":"bn"}},{"from":{"field":"region","value":"068"},"to":{"field":"region","value":"bo"}},{"from":{"field":"region","value":"535"},"to":{"field":"region","value":"bq"}},{"from":{"field":"region","value":"076"},"to":{"field":"region","value":"br"}},{"from":{"field":"region","value":"044"},"to":{"field":"region","value":"bs"}},{"from":{"field":"region","value":"064"},"to":{"field":"region","value":"bt"}},{"from":{"field":"region","value":"104"},"to":{"field":"region","value":"mm"}},{"from":{"field":"region","value":"074"},"to":{"field":"region","value":"bv"}},{"from":{"field":"region","value":"072"},"to":{"field":"region","value":"bw"}},{"from":{"field":"region","value":"112"},"to":{"field":"region","value":"by"}},{"from":{"field":"region","value":"084"},"to":{"field":"region","value":"bz"}},{"from":{"field":"region","value":"124"},"to":{"field":"region","value":"ca"}},{"from":{"field":"region","value":"166"},"to":{"field":"region","value":"cc"}},{"from":{"field":"region","value":"180"},"to":{"field":"region","value":"cd"}},{"from":{"field":"region","value":"140"},"to":{"field":"region","value":"cf"}},{"from":{"field":"region","value":"178"},"to":{"field":"region","value":"cg"}},{"from":{"field":"region","value":"756"},"to":{"field":"region","value":"ch"}},{"from":{"field":"region","value":"384"},"to":{"field":"region","value":"ci"}},{"from":{"field":"region","value":"184"},"to":{"field":"region","value":"ck"}},{"from":{"field":"region","value":"152"},"to":{"field":"region","value":"cl"}},{"from":{"field":"region","value":"120"},"to":{"field":"region","value":"cm"}},{"from":{"field":"region","value":"156"},"to":{"field":"region","value":"cn"}},{"from":{"field":"region","value":"170"},"to":{"field":"region","value":"co"}},{"from":{"field":"region","value":"188"},"to":{"field":"region","value":"cr"}},{"from":{"field":"region","value":"192"},"to":{"field":"region","value":"cu"}},{"from":{"field":"region","value":"132"},"to":{"field":"region","value":"cv"}},{"from":{"field":"region","value":"531"},"to":{"field":"region","value":"cw"}},{"from":{"field":"region","value":"162"},"to":{"field":"region","value":"cx"}},{"from":{"field":"region","value":"196"},"to":{"field":"region","value":"cy"}},{"from":{"field":"region","value":"203"},"to":{"field":"region","value":"cz"}},{"from":{"field":"region","value":"278"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"276"},"to":{"field":"region","value":"de"}},{"from":{"field":"region","value":"262"},"to":{"field":"region","value":"dj"}},{"from":{"field":"region","value":"208"},"to":{"field":"region","value":"dk"}},{"from":{"field":"region","value":"212"},"to":{"field":"region","value":"dm"}},{"from":{"field":"region","value":"214"},"to":{"field":"region","value":"do"}},{"from":{"field":"region","value":"012"},"to":{"field":"region","value":"dz"}},{"from":{"field":"region","value":"218"},"to":{"field":"region","value":"ec"}},{"from":{"field":"region","value":"233"},"to":{"field":"region","value":"ee"}},{"from":{"field":"region","value":"818"},"to":{"field":"region","value":"eg"}},{"from":{"field":"region","value":"732"},"to":{"field":"region","value":"eh"}},{"from":{"field":"region","value":"232"},"to":{"field":"region","value":"er"}},{"from":{"field":"region","value":"724"},"to":{"field":"region","value":"es"}},{"from":{"field":"region","value":"231"},"to":{"field":"region","value":"et"}},{"from":{"field":"region","value":"246"},"to":{"field":"region","value":"fi"}},{"from":{"field":"region","value":"242"},"to":{"field":"region","value":"fj"}},{"from":{"field":"region","value":"238"},"to":{"field":"region","value":"fk"}},{"from":{"field":"region","value":"583"},"to":{"field":"region","value":"fm"}},{"from":{"field":"region","value":"234"},"to":{"field":"region","value":"fo"}},{"from":{"field":"region","value":"250"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"249"},"to":{"field":"region","value":"fr"}},{"from":{"field":"region","value":"266"},"to":{"field":"region","value":"ga"}},{"from":{"field":"region","value":"826"},"to":{"field":"region","value":"gb"}},{"from":{"field":"region","value":"308"},"to":{"field":"region","value":"gd"}},{"from":{"field":"region","value":"268"},"to":{"field":"region","value":"ge"}},{"from":{"field":"region","value":"254"},"to":{"field":"region","value":"gf"}},{"from":{"field":"region","value":"831"},"to":{"field":"region","value":"gg"}},{"from":{"field":"region","value":"288"},"to":{"field":"region","value":"gh"}},{"from":{"field":"region","value":"292"},"to":{"field":"region","value":"gi"}},{"from":{"field":"region","value":"304"},"to":{"field":"region","value":"gl"}},{"from":{"field":"region","value":"270"},"to":{"field":"region","value":"gm"}},{"from":{"field":"region","value":"324"},"to":{"field":"region","value":"gn"}},{"from":{"field":"region","value":"312"},"to":{"field":"region","value":"gp"}},{"from":{"field":"region","value":"226"},"to":{"field":"region","value":"gq"}},{"from":{"field":"region","value":"300"},"to":{"field":"region","value":"gr"}},{"from":{"field":"region","value":"239"},"to":{"field":"region","value":"gs"}},{"from":{"field":"region","value":"320"},"to":{"field":"region","value":"gt"}},{"from":{"field":"region","value":"316"},"to":{"field":"region","value":"gu"}},{"from":{"field":"region","value":"624"},"to":{"field":"region","value":"gw"}},{"from":{"field":"region","value":"328"},"to":{"field":"region","value":"gy"}},{"from":{"field":"region","value":"344"},"to":{"field":"region","value":"hk"}},{"from":{"field":"region","value":"334"},"to":{"field":"region","value":"hm"}},{"from":{"field":"region","value":"340"},"to":{"field":"region","value":"hn"}},{"from":{"field":"region","value":"191"},"to":{"field":"region","value":"hr"}},{"from":{"field":"region","value":"332"},"to":{"field":"region","value":"ht"}},{"from":{"field":"region","value":"348"},"to":{"field":"region","value":"hu"}},{"from":{"field":"region","value":"360"},"to":{"field":"region","value":"id"}},{"from":{"field":"region","value":"372"},"to":{"field":"region","value":"ie"}},{"from":{"field":"region","value":"376"},"to":{"field":"region","value":"il"}},{"from":{"field":"region","value":"833"},"to":{"field":"region","value":"im"}},{"from":{"field":"region","value":"356"},"to":{"field":"region","value":"in"}},{"from":{"field":"region","value":"086"},"to":{"field":"region","value":"io"}},{"from":{"field":"region","value":"368"},"to":{"field":"region","value":"iq"}},{"from":{"field":"region","value":"364"},"to":{"field":"region","value":"ir"}},{"from":{"field":"region","value":"352"},"to":{"field":"region","value":"is"}},{"from":{"field":"region","value":"380"},"to":{"field":"region","value":"it"}},{"from":{"field":"region","value":"832"},"to":{"field":"region","value":"je"}},{"from":{"field":"region","value":"388"},"to":{"field":"region","value":"jm"}},{"from":{"field":"region","value":"400"},"to":{"field":"region","value":"jo"}},{"from":{"field":"region","value":"392"},"to":{"field":"region","value":"jp"}},{"from":{"field":"region","value":"404"},"to":{"field":"region","value":"ke"}},{"from":{"field":"region","value":"417"},"to":{"field":"region","value":"kg"}},{"from":{"field":"region","value":"116"},"to":{"field":"region","value":"kh"}},{"from":{"field":"region","value":"296"},"to":{"field":"region","value":"ki"}},{"from":{"field":"region","value":"174"},"to":{"field":"region","value":"km"}},{"from":{"field":"region","value":"659"},"to":{"field":"region","value":"kn"}},{"from":{"field":"region","value":"408"},"to":{"field":"region","value":"kp"}},{"from":{"field":"region","value":"410"},"to":{"field":"region","value":"kr"}},{"from":{"field":"region","value":"414"},"to":{"field":"region","value":"kw"}},{"from":{"field":"region","value":"136"},"to":{"field":"region","value":"ky"}},{"from":{"field":"region","value":"398"},"to":{"field":"region","value":"kz"}},{"from":{"field":"region","value":"418"},"to":{"field":"region","value":"la"}},{"from":{"field":"region","value":"422"},"to":{"field":"region","value":"lb"}},{"from":{"field":"region","value":"662"},"to":{"field":"region","value":"lc"}},{"from":{"field":"region","value":"438"},"to":{"field":"region","value":"li"}},{"from":{"field":"region","value":"144"},"to":{"field":"region","value":"lk"}},{"from":{"field":"region","value":"430"},"to":{"field":"region","value":"lr"}},{"from":{"field":"region","value":"426"},"to":{"field":"region","value":"ls"}},{"from":{"field":"region","value":"440"},"to":{"field":"region","value":"lt"}},{"from":{"field":"region","value":"442"},"to":{"field":"region","value":"lu"}},{"from":{"field":"region","value":"428"},"to":{"field":"region","value":"lv"}},{"from":{"field":"region","value":"434"},"to":{"field":"region","value":"ly"}},{"from":{"field":"region","value":"504"},"to":{"field":"region","value":"ma"}},{"from":{"field":"region","value":"492"},"to":{"field":"region","value":"mc"}},{"from":{"field":"region","value":"498"},"to":{"field":"region","value":"md"}},{"from":{"field":"region","value":"499"},"to":{"field":"region","value":"me"}},{"from":{"field":"region","value":"663"},"to":{"field":"region","value":"mf"}},{"from":{"field":"region","value":"450"},"to":{"field":"region","value":"mg"}},{"from":{"field":"region","value":"584"},"to":{"field":"region","value":"mh"}},{"from":{"field":"region","value":"807"},"to":{"field":"region","value":"mk"}},{"from":{"field":"region","value":"466"},"to":{"field":"region","value":"ml"}},{"from":{"field":"region","value":"496"},"to":{"field":"region","value":"mn"}},{"from":{"field":"region","value":"446"},"to":{"field":"region","value":"mo"}},{"from":{"field":"region","value":"580"},"to":{"field":"region","value":"mp"}},{"from":{"field":"region","value":"474"},"to":{"field":"region","value":"mq"}},{"from":{"field":"region","value":"478"},"to":{"field":"region","value":"mr"}},{"from":{"field":"region","value":"500"},"to":{"field":"region","value":"ms"}},{"from":{"field":"region","value":"470"},"to":{"field":"region","value":"mt"}},{"from":{"field":"region","value":"480"},"to":{"field":"region","value":"mu"}},{"from":{"field":"region","value":"462"},"to":{"field":"region","value":"mv"}},{"from":{"field":"region","value":"454"},"to":{"field":"region","value":"mw"}},{"from":{"field":"region","value":"484"},"to":{"field":"region","value":"mx"}},{"from":{"field":"region","value":"458"},"to":{"field":"region","value":"my"}},{"from":{"field":"region","value":"508"},"to":{"field":"region","value":"mz"}},{"from":{"field":"region","value":"516"},"to":{"field":"region","value":"na"}},{"from":{"field":"region","value":"540"},"to":{"field":"region","value":"nc"}},{"from":{"field":"region","value":"562"},"to":{"field":"region","value":"ne"}},{"from":{"field":"region","value":"574"},"to":{"field":"region","value":"nf"}},{"from":{"field":"region","value":"566"},"to":{"field":"region","value":"ng"}},{"from":{"field":"region","value":"558"},"to":{"field":"region","value":"ni"}},{"from":{"field":"region","value":"528"},"to":{"field":"region","value":"nl"}},{"from":{"field":"region","value":"578"},"to":{"field":"region","value":"no"}},{"from":{"field":"region","value":"524"},"to":{"field":"region","value":"np"}},{"from":{"field":"region","value":"520"},"to":{"field":"region","value":"nr"}},{"from":{"field":"region","value":"570"},"to":{"field":"region","value":"nu"}},{"from":{"field":"region","value":"554"},"to":{"field":"region","value":"nz"}},{"from":{"field":"region","value":"512"},"to":{"field":"region","value":"om"}},{"from":{"field":"region","value":"591"},"to":{"field":"region","value":"pa"}},{"from":{"field":"region","value":"604"},"to":{"field":"region","value":"pe"}},{"from":{"field":"region","value":"258"},"to":{"field":"region","value":"pf"}},{"from":{"field":"region","value":"598"},"to":{"field":"region","value":"pg"}},{"from":{"field":"region","value":"608"},"to":{"field":"region","value":"ph"}},{"from":{"field":"region","value":"586"},"to":{"field":"region","value":"pk"}},{"from":{"field":"region","value":"616"},"to":{"field":"region","value":"pl"}},{"from":{"field":"region","value":"666"},"to":{"field":"region","value":"pm"}},{"from":{"field":"region","value":"612"},"to":{"field":"region","value":"pn"}},{"from":{"field":"region","value":"630"},"to":{"field":"region","value":"pr"}},{"from":{"field":"region","value":"275"},"to":{"field":"region","value":"ps"}},{"from":{"field":"region","value":"620"},"to":{"field":"region","value":"pt"}},{"from":{"field":"region","value":"585"},"to":{"field":"region","value":"pw"}},{"from":{"field":"region","value":"600"},"to":{"field":"region","value":"py"}},{"from":{"field":"region","value":"634"},"to":{"field":"region","value":"qa"}},{"from":{"field":"region","value":"959"},"to":{"field":"region","value":"qm"}},{"from":{"field":"region","value":"960"},"to":{"field":"region","value":"qn"}},{"from":{"field":"region","value":"962"},"to":{"field":"region","value":"qp"}},{"from":{"field":"region","value":"963"},"to":{"field":"region","value":"qq"}},{"from":{"field":"region","value":"964"},"to":{"field":"region","value":"qr"}},{"from":{"field":"region","value":"965"},"to":{"field":"region","value":"qs"}},{"from":{"field":"region","value":"966"},"to":{"field":"region","value":"qt"}},{"from":{"field":"region","value":"967"},"to":{"field":"region","value":"eu"}},{"from":{"field":"region","value":"968"},"to":{"field":"region","value":"qv"}},{"from":{"field":"region","value":"969"},"to":{"field":"region","value":"qw"}},{"from":{"field":"region","value":"970"},"to":{"field":"region","value":"qx"}},{"from":{"field":"region","value":"971"},"to":{"field":"region","value":"qy"}},{"from":{"field":"region","value":"972"},"to":{"field":"region","value":"qz"}},{"from":{"field":"region","value":"638"},"to":{"field":"region","value":"re"}},{"from":{"field":"region","value":"642"},"to":{"field":"region","value":"ro"}},{"from":{"field":"region","value":"688"},"to":{"field":"region","value":"rs"}},{"from":{"field":"region","value":"643"},"to":{"field":"region","value":"ru"}},{"from":{"field":"region","value":"646"},"to":{"field":"region","value":"rw"}},{"from":{"field":"region","value":"682"},"to":{"field":"region","value":"sa"}},{"from":{"field":"region","value":"090"},"to":{"field":"region","value":"sb"}},{"from":{"field":"region","value":"690"},"to":{"field":"region","value":"sc"}},{"from":{"field":"region","value":"729"},"to":{"field":"region","value":"sd"}},{"from":{"field":"region","value":"752"},"to":{"field":"region","value":"se"}},{"from":{"field":"region","value":"702"},"to":{"field":"region","value":"sg"}},{"from":{"field":"region","value":"654"},"to":{"field":"region","value":"sh"}},{"from":{"field":"region","value":"705"},"to":{"field":"region","value":"si"}},{"from":{"field":"region","value":"744"},"to":{"field":"region","value":"sj"}},{"from":{"field":"region","value":"703"},"to":{"field":"region","value":"sk"}},{"from":{"field":"region","value":"694"},"to":{"field":"region","value":"sl"}},{"from":{"field":"region","value":"674"},"to":{"field":"region","value":"sm"}},{"from":{"field":"region","value":"686"},"to":{"field":"region","value":"sn"}},{"from":{"field":"region","value":"706"},"to":{"field":"region","value":"so"}},{"from":{"field":"region","value":"740"},"to":{"field":"region","value":"sr"}},{"from":{"field":"region","value":"728"},"to":{"field":"region","value":"ss"}},{"from":{"field":"region","value":"678"},"to":{"field":"region","value":"st"}},{"from":{"field":"region","value":"222"},"to":{"field":"region","value":"sv"}},{"from":{"field":"region","value":"534"},"to":{"field":"region","value":"sx"}},{"from":{"field":"region","value":"760"},"to":{"field":"region","value":"sy"}},{"from":{"field":"region","value":"748"},"to":{"field":"region","value":"sz"}},{"from":{"field":"region","value":"796"},"to":{"field":"region","value":"tc"}},{"from":{"field":"region","value":"148"},"to":{"field":"region","value":"td"}},{"from":{"field":"region","value":"260"},"to":{"field":"region","value":"tf"}},{"from":{"field":"region","value":"768"},"to":{"field":"region","value":"tg"}},{"from":{"field":"region","value":"764"},"to":{"field":"region","value":"th"}},{"from":{"field":"region","value":"762"},"to":{"field":"region","value":"tj"}},{"from":{"field":"region","value":"772"},"to":{"field":"region","value":"tk"}},{"from":{"field":"region","value":"626"},"to":{"field":"region","value":"tl"}},{"from":{"field":"region","value":"795"},"to":{"field":"region","value":"tm"}},{"from":{"field":"region","value":"788"},"to":{"field":"region","value":"tn"}},{"from":{"field":"region","value":"776"},"to":{"field":"region","value":"to"}},{"from":{"field":"region","value":"792"},"to":{"field":"region","value":"tr"}},{"from":{"field":"region","value":"780"},"to":{"field":"region","value":"tt"}},{"from":{"field":"region","value":"798"},"to":{"field":"region","value":"tv"}},{"from":{"field":"region","value":"158"},"to":{"field":"region","value":"tw"}},{"from":{"field":"region","value":"834"},"to":{"field":"region","value":"tz"}},{"from":{"field":"region","value":"804"},"to":{"field":"region","value":"ua"}},{"from":{"field":"region","value":"800"},"to":{"field":"region","value":"ug"}},{"from":{"field":"region","value":"581"},"to":{"field":"region","value":"um"}},{"from":{"field":"region","value":"840"},"to":{"field":"region","value":"us"}},{"from":{"field":"region","value":"858"},"to":{"field":"region","value":"uy"}},{"from":{"field":"region","value":"860"},"to":{"field":"region","value":"uz"}},{"from":{"field":"region","value":"336"},"to":{"field":"region","value":"va"}},{"from":{"field":"region","value":"670"},"to":{"field":"region","value":"vc"}},{"from":{"field":"region","value":"862"},"to":{"field":"region","value":"ve"}},{"from":{"field":"region","value":"092"},"to":{"field":"region","value":"vg"}},{"from":{"field":"region","value":"850"},"to":{"field":"region","value":"vi"}},{"from":{"field":"region","value":"704"},"to":{"field":"region","value":"vn"}},{"from":{"field":"region","value":"548"},"to":{"field":"region","value":"vu"}},{"from":{"field":"region","value":"876"},"to":{"field":"region","value":"wf"}},{"from":{"field":"region","value":"882"},"to":{"field":"region","value":"ws"}},{"from":{"field":"region","value":"973"},"to":{"field":"region","value":"xa"}},{"from":{"field":"region","value":"974"},"to":{"field":"region","value":"xb"}},{"from":{"field":"region","value":"975"},"to":{"field":"region","value":"xc"}},{"from":{"field":"region","value":"976"},"to":{"field":"region","value":"xd"}},{"from":{"field":"region","value":"977"},"to":{"field":"region","value":"xe"}},{"from":{"field":"region","value":"978"},"to":{"field":"region","value":"xf"}},{"from":{"field":"region","value":"979"},"to":{"field":"region","value":"xg"}},{"from":{"field":"region","value":"980"},"to":{"field":"region","value":"xh"}},{"from":{"field":"region","value":"981"},"to":{"field":"region","value":"xi"}},{"from":{"field":"region","value":"982"},"to":{"field":"region","value":"xj"}},{"from":{"field":"region","value":"983"},"to":{"field":"region","value":"xk"}},{"from":{"field":"region","value":"984"},"to":{"field":"region","value":"xl"}},{"from":{"field":"region","value":"985"},"to":{"field":"region","value":"xm"}},{"from":{"field":"region","value":"986"},"to":{"field":"region","value":"xn"}},{"from":{"field":"region","value":"987"},"to":{"field":"region","value":"xo"}},{"from":{"field":"region","value":"988"},"to":{"field":"region","value":"xp"}},{"from":{"field":"region","value":"989"},"to":{"field":"region","value":"xq"}},{"from":{"field":"region","value":"990"},"to":{"field":"region","value":"xr"}},{"from":{"field":"region","value":"991"},"to":{"field":"region","value":"xs"}},{"from":{"field":"region","value":"992"},"to":{"field":"region","value":"xt"}},{"from":{"field":"region","value":"993"},"to":{"field":"region","value":"xu"}},{"from":{"field":"region","value":"994"},"to":{"field":"region","value":"xv"}},{"from":{"field":"region","value":"995"},"to":{"field":"region","value":"xw"}},{"from":{"field":"region","value":"996"},"to":{"field":"region","value":"xx"}},{"from":{"field":"region","value":"997"},"to":{"field":"region","value":"xy"}},{"from":{"field":"region","value":"998"},"to":{"field":"region","value":"xz"}},{"from":{"field":"region","value":"720"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"887"},"to":{"field":"region","value":"ye"}},{"from":{"field":"region","value":"175"},"to":{"field":"region","value":"yt"}},{"from":{"field":"region","value":"710"},"to":{"field":"region","value":"za"}},{"from":{"field":"region","value":"894"},"to":{"field":"region","value":"zm"}},{"from":{"field":"region","value":"716"},"to":{"field":"region","value":"zw"}},{"from":{"field":"region","value":"999"},"to":{"field":"region","value":"zz"}},{"from":{"field":"variants","value":"aaland"},"to":{"field":"region","value":"ax"}},{"from":{"field":"variants","value":"polytoni"},"to":{"field":"variants","value":"polyton"}},{"from":{"field":"variants","value":"heploc"},"to":{"field":"variants","value":"alalc97"}},{"from":{"field":"variants","value":"arevela"},"to":{"field":"language","value":"hy"}},{"from":{"field":"variants","value":"arevmda"},"to":{"field":"language","value":"hyw"}}]')},9460:et=>{"use strict";et.exports=JSON.parse('{"region":{"172":["ru","am","az","by","ge","kg","kz","md","tj","tm","ua","uz"],"200":["cz","sk"],"530":["cw","sx","bq"],"532":["cw","sx","bq"],"536":["sa","iq"],"582":["fm","mh","mp","pw"],"810":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"830":["je","gg"],"890":["rs","me","si","hr","mk","ba"],"891":["rs","me"],"an":["cw","sx","bq"],"cs":["rs","me"],"fq":["aq","tf"],"nt":["sa","iq"],"pc":["fm","mh","mp","pw"],"su":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"yu":["rs","me"],"062":["034","143"],"ant":["cw","sx","bq"],"scg":["rs","me"],"ntz":["sa","iq"],"sun":["ru","am","az","by","ee","ge","kz","kg","lv","lt","md","tj","tm","ua","uz"],"yug":["rs","me"]}}')},7778:et=>{"use strict";et.exports=JSON.parse('[{"from":"in","to":"id"},{"from":"iw","to":"he"},{"from":"ji","to":"yi"},{"from":"jw","to":"jv"},{"from":"mo","to":"ro"},{"from":"scc","to":"sr"},{"from":"scr","to":"hr"},{"from":"aam","to":"aas"},{"from":"adp","to":"dz"},{"from":"aue","to":"ktz"},{"from":"ayx","to":"nun"},{"from":"bgm","to":"bcg"},{"from":"bjd","to":"drl"},{"from":"ccq","to":"rki"},{"from":"cjr","to":"mom"},{"from":"cka","to":"cmr"},{"from":"cmk","to":"xch"},{"from":"coy","to":"pij"},{"from":"cqu","to":"quh"},{"from":"drh","to":"mn"},{"from":"drw","to":"fa-af"},{"from":"gav","to":"dev"},{"from":"gfx","to":"vaj"},{"from":"ggn","to":"gvr"},{"from":"gti","to":"nyc"},{"from":"guv","to":"duz"},{"from":"hrr","to":"jal"},{"from":"ibi","to":"opa"},{"from":"ilw","to":"gal"},{"from":"jeg","to":"oyb"},{"from":"kgc","to":"tdf"},{"from":"kgh","to":"kml"},{"from":"koj","to":"kwv"},{"from":"krm","to":"bmf"},{"from":"ktr","to":"dtp"},{"from":"kvs","to":"gdj"},{"from":"kwq","to":"yam"},{"from":"kxe","to":"tvd"},{"from":"kzj","to":"dtp"},{"from":"kzt","to":"dtp"},{"from":"lii","to":"raq"},{"from":"lmm","to":"rmx"},{"from":"meg","to":"cir"},{"from":"mst","to":"mry"},{"from":"mwj","to":"vaj"},{"from":"myt","to":"mry"},{"from":"nad","to":"xny"},{"from":"ncp","to":"kdz"},{"from":"nnx","to":"ngv"},{"from":"nts","to":"pij"},{"from":"oun","to":"vaj"},{"from":"pcr","to":"adx"},{"from":"pmc","to":"huw"},{"from":"pmu","to":"phr"},{"from":"ppa","to":"bfy"},{"from":"ppr","to":"lcq"},{"from":"pry","to":"prt"},{"from":"puz","to":"pub"},{"from":"sca","to":"hle"},{"from":"skk","to":"oyb"},{"from":"tdu","to":"dtp"},{"from":"thc","to":"tpo"},{"from":"thx","to":"oyb"},{"from":"tie","to":"ras"},{"from":"tkk","to":"twm"},{"from":"tlw","to":"weo"},{"from":"tmp","to":"tyj"},{"from":"tne","to":"kak"},{"from":"tnf","to":"fa-af"},{"from":"tsf","to":"taj"},{"from":"uok","to":"ema"},{"from":"xba","to":"cax"},{"from":"xia","to":"acn"},{"from":"xkh","to":"waw"},{"from":"xsj","to":"suj"},{"from":"ybd","to":"rki"},{"from":"yma","to":"lrr"},{"from":"ymt","to":"mtm"},{"from":"yos","to":"zom"},{"from":"yuu","to":"yug"},{"from":"asd","to":"snz"},{"from":"dit","to":"dif"},{"from":"llo","to":"ngt"},{"from":"myd","to":"aog"},{"from":"nns","to":"nbr"},{"from":"sgn-br","to":"bzs"},{"from":"sgn-co","to":"csn"},{"from":"sgn-de","to":"gsg"},{"from":"sgn-dk","to":"dsl"},{"from":"sgn-fr","to":"fsl"},{"from":"sgn-gb","to":"bfi"},{"from":"sgn-gr","to":"gss"},{"from":"sgn-ie","to":"isg"},{"from":"sgn-it","to":"ise"},{"from":"sgn-jp","to":"jsl"},{"from":"sgn-mx","to":"mfs"},{"from":"sgn-ni","to":"ncs"},{"from":"sgn-nl","to":"dse"},{"from":"sgn-no","to":"nsi"},{"from":"sgn-pt","to":"psr"},{"from":"sgn-se","to":"swl"},{"from":"sgn-us","to":"ase"},{"from":"sgn-za","to":"sfs"},{"from":"no-bokmal","to":"nb"},{"from":"no-nynorsk","to":"nn"},{"from":"aa-saaho","to":"ssy"},{"from":"sh","to":"sr-latn"},{"from":"cnr","to":"sr-me"},{"from":"no","to":"nb"},{"from":"tl","to":"fil"},{"from":"az-az","to":"az-latn-az"},{"from":"bs-ba","to":"bs-latn-ba"},{"from":"ha-latn-gh","to":"ha-gh"},{"from":"ha-latn-ne","to":"ha-ne"},{"from":"ha-latn-ng","to":"ha-ng"},{"from":"kk-cyrl-kz","to":"kk-kz"},{"from":"ky-cyrl-kg","to":"ky-kg"},{"from":"ks-arab-in","to":"ks-in"},{"from":"mn-cyrl-mn","to":"mn-mn"},{"from":"ms-latn-bn","to":"ms-bn"},{"from":"ms-latn-my","to":"ms-my"},{"from":"ms-latn-sg","to":"ms-sg"},{"from":"pa-in","to":"pa-guru-in"},{"from":"pa-pk","to":"pa-arab-pk"},{"from":"shi-ma","to":"shi-tfng-ma"},{"from":"sr-ba","to":"sr-cyrl-ba"},{"from":"sr-me","to":"sr-latn-me"},{"from":"sr-rs","to":"sr-cyrl-rs"},{"from":"sr-xk","to":"sr-cyrl-xk"},{"from":"tzm-latn-ma","to":"tzm-ma"},{"from":"ug-arab-cn","to":"ug-cn"},{"from":"uz-af","to":"uz-arab-af"},{"from":"uz-uz","to":"uz-latn-uz"},{"from":"vai-lr","to":"vai-vaii-lr"},{"from":"yue-cn","to":"yue-hans-cn"},{"from":"yue-hk","to":"yue-hant-hk"},{"from":"zh-cn","to":"zh-hans-cn"},{"from":"zh-hk","to":"zh-hant-hk"},{"from":"zh-mo","to":"zh-hant-mo"},{"from":"zh-sg","to":"zh-hans-sg"},{"from":"zh-tw","to":"zh-hant-tw"},{"from":"aju","to":"jrb"},{"from":"als","to":"sq"},{"from":"arb","to":"ar"},{"from":"ayr","to":"ay"},{"from":"azj","to":"az"},{"from":"bcc","to":"bal"},{"from":"bcl","to":"bik"},{"from":"bxk","to":"luy"},{"from":"bxr","to":"bua"},{"from":"cld","to":"syr"},{"from":"cmn","to":"zh"},{"from":"cwd","to":"cr"},{"from":"dgo","to":"doi"},{"from":"dhd","to":"mwr"},{"from":"dik","to":"din"},{"from":"diq","to":"zza"},{"from":"lbk","to":"bnc"},{"from":"ekk","to":"et"},{"from":"emk","to":"man"},{"from":"esk","to":"ik"},{"from":"fat","to":"ak"},{"from":"fuc","to":"ff"},{"from":"gaz","to":"om"},{"from":"gbo","to":"grb"},{"from":"gno","to":"gon"},{"from":"gug","to":"gn"},{"from":"gya","to":"gba"},{"from":"hdn","to":"hai"},{"from":"hea","to":"hmn"},{"from":"ike","to":"iu"},{"from":"kmr","to":"ku"},{"from":"knc","to":"kr"},{"from":"kng","to":"kg"},{"from":"knn","to":"kok"},{"from":"kpv","to":"kv"},{"from":"lvs","to":"lv"},{"from":"mhr","to":"chm"},{"from":"mup","to":"raj"},{"from":"khk","to":"mn"},{"from":"npi","to":"ne"},{"from":"ojg","to":"oj"},{"from":"ory","to":"or"},{"from":"pbu","to":"ps"},{"from":"pes","to":"fa"},{"from":"plt","to":"mg"},{"from":"pnb","to":"lah"},{"from":"quz","to":"qu"},{"from":"rmy","to":"rom"},{"from":"spy","to":"kln"},{"from":"src","to":"sc"},{"from":"swh","to":"sw"},{"from":"ttq","to":"tmh"},{"from":"tw","to":"ak"},{"from":"umu","to":"del"},{"from":"uzn","to":"uz"},{"from":"xpe","to":"kpe"},{"from":"xsl","to":"den"},{"from":"ydd","to":"yi"},{"from":"zai","to":"zap"},{"from":"zsm","to":"ms"},{"from":"zyb","to":"za"},{"from":"him","to":"srx"},{"from":"mnk","to":"man"},{"from":"bh","to":"bho"},{"from":"prs","to":"fa-af"},{"from":"swc","to":"sw-cd"},{"from":"aar","to":"aa"},{"from":"abk","to":"ab"},{"from":"ave","to":"ae"},{"from":"afr","to":"af"},{"from":"aka","to":"ak"},{"from":"amh","to":"am"},{"from":"arg","to":"an"},{"from":"ara","to":"ar"},{"from":"asm","to":"as"},{"from":"ava","to":"av"},{"from":"aym","to":"ay"},{"from":"aze","to":"az"},{"from":"bak","to":"ba"},{"from":"bel","to":"be"},{"from":"bul","to":"bg"},{"from":"bih","to":"bho"},{"from":"bis","to":"bi"},{"from":"bam","to":"bm"},{"from":"ben","to":"bn"},{"from":"bod","to":"bo"},{"from":"bre","to":"br"},{"from":"bos","to":"bs"},{"from":"cat","to":"ca"},{"from":"che","to":"ce"},{"from":"cha","to":"ch"},{"from":"cos","to":"co"},{"from":"cre","to":"cr"},{"from":"ces","to":"cs"},{"from":"chu","to":"cu"},{"from":"chv","to":"cv"},{"from":"cym","to":"cy"},{"from":"dan","to":"da"},{"from":"deu","to":"de"},{"from":"div","to":"dv"},{"from":"dzo","to":"dz"},{"from":"ewe","to":"ee"},{"from":"ell","to":"el"},{"from":"eng","to":"en"},{"from":"epo","to":"eo"},{"from":"spa","to":"es"},{"from":"est","to":"et"},{"from":"eus","to":"eu"},{"from":"fas","to":"fa"},{"from":"ful","to":"ff"},{"from":"fin","to":"fi"},{"from":"fij","to":"fj"},{"from":"fao","to":"fo"},{"from":"fra","to":"fr"},{"from":"fry","to":"fy"},{"from":"gle","to":"ga"},{"from":"gla","to":"gd"},{"from":"glg","to":"gl"},{"from":"grn","to":"gn"},{"from":"guj","to":"gu"},{"from":"glv","to":"gv"},{"from":"hau","to":"ha"},{"from":"heb","to":"he"},{"from":"hin","to":"hi"},{"from":"hmo","to":"ho"},{"from":"hrv","to":"hr"},{"from":"hat","to":"ht"},{"from":"hun","to":"hu"},{"from":"hye","to":"hy"},{"from":"her","to":"hz"},{"from":"ina","to":"ia"},{"from":"ind","to":"id"},{"from":"ile","to":"ie"},{"from":"ibo","to":"ig"},{"from":"iii","to":"ii"},{"from":"ipk","to":"ik"},{"from":"ido","to":"io"},{"from":"isl","to":"is"},{"from":"ita","to":"it"},{"from":"iku","to":"iu"},{"from":"jpn","to":"ja"},{"from":"jav","to":"jv"},{"from":"kat","to":"ka"},{"from":"kon","to":"kg"},{"from":"kik","to":"ki"},{"from":"kua","to":"kj"},{"from":"kaz","to":"kk"},{"from":"kal","to":"kl"},{"from":"khm","to":"km"},{"from":"kan","to":"kn"},{"from":"kor","to":"ko"},{"from":"kau","to":"kr"},{"from":"kas","to":"ks"},{"from":"kur","to":"ku"},{"from":"kom","to":"kv"},{"from":"cor","to":"kw"},{"from":"kir","to":"ky"},{"from":"lat","to":"la"},{"from":"ltz","to":"lb"},{"from":"lug","to":"lg"},{"from":"lim","to":"li"},{"from":"lin","to":"ln"},{"from":"lao","to":"lo"},{"from":"lit","to":"lt"},{"from":"lub","to":"lu"},{"from":"lav","to":"lv"},{"from":"mlg","to":"mg"},{"from":"mah","to":"mh"},{"from":"mri","to":"mi"},{"from":"mkd","to":"mk"},{"from":"mal","to":"ml"},{"from":"mon","to":"mn"},{"from":"mol","to":"ro"},{"from":"mar","to":"mr"},{"from":"msa","to":"ms"},{"from":"mlt","to":"mt"},{"from":"mya","to":"my"},{"from":"nau","to":"na"},{"from":"nob","to":"nb"},{"from":"nde","to":"nd"},{"from":"nep","to":"ne"},{"from":"ndo","to":"ng"},{"from":"nld","to":"nl"},{"from":"nno","to":"nn"},{"from":"nor","to":"nb"},{"from":"nbl","to":"nr"},{"from":"nav","to":"nv"},{"from":"nya","to":"ny"},{"from":"oci","to":"oc"},{"from":"oji","to":"oj"},{"from":"orm","to":"om"},{"from":"ori","to":"or"},{"from":"oss","to":"os"},{"from":"pan","to":"pa"},{"from":"pli","to":"pi"},{"from":"pol","to":"pl"},{"from":"pus","to":"ps"},{"from":"por","to":"pt"},{"from":"que","to":"qu"},{"from":"roh","to":"rm"},{"from":"run","to":"rn"},{"from":"ron","to":"ro"},{"from":"rus","to":"ru"},{"from":"kin","to":"rw"},{"from":"san","to":"sa"},{"from":"srd","to":"sc"},{"from":"snd","to":"sd"},{"from":"sme","to":"se"},{"from":"sag","to":"sg"},{"from":"hbs","to":"sr-latn"},{"from":"sin","to":"si"},{"from":"slk","to":"sk"},{"from":"slv","to":"sl"},{"from":"smo","to":"sm"},{"from":"sna","to":"sn"},{"from":"som","to":"so"},{"from":"sqi","to":"sq"},{"from":"srp","to":"sr"},{"from":"ssw","to":"ss"},{"from":"sot","to":"st"},{"from":"sun","to":"su"},{"from":"swe","to":"sv"},{"from":"swa","to":"sw"},{"from":"tam","to":"ta"},{"from":"tel","to":"te"},{"from":"tgk","to":"tg"},{"from":"tha","to":"th"},{"from":"tir","to":"ti"},{"from":"tuk","to":"tk"},{"from":"tgl","to":"fil"},{"from":"tsn","to":"tn"},{"from":"ton","to":"to"},{"from":"tur","to":"tr"},{"from":"tso","to":"ts"},{"from":"tat","to":"tt"},{"from":"twi","to":"ak"},{"from":"tah","to":"ty"},{"from":"uig","to":"ug"},{"from":"ukr","to":"uk"},{"from":"urd","to":"ur"},{"from":"uzb","to":"uz"},{"from":"ven","to":"ve"},{"from":"vie","to":"vi"},{"from":"vol","to":"vo"},{"from":"wln","to":"wa"},{"from":"wol","to":"wo"},{"from":"xho","to":"xh"},{"from":"yid","to":"yi"},{"from":"yor","to":"yo"},{"from":"zha","to":"za"},{"from":"zho","to":"zh"},{"from":"zul","to":"zu"},{"from":"alb","to":"sq"},{"from":"arm","to":"hy"},{"from":"baq","to":"eu"},{"from":"bur","to":"my"},{"from":"chi","to":"zh"},{"from":"cze","to":"cs"},{"from":"dut","to":"nl"},{"from":"fre","to":"fr"},{"from":"geo","to":"ka"},{"from":"ger","to":"de"},{"from":"gre","to":"el"},{"from":"ice","to":"is"},{"from":"mac","to":"mk"},{"from":"mao","to":"mi"},{"from":"may","to":"ms"},{"from":"per","to":"fa"},{"from":"rum","to":"ro"},{"from":"slo","to":"sk"},{"from":"tib","to":"bo"},{"from":"wel","to":"cy"}]')},8589:et=>{"use strict";et.exports=JSON.parse('{"en-gb-oed":"en-GB-oxendict","i-ami":"ami","i-bnn":"bnn","i-default":null,"i-enochian":null,"i-hak":"hak","i-klingon":"tlh","i-lux":"lb","i-mingo":null,"i-navajo":"nv","i-pwn":"pwn","i-tao":"tao","i-tay":"tay","i-tsu":"tsu","sgn-be-fr":"sfb","sgn-be-nl":"vgt","sgn-ch-de":"sgg","art-lojban":"jbo","cel-gaulish":null,"no-bok":"nb","no-nyn":"nn","zh-guoyu":"cmn","zh-hakka":"hak","zh-min":null,"zh-min-nan":"nan","zh-xiang":"hsn"}')},858:et=>{"use strict";et.exports=JSON.parse('["art-lojban","cel-gaulish","no-bok","no-nyn","zh-guoyu","zh-hakka","zh-min","zh-min-nan","zh-xiang"]')}},rt={};function n(tt){var nt=rt[tt];if(void 0!==nt)return nt.exports;var it=rt[tt]={exports:{}};return et[tt].call(it.exports,it,it.exports,n),it.exports}n.amdO={},n.n=et=>{var tt=et&&et.__esModule?()=>et.default:()=>et;return n.d(tt,{a:tt}),tt},n.d=(et,tt)=>{for(var nt in tt)n.o(tt,nt)&&!n.o(et,nt)&&Object.defineProperty(et,nt,{enumerable:!0,get:tt[nt]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(et){if("object"==typeof window)return window}}(),n.o=(et,tt)=>Object.prototype.hasOwnProperty.call(et,tt);var it={};return(()=>{"use strict";n.d(it,{default:()=>ft}),n(8416);var et,tt=n(1715),nt=n(8080),rt=n(1737),at=n(7688),ot=function(){var et,tt="application/dash+xml";function n(nt,rt,it){if(!nt||!/^VIDEO$/i.test(nt.nodeName))return null;if(nt._dashjs_player)return nt._dashjs_player;var ot,st=nt.id||nt.name||"video element";if(!(rt=rt||[].slice.call(nt.querySelectorAll("source")).filter((function(et){return et.type==tt}))[0])&&nt.src)(rt=document.createElement("source")).src=nt.src;else if(!rt&&!nt.src)return null;return it=it||{},(ot=(0,at.Z)(it).create()).initialize(nt,rt.src,nt.autoplay),et||(et=ot.getDebug().getLogger()),et.debug("Converted "+st+" to dash.js player and added content: "+rt.src),nt._dashjs_player=ot,ot}function r(et){return/^VIDEO$/i.test(et.nodeName)?et:r(et.parentNode)}return{create:n,createAll:function(et,nt){var rt=[];et=et||"[data-dashjs-player]";for(var it=(nt=nt||document).querySelectorAll(et),at=0;at<it.length;at++){var ot=n(it[at],null);rt.push(ot)}for(var st=nt.querySelectorAll('source[type="'+tt+'"]'),lt=0;lt<st.length;lt++){var ft=n(r(st[lt]),null);rt.push(ft)}return rt}}}();!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?ot.createAll():et=window.setInterval((function(){window.dashjs&&(window.clearInterval(et),ot.createAll())}),500):window.addEventListener("load",(function e(){window.removeEventListener("load",e),ot.createAll()})));const st=ot;var lt=n(6398);dashjs.Protection=rt.default,dashjs.MetricsReporting=nt.default,dashjs.MediaPlayerFactory=st,dashjs.Debug=lt.Z,dashjs.supportsMediaSource=tt.B;const ft=dashjs})(),it.default})(),et.exports=rt()}).call(this,nt(175),nt(174).Buffer)}}]);