webamp
Version:
Winamp 2 implemented in HTML5 and JavaScript
1 lines • 942 kB
JavaScript
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}),n}function a(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var r={exports:{}};r.exports=function e(t,n,r){function i(s,o){if(!n[s]){if(!t[s]){if(!o&&a)return a(s);if(A)return A(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){return i(t[s][1][e]||e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var A=a,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){var a=e("./utils"),r=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,r,A,s,o,l,c=[],u=0,d=e.length,h=d,p="string"!==a.getTypeOf(e);u<e.length;)h=d-u,r=p?(t=e[u++],n=u<d?e[u++]:0,u<d?e[u++]:0):(t=e.charCodeAt(u++),n=u<d?e.charCodeAt(u++):0,u<d?e.charCodeAt(u++):0),A=t>>2,s=(3&t)<<4|n>>4,o=1<h?(15&n)<<2|r>>6:64,l=2<h?63&r:64,c.push(i.charAt(A)+i.charAt(s)+i.charAt(o)+i.charAt(l));return c.join("")},n.decode=function(e){var t,n,a,A,s,o,l=0,c=0,u="data:";if(e.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,h=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&h--,e.charAt(e.length-2)===i.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=r.uint8array?new Uint8Array(0|h):new Array(0|h);l<e.length;)t=i.indexOf(e.charAt(l++))<<2|(A=i.indexOf(e.charAt(l++)))>>4,n=(15&A)<<4|(s=i.indexOf(e.charAt(l++)))>>2,a=(3&s)<<6|(o=i.indexOf(e.charAt(l++))),d[c++]=t,64!==s&&(d[c++]=n),64!==o&&(d[c++]=a);return d}},{"./support":30,"./utils":32}],2:[function(e,t,n){var a=e("./external"),r=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),A=e("./stream/DataLengthProbe");function s(e,t,n,a,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=a,this.compressedContent=r}s.prototype={getContentWorker:function(){var e=new r(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new A("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new r(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new i).pipe(new A("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new A("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var a=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var a=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?function(e,t,n){var a=r,i=0+n;e^=-1;for(var A=0;A<i;A++)e=e>>>8^a[255&(e^t[A])];return-1^e}(0|t,e,e.length):function(e,t,n){var a=r,i=0+n;e^=-1;for(var A=0;A<i;A++)e=e>>>8^a[255&(e^t.charCodeAt(A))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var a;a="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:a}},{lie:37}],7:[function(e,t,n){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),i=e("./utils"),A=e("./stream/GenericWorker"),s=a?"uint8array":"array";function o(e,t){A.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",i.inherits(o,A),o.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(s,e.data),!1)},o.prototype.flush=function(){A.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){A.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new o("Deflate",e)},n.uncompressWorker=function(){return new o("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function a(e,t){var n,a="";for(n=0;n<t;n++)a+=String.fromCharCode(255&e),e>>>=8;return a}function r(e,t,n,r,A,c){var u,d,h=e.file,p=e.compression,f=c!==s.utf8encode,g=i.transformTo("string",c(h.name)),m=i.transformTo("string",s.utf8encode(h.name)),w=h.comment,b=i.transformTo("string",c(w)),E=i.transformTo("string",s.utf8encode(w)),y=m.length!==h.name.length,k=E.length!==w.length,v="",S="",I="",C=h.dir,x=h.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var B=0;t&&(B|=8),f||!y&&!k||(B|=2048);var U=0,M=0;C&&(U|=16),"UNIX"===A?(M=798,U|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(h.unixPermissions,C)):(M=20,U|=function(e){return 63&(e||0)}(h.dosPermissions)),u=x.getUTCHours(),u<<=6,u|=x.getUTCMinutes(),u<<=5,u|=x.getUTCSeconds()/2,d=x.getUTCFullYear()-1980,d<<=4,d|=x.getUTCMonth()+1,d<<=5,d|=x.getUTCDate(),y&&(S=a(1,1)+a(o(g),4)+m,v+="up"+a(S.length,2)+S),k&&(I=a(1,1)+a(o(b),4)+E,v+="uc"+a(I.length,2)+I);var N="";return N+="\n\0",N+=a(B,2),N+=p.magic,N+=a(u,2),N+=a(d,2),N+=a(T.crc32,4),N+=a(T.compressedSize,4),N+=a(T.uncompressedSize,4),N+=a(g.length,2),N+=a(v.length,2),{fileRecord:l.LOCAL_FILE_HEADER+N+g+v,dirRecord:l.CENTRAL_FILE_HEADER+a(M,2)+N+a(b.length,2)+"\0\0\0\0"+a(U,4)+a(r,4)+g+v+b}}var i=e("../utils"),A=e("../stream/GenericWorker"),s=e("../utf8"),o=e("../crc32"),l=e("../signature");function c(e,t,n,a){A.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,A),c.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,A.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-a-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=r(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+a(e.crc32,4)+a(e.compressedSize,4)+a(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,r=function(e,t,n,r,A){var s=i.transformTo("string",A(r));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(e,2)+a(e,2)+a(t,4)+a(n,4)+a(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},c.prototype.resume=function(){return!!A.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!A.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},c.prototype.lock=function(){A.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){var a=e("../compressions"),r=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var i=new r(t.streamFiles,n,t.platform,t.encodeFileName),A=0;try{e.forEach(function(e,n){A++;var r=function(e,t){var n=e||t,r=a[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},o=n.dir,l=n.date;n._compressWorker(r,s).withStreamInfo("file",{name:e,dir:o,date:l,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(i)}),i.entriesCount=A}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new a;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(a.prototype=e("./object")).loadAsync=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.version="3.10.1",a.loadAsync=function(e,t){return(new a).loadAsync(e,t)},a.external=e("./external"),t.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){var a=e("./utils"),r=e("./external"),i=e("./utf8"),A=e("./zipEntries"),s=e("./stream/Crc32Probe"),o=e("./nodejsUtils");function l(e){return new r.Promise(function(t,n){var a=e.decompressed.getContentWorker().pipe(new s);a.on("error",function(e){n(e)}).on("end",function(){a.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var n=this;return t=a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),o.isNode&&o.isStream(e)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new A(t);return n.load(e),n}).then(function(e){var n=[r.Promise.resolve(e)],a=e.files;if(t.checkCRC32)for(var i=0;i<a.length;i++)n.push(l(a[i]));return r.Promise.all(n)}).then(function(e){for(var r=e.shift(),i=r.files,A=0;A<i.length;A++){var s=i[A],o=s.fileNameStr,l=a.resolve(s.fileNameStr);n.file(l,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(l).unsafeOriginalName=o)}return r.zipComment.length&&(n.comment=r.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){var a=e("../utils"),r=e("../stream/GenericWorker");function i(e,t){r.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}a.inherits(i,r),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){var a=e("readable-stream").Readable;function r(e,t,n){a.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(e){r.emit("error",e)}).on("end",function(){r.push(null)})}e("../utils").inherits(r,a),r.prototype._read=function(){this._helper.resume()},t.exports=r},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){function a(e,t,n){var a,r=i.getTypeOf(t),s=i.extend(n||{},o);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=f(e)),s.createFolders&&(a=p(e))&&g.call(this,a,!0);var u="string"===r&&!1===s.binary&&!1===s.base64;n&&void 0!==n.binary||(s.binary=!u),(t instanceof l&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",r="string");var m;m=t instanceof l||t instanceof A?t:d.isNode&&d.isStream(t)?new h(e,t):i.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var w=new c(e,m,s);this.files[e]=w}var r=e("./utf8"),i=e("./utils"),A=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),o=e("./defaults"),l=e("./compressedObject"),c=e("./zipObject"),u=e("./generate"),d=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:o.createFolders,e=f(e),this.files[e]||a.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function m(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,a;for(t in this.files)a=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,a)},filter:function(e){var t=[];return this.forEach(function(n,a){e(n,a)&&t.push(a)}),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,a.call(this,e,t,n),this;if(m(e)){var r=e;return this.filter(function(e,t){return!t.dir&&r.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(m(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=g.call(this,t),a=this.clone();return a.root=n.name,a},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),a=0;a<n.length;a++)delete this.files[n[a].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");i.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var a=n.comment||this.comment||"";t=u.generateWorker(this,n,a)}catch(e){(t=new A("error")).error(e)}return new s(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===n&&this.data[i+2]===a&&this.data[i+3]===r)return i-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&n===i[1]&&a===i[2]&&r===i[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){var a=e("../utils");function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return a.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=r},{"../utils":32}],19:[function(e,t,n){var a=e("./Uint8ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var a=e("./ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var a=e("../utils"),r=e("../support"),i=e("./ArrayReader"),A=e("./StringReader"),s=e("./NodeBufferReader"),o=e("./Uint8ArrayReader");t.exports=function(e){var t=a.getTypeOf(e);return a.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new s(e):r.uint8array?new o(a.transformTo("uint8array",e)):new i(a.transformTo("array",e)):new A(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var a=e("./GenericWorker"),r=e("../utils");function i(e){a.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(i,a),i.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var a=e("./GenericWorker"),r=e("../crc32");function i(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,a),i.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function i(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}a.inherits(i,r),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function i(e){r.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=a.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}a.inherits(i,r),i.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function a(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=a},{}],29:[function(e,t,n){var a=e("../utils"),r=e("./ConvertWorker"),i=e("./GenericWorker"),A=e("../base64"),s=e("../support"),o=e("../external"),l=null;if(s.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,t,n){var A=t;switch(t){case"blob":case"arraybuffer":A="uint8array";break;case"base64":A="string"}try{this._internalType=A,this._outputType=t,this._mimeType=n,a.checkSupport(A),this._worker=e.pipe(new r(A)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}c.prototype={accumulate:function(e){return function(e,t){return new o.Promise(function(n,r){var i=[],s=e._internalType,o=e._outputType,l=e._mimeType;e.on("data",function(e,n){i.push(e),t&&t(n)}).on("error",function(e){i=[],r(e)}).on("end",function(){try{var e=function(e,t,n){switch(e){case"blob":return a.newBlob(a.transformTo("arraybuffer",t),n);case"base64":return A.encode(t);default:return a.transformTo(e,t)}}(o,function(e,t){var n,a=0,r=null,i=0;for(n=0;n<t.length;n++)i+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(i),n=0;n<t.length;n++)r.set(t[n],a),a+=t[n].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,i),l);n(e)}catch(e){r(e)}i=[]}).resume()})}(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){a.delay(t,arguments,n)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(a.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=0===new Blob([a],{type:"application/zip"}).size}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(a),n.blob=0===r.getBlob("application/zip").size}catch(e){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(e){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var a=e("./utils"),r=e("./support"),i=e("./nodejsUtils"),A=e("./stream/GenericWorker"),s=new Array(256),o=0;o<256;o++)s[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function l(){A.call(this,"utf-8 decode"),this.leftOver=null}function c(){A.call(this,"utf-8 encode")}s[254]=s[254]=1,n.utf8encode=function(e){return r.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,n,a,i,A,s=e.length,o=0;for(i=0;i<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(o):new Array(o),i=A=0;A<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(a=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(a-56320),i++),n<128?t[A++]=n:(n<2048?t[A++]=192|n>>>6:(n<65536?t[A++]=224|n>>>12:(t[A++]=240|n>>>18,t[A++]=128|n>>>12&63),t[A++]=128|n>>>6&63),t[A++]=128|63&n);return t}(e)},n.utf8decode=function(e){return r.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,i,A=e.length,o=new Array(2*A);for(t=n=0;t<A;)if((r=e[t++])<128)o[n++]=r;else if(4<(i=s[r]))o[n++]=65533,t+=i-1;else{for(r&=2===i?31:3===i?15:7;1<i&&t<A;)r=r<<6|63&e[t++],i--;1<i?o[n++]=65533:r<65536?o[n++]=r:(r-=65536,o[n++]=55296|r>>10&1023,o[n++]=56320|1023&r)}return o.length!==n&&(o.subarray?o=o.subarray(0,n):o.length=n),a.applyFromCharCode(o)}(e=a.transformTo(r.uint8array?"uint8array":"array",e))},a.inherits(l,A),l.prototype.processChunk=function(e){var t=a.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var A=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),o=t;A!==t.length&&(r.uint8array?(o=t.subarray(0,A),this.leftOver=t.subarray(A,t.length)):(o=t.slice(0,A),this.leftOver=t.slice(A,t.length))),this.push({data:n.utf8decode(o),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,a.inherits(c,A),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var a=e("./support"),r=e("./base64"),i=e("./nodejsUtils"),A=e("./external");function s(e){return e}function o(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),n.newBlob=function(t,a){n.checkSupport("blob");try{return new Blob([t],{type:a})}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(t),r.getBlob(a)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,n){var a=[],r=0,i=e.length;if(i<=n)return String.fromCharCode.apply(null,e);for(;r<i;)"array"===t||"nodebuffer"===t?a.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+n,i)))):a.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+n,i)))),r+=n;return a.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,a=n.getTypeOf(e),r=!0;if("uint8array"===a?r=l.applyCanBeUsed.uint8array:"nodebuffer"===a&&(r=l.applyCanBeUsed.nodebuffer),r)for(;1<t;)try{return l.stringifyByChunk(e,a,t)}catch(e){t=Math.floor(t/2)}return l.stringifyByChar(e)}function u(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=c;var d={};d.string={string:s,array:function(e){return o(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return o(e,new Uint8Array(e.length))},nodebuffer:function(e){return o(e,i.allocBuffer(e.length))}},d.array={string:c,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},d.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return i.newBufferFrom(e)}},d.nodebuffer={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var a=n.getTypeOf(t);return d[a][e](t)},n.resolve=function(e){for(var t=e.split("/"),n=[],a=0;a<t.length;a++){var r=t[a];"."===r||""===r&&0!==a&&a!==t.length-1||(".."===r?n.pop():n.push(r))}return n.join("/")},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":a.nodebuffer&&i.isBuffer(e)?"nodebuffer":a.uint8array&&e instanceof Uint8Array?"uint8array":a.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!a[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,a="";for(n=0;n<(e||"").length;n++)a+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return a},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,i,s,l){return A.Promise.resolve(t).then(function(e){return a.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new A.Promise(function(t,n){var a=new FileReader;a.onload=function(e){t(e.target.result)},a.onerror=function(e){n(e.target.error)},a.readAsArrayBuffer(e)}):e}).then(function(t){var c=n.getTypeOf(t);return c?("arraybuffer"===c?t=n.transformTo("uint8array",t):"string"===c&&(l?t=r.decode(t):i&&!0!==s&&(t=function(e){return o(e,a.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):A.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),i=e("./signature"),A=e("./zipEntry"),s=e("./support");function o(e){this.files=[],this.loadOptions=e}o.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var a=this.reader.readString(4)===t;return this.reader.setIndex(n),a},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",n=r.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,a=this.zip64EndOfCentralSize-44;0<a;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new A({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var a=t-n;if(0<a)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=a);else if(a<0)throw new Error("Corrupted zip: missing "+Math.abs(a)+" bytes.")},prepareReader:function(e){this.reader=a(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=o},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),i=e("./compressedObject"),A=e("./crc32"),s=e("./utf8"),o=e("./compressions"),l=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in o)if(Object.prototype.hasOwnProperty.call(o,t)&&o[t].magic===e)return o[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=a(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,a,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),a=e.readData(n),this.extraFields[t]={id:t,length:n,value:a};e.setIndex(r)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=r.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var a=this.findExtraFieldUnicodeComment();if(null!==a)this.fileCommentStr=a;else{var i=r.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=a(e.value);return 1!==t.readInt(1)||A(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=a(e.value);return 1!==t.readInt(1)||A(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){function a(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var r=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),A=e("./utf8"),s=e("./compressedObject"),o=e("./stream/GenericWorker");a.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var a="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!a&&(t=t.pipe(new A.Utf8EncodeWorker)),!i&&a&&(t=t.pipe(new A.Utf8DecodeWorker))}catch(e){(t=new o("error")).error(e)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new A.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof o?this._data:new i(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<l.length;u++)a.prototype[l[u]]=c;t.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,a){(function(e){var t,a,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var i=0,A=new r(c),s=e.document.createTextNode("");A.observe(s,{characterData:!0}),t=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var o=new e.MessageChannel;o.port1.onmessage=c,t=function(){o.port2.postMessage(0)}}var l=[];function c(){var e,t;a=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}a=!1}n.exports=function(e){1!==l.push(e)||a||t()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){var a=e("immediate");function r(){}var i={},A=["REJECTED"],s=["FULFILLED"],o=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=o,this.queue=[],this.outcome=void 0,e!==r&&h(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){a(function(){var a;try{a=t(n)}catch(a){return i.reject(e,a)}a===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,a)})}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var n=!1;function a(t){n||(n=!0,i.reject(e,t))}function r(t){n||(n=!0,i.resolve(e,t))}var A=p(function(){t(r,a)});"error"===A.status&&a(A.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=l).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var n=new this.constructor(r);return this.state!==o?u(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){i.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return i.reject(e,n.value);var a=n.value;if(a)h(e,a);else{e.state=s,e.outcome=t;for(var r=-1,A=e.queue.length;++r<A;)e.queue[r].callFulfilled(t)}return e},i.reject=function(e,t){e.state=A,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:i.resolve(new this(r),e)},l.reject=function(e){var t=new this(r);return i.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var A=new Array(n),s=0,o=-1,l=new this(r);++o<n;)c(e[o],o);return l;function c(e,r){t.resolve(e).then(function(e){A[r]=e,++s!==n||a||(a=!0,i.