UNPKG

pizzip

Version:

Create, read and edit .zip files synchronously with Javascript

2 lines 79.9 kB
/*! For license information please see pizzip.min.js.LICENSE.txt */ (()=>{var t={511:(t,e,r)=>{"use strict";var n=r(210);function i(t){if(t){this.data=t,this.length=this.data.length,this.index=0,this.zero=0;for(var e=0;e<this.data.length;e++)t[e]&=t[e]}}i.prototype=new n,i.prototype.byteAt=function(t){return this.data[this.zero+t]},i.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===e&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},i.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},t.exports=i},474:(t,e)=>{"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(t){for(var e,n,i,a,s,o,d,h="",l=0;l<t.length;)a=(e=t.charCodeAt(l++))>>2,s=(3&e)<<4|(n=t.charCodeAt(l++))>>4,o=(15&n)<<2|(i=t.charCodeAt(l++))>>6,d=63&i,isNaN(n)?o=d=64:isNaN(i)&&(d=64),h=h+r.charAt(a)+r.charAt(s)+r.charAt(o)+r.charAt(d);return h},e.decode=function(t){var e,n,i,a,s,o,d="",h=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<t.length;)e=r.indexOf(t.charAt(h++))<<2|(a=r.indexOf(t.charAt(h++)))>>4,n=(15&a)<<4|(s=r.indexOf(t.charAt(h++)))>>2,i=(3&s)<<6|(o=r.indexOf(t.charAt(h++))),d+=String.fromCharCode(e),64!==s&&(d+=String.fromCharCode(n)),64!==o&&(d+=String.fromCharCode(i));return d}},955:t=>{"use strict";function e(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}e.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},t.exports=e},538:(t,e,r)=>{"use strict";e.STORE={magic:"\0\0",compress:function(t){return t},uncompress:function(t){return t},compressInputType:null,uncompressInputType:null},e.DEFLATE=r(899)},870:(t,e,r)=>{"use strict";var n=r(320),i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];t.exports=function(t,e){if(void 0===t||!t.length)return 0;var r="string"!==n.getTypeOf(t);void 0===e&&(e=0);var a=0;e^=-1;for(var s=0,o=t.length;s<o;s++)a=r?t[s]:t.charCodeAt(s),e=e>>>8^i[255&(e^a)];return~e}},210:(t,e,r)=>{"use strict";var n=r(320);function i(){this.data=null,this.length=0,this.index=0,this.zero=0}i.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(){},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(){},lastIndexOfSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)}},t.exports=i},671:(t,e)=>{"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!1,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},284:(t,e,r)=>{"use strict";var n=r(320);e.string2binary=function(t){return n.string2binary(t)},e.string2Uint8Array=function(t){return n.transformTo("uint8array",t)},e.uint8Array2String=function(t){return n.transformTo("string",t)},e.string2Blob=function(t){var e=n.transformTo("arraybuffer",t);return n.arrayBuffer2Blob(e)},e.arrayBuffer2Blob=function(t){return n.arrayBuffer2Blob(t)},e.transformTo=function(t,e){return n.transformTo(t,e)},e.getTypeOf=function(t){return n.getTypeOf(t)},e.checkSupport=function(t){return n.checkSupport(t)},e.MAX_VALUE_16BITS=n.MAX_VALUE_16BITS,e.MAX_VALUE_32BITS=n.MAX_VALUE_32BITS,e.pretty=function(t){return n.pretty(t)},e.findCompression=function(t){return n.findCompression(t)},e.isRegExp=function(t){return n.isRegExp(t)}},899:(t,e,r)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=r(851);e.uncompressInputType=n?"uint8array":"array",e.compressInputType=n?"uint8array":"array",e.magic="\b\0",e.compress=function(t,e){return i.deflateRaw(t,{level:e.level||-1})},e.uncompress=function(t){return i.inflateRaw(t)}},501:(t,e,r)=>{"use strict";var n=r(474);function i(t,e){if(!(this instanceof i))return new i(t,e);this.files={},this.comment=null,this.root="",t&&this.load(t,e),this.clone=function(){var t=this,e=new i;return Object.keys(this.files).forEach((function(r){e.file(r,t.files[r].asUint8Array())})),e},this.shallowClone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}i.prototype=r(822),i.prototype.load=r(537),i.support=r(182),i.defaults=r(671),i.utils=r(284),i.base64={encode:function(t){return n.encode(t)},decode:function(t){return n.decode(t)}},i.compressions=r(538),t.exports=i,t.exports.default=i},537:(t,e,r)=>{"use strict";var n=r(474),i=r(890),a=r(320),s=r(280);t.exports=function(t,e){var r,o;(e=a.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode})).base64&&(t=n.decode(t));var d=new s(t,e),h=d.files;for(r=0;r<h.length;r++)o=h[r],this.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:e.createFolders});return d.zipComment.length&&(this.comment=d.zipComment),this}},67:t=>{"use strict";t.exports=function(t,e){return"number"==typeof t?Buffer.alloc(t):Buffer.from(t,e)},t.exports.test=function(t){return Buffer.isBuffer(t)}},60:(t,e,r)=>{"use strict";var n=r(279);function i(t){this.data=t,this.length=this.data.length,this.index=0,this.zero=0}i.prototype=new n,i.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},t.exports=i},822:(t,e,r)=>{"use strict";var n=r(182),i=r(320),a=r(870),s=r(195),o=r(671),d=r(474),h=r(538),l=r(955),f=r(67),u=r(890),c=r(871),_=r(135);function p(t){if(t._data instanceof l&&(t._data=t._data.getContent(),t.options.binary=!0,t.options.base64=!1,"uint8array"===i.getTypeOf(t._data))){var e=t._data;t._data=new Uint8Array(e.length),0!==e.length&&t._data.set(e,0)}return t._data}function m(t){var e=p(t);return"string"===i.getTypeOf(e)?!t.options.binary&&n.nodebuffer?f(e,"utf-8"):t.asBinary():e}var g={load:function(){throw new Error("Load method is not defined. Is the file pizzip-load.js included ?")},filter:function(t){var e,r,n,a,s=[];for(e in this.files)this.files.hasOwnProperty(e)&&(a=new b((n=this.files[e]).name,n._data,i.extend(n.options)),r=e.slice(this.root.length,e.length),e.slice(0,this.root.length)===this.root&&t(r,a)&&s.push(a));return s},file:function(t,e,r){if(1===arguments.length){if(i.isRegExp(t)){var n=t;return this.filter((function(t,e){return!e.dir&&n.test(t)}))}return this.filter((function(e,r){return!r.dir&&e===t}))[0]||null}return t=this.root+t,v.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(i.isRegExp(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=k.call(this,e),n=this.shallowClone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){t=i.extend(t||{},{base64:!0,compression:"STORE",compressionOptions:null,type:"base64",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:u.utf8encode}),i.checkSupport(t.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var e,r,n,a=[],o=i.transformTo("string",t.encodeFileName(t.comment||this.comment||"")),l=0,f=0;for(var p in this.files)if(this.files.hasOwnProperty(p)){var m=this.files[p],g=m.options.compression||t.compression.toUpperCase(),w=h[g];if(!w)throw new Error(g+" is not a valid compression method !");var b=m.options.compressionOptions||t.compressionOptions||{},v=z.call(this,m,w,b),x=A.call(this,p,m,v,l,t.platform,t.encodeFileName);l+=x.fileRecord.length+v.compressedSize,f+=x.dirRecord.length,a.push(x)}n=s.CENTRAL_DIRECTORY_END+"\0\0\0\0"+y(a.length,2)+y(a.length,2)+y(f,4)+y(l,4)+y(o.length,2)+o;var k=t.type.toLowerCase();for(e="uint8array"===k||"arraybuffer"===k||"blob"===k||"nodebuffer"===k?new _(l+f+n.length):new c(l+f+n.length),r=0;r<a.length;r++)e.append(a[r].fileRecord),e.append(a[r].compressedObject.compressedContent);for(r=0;r<a.length;r++)e.append(a[r].dirRecord);e.append(n);var E=e.finalize();switch(t.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return i.transformTo(t.type.toLowerCase(),E);case"blob":return i.arrayBuffer2Blob(i.transformTo("arraybuffer",E),t.mimeType);case"base64":return t.base64?d.encode(E):E;default:return E}},crc32:function(t,e){return a(t,e)},utf8encode:function(t){return i.transformTo("string",u.utf8encode(t))},utf8decode:function(t){return u.utf8decode(t)}};function w(t){var e=p(this);return null==e?"":(this.options.base64&&(e=d.decode(e)),e=t&&this.options.binary?g.utf8decode(e):i.transformTo("string",e),t||this.options.binary||(e=i.transformTo("string",g.utf8encode(e))),e)}function b(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.options=r,this._initialMetadata={dir:r.dir,date:r.date}}function y(t,e){var r,n="";for(r=0;r<e;r++)n+=String.fromCharCode(255&t),t>>>=8;return n}function v(t,e,r){var n,a=i.getTypeOf(e);if("string"==typeof(r=function(t){return!0!==(t=t||{}).base64||null!==t.binary&&void 0!==t.binary||(t.binary=!0),(t=i.extend(t,o)).date=t.date||new Date,null!==t.compression&&(t.compression=t.compression.toUpperCase()),t}(r)).unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(t=x(t)),r.createFolders&&(n=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""}(t))&&k.call(this,n,!0),r.dir||null==e)r.base64=!1,r.binary=!1,e=null,a=null;else if("string"===a)r.binary&&!r.base64&&!0!==r.optimizedBinaryString&&(e=i.string2binary(e));else{if(r.base64=!1,r.binary=!0,!(a||e instanceof l))throw new Error("The data of '"+t+"' is in an unsupported format !");"arraybuffer"===a&&(e=i.transformTo("uint8array",e))}var s=new b(t,e,r);return this.files[t]=s,s}function x(t){return"/"!==t.slice(-1)&&(t+="/"),t}function k(t,e){return e=void 0!==e&&e,t=x(t),this.files[t]||v.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]}function z(t,e,r){var n,s=new l;return t._data instanceof l?(s.uncompressedSize=t._data.uncompressedSize,s.crc32=t._data.crc32,0===s.uncompressedSize||t.dir?(e=h.STORE,s.compressedContent="",s.crc32=0):t._data.compressionMethod===e.magic?s.compressedContent=t._data.getCompressedContent():(n=t._data.getContent(),s.compressedContent=e.compress(i.transformTo(e.compressInputType,n),r))):((n=m(t))&&0!==n.length&&!t.dir||(e=h.STORE,n=""),s.uncompressedSize=n.length,s.crc32=a(n),s.compressedContent=e.compress(i.transformTo(e.compressInputType,n),r)),s.compressedSize=s.compressedContent.length,s.compressionMethod=e.magic,s}function A(t,e,r,n,o,d){var h,l,f,c,_=d!==u.utf8encode,p=i.transformTo("string",d(e.name)),m=i.transformTo("string",u.utf8encode(e.name)),g=e.comment||"",w=i.transformTo("string",d(g)),b=i.transformTo("string",u.utf8encode(g)),v=m.length!==e.name.length,x=b.length!==g.length,k=e.options,z="",A="",E="";f=e._initialMetadata.dir!==e.dir?e.dir:k.dir,c=e._initialMetadata.date!==e.date?e.date:k.date;var C,S,I=0,T=0;f&&(I|=16),"UNIX"===o?(T=798,I|=(S=C=e.unixPermissions,C||(S=f?16893:33204),(65535&S)<<16)):(T=20,I|=63&(e.dosPermissions||0)),h=c.getHours(),h<<=6,h|=c.getMinutes(),h<<=5,h|=c.getSeconds()/2,l=c.getFullYear()-1980,l<<=4,l|=c.getMonth()+1,l<<=5,l|=c.getDate(),v&&(A=y(1,1)+y(a(p),4)+m,z+="up"+y(A.length,2)+A),x&&(E=y(1,1)+y(this.crc32(w),4)+b,z+="uc"+y(E.length,2)+E);var R="";return R+="\n\0",R+=_||!v&&!x?"\0\0":"\0\b",R+=r.compressionMethod,R+=y(h,2),R+=y(l,2),R+=y(r.crc32,4),R+=y(r.compressedSize,4),R+=y(r.uncompressedSize,4),R+=y(p.length,2),R+=y(z.length,2),{fileRecord:s.LOCAL_FILE_HEADER+R+p+z,dirRecord:s.CENTRAL_FILE_HEADER+y(T,2)+R+y(w.length,2)+"\0\0\0\0"+y(I,4)+y(n,4)+p+z+w,compressedObject:r}}b.prototype={asText:function(){return w.call(this,!0)},asBinary:function(){return w.call(this,!1)},asNodeBuffer:function(){var t=m(this);return i.transformTo("nodebuffer",t)},asUint8Array:function(){var t=m(this);return i.transformTo("uint8array",t)},asArrayBuffer:function(){return this.asUint8Array().buffer}},t.exports=g},195:(t,e)=>{"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"},63:(t,e,r)=>{"use strict";var n=r(210),i=r(320);function a(t,e){this.data=t,e||(this.data=i.string2binary(this.data)),this.length=this.data.length,this.index=0,this.zero=0}a.prototype=new 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.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},t.exports=a},871:(t,e,r)=>{"use strict";var n=r(320);function i(){this.data=[]}i.prototype={append:function(t){t=n.transformTo("string",t),this.data.push(t)},finalize:function(){return this.data.join("")}},t.exports=i},182:(t,e)=>{"use strict";if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer="undefined"!=typeof Buffer,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=!1;else{var r=new ArrayBuffer(0);try{e.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);n.append(r),e.blob=0===n.getBlob("application/zip").size}catch(t){e.blob=!1}}}},279:(t,e,r)=>{"use strict";var n=r(511);function i(t){t&&(this.data=t,this.length=this.data.length,this.index=0,this.zero=0)}i.prototype=new n,i.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},t.exports=i},135:(t,e,r)=>{"use strict";var n=r(320);function i(t){this.data=new Uint8Array(t),this.index=0}i.prototype={append:function(t){0!==t.length&&(t=n.transformTo("uint8array",t),this.data.set(t,this.index),this.index+=t.length)},finalize:function(){return this.data}},t.exports=i},890:(t,e,r)=>{"use strict";for(var n=r(320),i=r(182),a=r(67),s=new Array(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function d(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}function h(t){var e,r,i,a,o=t.length,d=new Array(2*o);for(r=0,e=0;e<o;)if((i=t[e++])<128)d[r++]=i;else if((a=s[i])>4)d[r++]=65533,e+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&e<o;)i=i<<6|63&t[e++],a--;a>1?d[r++]=65533:i<65536?d[r++]=i:(i-=65536,d[r++]=55296|i>>10&1023,d[r++]=56320|1023&i)}return d.length!==r&&(d.subarray?d=d.subarray(0,r):d.length=r),n.applyFromCharCode(d)}s[254]=s[254]=1,e.utf8encode=function(t){return i.nodebuffer?a(t,"utf-8"):function(t){var e,r,n,a,s,o=0,d=t.length;for(a=0;a<d;a++)55296==(64512&(r=t.charCodeAt(a)))&&a+1<d&&56320==(64512&(n=t.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=i.uint8array?new Uint8Array(o):new Array(o),s=0,a=0;s<o;a++)55296==(64512&(r=t.charCodeAt(a)))&&a+1<d&&56320==(64512&(n=t.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e}(t)},e.utf8decode=function(t){if(i.nodebuffer)return n.transformTo("nodebuffer",t).toString("utf-8");for(var e=[],r=(t=n.transformTo(i.uint8array?"uint8array":"array",t)).length,a=0;a<r;){var s=d(t,Math.min(a+65536,r));i.uint8array?e.push(h(t.subarray(a,s))):e.push(h(t.slice(a,s))),a=s}return e.join("")}},320:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(182),a=r(538),s=r(67);function o(t){return t}function d(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}function h(t){var r=65536,n=[],i=t.length,a=e.getTypeOf(t),o=0,d=!0;try{switch(a){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,s(0))}}catch(t){d=!1}if(!d){for(var h="",l=0;l<t.length;l++)h+=String.fromCharCode(t[l]);return h}for(;o<i&&r>1;)try{"array"===a||"nodebuffer"===a?n.push(String.fromCharCode.apply(null,t.slice(o,Math.min(o+r,i)))):n.push(String.fromCharCode.apply(null,t.subarray(o,Math.min(o+r,i)))),o+=r}catch(t){r=Math.floor(r/2)}return n.join("")}function l(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}e.string2binary=function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(255&t.charCodeAt(r));return e},e.arrayBuffer2Blob=function(t,r){e.checkSupport("blob"),r=r||"application/zip";try{return new Blob([t],{type:r})}catch(e){try{var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}},e.applyFromCharCode=h;var f={};f.string={string:o,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:function(t){return d(t,s(t.length))}},f.array={string:h,array:o,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s(t)}},f.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return l(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:o,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s(new Uint8Array(t))}},f.uint8array={string:h,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:o,nodebuffer:function(t){return s(t)}},f.nodebuffer={string:h,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:o},e.transformTo=function(t,r){if(r||(r=""),!t)return r;e.checkSupport(t);var n=e.getTypeOf(r);return f[n][t](r)},e.getTypeOf=function(t){if(null!=t){if("string"==typeof t)return"string";var e=Object.prototype.toString.call(t);if("[object Array]"===e)return"array";if(i.nodebuffer&&s.test(t))return"nodebuffer";if(i.uint8array&&"[object Uint8Array]"===e)return"uint8array";if(i.arraybuffer&&"[object ArrayBuffer]"===e)return"arraybuffer";if("[object Promise]"===e)throw new Error("Cannot read data from a promise, you probably are running new PizZip(data) with a promise");if("object"===n(t)&&"function"==typeof t.file)throw new Error("Cannot read data from a pizzip instance, you probably are running new PizZip(zip) with a zipinstance");if("[object Date]"===e)throw new Error("Cannot read data from a Date, you probably are running new PizZip(data) with a date");if("object"===n(t)&&null==t.crc32)throw new Error("Unsupported data given to new PizZip(data) (object given)")}},e.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+" is not supported by this browser")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)n+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return n},e.findCompression=function(t){for(var e in a)if(a.hasOwnProperty(e)&&a[e].magic===t)return a[e];return null},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r}},280:(t,e,r)=>{"use strict";var n=r(63),i=r(60),a=r(279),s=r(511),o=r(320),d=r(195),h=r(80),l=r(182);function f(t,e){this.files=[],this.loadOptions=e,t&&this.load(t)}f.prototype={checkSignature:function(t){var e=this.reader.readString(4);if(e!==t)throw new Error("Corrupted zip or bug : unexpected signature ("+o.pretty(e)+", expected "+o.pretty(t)+")")},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===e;return this.reader.setIndex(r),n},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=l.uint8array?"uint8array":"array",r=o.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),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.readString(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),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(d.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===d.CENTRAL_FILE_HEADER;)(t=new h({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(d.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,d.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 ?");this.reader.setIndex(t);var e=t;if(this.checkSignature(d.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(d.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(d.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,d.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(d.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(d.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=e-r;if(n>0)this.isSignature(e,d.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){var e=o.getTypeOf(t);if(o.checkSupport(e),"string"!==e||l.uint8array)if("nodebuffer"===e)this.reader=new i(t);else if(l.uint8array)this.reader=new a(o.transformTo("uint8array",t));else{if(!l.array)throw new Error("Unexpected error: unsupported type '"+e+"'");this.reader=new s(o.transformTo("array",t))}else this.reader=new n(t,this.loadOptions.optimizedBinaryString)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=f},80:(t,e,r)=>{"use strict";var n=r(63),i=r(320),a=r(955),s=r(822),o=r(182);function d(t,e){this.options=t,this.loadOptions=e}d.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},prepareCompressedContent:function(t,e,r){return function(){var n=t.index;t.setIndex(e);var i=t.readData(r);return t.setIndex(n),i}},prepareContent:function(t,e,r,n,a){return function(){var t=i.transformTo(n.uncompressInputType,this.getCompressedContent()),e=n.uncompress(t);if(e.length!==a)throw new Error("Bug : uncompressed data size mismatch");return e}},readLocalPart:function(t){t.skip(22),this.fileNameLength=t.readInt(2);var e=t.readInt(2);if(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 informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");var r=i.findCompression(this.compressionMethod);if(null===r)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");if(this.decompressed=new a,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(t,t.index,this.compressedSize,r),this.decompressed.getContent=this.prepareContent(t,t.index,this.compressedSize,r,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=i.transformTo("string",this.decompressed.getContent()),s.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(t){if(this.versionMadeBy=t.readInt(2),this.versionNeeded=t.readInt(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),this.fileNameLength=t.readInt(2),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");this.fileName=t.readData(this.fileNameLength),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(){if(this.extraFields[1]){var t=new n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index;for(this.extraFields=this.extraFields||{};t.index<i+this.extraFieldsLength;)e=t.readInt(2),r=t.readInt(2),n=t.readString(r),this.extraFields[e]={id:e,length:r,value:n}},handleUTF8:function(){var t=o.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=i.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var a=i.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=new n(t.value);return 1!==e.readInt(1)||s.crc32(this.fileName)!==e.readInt(4)?null:s.utf8decode(e.readString(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=new n(t.value);return 1!==e.readInt(1)||s.crc32(this.fileComment)!==e.readInt(4)?null:s.utf8decode(e.readString(t.length-5))}return null}},t.exports=d},851:function(t,e){!function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);e(s);var o=new Array(60);e(o);var d=new Array(512);e(d);var h=new Array(256);e(h);var l=new Array(29);e(l);var f,u,c,_=new Array(30);function p(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(_);var g=function(t){return t<256?d[t]:d[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=function(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},y=function(t,e,r){b(t,r[2*e],r[2*e+1])},v=function(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},x=function(t,e,r){var n,i,a=new Array(16),s=0;for(n=1;n<=15;n++)s=s+r[n-1]<<1,a[n]=s;for(i=0;i<=e;i++){var o=t[2*i+1];0!==o&&(t[2*i]=v(a[o]++,o))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},z=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]},E=function(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&A(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!A(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},C=function(t,e,i){var a,s,o,d,f=0;if(0!==t.sym_next)do{a=255&t.pending_buf[t.sym_buf+f++],a+=(255&t.pending_buf[t.sym_buf+f++])<<8,s=t.pending_buf[t.sym_buf+f++],0===a?y(t,s,e):(o=h[s],y(t,o+256+1,e),0!==(d=r[o])&&(s-=l[o],b(t,s,d)),a--,o=g(a),y(t,o,i),0!==(d=n[o])&&(a-=_[o],b(t,a,d)))}while(f<t.sym_next);y(t,256,e)},S=function(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,d=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<d;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(i=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)E(t,a,r);i=d;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],E(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,E(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,s,o,d=e.dyn_tree,h=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,_=e.stat_desc.max_length,p=0;for(a=0;a<=15;a++)t.bl_count[a]=0;for(d[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=d[2*d[2*(n=t.heap[r])+1]+1]+1)>_&&(a=_,p++),d[2*n+1]=a,n>h||(t.bl_count[a]++,s=0,n>=c&&(s=u[n-c]),o=d[2*n],t.opt_len+=o*(a+s),f&&(t.static_len+=o*(l[2*n+1]+s)));if(0!==p){do{for(a=_-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[_]--,p-=2}while(p>0);for(a=_;0!==a;a--)for(n=t.bl_count[a];0!==n;)(i=t.heap[--r])>h||(d[2*i+1]!==a&&(t.opt_len+=(a-d[2*i+1])*d[2*i],d[2*i+1]=a),n--)}}(t,e),x(a,h,t.bl_count)},I=function(t,e,r){var n,i,a=-1,s=e[1],o=0,d=7,h=4;for(0===s&&(d=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++o<d&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=i,0===s?(d=138,h=3):i===s?(d=6,h=3):(d=7,h=4))},T=function(t,e,r){var n,i,a=-1,s=e[1],o=0,d=7,h=4;for(0===s&&(d=138,h=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++o<d&&i===s)){if(o<h)do{y(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==a&&(y(t,i,t.bl_tree),o--),y(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(y(t,17,t.bl_tree),b(t,o-3,3)):(y(t,18,t.bl_tree),b(t,o-11,7));o=0,a=i,0===s?(d=138,h=3):i===s?(d=6,h=3):(d=7,h=4)}},R=!1,O=function(t,e,r,n){b(t,0+(n?1:0),3),z(t),w(t,r),w(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r},D=function(t){R||(function(){var t,e,a,m,g,w=new Array(16);for(a=0,m=0;m<28;m++)for(l[m]=a,t=0;t<1<<r[m];t++)h[a++]=m;for(h[a-1]=m,g=0,m=0;m<16;m++)for(_[m]=g,t=0;t<1<<n[m];t++)d[g++]=m;for(g>>=7;m<30;m++)for(_[m]=g<<7,t=0;t<1<<n[m]-7;t++)d[256+g++]=m;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(x(s,287,w),t=0;t<30;t++)o[2*t+1]=5,o[2*t]=v(t,5);f=new p(s,r,257,286,15),u=new p(o,n,0,30,15),c=new p(new Array(0),i,0,19,7)}(),R=!0),t.l_desc=new m(t.dyn_ltree,f),t.d_desc=new m(t.dyn_dtree,u),t.bl_desc=new m(t.bl_tree,c),t.bi_buf=0,t.bi_valid=0,k(t)},U=O,B=function(t,e,r,n){var i,d,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),S(t,t.l_desc),S(t,t.d_desc),h=function(t){var e;for(I(t,t.dyn_ltree,t.l_desc.max_code),I(t,t.dyn_dtree,t.d_desc.max_code),S(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(d=t.static_len+3+7>>>3)<=i&&(i=d)):i=d=r+5,r+4<=i&&-1!==e?O(t,e,r,n):4===t.strategy||d===i?(b(t,2+(n?1:0),3),C(t,s,o)):(b(t,4+(n?1:0),3),function(t,e,r,n){var i;for(b(t,e-257,5),b(t,r-1,5),b(t,n-4,4),i=0;i<n;i++)b(t,t.bl_tree[2*a[i]+1],3);T(t,t.dyn_ltree,e-1),T(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),C(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&z(t)},L=function(t,e,r){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*g(e)]++),t.sym_next===t.sym_end},Z=function(t){b(t,2,3),y(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)},N=function(t,e,r,n){for(var i=65535&t,a=t>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{a=a+(i=i+e[n++]|0)|0}while(--s);i%=65521,a%=65521}return i|a<<16},F=new Uint32Array(function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}()),P=function(t,e,r,n){var i=F,a=n+r;t^=-1;for(var s=n;s<a;s++)t=t>>>8^i[255&(t^e[s])];return~t},M={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},H={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},j=D,X=U,K=B,Y=L,V=Z,W=H.Z_NO_FLUSH,G=H.Z_PARTIAL_FLUSH,q=H.Z_FULL_FLUSH,J=H.Z_FINISH,Q=H.Z_BLOCK,$=H.Z_OK,tt=H.Z_STREAM_END,et=H.Z_STREAM_ERROR,rt=H.Z_DATA_ERROR,nt=H.Z_BUF_ERROR,it=H.Z_DEFAULT_COMPRESSION,at=H.Z_FILTERED,st=H.Z_HUFFMAN_ONLY,ot=H.Z_RLE,dt=H.Z_FIXED,ht=H.Z_DEFAULT_STRATEGY,lt=H.Z_UNKNOWN,ft=H.Z_DEFLATED,ut=258,ct=262,_t=42,pt=113,mt=666,gt=function(t,e){return t.msg=M[e],e},wt=function(t){return 2*t-(t>4?9:0)},bt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t){var e,r,n,i=t.w_size;n=e=t.hash_size;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);n=e=i;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)},vt=function(t,e,r){return(e<<t.hash_shift^r)&t.hash_mask},xt=function(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},kt=function(t,e){K(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},zt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=N(t.adler,e,i,r):2===t.state.wrap&&(t.adler=P(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Ct=function(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,d=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,l=t.w_mask,f=t.prev,u=t.strstart+ut,c=h[a+s-1],_=h[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(r=e)+s]===_&&h[r+s-1]===c&&h[r]===h[a]&&h[++r]===h[a+1]){a+=2,r++;do{}while(h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&a<u);if(n=ut-(u-a),a=u-ut,n>s){if(t.match_start=e,s=n,n>=o)break;c=h[a+s-1],_=h[a+s]}}}while((e=f[e&l])>d&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,r,n,i=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-r),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),yt(t),r+=i),0===t.strm.avail_in)break;if(e=Et(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=vt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=vt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},It=function(t,e){var r,n,i,a=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,r>(n=t.strstart-t.block_start)+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r<a&&(0===r&&e!==J||e===W||r!==n+t.strm.avail_in))break;s=e===J&&r===n+t.strm.avail_in?1:0,X(t,0,0,s),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,xt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(Et(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==W&&e!==J&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Et(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,a=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=a||(n||e===J)&&e!==W&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,s=e===J&&0===t.strm.avail_in&&r===n?1:0,X(t,t.block_start,r,s),t.block_start+=r,xt(t.strm)),s?3:1)},Tt=function(t,e){for(var r,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===W)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=vt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ct&&(t.match_length=Ct(t,r)),t.match_length>=3)if(n=Y(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=vt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=vt(t,t.ins_h,t.window[t.strstart+1]);else n=Y(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(kt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(kt(t,!1),0===t.strm.avail_out)?1:2},Rt=function(t,e){for(var r,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===W)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=vt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-ct&&(t.match_length=Ct(t,r),t.match_length<=5&&(t.strategy===at||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=Y(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=vt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(kt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=Y(t,0,t.window[t.strstart-1]))&&kt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Y(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(kt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(kt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}var Dt=[new Ot(0,0,0,0,It),new Ot(4,4,8,4,Tt),new Ot(4,5,16,8,Tt),new Ot(4,6,32,32,Tt),new Ot(4,4,16,16,Rt),new Ot(8,16,32,32,Rt),new Ot(8,16,128,128,Rt),new Ot(8,32,128,256,Rt),new Ot(32,128,258,1024,Rt),new Ot(32,258,258,4096,Rt)];function Ut(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),bt(this.dyn_ltree),bt(this.dyn_dtree),bt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),bt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Bt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==_t&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==pt&&e.status!==mt?1:0},Lt=function(t){if(Bt(t))return gt(t,et);t.total_in=t.total_out=0,t.data_type=lt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?_t:pt,t.adler=2===e.wrap?0:1,e.last_flush=-2,j(e),$},Zt=function(t){var e,r=Lt(t);return r===$&&((e=t.state).window_size=2*e.w_size,bt(e.head),e.max_lazy_match=Dt[e.level].max_lazy,e.good_match=Dt[e.level].good_length,e.nice_match=Dt[e.level].nice_length,e.max_chain_length=Dt[e.level].max_chain,e.strs