UNPKG

@canwdev/pptxgenjs

Version:

Create JavaScript PowerPoint Presentations

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