UNPKG

nsplayer

Version:

NSPlayer, a player which supports quality list of dash and hls

43 lines 896 kB
"undefined"!=typeof self?self:globalThis;import{C as e,_ as t,t as r,E as n,D as i}from"./index-de6181c4.mjs";var o,l={exports:{}};function u(e,t){const r=e.getDashMetrics().getHttpRequests(t).slice(-20).filter((e=>"MediaSegment"===e.type&&e._stream===t&&e.trace.length>1&&e._tfinish.getTime()-e.tresponse.getTime()>0)).slice(-4);if(0===r.length)return 0;const n=r.map((e=>8*e.trace.reduce(((e,t)=>e+t.b[0]),0))),a=r.map((e=>e.trace.reduce(((e,t)=>e+t.d),0)/1e3)),i=n.reduce(((e,t)=>e+t),0),o=a.reduce(((e,t)=>e+t),0);return Math.round(i/o)}self,o=()=>(()=>{var e={"./externals/base64.js": /*!*****************************!*\ !*** ./externals/base64.js ***! \*****************************/(e,t)=>{var r,n,i,o,l,u={encode:function(e){for(var t=[],r=0;r<e.length;++r){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?(t.push(192|n>>6),t.push(128|63&n)):n<65536?(t.push(224|n>>12),t.push(128|63&n>>6),t.push(128|63&n)):(t.push(240|n>>18),t.push(128|63&n>>12),t.push(128|63&n>>6),t.push(128|63&n))}return t},decode:function(e){for(var t=[],r=0;r<e.length;){var n=e[r++];n<128||(n<224?(n=(31&n)<<6,n|=63&e[r++]):n<240?(n=(15&n)<<12,n|=(63&e[r++])<<6,n|=63&e[r++]):(n=(7&n)<<18,n|=(63&e[r++])<<12,n|=(63&e[r++])<<6,n|=63&e[r++])),t.push(String.fromCharCode(n))}return t.join("")}},c={};r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(e){for(var t=0,n=[],a=0|e.length/3;0<a--;){var i=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(r.charAt(63&i>>18)),n.push(r.charAt(63&i>>12)),n.push(r.charAt(63&i>>6)),n.push(r.charAt(63&i))}return 2==e.length-t?(i=(e[t]<<16)+(e[t+1]<<8),n.push(r.charAt(63&i>>18)),n.push(r.charAt(63&i>>12)),n.push(r.charAt(63&i>>6)),n.push("=")):1==e.length-t&&(i=e[t]<<16,n.push(r.charAt(63&i>>18)),n.push(r.charAt(63&i>>12)),n.push("==")),n.join("")},i=function(){for(var e=[],t=0;t<r.length;++t)e[r.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),o=function(e){for(var t=0,r=[],n=0|e.length/4;0<n--;){var a=(i[e.charCodeAt(t)]<<18)+(i[e.charCodeAt(t+1)]<<12)+(i[e.charCodeAt(t+2)]<<6)+i[e.charCodeAt(t+3)];r.push(255&a>>16),r.push(255&a>>8),r.push(255&a),t+=4}return r&&("="==e.charAt(t-2)?(r.pop(),r.pop()):"="==e.charAt(t-1)&&r.pop()),r},l={encode:function(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},c.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},c.encodeASCII=function(e){var t=l.encode(e);return n(t)},c.decodeASCII=function(e){var t=o(e);return l.decode(t)},c.encode=function(e){var t=u.encode(e);return n(t)},c.decode=function(e){var t=o(e);return u.decode(t)},t.decode=c.decode,t.decodeArray=c.decodeArray,t.encode=c.encode,t.encodeASCII=c.encodeASCII},"./externals/cea608-parser.js": /*!************************************!*\ !*** ./externals/cea608-parser.js ***! \************************************/(e,t)=>{!function(e){var t={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},r=function(e){var r=e;return t.hasOwnProperty(e)&&(r=t[e]),String.fromCharCode(r)},n=15,a=32,i={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var r=this.verboseFilter[e];this.verboseLevel>=r&&console.log(this.time+" ["+e+"] "+t)}},f=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},d=function(e,t,r,n,a){this.foreground=e||"white",this.underline=t||!1,this.italics=r||!1,this.background=n||"black",this.flash=a||!1};d.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var g=function(e,t,r,n,a,i){this.uchar=e||" ",this.penState=new d(t,r,n,a,i)};g.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var m=function(){this.chars=[];for(var e=0;e<a;e++)this.chars.push(new g);this.pos=0,this.currPenState=new d};m.prototype={equals:function(e){for(var t=!0,r=0;r<a;r++)if(!this.chars[r].equals(e.chars[r])){t=!1;break}return t},copy:function(e){for(var t=0;t<a;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<a;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(c.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>a&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=a)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=r(e);this.pos>=a?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<a;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,r=0;r<a;r++){var n=this.chars[r].uchar;" "!==n&&(t=!1),e.push(n)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};var h=function(){this.rows=[];for(var e=0;e<n;e++)this.rows.push(new m);this.currRow=14,this.nrRollUpRows=null,this.reset()};h.prototype={reset:function(){for(var e=0;e<n;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,r=0;r<n;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},copy:function(e){for(var t=0;t<n;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<n;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){c.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){c.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var r=this.rows[this.currRow];if(null!==e.indent){var n=e.indent,a=Math.max(n-1,0);r.setCursor(e.indent),e.color=r.chars[a].penState.foreground}var i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)},setBkgData:function(e){c.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){c.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),c.log("INFO","Rolling up")}else c.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],r="",a=-1,i=0;i<n;i++){var o=this.rows[i].getTextString();o&&(a=i+1,e?t.push("Row "+a+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},getTextAndFormat:function(){return this.rows}};var p=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new h,this.nonDisplayedMemory=new h,this.lastOutputScreen=new h,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};p.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(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"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=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";c.log("INFO",r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(c.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){c.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){c.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(){c.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){c.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){c.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){c.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){c.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){c.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){c.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){c.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){c.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(c.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,c.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){c.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=c.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var y=function(e,t,r){this.field=e||1,this.outputs=[t,r],this.channels=[new p(1,t),new p(2,r)],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(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var r,n,a,i=!1;this.lastTime=e,c.setTime(e);for(var o=0;o<t.length;o+=2)n=127&t[o],a=127&t[o+1],n>=16&&n<=31&&n===this.lastCmdA&&a===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+f([n,a])+") is dropped")):0!==n||0!==a?(c.log("DATA","["+f([t[o],t[o+1]])+"] -> ("+f([n,a])+")"),(r=this.parseCmd(n,a))||(r=this.parseMidrow(n,a)),r||(r=this.parsePAC(n,a)),r||(r=this.parseBackgroundAttributes(n,a)),r||(i=this.parseChars(n,a))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(i):c.log("WARNING","No channel found yet. TEXT-MODE?")),r?this.dataCounters.cmd+=2:i?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+f([n,a])+" orig: "+f([t[o],t[o+1]])))):this.dataCounters.padding+=2},parseCmd:function(e,t){var r=null;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47||(23===e||31===e)&&33<=t&&t<=35))return!1;r=20===e||21===e||23===e?1:2;var n=this.channels[r-1];return 20===e||21===e||28===e||29===e?32===t?n.cc_RCL():33===t?n.cc_BS():34===t?n.cc_AOF():35===t?n.cc_AON():36===t?n.cc_DER():37===t?n.cc_RU(2):38===t?n.cc_RU(3):39===t?n.cc_RU(4):40===t?n.cc_FON():41===t?n.cc_RDC():42===t?n.cc_TR():43===t?n.cc_RTD():44===t?n.cc_EDM():45===t?n.cc_CR():46===t?n.cc_ENM():47===t&&n.cc_EOC():n.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},parseMidrow:function(e,t){var r=null;if((17===e||25===e)&&32<=t&&t<=47){if((r=17===e?1:2)!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var n=this.channels[r-1];return n.insertChars([32]),n.cc_MIDROW(t),c.log("DEBUG","MIDROW ("+f([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var r,n=null;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127||(16===e||24===e)&&64<=t&&t<=95))return!1;r=e<=23?1:2,n=64<=t&&t<=95?1===r?i[e]:s[e]:1===r?o[e]:l[e];var a=this.interpretPAC(n,t);return this.channels[r-1].setPAC(a),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=r,!0},interpretPAC:function(e,t){var r=t,n={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,n.underline=1==(1&r),r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((r-16)/2),n},parseChars:function(e,t){var n=null,a=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),17<=i&&i<=19){var o=t;o=17===i?t+80:18===i?t+112:t+144,c.log("INFO","Special char '"+r(o)+"' in channel "+n),a=[o],this.lastCmdA=e,this.lastCmdB=t}else 32<=e&&e<=127&&(a=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null);if(a){var s=f(a);c.log("DEBUG","Char codes = "+s.join(","))}return a},parseBackgroundAttributes:function(e,t){var r,n,a;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(r={},16===e||24===e?(n=Math.floor((t-32)/2),r.background=u[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0)),a=e<24?1:2,this.channels[a-1].setBkgData(r),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}},e.logger=c,e.PenState=d,e.CaptionScreen=h,e.Cea608Parser=y,e.findCea608Nalus=function(e,t,r){for(var n=0,a=t,i=[],o=function(e,t,r,n){if(4!==e||t<8)return null;var a=r.getUint8(n),i=r.getUint16(n+1),o=r.getUint32(n+3),s=r.getUint8(n+7);return 181==a&&49==i&&1195456820==o&&3==s};a<t+r;){if(n=e.getUint32(a),6==(31&e.getUint8(a+4)))for(var s=a+5,l=-1;s<a+4+n-1;){l=0;for(var u=255;255===u;)l+=u=e.getUint8(s),s++;var c=0;for(u=255;255===u;)c+=u=e.getUint8(s),s++;o(l,c,e,s)&&i.push([s,c]),s+=c}a+=n+4}return i},e.extractCea608DataFromRange=function(e,t){var r=t[0],n=[[],[]];r+=8;var a=31&e.getUint8(r);r+=2;for(var i=0;i<a;i++){var o=e.getUint8(r),s=4&o,l=3&o;r++;var u=e.getUint8(r);r++;var c=e.getUint8(r);r++,s&&(127&u)+(127&c)!=0&&(0===l?(n[0].push(u),n[0].push(c)):1===l&&(n[1].push(u),n[1].push(c)))}return n}}(t)},"./externals/xml2json.js": /*!*******************************!*\ !*** ./externals/xml2json.js ***! \*******************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});const n=function(e){void 0===(e=e||{}).escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1),void 0===e.ignoreRoot&&(e.ignoreRoot=!1);var t=1,r=3,n=4,a=8,i=9;function o(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function s(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):e}function l(e,t,r,n){for(var a=0;a<e.length;a++){var i=e[a];if("string"==typeof i){if(i==n)break}else if(i instanceof RegExp){if(i.test(n))break}else if("function"==typeof i&&i(t,r,n))break}return a!=e.length}function u(t,r,n){"property"===e.arrayAccessForm&&(t[r]instanceof Array?t[r+"_asArray"]=t[r]:t[r+"_asArray"]=[t[r]]),!(t[r]instanceof Array)&&e.arrayAccessFormPaths.length>0&&l(e.arrayAccessFormPaths,t,r,n)&&(t[r]=[t[r]])}function c(e){var t=e.split(/[-T:+Z]/g),r=new Date(t[0],t[1]-1,t[2]),n=t[5].split(".");if(r.setHours(t[3],t[4],n[0]),n.length>1&&r.setMilliseconds(n[1]),t[6]&&t[7]){var a=60*t[6]+Number(t[7]);a=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*a:a),r.setMinutes(r.getMinutes()-a-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function f(r,n,a,i){return!(n==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,r,a,i)}function d(s,g){if(s.nodeType==i){for(var m=new Object,h=s.childNodes,p=0;p<h.length;p++)(v=h[p]).nodeType==t&&(e.ignoreRoot?m=d(v):(m={})[E=o(v)]=d(v));return m}if(s.nodeType==t){(m=new Object).__cnt=0;var y=[];for(h=s.childNodes,p=0;p<h.length;p++){var v,E=o(v=h[p]);if(v.nodeType!=a){var _=g+"."+E;if(f(m,v.nodeType,E,_))if(m.__cnt++,null==m[E]){var T=d(v,_);("#text"!=E||/[^\s]/.test(T))&&((b={})[E]=T,y.push(b)),m[E]=T,u(m,E,_)}else{var b;null!=m[E]&&(m[E]instanceof Array||(m[E]=[m[E]],u(m,E,_))),T=d(v,_),("#text"!=E||/[^\s]/.test(T))&&((b={})[E]=T,y.push(b)),m[E][m[E].length]=T}}}m.__children=y;for(var S=o(s),A=0;A<s.attributes.length;A++){var R=s.attributes[A];m.__cnt++;for(var I=R.value,w=0,C=e.matchers.length;w<C;w++){var N=e.matchers[w];N.test(R,S)&&(I=N.converter(R.value))}m[e.attributePrefix+R.name]=I}var D=function(e){return e.prefix}(s);return null!=D&&""!=D&&(m.__cnt++,m.__prefix=D),null!=m["#text"]&&(m.__text=m["#text"],m.__text instanceof Array&&(m.__text=m.__text.join("\n")),e.stripWhitespaces&&(m.__text=m.__text.trim()),delete m["#text"],"property"==e.arrayAccessForm&&delete m["#text_asArray"],m.__text=function(t,r,n){if(e.datetimeAccessFormPaths.length>0){var a=n.split(".#")[0];return l(e.datetimeAccessFormPaths,t,r,a)?c(t):t}return t}(m.__text,E,g+"."+E)),null!=m["#cdata-section"]&&(m.__cdata=m["#cdata-section"],delete m["#cdata-section"],"property"==e.arrayAccessForm&&delete m["#cdata-section_asArray"]),0==m.__cnt&&"text"==e.emptyNodeForm?m="":1==m.__cnt&&null!=m.__text?m=m.__text:1!=m.__cnt||null==m.__cdata||e.keepCData?m.__cnt>1&&null!=m.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==m.__text||""==m.__text.trim())&&delete m.__text:m=m.__cdata,delete m.__cnt,!e.enableToStringFunc||null==m.__text&&null==m.__cdata||(m.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),m}if(s.nodeType==r||s.nodeType==n)return s.nodeValue}function g(t,r,n,a){var i="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+r;if(null!=n)for(var o=0;o<n.length;o++){var l=n[o],u=t[l];e.escapeMode&&(u=s(u)),i+=" "+l.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?i+='"'+u+'"':i+="'"+u+"'"}return i+=a?"/>":">"}function m(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function h(t,r){return"property"==e.arrayAccessForm&&(n=r.toString(),a="_asArray",-1!==n.indexOf(a,n.length-a.length))||0==r.toString().indexOf(e.attributePrefix)||0==r.toString().indexOf("__")||t[r]instanceof Function;var n,a}function p(e){var t=0;if(e instanceof Object)for(var r in e)h(e,r)||t++;return t}function y(t,r,n){return 0==e.jsonPropertiesFilter.length||""==n||l(e.jsonPropertiesFilter,t,r,n)}function v(t){var r=[];if(t instanceof Object)for(var n in t)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(e.attributePrefix)&&r.push(n);return r}function E(t){var r="";return t instanceof Object?r+=function(t){var r="";return null!=t.__cdata&&(r+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?r+=s(t.__text):r+=t.__text),r}(t):null!=t&&(e.escapeMode?r+=s(t):r+=t),r}function _(e,t){return""===e?t:e+"."+t}function T(e,t,r,n){var a="";if(0==e.length)a+=g(e,t,r,!0);else for(var i=0;i<e.length;i++)a+=g(e[i],t,v(e[i]),!1),a+=b(e[i],_(n,t)),a+=m(e[i],t);return a}function b(e,t){var r="";if(p(e)>0)for(var n in e)if(!h(e,n)&&(""==t||y(e,n,_(t,n)))){var a=e[n],i=v(a);null==a||null==a?r+=g(a,n,i,!0):a instanceof Object?a instanceof Array?r+=T(a,n,i,t):a instanceof Date?(r+=g(a,n,i,!1),r+=a.toISOString(),r+=m(a,n)):p(a)>0||null!=a.__text||null!=a.__cdata?(r+=g(a,n,i,!1),r+=b(a,_(t,n)),r+=m(a,n)):r+=g(a,n,i,!0):(r+=g(a,n,i,!1),r+=E(a),r+=m(a,n))}return r+=E(e)}this.parseXmlString=function(e){if(void 0===e)return null;var t;if(window.DOMParser){var r=new window.DOMParser;try{(t=r.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?c(e):e},this.xml2json=function(e){return d(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return b(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}}},"./index_mediaplayerOnly.js": /*!**********************************!*\ !*** ./index_mediaplayerOnly.js ***! \**********************************/(e,t,r)=>{r.r(t),r.d(t,{Debug:()=>i.default,FactoryMaker:()=>a.default,MediaPlayer:()=>n.default,default:()=>u});var n=r(/*! ./src/streaming/MediaPlayer */"./src/streaming/MediaPlayer.js"),a=r(/*! ./src/core/FactoryMaker */"./src/core/FactoryMaker.js"),i=r(/*! ./src/core/Debug */"./src/core/Debug.js"),o=r(/*! ./src/core/Version */"./src/core/Version.js");r(/*! es6-promise/auto */"./node_modules/es6-promise/auto.js");var s="undefined"!=typeof window&&window||r.g,l=s.dashjs;l||(l=s.dashjs={}),l.MediaPlayer=n.default,l.FactoryMaker=a.default,l.Debug=i.default,l.Version=(0,o.getVersionString)();const u=l},"./src/core/Debug.js": /*!***************************!*\ !*** ./src/core/Debug.js ***! \***************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(/*! ./EventBus */"./src/core/EventBus.js"),a=r(/*! ./events/Events */"./src/core/events/Events.js"),i=r(/*! ./FactoryMaker */"./src/core/FactoryMaker.js"),o=1,s=2,l=3,u=4,c=5;function f(e){e=e||{};var t,r,i,f,d=this.context,g=(0,n.default)(d).getInstance(),m=e.settings,h=[];function p(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function y(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.apply(void 0,[o,this].concat(t))}function v(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.apply(void 0,[s,this].concat(t))}function E(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.apply(void 0,[l,this].concat(t))}function _(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.apply(void 0,[u,this].concat(t))}function T(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.apply(void 0,[c,this].concat(t))}function b(e,t){var n="",o=null;r&&(o=(new Date).getTime(),n+="["+(o-f)+"]"),i&&t&&t.getClassName&&(n+="["+t.getClassName()+"]",t.getType&&(n+="["+t.getType()+"]")),n.length>0&&(n+=" ");for(var s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];Array.apply(null,l).forEach((function(e){n+=e+" "})),h[e]&&m&&m.get().debug.logLevel>=e&&h[e](n),m&&m.get().debug.dispatchEvent&&g.trigger(a.default.LOG,{message:n,level:e})}return t={getLogger:function(e){return{fatal:y.bind(e),error:v.bind(e),warn:E.bind(e),info:_.bind(e),debug:T.bind(e)}},setLogTimestampVisible:function(e){r=e},setCalleeNameVisible:function(e){i=e}},r=!0,i=!0,f=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(h[o]=p(window.console.error),h[s]=p(window.console.error),h[l]=p(window.console.warn),h[u]=p(window.console.info),h[c]=p(window.console.debug)),t}f.__dashjs_factory_name="Debug";var d=i.default.getSingletonFactory(f);d.LOG_LEVEL_NONE=0,d.LOG_LEVEL_FATAL=o,d.LOG_LEVEL_ERROR=s,d.LOG_LEVEL_WARNING=l,d.LOG_LEVEL_INFO=u,d.LOG_LEVEL_DEBUG=c,i.default.updateSingletonFactory(f.__dashjs_factory_name,d);const g=d},"./src/core/EventBus.js": /*!******************************!*\ !*** ./src/core/EventBus.js ***! \******************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var n=r(/*! ./FactoryMaker */"./src/core/FactoryMaker.js"),a=r(/*! ../streaming/MediaPlayerEvents */"./src/streaming/MediaPlayerEvents.js");function i(){var e={};function t(t,r,n){var a=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===r&&(!n||n===e.scope))return a=t,!0})),a):a}var r={on:function(r,n,a){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!r)throw new Error("event type cannot be null or undefined");if(!n||"function"!=typeof n)throw new Error("listener must be a function: "+n);var o=i.priority||0;if(!(t(r,n,a)>=0)){e[r]=e[r]||[];var s={callback:n,scope:a,priority:o};a&&a.getStreamId&&(s.streamId=a.getStreamId()),a&&a.getType&&(s.mediaType=a.getType()),i&&i.mode&&(s.mode=i.mode);var l=e[r].some((function(t,n){if(t&&o>t.priority)return e[r].splice(n,0,s),!0}));l||e[r].push(s)}},off:function(r,n,a){if(r&&n&&e[r]){var i=t(r,n,a);i<0||(e[r][i]=null)}},trigger:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((r=r||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");r.type=t,n.streamId&&(r.streamId=n.streamId),n.mediaType&&(r.mediaType=n.mediaType),e[t].filter((function(e){return!(!e||n.streamId&&e.streamId&&e.streamId!==n.streamId||n.mediaType&&e.mediaType&&e.mediaType!==n.mediaType||n.mode&&e.mode&&e.mode!==n.mode||!e.mode&&n.mode&&n.mode===a.default.EVENT_MODE_ON_RECEIVE)})).forEach((function(e){return e&&e.callback.call(e.scope,r)}))}},reset:function(){e={}}};return r}i.__dashjs_factory_name="EventBus";var o=n.default.getSingletonFactory(i);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,n.default.updateSingletonFactory(i.__dashjs_factory_name,o);const s=o},"./src/core/FactoryMaker.js": /*!**********************************!*\ !*** ./src/core/FactoryMaker.js ***! \**********************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=function(){var e,t=[],r={},n={};function a(e,r){for(var n in t){var a=t[n];if(a.context===e&&a.name===r)return a.instance}return null}function i(e,t){return t[e]}function o(e,t,r){e in r&&(r[e]=t)}function s(t,r,n){var a,i=t.__dashjs_factory_name,o=r[i];if(o){var s=o.instance;if(!o.override)return s.apply({context:r,factory:e},n);for(var l in a=t.apply({context:r},n),s=s.apply({context:r,factory:e,parent:a},n))a.hasOwnProperty(l)&&(a[l]=s[l])}else a=t.apply({context:r},n);return a.getClassName=function(){return i},a}return e={extend:function(e,t,r,n){!n[e]&&t&&(n[e]={instance:t,override:r})},getSingletonInstance:a,setSingletonInstance:function(e,r,n){for(var a in t){var i=t[a];if(i.context===e&&i.name===r)return void(t[a].instance=n)}t.push({name:r,context:e,instance:n})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var n=i(e.__dashjs_factory_name,r);return n||(n=function(r){var n;return void 0===r&&(r={}),{getInstance:function(){return n||(n=a(r,e.__dashjs_factory_name)),n||(n=s(e,r,arguments),t.push({name:e.__dashjs_factory_name,context:r,instance:n})),n}}},r[e.__dashjs_factory_name]=n),n},getSingletonFactoryByName:function(e){return i(e,r)},updateSingletonFactory:function(e,t){o(e,t,r)},getClassFactory:function(e){var t=i(e.__dashjs_factory_name,n);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},n[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return i(e,n)},updateClassFactory:function(e,t){o(e,t,n)}},e}();const a=n},"./src/core/Settings.js": /*!******************************!*\ !*** ./src/core/Settings.js ***! \******************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(/*! ./FactoryMaker */"./src/core/FactoryMaker.js"),a=r(/*! ./Utils.js */"./src/core/Utils.js"),i=r(/*! ../core/Debug */"./src/core/Debug.js"),o=r(/*! ../streaming/constants/Constants */"./src/streaming/constants/Constants.js"),s=r(/*! ../streaming/vo/metrics/HTTPRequest */"./src/streaming/vo/metrics/HTTPRequest.js"),l=r(/*! ./EventBus */"./src/core/EventBus.js"),u=r(/*! ./events/Events */"./src/core/events/Events.js");function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(){var e,t,r=this.context,n=(0,l.default)(r).getInstance(),d={"streaming.delay.liveDelay":u.default.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":u.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":u.default.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":u.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":u.default.SETTING_UPDATED_PLAYBACK_RATE_MAX},g={debug:{logLevel:i.default.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,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:o.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:o.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.default.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:o.default.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,manifestRequestTimeout:1e4,retryIntervals:(e={},f(e,s.HTTPRequest.MPD_TYPE,500),f(e,s.HTTPRequest.XLINK_EXPANSION_TYPE,500),f(e,s.HTTPRequest.MEDIA_SEGMENT_TYPE,1e3),f(e,s.HTTPRequest.INIT_SEGMENT_TYPE,1e3),f(e,s.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),f(e,s.HTTPRequest.INDEX_SEGMENT_TYPE,1e3),f(e,s.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),f(e,s.HTTPRequest.LICENSE,1e3),f(e,s.HTTPRequest.OTHER_TYPE,1e3),f(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},f(t,s.HTTPRequest.MPD_TYPE,3),f(t,s.HTTPRequest.XLINK_EXPANSION_TYPE,1),f(t,s.HTTPRequest.MEDIA_SEGMENT_TYPE,3),f(t,s.HTTPRequest.INIT_SEGMENT_TYPE,3),f(t,s.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),f(t,s.HTTPRequest.INDEX_SEGMENT_TYPE,3),f(t,s.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),f(t,s.HTTPRequest.LICENSE,3),f(t,s.HTTPRequest.OTHER_TYPE,3),f(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:o.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:o.default.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:o.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.default.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}}},m=a.default.clone(g);function h(e,t,r){for(var i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?"object"!==c(e[i])||e[i]instanceof Array||null===e[i]?(t[i]=a.default.clone(e[i]),d[r+i]&&n.trigger(d[r+i])):h(e[i],t[i],r.slice()+i+"."):console.error("Settings parameter "+r+i+" is not supported"))}return{get:function(){return m},update:function(e){"object"===c(e)&&h(e,m,"")},reset:function(){m=a.default.clone(g)}}}d.__dashjs_factory_name="Settings";const g=n.default.getSingletonFactory(d)},"./src/core/Utils.js": /*!***************************!*\ !*** ./src/core/Utils.js ***! \***************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var n=r(/*! path-browserify */"./node_modules/path-browserify/index.js"),a=r.n(n),i=r(/*! ua-parser-js */"./node_modules/ua-parser-js/src/ua-parser.js");function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"mixin",value:function(t,r,n){var a,i={};if(t)for(var s in r)r.hasOwnProperty(s)&&(a=r[s],s in t&&(t[s]===a||s in i&&i[s]===a)||("object"===o(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,n):t[s]=n(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==o(t))return t;var r;if(t instanceof Array){r=[];for(var n=0,a=t.length;n<a;++n)n in t&&r.push(e.clone(t[n]))}else r={};return e.mixin(r,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var r=new URL(e);return t.forEach((function(e){e.key&&e.value&&r.searchParams.set(e.key,e.value)})),r.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var r=e.trim().split("\r\n"),n=0,a=r.length;n<a;n++){var i=r[n],o=i.indexOf(": ");o>0&&(t[i.substring(0,o)]=i.substring(o+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var r=new URL(e),n=new URL(t);if(r.protocol=n.protocol,r.origin!==n.origin)return t;var i=a().relative(r.pathname.substr(0,r.pathname.lastIndexOf("/")),n.pathname.substr(0,n.pathname.lastIndexOf("/"))),o=0===i.length?1:0;return i+=n.pathname.substr(n.pathname.lastIndexOf("/")+o,n.pathname.length-1),n.pathname.length<i.length?n.pathname:i}catch(e){return t}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,i.UAParser)(t)}catch(e){return{}}}}],(r=null)&&s(t.prototype,r),n&&s(t,n),e}();const u=l},"./src/core/Version.js": /*!*****************************!*\ !*** ./src/core/Version.js ***! \*****************************/(e,t,r)=>{function n(){return"4.6.0"}r.r(t),r.d(t,{getVersionString:()=>n})},"./src/core/errors/Errors.js": /*!***********************************!*\ !*** ./src/core/errors/Errors.js ***! \***********************************/(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e){var t=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(e){return!1}}();return function(){var r,n=s(e);if(t){var a=s(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return o(this,r)}}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}r.r(t),r.d(t,{default:()=>l});const l=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(r,e);var t=i(r);function r(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=t.call(this)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e}return r}(r(/*! ./ErrorsBase */"./src/core/errors/ErrorsBase.js").default))},"./src/core/errors/ErrorsBase.js": /*!***************************************!*\ !*** ./src/core/errors/ErrorsBase.js ***! \***************************************/(e,t,r)=>{function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.r(t),r.d(t,{default:()=>a});const a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,a;return t=e,(r=[{key:"extend",value:function(e,t){if(e){var r=!!t&&t.override,n=!!t&&t.publicOnly;for(var a in e)!e.hasOwnProperty(a)||this[a]&&!r||n&&-1===e[a].indexOf("public_")||(this[a]=e[a])}}}])&&n(t.prototype,r),a&&n(t,a),e}()},"./src/core/events/CoreEvents.js": /*!***************************************!*\ !*** ./src/core/events/CoreEvents.js ***! \***************************************/(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e){var t=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(e){return!1}}();return function(){var r,n=s(e);if(t){var a=s(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return o(this,r)}}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}r.r(t),r.d(t,{default:()=>l});const l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(r,e);var t=i(r);function r(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=t.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CMSD_STATIC_HEADER="cmsdStaticHeader",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEEK_TARGET="seekTarget",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",e.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",e}return r}(r(/*! ./EventsBase */"./src/core/events/EventsBase.js").default)},"./src/core/events/Events.js": /*!***********************************!*\ !*** ./src/core/events/Events.js ***! \***********************************/(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){var t=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(e){return!1}}();return fun