Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hls-parser

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hls-parser - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

dist/hls-parser.min.js

@@ -8,3 +8,3 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HLS=e():t.HLS=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e,r){(function(e){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(t){throw t}function i(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return"number"==typeof t?t:(e=10===r?parseFloat(t,r):parseInt(t,r),isNaN(e)?0:e)}t.exports={THROW:n,ASSERT:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];var a=!0,s=!1,u=void 0;try{for(var c,f=i.entries()[Symbol.iterator]();!(a=(c=f.next()).done);a=!0){var l=r(c.value,2),h=l[0];l[1]||n(new Error("".concat(t," : Failed at [").concat(h,"]")))}}catch(t){s=!0,u=t}finally{try{a||null==f.return||f.return()}finally{if(s)throw u}}},CONDITIONALASSERT:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=!0,a=!1,s=void 0;try{for(var u,c=e.entries()[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var f=r(u.value,2),l=f[0],h=r(f[1],2),E=h[0],p=h[1];E&&(p||n(new Error("Conditional Assert : Failed at [".concat(l,"]"))))}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}},PARAMCHECK:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=!0,a=!1,s=void 0;try{for(var u,c=e.entries()[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var f=r(u.value,2),l=f[0];void 0===f[1]&&n(new Error("Param Check : Failed at [".concat(l,"]")))}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}},CONDITIONALPARAMCHECK:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=!0,a=!1,s=void 0;try{for(var u,c=e.entries()[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var f=r(u.value,2),l=f[0],h=r(f[1],2),E=h[0],p=h[1];E&&void 0===p&&n(new Error("Conditional Param Check : Failed at [".concat(l,"]")))}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}},INVALIDPLAYLIST:function(t){n(new Error("Invalid Playlist : ".concat(t)))},toNumber:i,hexToByteSequence:function(t){(t.startsWith("0x")||t.startsWith("0X"))&&(t=t.slice(2));for(var r=[],n=0;n<t.length;n+=2)r.push(i(t.substr(n,2),16));return e.from(r)},byteSequenceToHex:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;r<=e&&n(new Error("end must be larger than start : start=".concat(e,", end=").concat(r)));for(var i=[],o=e;o<r;o++)i.push("0".concat((255&t[o]).toString(16).toUpperCase()).slice(-2));return"0x".concat(i.join(""))},tryCatch:function(t,e){try{return t()}catch(t){return e(t)}},splitAt:function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=-1,i=0,o=0;i<t.length;i++)if(t[i]===e){if(o++===r)return[t.slice(0,i),t.slice(i+1)];n=i}return-1!==n?[t.slice(0,n),t.slice(n+1)]:[t]},trim:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t?(t=t.trim()," "===e?t:(t.startsWith(e)&&(t=t.slice(1)),t.endsWith(e)&&(t=t.slice(0,-1)),t)):t},splitByCommaWithPreservingQuotes:function(t){for(var e=[],r=!0,n=0,i=[],o=0;o<t.length;o++){var a=t[o];r&&","===a?(e.push(t.slice(n,o).trim()),n=o+1):'"'!==a&&"'"!==a||(r?(i.push(a),r=!1):a===i[i.length-1]?(i.pop(),r=!0):i.push(a))}return e.push(t.slice(n).trim()),e},camelify:function(t){var e=[],r=!1,n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;"-"!==u&&"_"!==u?r?(e.push(u.toUpperCase()),r=!1):e.push(u.toLowerCase()):r=!0}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return e.join("")},formatDate:function(t){var e=t.getUTCFullYear(),r=("0"+(t.getUTCMonth()+1)).slice(-2),n=("0"+t.getUTCDate()).slice(-2),i=("0"+t.getUTCHours()).slice(-2),o=("0"+t.getUTCMinutes()).slice(-2),a=("0"+t.getUTCSeconds()).slice(-2),s=("00"+t.getUTCMilliseconds()).slice(-3);return"".concat(e,"-").concat(r,"-").concat(n,"T").concat(i,":").concat(o,":").concat(a,".").concat(s,"Z")},hasOwnProp:function(t,e){return Object.hasOwnProperty.call(t,e)}}}).call(this,r(4).Buffer)},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var c=r(0),f=function t(e){u(this,t),c.PARAMCHECK(e),this.type=e},l=function(t){function e(t){var r,n=t.isMasterPlaylist,a=t.uri,s=t.version,f=t.independentSegments,l=void 0!==f&&f,h=t.start,E=t.source;return u(this,e),r=i(this,o(e).call(this,"playlist")),c.PARAMCHECK(n),r.isMasterPlaylist=n,r.uri=a,r.version=s,r.independentSegments=l,r.start=h,r.source=E,r}return a(e,f),e}(),h=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),r.isMasterPlaylist=!0,t=i(this,o(e).call(this,r));var n=r.variants,a=void 0===n?[]:n,s=r.currentVariant,c=r.sessionDataList,f=void 0===c?[]:c,l=r.sessionKeyList,h=void 0===l?[]:l;return t.variants=a,t.currentVariant=s,t.sessionDataList=f,t.sessionKeyList=h,t}return a(e,l),e}(),E=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),r.isMasterPlaylist=!1,t=i(this,o(e).call(this,r));var n=r.targetDuration,a=r.mediaSequenceBase,s=void 0===a?0:a,c=r.discontinuitySequenceBase,f=void 0===c?0:c,l=r.endlist,h=void 0!==l&&l,E=r.playlistType,p=r.isIFrame,T=r.segments,y=void 0===T?[]:T,d=r.hash;return t.targetDuration=n,t.mediaSequenceBase=s,t.discontinuitySequenceBase=f,t.endlist=h,t.playlistType=E,t.isIFrame=p,t.segments=y,t.hash=d,t}return a(e,l),e}(),p=function(t){function e(t){var r,n=t.uri,a=t.mimeType,s=t.data,f=t.duration,l=t.title,h=t.byterange,E=t.discontinuity,p=t.mediaSequenceNumber,T=t.discontinuitySequence,y=t.key,d=t.map,g=t.programDateTime,A=t.dateRange;return u(this,e),r=i(this,o(e).call(this,"segment")),c.PARAMCHECK(n,p,T),r.uri=n,r.mimeType=a,r.data=s,r.duration=f,r.title=l,r.byterange=h,r.discontinuity=E,r.mediaSequenceNumber=p,r.discontinuitySequence=T,r.key=y,r.map=d,r.programDateTime=g,r.dateRange=A,r}return a(e,f),e}();t.exports={Rendition:function t(e){var r=e.type,n=e.uri,i=e.groupId,o=e.language,a=e.assocLanguage,s=e.name,f=e.isDefault,l=e.autoselect,h=e.forced,E=e.instreamId,p=e.characteristics,T=e.channels;u(this,t),c.PARAMCHECK(r,i,s),c.CONDITIONALASSERT(["SUBTITLES"===r,n],["CLOSED-CAPTIONS"===r,E],["CLOSED-CAPTIONS"===r,!n],[h,"CLOSED-CAPTIONS"===r]),this.type=r,this.uri=n,this.groupId=i,this.language=o,this.assocLanguage=a,this.name=s,this.isDefault=f,this.autoselect=l,this.forced=h,this.instreamId=E,this.characteristics=p,this.channels=T},Variant:function t(e){var r=e.uri,n=e.isIFrameOnly,i=void 0!==n&&n,o=e.bandwidth,a=e.averageBandwidth,s=e.codecs,f=e.resolution,l=e.frameRate,h=e.hdcpLevel,E=e.audio,p=void 0===E?[]:E,T=e.video,y=void 0===T?[]:T,d=e.subtitles,g=void 0===d?[]:d,A=e.closedCaptions,v=void 0===A?[]:A,I=e.currentRenditions,S=void 0===I?{audio:0,video:0,subtitles:0,closedCaptions:0}:I;u(this,t),c.PARAMCHECK(r,o),this.uri=r,this.isIFrameOnly=i,this.bandwidth=o,this.averageBandwidth=a,this.codecs=s,this.resolution=f,this.frameRate=l,this.hdcpLevel=h,this.audio=p,this.video=y,this.subtitles=g,this.closedCaptions=v,this.currentRenditions=S},SessionData:function t(e){var r=e.id,n=e.value,i=e.uri,o=e.language;u(this,t),c.PARAMCHECK(r,n||i),c.ASSERT("SessionData cannot have both value and uri, shoud be either.",!(n&&i)),this.id=r,this.value=n,this.uri=i,this.language=o},Key:function t(e){var r=e.method,n=e.uri,i=e.iv,o=e.format,a=e.formatVersion;u(this,t),c.PARAMCHECK(r),c.CONDITIONALPARAMCHECK(["NONE"!==r,n]),c.CONDITIONALASSERT(["NONE"===r,!(n||i||o||a)]),this.method=r,this.uri=n,this.iv=i,this.format=o,this.formatVersion=a},MediaInitializationSection:function t(e){var r=e.uri,n=e.mimeType,i=e.byterange;u(this,t),c.PARAMCHECK(r),this.uri=r,this.mimeType=n,this.byterange=i},DateRange:function t(e){var r=e.id,n=e.classId,i=e.start,o=e.end,a=e.duration,s=e.plannedDuration,f=e.endOnNext,l=e.attributes,h=void 0===l?{}:l;u(this,t),c.PARAMCHECK(r,i),c.CONDITIONALPARAMCHECK([!0===f,n]),c.CONDITIONALASSERT([o,i<=o],[a,a>=0],[s,s>=0]),this.id=r,this.classId=n,this.start=i,this.end=o,this.duration=a,this.plannedDuration=s,this.endOnNext=f,this.attributes=h},Playlist:l,MasterPlaylist:h,MediaPlaylist:E,Segment:p}},function(t,e,r){var n=r(3),i=r(9),o=r(1);t.exports={parse:n,stringify:i,types:o}},function(t,e,r){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=r(0),o=r(1),a=o.Rendition,s=o.Variant,u=o.SessionData,c=o.Key,f=o.MediaInitializationSection,l=o.DateRange,h=o.MasterPlaylist,E=o.MediaPlaylist,p=o.Segment;function T(t){return i.trim(t,'"')}function y(t){var e=i.splitAt(t,"@");return{length:i.toNumber(e[0]),offset:e[1]?i.toNumber(e[1]):-1}}function d(t,e){e.IV&&t.compatibleVersion<2&&(t.compatibleVersion=2),(e.KEYFORMAT||e.KEYFORMATVERSIONS)&&t.compatibleVersion<5&&(t.compatibleVersion=5)}function g(t){var e={};return i.splitByCommaWithPreservingQuotes(t).forEach(function(t){var r=n(i.splitAt(t,"="),2),o=r[0],a=r[1],s=T(a);switch(o){case"URI":e[o]=s;break;case"START-DATE":case"END-DATE":e[o]=new Date(s);break;case"IV":e[o]=function(t){var e=i.hexToByteSequence(t);return 16!==e.length&&i.INVALIDPLAYLIST("IV must be a 128-bit unsigned integer"),e}(s);break;case"BYTERANGE":e[o]=y(s);break;case"RESOLUTION":e[o]=function(t){var e=i.splitAt(t,"x");return{width:i.toNumber(e[0]),height:i.toNumber(e[1])}}(s);break;case"END-ON-NEXT":case"DEFAULT":case"AUTOSELECT":case"FORCED":case"PRECISE":e[o]="YES"===s;break;case"DURATION":case"PLANNED-DURATION":case"BANDWIDTH":case"AVERAGE-BANDWIDTH":case"FRAME-RATE":case"TIME-OFFSET":e[o]=i.toNumber(s);break;default:o.startsWith("SCTE35-")?e[o]=i.hexToByteSequence(s):o.startsWith("X-")?e[o]=function(t){return t.startsWith('"')?T(t):t.startsWith("0x")||t.startsWith("0X")?i.hexToByteSequence(t):i.toNumber(t)}(a):e[o]=s}}),e}function A(t,e){switch(t){case"EXTM3U":case"EXT-X-DISCONTINUITY":case"EXT-X-ENDLIST":case"EXT-X-I-FRAMES-ONLY":case"EXT-X-INDEPENDENT-SEGMENTS":return[null,null];case"EXT-X-VERSION":case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":return[i.toNumber(e),null];case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-DATERANGE":case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":case"EXT-X-START":return[null,g(e)];case"EXTINF":return[function(t){var e=i.splitAt(t,",");return{duration:i.toNumber(e[0]),title:decodeURIComponent(escape(e[1]))}}(e),null];case"EXT-X-BYTERANGE":return[y(e),null];case"EXT-X-PROGRAM-DATE-TIME":return[new Date(e),null];case"EXT-X-PLAYLIST-TYPE":default:return[e,null]}}function v(){i.INVALIDPLAYLIST("The file contains both media and master playlist tags.")}function I(t,e,r){var n=function(t){var e=t.attributes;return new a({type:e.TYPE,uri:e.URI,groupId:e["GROUP-ID"],language:e.LANGUAGE,assocLanguage:e["ASSOC-LANGUAGE"],name:e.NAME,isDefault:e.DEFAULT,autoselect:e.AUTOSELECT,forced:e.FORCED,instreamId:e["INSTREAM-ID"],characteristics:e.CHARACTERISTICS,channels:e.CHANNELS})}(e),o=t[i.camelify(r)],s=function(t,e){var r=!1,n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(u.name===e.name)return"All EXT-X-MEDIA tags in the same Group MUST have different NAME attributes.";u.isDefault&&(r=!0)}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r&&e.isDefault?"EXT-X-MEDIA A Group MUST NOT have more than one member with a DEFAULT attribute of YES.":""}(o,n);s&&i.INVALIDPLAYLIST(s),o.push(n),n.isDefault&&(t.currentRenditions[i.camelify(r)]=o.length-1)}function S(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=new s({uri:r,bandwidth:e.BANDWIDTH,averageBandwidth:e["AVERAGE-BANDWIDTH"],codecs:e.CODECS,resolution:e.RESOLUTION,frameRate:e["FRAME-RATE"],hdcpLevel:e["HDCP-LEVEL"]}),u=!0,c=!1,f=void 0;try{for(var l,h=t[Symbol.iterator]();!(u=(l=h.next()).done);u=!0){var E=l.value;if("EXT-X-MEDIA"===E.name){var p=E.attributes,T=p.TYPE;if(T&&p["GROUP-ID"]||i.INVALIDPLAYLIST("EXT-X-MEDIA TYPE attribute is REQUIRED."),e[T]===p["GROUP-ID"]&&(I(a,E,T),"CLOSED-CAPTIONS"===T)){var y=!0,d=!1,g=void 0;try{for(var A,v=a.closedCaptions[Symbol.iterator]();!(y=(A=v.next()).done);y=!0){var S=A.value.instreamId;if(S&&S.startsWith("SERVICE")&&o.compatibleVersion<7){o.compatibleVersion=7;break}}}catch(t){d=!0,g=t}finally{try{y||null==v.return||v.return()}finally{if(d)throw g}}}}}}catch(t){c=!0,f=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw f}}return function(t,e,r){["AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(n){"CLOSED-CAPTIONS"===n&&"NONE"===t[n]?(r.isClosedCaptionsNone=!0,e.closedCaptions=[]):t[n]&&!e[i.camelify(n)].find(function(e){return e.groupId===t[n]})&&i.INVALIDPLAYLIST("".concat(n," attribute MUST match the value of the GROUP-ID attribute of an EXT-X-MEDIA tag whose TYPE attribute is ").concat(n,"."))})}(e,a,o),a.isIFrameOnly=n,a}function m(t,e){if(t.method!==e.method)return!1;if(t.uri!==e.uri)return!1;if(t.iv){if(!e.iv)return!1;if(t.iv.length!==e.iv.length)return!1;for(var r=0;r<t.iv.length;r++)if(t.iv[r]!==e.iv[r])return!1}else if(e.iv)return!1;return t.format===e.format&&t.formatVersion===e.formatVersion}function b(t,e,r,n,o,a,s){for(var u=new p({uri:e,mediaSequenceNumber:o,discontinuitySequence:a}),h=function(e){var r=t[e],n=r.name,o=r.value,a=r.attributes;if("EXTINF"===n)!Number.isInteger(o.duration)&&s.compatibleVersion<3&&(s.compatibleVersion=3),Math.round(o.duration)>s.targetDuration&&i.INVALIDPLAYLIST("EXTINF duration, when rounded to the nearest integer, MUST be less than or equal to the target duration"),u.duration=o.duration,u.title=o.title;else if("EXT-X-BYTERANGE"===n)s.compatibleVersion<4&&(s.compatibleVersion=4),u.byterange=o;else if("EXT-X-DISCONTINUITY"===n)u.discontinuity=!0;else if("EXT-X-KEY"===n)d(s,a),u.key=new c({method:a.METHOD,uri:a.URI,iv:a.IV,format:a.KEYFORMAT,formatVersion:a.KEYFORMATVERSIONS});else if("EXT-X-MAP"===n)s.compatibleVersion<5&&(s.compatibleVersion=5),s.hasMap=!0,u.map=new f({uri:a.URI,byterange:a.BYTERANGE});else if("EXT-X-PROGRAM-DATE-TIME"===n)u.programDateTime=o;else if("EXT-X-DATERANGE"===n){var h={};Object.keys(a).forEach(function(t){(t.startsWith("SCTE35-")||t.startsWith("X-"))&&(h[t]=a[t])}),u.dateRange=new l({id:a.ID,classId:a.CLASS,start:a["START-DATE"],end:a["END-DATE"],duration:a.DURATION,plannedDuration:a["PLANNED-DURATION"],endOnNext:a["END-ON-NEXT"],attributes:h})}},E=r;E<=n;E++)h(E);return u}function N(t,e){var r=new E,o=-1,a=0,s=0,u=null,c=null,f=!0,l=!1,h=void 0;try{for(var p,T=t.entries()[Symbol.iterator]();!(f=(p=T.next()).done);f=!0){var y=n(p.value,2),d=y[0],g=y[1],A=g.name,v=g.value,I=g.attributes;if("Segment"!==g.category){if("EXT-X-VERSION"===A)void 0===r.version?r.version=v:i.INVALIDPLAYLIST("A Playlist file MUST NOT contain more than one EXT-X-VERSION tag.");else if("EXT-X-TARGETDURATION"===A)r.targetDuration=e.targetDuration=v;else if("EXT-X-MEDIA-SEQUENCE"===A)(r.segments.length>0||-1!==o)&&i.INVALIDPLAYLIST("The EXT-X-MEDIA-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),r.mediaSequenceBase=a=v;else if("EXT-X-DISCONTINUITY-SEQUENCE"===A)(r.segments.length>0||-1!==o)&&i.INVALIDPLAYLIST("The EXT-X-DISCONTINUITY-SEQUENCE tag MUST appear before the first Media Segment in the Playlist."),r.discontinuitySequenceBase=s=v;else if("EXT-X-ENDLIST"===A)r.endlist=!0;else if("EXT-X-PLAYLIST-TYPE"===A)r.playlistType=v;else if("EXT-X-I-FRAMES-ONLY"===A)e.compatibleVersion<4&&(e.compatibleVersion=4),r.isIFrame=!0;else if("EXT-X-INDEPENDENT-SEGMENTS"===A)r.independentSegments&&i.INVALIDPLAYLIST("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),r.independentSegments=!0;else if("EXT-X-START"===A)r.start&&i.INVALIDPLAYLIST("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof I["TIME-OFFSET"]&&i.INVALIDPLAYLIST("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),r.start={offset:I["TIME-OFFSET"],precise:I.PRECISE||!1};else if("string"==typeof g){-1===o&&i.INVALIDPLAYLIST("A URI line is not preceded by any segment tags"),r.targetDuration||i.INVALIDPLAYLIST("The EXT-X-TARGETDURATION tag is REQUIRED");var S=b(t,g,o,d-1,a++,s,e);if(S){var m=S.discontinuity,N=S.key,R=S.map,D=S.byterange,w=S.uri;if(m&&(S.discontinuitySequence=++s),N?u=N:u&&(S.key=u),R?c=R:c&&(S.map=c),D&&-1===D.offset){var X=r.segments;if(X.length>0){var O=X[X.length-1];O.byterange&&O.uri===w?D.offset=O.byterange.offset+O.byterange.length:i.INVALIDPLAYLIST("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST be a sub-range of the same media resource")}else i.INVALIDPLAYLIST("If offset of EXT-X-BYTERANGE is not present, a previous Media Segment MUST appear in the Playlist file")}r.segments.push(S)}o=-1}}else-1===o&&(o=d)}}catch(t){l=!0,h=t}finally{try{f||null==T.return||T.return()}finally{if(l)throw h}}return function(t){for(var e=new Map,r=new Map,n=!1,o=!1,a=t.length-1;a>=0;a--){var s=t[a],u=s.programDateTime,c=s.dateRange;if(u&&(o=!0),c){n=!0,c.endOnNext&&(c.end||c.duration)&&i.INVALIDPLAYLIST("An EXT-X-DATERANGE tag with an END-ON-NEXT=YES attribute MUST NOT contain DURATION or END-DATE attributes.");var f=c.start.getTime(),l=c.duration||0;c.end&&c.duration&&f+1e3*l!==c.end.getTime()&&i.INVALIDPLAYLIST("END-DATE MUST be equal to the value of the START-DATE attribute plus the value of the DURATION"),c.endOnNext&&(c.end=e.get(c.classId)),e.set(c.classId,c.start);var h=c.end?c.end.getTime():c.start.getTime()+1e3*(c.duration||0),E=r.get(c.classId);if(E){var p=!0,T=!1,y=void 0;try{for(var d,g=E[Symbol.iterator]();!(p=(d=g.next()).done);p=!0){var A=d.value;(A.start<=f&&A.end>f||A.start>=f&&A.start<h)&&i.INVALIDPLAYLIST("DATERANGE tags with the same CLASS should not overlap")}}catch(t){T=!0,y=t}finally{try{p||null==g.return||g.return()}finally{if(T)throw y}}E.push({start:f,end:h})}else r.set(c.classId,[{start:f,end:h}])}}n&&!o&&i.INVALIDPLAYLIST("If a Playlist contains an EXT-X-DATERANGE tag, it MUST also contain at least one EXT-X-PROGRAM-DATE-TIME tag.")}(r.segments),r}function R(t,e){var r=n(function(t){var e=t.indexOf(":");return-1===e?[t.slice(1).trim(),null]:[t.slice(1,e).trim(),t.slice(e+1).trim()]}(t),2),o=r[0],a=r[1],s=function(t){switch(t){case"EXTM3U":case"EXT-X-VERSION":return"Basic";case"EXTINF":case"EXT-X-BYTERANGE":case"EXT-X-DISCONTINUITY":case"EXT-X-KEY":case"EXT-X-MAP":case"EXT-X-PROGRAM-DATE-TIME":case"EXT-X-DATERANGE":return"Segment";case"EXT-X-TARGETDURATION":case"EXT-X-MEDIA-SEQUENCE":case"EXT-X-DISCONTINUITY-SEQUENCE":case"EXT-X-ENDLIST":case"EXT-X-PLAYLIST-TYPE":case"EXT-X-I-FRAMES-ONLY":return"MediaPlaylist";case"EXT-X-MEDIA":case"EXT-X-STREAM-INF":case"EXT-X-I-FRAME-STREAM-INF":case"EXT-X-SESSION-DATA":case"EXT-X-SESSION-KEY":return"MasterPlaylist";case"EXT-X-INDEPENDENT-SEGMENTS":case"EXT-X-START":return"MediaorMasterPlaylist";default:return"Unknown"}}(o);if(function(t,e){if("Segment"===t||"MediaPlaylist"===t)return void 0===e.isMasterPlaylist?void(e.isMasterPlaylist=!1):void(e.isMasterPlaylist&&v());if("MasterPlaylist"===t){if(void 0===e.isMasterPlaylist)return void(e.isMasterPlaylist=!0);!1===e.isMasterPlaylist&&v()}}(s,e),"Unknown"===s)return null;"MediaPlaylist"===s&&(e.hash[o]&&i.INVALIDPLAYLIST("There MUST NOT be more than one Media Playlist tag of each type in any Media Playlist"),e.hash[o]=!0);var u=n(A(o,a),2);return{name:o,category:s,value:u[0],attributes:u[1]}}function D(t,e){var r;return e.isMasterPlaylist?r=function(t,e){var r=new h,o=!0,a=!1,s=void 0;try{for(var f,l=t.entries()[Symbol.iterator]();!(o=(f=l.next()).done);o=!0){var E=n(f.value,2),p=E[0],T=E[1],y=T.name,g=T.value,A=T.attributes;if("EXT-X-VERSION"===y)r.version=g;else if("EXT-X-STREAM-INF"===y){var v=t[p+1];("string"!=typeof v||v.startsWith("#EXT"))&&i.INVALIDPLAYLIST("EXT-X-STREAM-INF must be followed by a URI line");var I=S(t,A,v,!1,e);I&&r.variants.push(I)}else if("EXT-X-I-FRAME-STREAM-INF"===y){var b=S(t,A,A.URI,!0,e);b&&r.variants.push(b)}else"EXT-X-SESSION-DATA"===y?function(){var t=new u({id:A["DATA-ID"],value:A.VALUE,uri:A.URI,language:A.LANGUAGE});r.sessionDataList.find(function(e){return e.id===t.id&&e.language===t.language})&&i.INVALIDPLAYLIST("A Playlist MUST NOT contain more than one EXT-X-SESSION-DATA tag with the same DATA-ID attribute and the same LANGUAGE attribute."),r.sessionDataList.push(t)}():"EXT-X-SESSION-KEY"===y?function(){"NONE"===A.METHOD&&i.INVALIDPLAYLIST("EXT-X-SESSION-KEY: The value of the METHOD attribute MUST NOT be NONE");var t=new c({method:A.METHOD,uri:A.URI,iv:A.IV,format:A.KEYFORMAT,formatVersion:A.KEYFORMATVERSIONS});r.sessionKeyList.find(function(e){return m(e,t)})&&i.INVALIDPLAYLIST("A Master Playlist MUST NOT contain more than one EXT-X-SESSION-KEY tag with the same METHOD, URI, IV, KEYFORMAT, and KEYFORMATVERSIONS attribute values."),d(e,A),r.sessionKeyList.push(t)}():"EXT-X-INDEPENDENT-SEGMENTS"===y?(r.independentSegments&&i.INVALIDPLAYLIST("EXT-X-INDEPENDENT-SEGMENTS tag MUST NOT appear more than once in a Playlist"),r.independentSegments=!0):"EXT-X-START"===y&&(r.start&&i.INVALIDPLAYLIST("EXT-X-START tag MUST NOT appear more than once in a Playlist"),"number"!=typeof A["TIME-OFFSET"]&&i.INVALIDPLAYLIST("EXT-X-START: TIME-OFFSET attribute is REQUIRED"),r.start={offset:A["TIME-OFFSET"],precise:A.PRECISE||!1})}}catch(t){a=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}if(e.isClosedCaptionsNone){var N=!0,R=!1,D=void 0;try{for(var w,X=r.variants[Symbol.iterator]();!(N=(w=X.next()).done);N=!0)w.value.closedCaptions.length>0&&i.INVALIDPLAYLIST("If there is a variant with CLOSED-CAPTIONS attribute of NONE, all EXT-X-STREAM-INF tags MUST have this attribute with a value of NONE")}catch(t){R=!0,D=t}finally{try{N||null==X.return||X.return()}finally{if(R)throw D}}}return r}(t,e):!(r=N(t,e)).isIFrame&&e.hasMap&&e.compatibleVersion<6&&(e.compatibleVersion=6),e.compatibleVersion>1&&(!r.version||r.version<e.compatibleVersion)&&i.INVALIDPLAYLIST("EXT-X-VERSION needs to be ".concat(e.compatibleVersion," or higher.")),r}t.exports=function(t){var e={version:void 0,isMasterPlaylist:void 0,hasMap:!1,targetDuration:0,compatibleVersion:1,isClosedCaptionsNone:!1,hash:{}},r=D(function(t,e){var r=[];return t.split("\n").forEach(function(t){var n=t.trim();if(n)if(n.startsWith("#")){if(n.startsWith("#EXT")){var i=R(n,e);return void(i&&r.push(i))}}else r.push(n)}),0!==r.length&&"EXTM3U"===r[0].name||i.INVALIDPLAYLIST("The EXTM3U tag MUST be the first line."),r}(t,e),e);return r.source=t,r}},function(t,e,r){"use strict";(function(t){

*/
var n=r(6),i=r(7),o=r(8);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|E(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|E(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|E(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function E(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function T(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:d(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):d(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function d(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function A(t,e,r,n){return G(F(e,t.length-r),t,r,n)}function v(t,e,r,n){return G(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function I(t,e,r,n){return v(t,e,r,n)}function S(t,e,r,n){return G(x(e),t,r,n)}function m(t,e,r,n){return G(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function b(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function N(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).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(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)T(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)T(this,e,e+3),T(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)T(this,e,e+7),T(this,e+1,e+6),T(this,e+2,e+5),T(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?N(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return X(this,e,r);case"utf8":case"utf-8":return N(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return w(this,e,r);case"base64":return b(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return I(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function w(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function X(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=V(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function M(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function C(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Y(t,e,r,n,o){return o||C(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function _(t,e,r,n,o){return o||C(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return _(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return _(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:F(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function x(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(5))},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=c(t),n=r[0],a=r[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,n,a)),u=0,f=a>0?n-4:n,l=0;l<f;l+=4)e=i[t.charCodeAt(l)]<<18|i[t.charCodeAt(l+1)]<<12|i[t.charCodeAt(l+2)]<<6|i[t.charCodeAt(l+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(l)]<<2|i[t.charCodeAt(l+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(l)]<<10|i[t.charCodeAt(l+1)]<<4|i[t.charCodeAt(l+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(f(n));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,E=t[e+l];for(l+=h,o=E&(1<<-f)-1,E>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(E?-1:1);a+=Math.pow(2,n),o-=c}return(E?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,p=n?1:-1,T=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+E]=255&s,E+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+E]=255&a,E+=p,a/=256,c-=8);t[r+E-p]|=128*T}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t,e,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}})(t,e,r||t)}function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return u(t,arguments,f(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function u(t,e,r){return(u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=r(0),h=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF"],E=["#EXT-X-KEY","#EXT-X-MEDIA"],p=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,f(e).call(this))).baseUri=t,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,s(Array)),function(t,e,r){e&&i(t.prototype,e),r&&i(t,r)}(e,[{key:"push",value:function(){for(var t=this,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var o=function(){var r=n[s];if(h.some(function(t){return r.startsWith(t)}))return a(f(e.prototype),"push",t).call(t,r),"continue";if(t.includes(r)){if(E.some(function(t){return r.startsWith(t)}))return"continue";l.INVALIDPLAYLIST("Redundant item (".concat(r,")"))}a(f(e.prototype),"push",t).call(t,r)},s=0;s<n.length;s++)o()}}]),e}();function T(t,e){var r=['DATA-ID="'.concat(e.id,'"')];e.language&&r.push('LANGUAGE="'.concat(e.language,'"')),e.value?r.push('VALUE="'.concat(e.value,'"')):e.uri&&r.push('URI="'.concat(e.uri,'"')),t.push("#EXT-X-SESSION-DATA:".concat(r.join(",")))}function y(t,e,r){var n=r?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",i=["METHOD=".concat(e.method)];e.uri&&i.push('URI="'.concat(e.uri,'"')),e.iv&&(16!==e.iv.length&&l.INVALIDPLAYLIST("IV must be a 128-bit unsigned integer"),i.push("IV=".concat(l.byteSequenceToHex(e.iv)))),e.format&&i.push('KEYFORMAT="'.concat(e.format,'"')),e.formatVersion&&i.push('KEYFORMATVERSIONS="'.concat(e.formatVersion,'"')),t.push("".concat(n,":").concat(i.join(",")))}function d(t,e){var r=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",n=["BANDWIDTH=".concat(e.bandwidth)];if(e.averageBandwidth&&n.push("AVERAGE-BANDWIDTH=".concat(e.averageBandwidth)),e.isIFrameOnly&&n.push('URI="'.concat(e.uri,'"')),e.codecs&&n.push('CODECS="'.concat(e.codecs,'"')),e.resolution&&n.push("RESOLUTION=".concat(e.resolution.width,"x").concat(e.resolution.height)),e.frameRate&&n.push("FRAME-RATE=".concat(e.frameRate)),e.hdcpLevel&&n.push("HDCP-LEVEL=".concat(e.hdcpLevel)),e.audio.length>0){n.push('AUDIO="'.concat(e.audio[0].groupId,'"'));var i=!0,o=!1,a=void 0;try{for(var s,u=e.audio[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){g(t,s.value)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(e.video.length>0){n.push('VIDEO="'.concat(e.video[0].groupId,'"'));var c=!0,f=!1,l=void 0;try{for(var h,E=e.video[Symbol.iterator]();!(c=(h=E.next()).done);c=!0){g(t,h.value)}}catch(t){f=!0,l=t}finally{try{c||null==E.return||E.return()}finally{if(f)throw l}}}if(e.subtitles.length>0){n.push('SUBTITLES="'.concat(e.subtitles[0].groupId,'"'));var p=!0,T=!1,y=void 0;try{for(var d,A=e.subtitles[Symbol.iterator]();!(p=(d=A.next()).done);p=!0){g(t,d.value)}}catch(t){T=!0,y=t}finally{try{p||null==A.return||A.return()}finally{if(T)throw y}}}if(e.closedCaptions.length>0){n.push('CLOSED-CAPTIONS="'.concat(e.closedCaptions[0].groupId,'"'));var v=!0,I=!1,S=void 0;try{for(var m,b=e.closedCaptions[Symbol.iterator]();!(v=(m=b.next()).done);v=!0){g(t,m.value)}}catch(t){I=!0,S=t}finally{try{v||null==b.return||b.return()}finally{if(I)throw S}}}t.push("".concat(r,":").concat(n.join(","))),e.isIFrameOnly||t.push("".concat(e.uri))}function g(t,e){var r=["TYPE=".concat(e.type),'GROUP-ID="'.concat(e.groupId,'"'),'NAME="'.concat(e.name,'"')];void 0!==e.isDefault&&r.push("DEFAULT=".concat(e.isDefault?"YES":"NO")),void 0!==e.autoselect&&r.push("AUTOSELECT=".concat(e.autoselect?"YES":"NO")),void 0!==e.forced&&r.push("FORCED=".concat(e.forced?"YES":"NO")),e.language&&r.push('LANGUAGE="'.concat(e.language,'"')),e.assocLanguage&&r.push('ASSOC-LANGUAGE="'.concat(e.assocLanguage,'"')),e.instreamId&&r.push('INSTREAM-ID="'.concat(e.instreamId,'"')),e.characteristics&&r.push('CHARACTERISTICS="'.concat(e.characteristics,'"')),e.channels&&r.push('CHANNELS="'.concat(e.channels,'"')),e.uri&&r.push('URI="'.concat(e.uri,'"')),t.push("#EXT-X-MEDIA:".concat(r.join(",")))}function A(t,e){e.byterange&&t.push("#EXT-X-BYTERANGE:".concat(e.byterange.length,"@").concat(e.byterange.offset)),e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key&&y(t,e.key),e.map&&function(t,e){var r=['URI="'.concat(e.uri,'"')];e.byterange&&r.push("BYTERANGE=".concat(e.byterange));t.push("#EXT-X-MAP:".concat(r.join(",")))}(t,e.map),e.programDateTime&&t.push("#EXT-X-PROGRAM-DATE-TIME:".concat(l.formatDate(e.programDateTime))),e.dateRange&&function(t,e){var r=['ID="'.concat(e.id,'"'),'START-DATE="'.concat(l.formatDate(e.start),'"')];e.end&&r.push('END-DATE="'.concat(e.end,'"'));e.duration&&r.push("DURATION=".concat(e.duration));e.plannedDuration&&r.push("PLANNED-DURATION=".concat(e.plannedDuration));e.classId&&r.push('CLASS="'.concat(e.classId,'"'));e.endOnNext&&r.push("END-ON-NEXT=YES");Object.keys(e.attributes).forEach(function(t){t.startsWith("X-")?"number"==typeof e.attributes[t]?r.push("".concat(t,"=").concat(e.attributes[t])):r.push("".concat(t,'="').concat(e.attributes[t],'"')):t.startsWith("SCTE35-")&&r.push("".concat(t,"=").concat(l.byteSequenceToHex(e.attributes[t])))}),t.push("#EXT-X-DATERANGE:".concat(r.join(",")))}(t,e.dateRange),t.push("#EXTINF:".concat(e.duration,",").concat(unescape(encodeURIComponent(e.title||"")))),t.push("".concat(e.uri))}t.exports=function(t){l.PARAMCHECK(t),l.ASSERT("Not a playlist","playlist"===t.type);var e=new p(t.uri);return e.push("#EXTM3U"),t.version&&e.push("#EXT-X-VERSION:".concat(t.version)),t.independentSegments&&e.push("#EXT-X-INDEPENDENT-SEGMENTS:".concat(t.independentSegments)),t.start&&e.push("#EXT-X-START:TIME-OFFSET=".concat(t.start.offset).concat(t.start.precise?",PRECISE=YES":"")),t.isMasterPlaylist?function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=e.sessionDataList[Symbol.iterator]();!(r=(o=a.next()).done);r=!0)T(t,o.value)}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}var s=!0,u=!1,c=void 0;try{for(var f,l=e.sessionKeyList[Symbol.iterator]();!(s=(f=l.next()).done);s=!0)y(t,f.value,!0)}catch(t){u=!0,c=t}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}var h=!0,E=!1,p=void 0;try{for(var g,A=e.variants[Symbol.iterator]();!(h=(g=A.next()).done);h=!0)d(t,g.value)}catch(t){E=!0,p=t}finally{try{h||null==A.return||A.return()}finally{if(E)throw p}}}(e,t):function(t,e){e.targetDuration&&t.push("#EXT-X-TARGETDURATION:".concat(e.targetDuration)),e.mediaSequenceBase&&t.push("#EXT-X-MEDIA-SEQUENCE:".concat(e.mediaSequenceBase)),e.discontinuitySequenceBase&&t.push("#EXT-X-DISCONTINUITY-SEQUENCE:".concat(e.discontinuitySequenceBase)),e.playlistType&&t.push("#EXT-X-PLAYLIST-TYPE:".concat(e.playlistType)),e.isIFrame&&t.push("#EXT-X-I-FRAMES-ONLY");var r=!0,n=!1,i=void 0;try{for(var o,a=e.segments[Symbol.iterator]();!(r=(o=a.next()).done);r=!0)A(t,o.value)}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}e.endlist&&t.push("#EXT-X-ENDLIST")}(e,t),e.join("\n")}}])});
var n=r(6),i=r(7),o=r(8);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|E(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|E(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|E(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function E(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function T(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:d(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):d(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function d(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function A(t,e,r,n){return G(F(e,t.length-r),t,r,n)}function v(t,e,r,n){return G(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function I(t,e,r,n){return v(t,e,r,n)}function S(t,e,r,n){return G(x(e),t,r,n)}function m(t,e,r,n){return G(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function b(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function N(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).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(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)T(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)T(this,e,e+3),T(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)T(this,e,e+7),T(this,e+1,e+6),T(this,e+2,e+5),T(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?N(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return X(this,e,r);case"utf8":case"utf-8":return N(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return w(this,e,r);case"base64":return b(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return I(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function w(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function X(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=V(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function M(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function C(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Y(t,e,r,n,o){return o||C(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function _(t,e,r,n,o){return o||C(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return _(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return _(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:F(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function x(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(5))},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=c(t),n=r[0],a=r[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,n,a)),u=0,f=a>0?n-4:n,l=0;l<f;l+=4)e=i[t.charCodeAt(l)]<<18|i[t.charCodeAt(l+1)]<<12|i[t.charCodeAt(l+2)]<<6|i[t.charCodeAt(l+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(l)]<<2|i[t.charCodeAt(l+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(l)]<<10|i[t.charCodeAt(l+1)]<<4|i[t.charCodeAt(l+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(f(n));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,E=t[e+l];for(l+=h,o=E&(1<<-f)-1,E>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(E?-1:1);a+=Math.pow(2,n),o-=c}return(E?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,p=n?1:-1,T=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+E]=255&s,E+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+E]=255&a,E+=p,a/=256,c-=8);t[r+E-p]|=128*T}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t,e,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}})(t,e,r||t)}function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return u(t,arguments,f(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function u(t,e,r){return(u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=r(0),h=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-MAP","#EXT-X-STREAM-INF"],E=["#EXT-X-KEY","#EXT-X-MEDIA"],p=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=o(this,f(e).call(this))).baseUri=t,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,s(Array)),function(t,e,r){e&&i(t.prototype,e),r&&i(t,r)}(e,[{key:"push",value:function(){for(var t=this,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var o=function(){var r=n[s];if(h.some(function(t){return r.startsWith(t)}))return a(f(e.prototype),"push",t).call(t,r),"continue";if(t.includes(r)){if(E.some(function(t){return r.startsWith(t)}))return"continue";l.INVALIDPLAYLIST("Redundant item (".concat(r,")"))}a(f(e.prototype),"push",t).call(t,r)},s=0;s<n.length;s++)o()}}]),e}();function T(t,e){var r=['DATA-ID="'.concat(e.id,'"')];e.language&&r.push('LANGUAGE="'.concat(e.language,'"')),e.value?r.push('VALUE="'.concat(e.value,'"')):e.uri&&r.push('URI="'.concat(e.uri,'"')),t.push("#EXT-X-SESSION-DATA:".concat(r.join(",")))}function y(t,e,r){var n=r?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",i=["METHOD=".concat(e.method)];e.uri&&i.push('URI="'.concat(e.uri,'"')),e.iv&&(16!==e.iv.length&&l.INVALIDPLAYLIST("IV must be a 128-bit unsigned integer"),i.push("IV=".concat(l.byteSequenceToHex(e.iv)))),e.format&&i.push('KEYFORMAT="'.concat(e.format,'"')),e.formatVersion&&i.push('KEYFORMATVERSIONS="'.concat(e.formatVersion,'"')),t.push("".concat(n,":").concat(i.join(",")))}function d(t,e){var r=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",n=["BANDWIDTH=".concat(e.bandwidth)];if(e.averageBandwidth&&n.push("AVERAGE-BANDWIDTH=".concat(e.averageBandwidth)),e.isIFrameOnly&&n.push('URI="'.concat(e.uri,'"')),e.codecs&&n.push('CODECS="'.concat(e.codecs,'"')),e.resolution&&n.push("RESOLUTION=".concat(e.resolution.width,"x").concat(e.resolution.height)),e.frameRate&&n.push("FRAME-RATE=".concat(e.frameRate)),e.hdcpLevel&&n.push("HDCP-LEVEL=".concat(e.hdcpLevel)),e.audio.length>0){n.push('AUDIO="'.concat(e.audio[0].groupId,'"'));var i=!0,o=!1,a=void 0;try{for(var s,u=e.audio[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){g(t,s.value)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(e.video.length>0){n.push('VIDEO="'.concat(e.video[0].groupId,'"'));var c=!0,f=!1,l=void 0;try{for(var h,E=e.video[Symbol.iterator]();!(c=(h=E.next()).done);c=!0){g(t,h.value)}}catch(t){f=!0,l=t}finally{try{c||null==E.return||E.return()}finally{if(f)throw l}}}if(e.subtitles.length>0){n.push('SUBTITLES="'.concat(e.subtitles[0].groupId,'"'));var p=!0,T=!1,y=void 0;try{for(var d,A=e.subtitles[Symbol.iterator]();!(p=(d=A.next()).done);p=!0){g(t,d.value)}}catch(t){T=!0,y=t}finally{try{p||null==A.return||A.return()}finally{if(T)throw y}}}if(e.closedCaptions.length>0){n.push('CLOSED-CAPTIONS="'.concat(e.closedCaptions[0].groupId,'"'));var v=!0,I=!1,S=void 0;try{for(var m,b=e.closedCaptions[Symbol.iterator]();!(v=(m=b.next()).done);v=!0){g(t,m.value)}}catch(t){I=!0,S=t}finally{try{v||null==b.return||b.return()}finally{if(I)throw S}}}t.push("".concat(r,":").concat(n.join(","))),e.isIFrameOnly||t.push("".concat(e.uri))}function g(t,e){var r=["TYPE=".concat(e.type),'GROUP-ID="'.concat(e.groupId,'"'),'NAME="'.concat(e.name,'"')];void 0!==e.isDefault&&r.push("DEFAULT=".concat(e.isDefault?"YES":"NO")),void 0!==e.autoselect&&r.push("AUTOSELECT=".concat(e.autoselect?"YES":"NO")),void 0!==e.forced&&r.push("FORCED=".concat(e.forced?"YES":"NO")),e.language&&r.push('LANGUAGE="'.concat(e.language,'"')),e.assocLanguage&&r.push('ASSOC-LANGUAGE="'.concat(e.assocLanguage,'"')),e.instreamId&&r.push('INSTREAM-ID="'.concat(e.instreamId,'"')),e.characteristics&&r.push('CHARACTERISTICS="'.concat(e.characteristics,'"')),e.channels&&r.push('CHANNELS="'.concat(e.channels,'"')),e.uri&&r.push('URI="'.concat(e.uri,'"')),t.push("#EXT-X-MEDIA:".concat(r.join(",")))}function A(t,e){e.byterange&&t.push("#EXT-X-BYTERANGE:".concat(e.byterange.length,"@").concat(e.byterange.offset)),e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key&&y(t,e.key),e.map&&function(t,e){var r=['URI="'.concat(e.uri,'"')];e.byterange&&r.push("BYTERANGE=".concat(e.byterange));t.push("#EXT-X-MAP:".concat(r.join(",")))}(t,e.map),e.programDateTime&&t.push("#EXT-X-PROGRAM-DATE-TIME:".concat(l.formatDate(e.programDateTime))),e.dateRange&&function(t,e){var r=['ID="'.concat(e.id,'"'),'START-DATE="'.concat(l.formatDate(e.start),'"')];e.end&&r.push('END-DATE="'.concat(e.end,'"'));e.duration&&r.push("DURATION=".concat(e.duration));e.plannedDuration&&r.push("PLANNED-DURATION=".concat(e.plannedDuration));e.classId&&r.push('CLASS="'.concat(e.classId,'"'));e.endOnNext&&r.push("END-ON-NEXT=YES");Object.keys(e.attributes).forEach(function(t){t.startsWith("X-")?"number"==typeof e.attributes[t]?r.push("".concat(t,"=").concat(e.attributes[t])):r.push("".concat(t,'="').concat(e.attributes[t],'"')):t.startsWith("SCTE35-")&&r.push("".concat(t,"=").concat(l.byteSequenceToHex(e.attributes[t])))}),t.push("#EXT-X-DATERANGE:".concat(r.join(",")))}(t,e.dateRange),t.push("#EXTINF:".concat(e.duration,",").concat(unescape(encodeURIComponent(e.title||"")))),t.push("".concat(e.uri))}t.exports=function(t){l.PARAMCHECK(t),l.ASSERT("Not a playlist","playlist"===t.type);var e=new p(t.uri);return e.push("#EXTM3U"),t.version&&e.push("#EXT-X-VERSION:".concat(t.version)),t.independentSegments&&e.push("#EXT-X-INDEPENDENT-SEGMENTS:".concat(t.independentSegments)),t.start&&e.push("#EXT-X-START:TIME-OFFSET=".concat(t.start.offset).concat(t.start.precise?",PRECISE=YES":"")),t.isMasterPlaylist?function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=e.sessionDataList[Symbol.iterator]();!(r=(o=a.next()).done);r=!0)T(t,o.value)}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}var s=!0,u=!1,c=void 0;try{for(var f,l=e.sessionKeyList[Symbol.iterator]();!(s=(f=l.next()).done);s=!0)y(t,f.value,!0)}catch(t){u=!0,c=t}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}var h=!0,E=!1,p=void 0;try{for(var g,A=e.variants[Symbol.iterator]();!(h=(g=A.next()).done);h=!0)d(t,g.value)}catch(t){E=!0,p=t}finally{try{h||null==A.return||A.return()}finally{if(E)throw p}}}(e,t):function(t,e){e.targetDuration&&t.push("#EXT-X-TARGETDURATION:".concat(e.targetDuration)),e.mediaSequenceBase&&t.push("#EXT-X-MEDIA-SEQUENCE:".concat(e.mediaSequenceBase)),e.discontinuitySequenceBase&&t.push("#EXT-X-DISCONTINUITY-SEQUENCE:".concat(e.discontinuitySequenceBase)),e.playlistType&&t.push("#EXT-X-PLAYLIST-TYPE:".concat(e.playlistType)),e.isIFrame&&t.push("#EXT-X-I-FRAMES-ONLY");var r=!0,n=!1,i=void 0;try{for(var o,a=e.segments[Symbol.iterator]();!(r=(o=a.next()).done);r=!0)A(t,o.value)}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}e.endlist&&t.push("#EXT-X-ENDLIST")}(e,t),e.join("\n")}}])});
//# sourceMappingURL=hls-parser.min.js.map
{
"name": "hls-parser",
"version": "0.2.1",
"version": "0.2.2",
"description": "A simple library to read/write HLS playlists",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,3 @@ const utils = require('./utils');

'#EXT-X-DISCONTINUITY',
'#EXT-X-MAP',
'#EXT-X-STREAM-INF'

@@ -9,0 +10,0 @@ ];

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc