UNPKG

editorconfig-checker

Version:
10 lines 673 kB
#!/usr/bin/env node import{createRequire as e}from"module";var t={1316:(e,t,A)=>{const r=A(5391);const s=A(6928);const n=A(2609);const o=A(6991);const get_Bool=(...e)=>r.findLast(e,(e=>typeof e==="boolean"));const get_Str=(...e)=>r.findLast(e,(e=>typeof e==="string"));const get_Fun=(...e)=>r.findLast(e,(e=>typeof e==="function"));const i={noSort:false,readEntries:false,method:r.Constants.NONE,fs:null};e.exports=function(e,t){let A=null;const a=Object.assign(Object.create(null),i);if(e&&"object"===typeof e){if(!(e instanceof Uint8Array)){Object.assign(a,e);e=a.input?a.input:undefined;if(a.input)delete a.input}if(Buffer.isBuffer(e)){A=e;a.method=r.Constants.BUFFER;e=undefined}}Object.assign(a,t);const c=new r(a);if(typeof a.decoder!=="object"||typeof a.decoder.encode!=="function"||typeof a.decoder.decode!=="function"){a.decoder=r.decoder}if(e&&"string"===typeof e){if(c.fs.existsSync(e)){a.method=r.Constants.FILE;a.filename=e;A=c.fs.readFileSync(e)}else{throw r.Errors.INVALID_FILENAME()}}const l=new o(A,a);const{canonical:g,sanitize:h,zipnamefix:u}=r;function getEntry(e){if(e&&l){var t;if(typeof e==="string")t=l.getEntry(s.posix.normalize(e));if(typeof e==="object"&&typeof e.entryName!=="undefined"&&typeof e.header!=="undefined")t=l.getEntry(e.entryName);if(t){return t}}return null}function fixPath(e){const{join:t,normalize:A,sep:r}=s.posix;return t(".",A(r+e.split("\\").join(r)+r))}function filenameFilter(e){if(e instanceof RegExp){return function(e){return function(t){return e.test(t)}}(e)}else if("function"!==typeof e){return()=>true}return e}const relativePath=(e,t)=>{let A=t.slice(-1);A=A===c.sep?c.sep:"";return s.relative(e,t)+A};return{readFile:function(e,t){var A=getEntry(e);return A&&A.getData(t)||null},childCount:function(e){const t=getEntry(e);if(t){return l.getChildCount(t)}},readFileAsync:function(e,t){var A=getEntry(e);if(A){A.getDataAsync(t)}else{t(null,"getEntry failed for:"+e)}},readAsText:function(e,t){var A=getEntry(e);if(A){var r=A.getData();if(r&&r.length){return r.toString(t||"utf8")}}return""},readAsTextAsync:function(e,t,A){var r=getEntry(e);if(r){r.getDataAsync((function(e,r){if(r){t(e,r);return}if(e&&e.length){t(e.toString(A||"utf8"))}else{t("")}}))}else{t("")}},deleteFile:function(e,t=true){var A=getEntry(e);if(A){l.deleteFile(A.entryName,t)}},deleteEntry:function(e){var t=getEntry(e);if(t){l.deleteEntry(t.entryName)}},addZipComment:function(e){l.comment=e},getZipComment:function(){return l.comment||""},addZipEntryComment:function(e,t){var A=getEntry(e);if(A){A.comment=t}},getZipEntryComment:function(e){var t=getEntry(e);if(t){return t.comment||""}return""},updateFile:function(e,t){var A=getEntry(e);if(A){A.setData(t)}},addLocalFile:function(e,t,A,n){if(c.fs.existsSync(e)){t=t?fixPath(t):"";const r=s.win32.basename(s.win32.normalize(e));t+=A?A:r;const o=c.fs.statSync(e);const i=o.isFile()?c.fs.readFileSync(e):Buffer.alloc(0);if(o.isDirectory())t+=c.sep;this.addFile(t,i,n,o)}else{throw r.Errors.FILE_NOT_FOUND(e)}},addLocalFileAsync:function(e,t){e=typeof e==="object"?e:{localPath:e};const A=s.resolve(e.localPath);const{comment:r}=e;let{zipPath:n,zipName:o}=e;const i=this;c.fs.stat(A,(function(e,a){if(e)return t(e,false);n=n?fixPath(n):"";const l=s.win32.basename(s.win32.normalize(A));n+=o?o:l;if(a.isFile()){c.fs.readFile(A,(function(e,A){if(e)return t(e,false);i.addFile(n,A,r,a);return setImmediate(t,undefined,true)}))}else if(a.isDirectory()){n+=c.sep;i.addFile(n,Buffer.alloc(0),r,a);return setImmediate(t,undefined,true)}}))},addLocalFolder:function(e,t,A){A=filenameFilter(A);t=t?fixPath(t):"";e=s.normalize(e);if(c.fs.existsSync(e)){const r=c.findFiles(e);const n=this;if(r.length){for(const o of r){const r=s.join(t,relativePath(e,o));if(A(r)){n.addLocalFile(o,s.dirname(r))}}}}else{throw r.Errors.FILE_NOT_FOUND(e)}},addLocalFolderAsync:function(e,t,A,n){n=filenameFilter(n);A=A?fixPath(A):"";e=s.normalize(e);var o=this;c.fs.open(e,"r",(function(s){if(s&&s.code==="ENOENT"){t(undefined,r.Errors.FILE_NOT_FOUND(e))}else if(s){t(undefined,s)}else{var i=c.findFiles(e);var a=-1;var next=function(){a+=1;if(a<i.length){var r=i[a];var s=relativePath(e,r).split("\\").join("/");s=s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(n(s)){c.fs.stat(r,(function(e,n){if(e)t(undefined,e);if(n.isFile()){c.fs.readFile(r,(function(e,r){if(e){t(undefined,e)}else{o.addFile(A+s,r,"",n);next()}}))}else{o.addFile(A+s+"/",Buffer.alloc(0),"",n);next()}}))}else{process.nextTick((()=>{next()}))}}else{t(true,undefined)}};next()}}))},addLocalFolderAsync2:function(e,t){const A=this;e=typeof e==="object"?e:{localPath:e};localPath=s.resolve(fixPath(e.localPath));let{zipPath:n,filter:o,namefix:i}=e;if(o instanceof RegExp){o=function(e){return function(t){return e.test(t)}}(o)}else if("function"!==typeof o){o=function(){return true}}n=n?fixPath(n):"";if(i=="latin1"){i=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")}if(typeof i!=="function")i=e=>e;const relPathFix=e=>s.join(n,i(relativePath(localPath,e)));const fileNameFix=e=>s.win32.basename(s.win32.normalize(i(e)));c.fs.open(localPath,"r",(function(e){if(e&&e.code==="ENOENT"){t(undefined,r.Errors.FILE_NOT_FOUND(localPath))}else if(e){t(undefined,e)}else{c.findFilesAsync(localPath,(function(e,r){if(e)return t(e);r=r.filter((e=>o(relPathFix(e))));if(!r.length)t(undefined,false);setImmediate(r.reverse().reduce((function(e,t){return function(r,n){if(r||n===false)return setImmediate(e,r,false);A.addLocalFileAsync({localPath:t,zipPath:s.dirname(relPathFix(t)),zipName:fileNameFix(t)},e)}}),t))}))}}))},addLocalFolderPromise:function(e,t){return new Promise(((A,r)=>{this.addLocalFolderAsync2(Object.assign({localPath:e},t),((e,t)=>{if(e)r(e);if(t)A(this)}))}))},addFile:function(e,t,A,r){e=u(e);let s=getEntry(e);const o=s!=null;if(!o){s=new n(a);s.entryName=e}s.comment=A||"";const i="object"===typeof r&&r instanceof c.fs.Stats;if(i){s.header.time=r.mtime}var g=s.isDirectory?16:0;let h=s.isDirectory?16384:32768;if(i){h|=4095&r.mode}else if("number"===typeof r){h|=4095&r}else{h|=s.isDirectory?493:420}g=(g|h<<16)>>>0;s.attr=g;s.setData(t);if(!o)l.setEntry(s);return s},getEntries:function(e){l.password=e;return l?l.entries:[]},getEntry:function(e){return getEntry(e)},getEntryCount:function(){return l.getEntryCount()},forEach:function(e){return l.forEach(e)},extractEntryTo:function(e,t,A,n,o,i){n=get_Bool(false,n);o=get_Bool(false,o);A=get_Bool(true,A);i=get_Str(o,i);var a=getEntry(e);if(!a){throw r.Errors.NO_ENTRY()}var u=g(a.entryName);var d=h(t,i&&!a.isDirectory?i:A?u:s.basename(u));if(a.isDirectory){var Q=l.getEntryChildren(a);Q.forEach((function(e){if(e.isDirectory)return;var i=e.getData();if(!i){throw r.Errors.CANT_EXTRACT_FILE()}var a=g(e.entryName);var l=h(t,A?a:s.basename(a));const u=o?e.header.fileAttr:undefined;c.writeFileTo(l,i,n,u)}));return true}var C=a.getData(l.password);if(!C)throw r.Errors.CANT_EXTRACT_FILE();if(c.fs.existsSync(d)&&!n){throw r.Errors.CANT_OVERRIDE()}const B=o?e.header.fileAttr:undefined;c.writeFileTo(d,C,n,B);return true},test:function(e){if(!l){return false}for(var t in l.entries){try{if(t.isDirectory){continue}var A=l.entries[t].getData(e);if(!A){return false}}catch(e){return false}}return true},extractAllTo:function(e,t,A,s){A=get_Bool(false,A);s=get_Str(A,s);t=get_Bool(false,t);if(!l)throw r.Errors.NO_ZIP();l.entries.forEach((function(n){var o=h(e,g(n.entryName));if(n.isDirectory){c.makeDir(o);return}var i=n.getData(s);if(!i){throw r.Errors.CANT_EXTRACT_FILE()}const a=A?n.header.fileAttr:undefined;c.writeFileTo(o,i,t,a);try{c.fs.utimesSync(o,n.header.time,n.header.time)}catch(e){throw r.Errors.CANT_EXTRACT_FILE()}}))},extractAllToAsync:function(e,t,A,n){n=get_Fun(t,A,n);A=get_Bool(false,A);t=get_Bool(false,t);if(!n){return new Promise(((r,s)=>{this.extractAllToAsync(e,t,A,(function(e){if(e){s(e)}else{r(this)}}))}))}if(!l){n(r.Errors.NO_ZIP());return}e=s.resolve(e);const getPath=t=>h(e,s.normalize(g(t.entryName)));const getError=(e,t)=>new Error(e+': "'+t+'"');const o=[];const i=[];l.entries.forEach((e=>{if(e.isDirectory){o.push(e)}else{i.push(e)}}));for(const e of o){const t=getPath(e);const r=A?e.header.fileAttr:undefined;try{c.makeDir(t);if(r)c.fs.chmodSync(t,r);c.fs.utimesSync(t,e.header.time,e.header.time)}catch(e){n(getError("Unable to create folder",t))}}i.reverse().reduce((function(n,o){return function(i){if(i){n(i)}else{const i=s.normalize(g(o.entryName));const a=h(e,i);o.getDataAsync((function(e,s){if(s){n(s)}else if(!e){n(r.Errors.CANT_EXTRACT_FILE())}else{const r=A?o.header.fileAttr:undefined;c.writeFileToAsync(a,e,t,r,(function(e){if(!e){n(getError("Unable to write file",a))}c.fs.utimes(a,o.header.time,o.header.time,(function(e){if(e){n(getError("Unable to set times",a))}else{n()}}))}))}}))}}}),n)()},writeZip:function(e,t){if(arguments.length===1){if(typeof e==="function"){t=e;e=""}}if(!e&&a.filename){e=a.filename}if(!e)return;var A=l.compressToBuffer();if(A){var r=c.writeFileTo(e,A,true);if(typeof t==="function")t(!r?new Error("failed"):null,"")}},writeZipPromise:function(e,t){const{overwrite:A,perm:r}=Object.assign({overwrite:true},t);return new Promise(((t,s)=>{if(!e&&a.filename)e=a.filename;if(!e)s("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((n=>{const ret=e=>e?t(e):s("ADM-ZIP: Wasn't able to write zip file");c.writeFileToAsync(e,n,A,r,ret)}),s)}))},toBufferPromise:function(){return new Promise(((e,t)=>{l.toAsyncBuffer(e,t)}))},toBuffer:function(e,t,A,r){if(typeof e==="function"){l.toAsyncBuffer(e,t,A,r);return null}return l.compressToBuffer()}}}},3746:(e,t,A)=>{var r=A(5391),s=r.Constants;e.exports=function(){var e=20,t=10,A=0,n=0,o=0,i=0,a=0,c=0,l=0,g=0,h=0,u=0,d=0,Q=0,C=0;e|=r.isWin?2560:768;A|=s.FLG_EFS;const B={extraLen:0};const uint32=e=>Math.max(0,e)>>>0;const uint16=e=>Math.max(0,e)&65535;const uint8=e=>Math.max(0,e)&255;o=r.fromDate2DOS(new Date);return{get made(){return e},set made(t){e=t},get version(){return t},set version(e){t=e},get flags(){return A},set flags(e){A=e},get flags_efs(){return(A&s.FLG_EFS)>0},set flags_efs(e){if(e){A|=s.FLG_EFS}else{A&=~s.FLG_EFS}},get flags_desc(){return(A&s.FLG_DESC)>0},set flags_desc(e){if(e){A|=s.FLG_DESC}else{A&=~s.FLG_DESC}},get method(){return n},set method(e){switch(e){case s.STORED:this.version=10;case s.DEFLATED:default:this.version=20}n=e},get time(){return r.fromDOS2Date(this.timeval)},set time(e){this.timeval=r.fromDate2DOS(e)},get timeval(){return o},set timeval(e){o=uint32(e)},get timeHighByte(){return uint8(o>>>8)},get crc(){return i},set crc(e){i=uint32(e)},get compressedSize(){return a},set compressedSize(e){a=uint32(e)},get size(){return c},set size(e){c=uint32(e)},get fileNameLength(){return l},set fileNameLength(e){l=e},get extraLength(){return g},set extraLength(e){g=e},get extraLocalLength(){return B.extraLen},set extraLocalLength(e){B.extraLen=e},get commentLength(){return h},set commentLength(e){h=e},get diskNumStart(){return u},set diskNumStart(e){u=uint32(e)},get inAttr(){return d},set inAttr(e){d=uint32(e)},get attr(){return Q},set attr(e){Q=uint32(e)},get fileAttr(){return(Q||0)>>16&4095},get offset(){return C},set offset(e){C=uint32(e)},get encrypted(){return(A&s.FLG_ENC)===s.FLG_ENC},get centralHeaderSize(){return s.CENHDR+l+g+h},get realDataOffset(){return C+s.LOCHDR+B.fnameLen+B.extraLen},get localHeader(){return B},loadLocalHeaderFromBinary:function(e){var t=e.slice(C,C+s.LOCHDR);if(t.readUInt32LE(0)!==s.LOCSIG){throw r.Errors.INVALID_LOC()}B.version=t.readUInt16LE(s.LOCVER);B.flags=t.readUInt16LE(s.LOCFLG);B.method=t.readUInt16LE(s.LOCHOW);B.time=t.readUInt32LE(s.LOCTIM);B.crc=t.readUInt32LE(s.LOCCRC);B.compressedSize=t.readUInt32LE(s.LOCSIZ);B.size=t.readUInt32LE(s.LOCLEN);B.fnameLen=t.readUInt16LE(s.LOCNAM);B.extraLen=t.readUInt16LE(s.LOCEXT);const A=C+s.LOCHDR+B.fnameLen;const n=A+B.extraLen;return e.slice(A,n)},loadFromBinary:function(B){if(B.length!==s.CENHDR||B.readUInt32LE(0)!==s.CENSIG){throw r.Errors.INVALID_CEN()}e=B.readUInt16LE(s.CENVEM);t=B.readUInt16LE(s.CENVER);A=B.readUInt16LE(s.CENFLG);n=B.readUInt16LE(s.CENHOW);o=B.readUInt32LE(s.CENTIM);i=B.readUInt32LE(s.CENCRC);a=B.readUInt32LE(s.CENSIZ);c=B.readUInt32LE(s.CENLEN);l=B.readUInt16LE(s.CENNAM);g=B.readUInt16LE(s.CENEXT);h=B.readUInt16LE(s.CENCOM);u=B.readUInt16LE(s.CENDSK);d=B.readUInt16LE(s.CENATT);Q=B.readUInt32LE(s.CENATX);C=B.readUInt32LE(s.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(s.LOCHDR);e.writeUInt32LE(s.LOCSIG,0);e.writeUInt16LE(t,s.LOCVER);e.writeUInt16LE(A,s.LOCFLG);e.writeUInt16LE(n,s.LOCHOW);e.writeUInt32LE(o,s.LOCTIM);e.writeUInt32LE(i,s.LOCCRC);e.writeUInt32LE(a,s.LOCSIZ);e.writeUInt32LE(c,s.LOCLEN);e.writeUInt16LE(l,s.LOCNAM);e.writeUInt16LE(B.extraLen,s.LOCEXT);return e},centralHeaderToBinary:function(){var r=Buffer.alloc(s.CENHDR+l+g+h);r.writeUInt32LE(s.CENSIG,0);r.writeUInt16LE(e,s.CENVEM);r.writeUInt16LE(t,s.CENVER);r.writeUInt16LE(A,s.CENFLG);r.writeUInt16LE(n,s.CENHOW);r.writeUInt32LE(o,s.CENTIM);r.writeUInt32LE(i,s.CENCRC);r.writeUInt32LE(a,s.CENSIZ);r.writeUInt32LE(c,s.CENLEN);r.writeUInt16LE(l,s.CENNAM);r.writeUInt16LE(g,s.CENEXT);r.writeUInt16LE(h,s.CENCOM);r.writeUInt16LE(u,s.CENDSK);r.writeUInt16LE(d,s.CENATT);r.writeUInt32LE(Q,s.CENATX);r.writeUInt32LE(C,s.CENOFF);return r},toJSON:function(){const bytes=function(e){return e+" bytes"};return{made:e,version:t,flags:A,method:r.methodToString(n),time:this.time,crc:"0x"+i.toString(16).toUpperCase(),compressedSize:bytes(a),size:bytes(c),fileNameLength:bytes(l),extraLength:bytes(g),commentLength:bytes(h),diskNumStart:u,inAttr:d,attr:Q,offset:C,centralHeaderSize:bytes(s.CENHDR+l+g+h)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},1907:(e,t,A)=>{t.EntryHeader=A(3746);t.MainHeader=A(9311)},9311:(e,t,A)=>{var r=A(5391),s=r.Constants;e.exports=function(){var e=0,t=0,A=0,n=0,o=0;return{get diskEntries(){return e},set diskEntries(A){e=t=A},get totalEntries(){return t},set totalEntries(A){t=e=A},get size(){return A},set size(e){A=e},get offset(){return n},set offset(e){n=e},get commentLength(){return o},set commentLength(e){o=e},get mainHeaderSize(){return s.ENDHDR+o},loadFromBinary:function(i){if((i.length!==s.ENDHDR||i.readUInt32LE(0)!==s.ENDSIG)&&(i.length<s.ZIP64HDR||i.readUInt32LE(0)!==s.ZIP64SIG)){throw r.Errors.INVALID_END()}if(i.readUInt32LE(0)===s.ENDSIG){e=i.readUInt16LE(s.ENDSUB);t=i.readUInt16LE(s.ENDTOT);A=i.readUInt32LE(s.ENDSIZ);n=i.readUInt32LE(s.ENDOFF);o=i.readUInt16LE(s.ENDCOM)}else{e=r.readBigUInt64LE(i,s.ZIP64SUB);t=r.readBigUInt64LE(i,s.ZIP64TOT);A=r.readBigUInt64LE(i,s.ZIP64SIZE);n=r.readBigUInt64LE(i,s.ZIP64OFF);o=0}},toBinary:function(){var r=Buffer.alloc(s.ENDHDR+o);r.writeUInt32LE(s.ENDSIG,0);r.writeUInt32LE(0,4);r.writeUInt16LE(e,s.ENDSUB);r.writeUInt16LE(t,s.ENDTOT);r.writeUInt32LE(A,s.ENDSIZ);r.writeUInt32LE(n,s.ENDOFF);r.writeUInt16LE(o,s.ENDCOM);r.fill(" ",s.ENDHDR);return r},toJSON:function(){const offset=function(e,t){let A=e.toString(16).toUpperCase();while(A.length<t)A="0"+A;return"0x"+A};return{diskEntries:e,totalEntries:t,size:A+" bytes",offset:offset(n,4),commentLength:o}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},5120:(e,t,A)=>{e.exports=function(e){var t=A(3106);var r={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,r)},deflateAsync:function(A){var s=t.createDeflateRaw(r),n=[],o=0;s.on("data",(function(e){n.push(e);o+=e.length}));s.on("end",(function(){var e=Buffer.alloc(o),t=0;e.fill(0);for(var r=0;r<n.length;r++){var s=n[r];s.copy(e,t);t+=s.length}A&&A(e)}));s.end(e)}}}},3667:(e,t,A)=>{t.Deflater=A(5120);t.Inflater=A(9540);t.ZipCrypto=A(2689)},9540:(e,t,A)=>{const r=+(process.versions?process.versions.node:"").split(".")[0]||0;e.exports=function(e,t){var s=A(3106);const n=r>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return s.inflateRawSync(e,n)},inflateAsync:function(t){var A=s.createInflateRaw(n),r=[],o=0;A.on("data",(function(e){r.push(e);o+=e.length}));A.on("end",(function(){var e=Buffer.alloc(o),A=0;e.fill(0);for(var s=0;s<r.length;s++){var n=r[s];n.copy(e,A);A+=n.length}t&&t(e)}));A.end(e)}}}},2689:(e,t,A)=>{const{randomFillSync:r}=A(6982);const s=A(6232);const n=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++){if(0!==(t&1)){t=t>>>1^3988292384}else{t>>>=1}}return t>>>0}));const uMul=(e,t)=>Math.imul(e,t)>>>0;const crc32update=(e,t)=>n[(e^t)&255]^e>>>8;const genSalt=()=>{if("function"===typeof r){return r(Buffer.alloc(12))}else{return genSalt.node()}};genSalt.node=()=>{const e=Buffer.alloc(12);const t=e.length;for(let A=0;A<t;A++)e[A]=Math.random()*256&255;return e};const o={genSalt:genSalt};function Initkeys(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let e=0;e<t.length;e++){this.updateKeys(t[e])}}Initkeys.prototype.updateKeys=function(e){const t=this.keys;t[0]=crc32update(t[0],e);t[1]+=t[0]&255;t[1]=uMul(t[1],134775813)+1;t[2]=crc32update(t[2],t[1]>>>24);return e};Initkeys.prototype.next=function(){const e=(this.keys[2]|2)>>>0;return uMul(e,e^1)>>8&255};function make_decrypter(e){const t=new Initkeys(e);return function(e){const A=Buffer.alloc(e.length);let r=0;for(let s of e){A[r++]=t.updateKeys(s^t.next())}return A}}function make_encrypter(e){const t=new Initkeys(e);return function(e,A,r=0){if(!A)A=Buffer.alloc(e.length);for(let s of e){const e=t.next();A[r++]=s^e;t.updateKeys(s)}return A}}function decrypt(e,t,A){if(!e||!Buffer.isBuffer(e)||e.length<12){return Buffer.alloc(0)}const r=make_decrypter(A);const n=r(e.slice(0,12));const o=(t.flags&8)===8?t.timeHighByte:t.crc>>>24;if(n[11]!==o){throw s.WRONG_PASSWORD()}return r(e.slice(12))}function _salter(e){if(Buffer.isBuffer(e)&&e.length>=12){o.genSalt=function(){return e.slice(0,12)}}else if(e==="node"){o.genSalt=genSalt.node}else{o.genSalt=genSalt}}function encrypt(e,t,A,r=false){if(e==null)e=Buffer.alloc(0);if(!Buffer.isBuffer(e))e=Buffer.from(e.toString());const s=make_encrypter(A);const n=o.genSalt();n[11]=t.crc>>>24&255;if(r)n[10]=t.crc>>>16&255;const i=Buffer.alloc(e.length+12);s(n,i);return s(e,i,12)}e.exports={decrypt:decrypt,encrypt:encrypt,_salter:_salter}},2834:e=>{e.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}},1579:e=>{e.exports={efs:true,encode:e=>Buffer.from(e,"utf8"),decode:e=>e.toString("utf8")}},6232:(e,t)=>{const A={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function E(e){return function(...t){if(t.length){e=e.replace(/\{(\d)\}/g,((e,A)=>t[A]||""))}return new Error("ADM-ZIP: "+e)}}for(const e of Object.keys(A)){t[e]=E(A[e])}},38:(e,t,A)=>{const r=A(6928);e.exports=function(e,{fs:t}){var A=e||"",s=newAttr(),n=null;function newAttr(){return{directory:false,readonly:false,hidden:false,executable:false,mtime:0,atime:0}}if(A&&t.existsSync(A)){n=t.statSync(A);s.directory=n.isDirectory();s.mtime=n.mtime;s.atime=n.atime;s.executable=(73&n.mode)!==0;s.readonly=(128&n.mode)===0;s.hidden=r.basename(A)[0]==="."}else{console.warn("Invalid path: "+A)}return{get directory(){return s.directory},get readOnly(){return s.readonly},get hidden(){return s.hidden},get mtime(){return s.mtime},get atime(){return s.atime},get executable(){return s.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:A,isDirectory:s.directory,isReadOnly:s.readonly,isHidden:s.hidden,isExecutable:s.executable,mTime:s.mtime,aTime:s.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},5391:(e,t,A)=>{e.exports=A(9066);e.exports.Constants=A(2834);e.exports.Errors=A(6232);e.exports.FileAttr=A(38);e.exports.decoder=A(1579)},9066:(e,t,A)=>{const r=A(9896);const s=A(6928);const n=A(2834);const o=A(6232);const i=typeof process==="object"&&"win32"===process.platform;const is_Obj=e=>typeof e==="object"&&e!==null;const a=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++){if((t&1)!==0){t=3988292384^t>>>1}else{t>>>=1}}return t>>>0}));function Utils(e){this.sep=s.sep;this.fs=r;if(is_Obj(e)){if(is_Obj(e.fs)&&typeof e.fs.statSync==="function"){this.fs=e.fs}}}e.exports=Utils;Utils.prototype.makeDir=function(e){const t=this;function mkdirSync(e){let A=e.split(t.sep)[0];e.split(t.sep).forEach((function(e){if(!e||e.substr(-1,1)===":")return;A+=t.sep+e;var r;try{r=t.fs.statSync(A)}catch(e){t.fs.mkdirSync(A)}if(r&&r.isFile())throw o.FILE_IN_THE_WAY(`"${A}"`)}))}mkdirSync(e)};Utils.prototype.writeFileTo=function(e,t,A,r){const n=this;if(n.fs.existsSync(e)){if(!A)return false;var o=n.fs.statSync(e);if(o.isDirectory()){return false}}var i=s.dirname(e);if(!n.fs.existsSync(i)){n.makeDir(i)}var a;try{a=n.fs.openSync(e,"w",438)}catch(t){n.fs.chmodSync(e,438);a=n.fs.openSync(e,"w",438)}if(a){try{n.fs.writeSync(a,t,0,t.length,0)}finally{n.fs.closeSync(a)}}n.fs.chmodSync(e,r||438);return true};Utils.prototype.writeFileToAsync=function(e,t,A,r,n){if(typeof r==="function"){n=r;r=undefined}const o=this;o.fs.exists(e,(function(i){if(i&&!A)return n(false);o.fs.stat(e,(function(A,a){if(i&&a.isDirectory()){return n(false)}var c=s.dirname(e);o.fs.exists(c,(function(A){if(!A)o.makeDir(c);o.fs.open(e,"w",438,(function(A,s){if(A){o.fs.chmod(e,438,(function(){o.fs.open(e,"w",438,(function(A,s){o.fs.write(s,t,0,t.length,0,(function(){o.fs.close(s,(function(){o.fs.chmod(e,r||438,(function(){n(true)}))}))}))}))}))}else if(s){o.fs.write(s,t,0,t.length,0,(function(){o.fs.close(s,(function(){o.fs.chmod(e,r||438,(function(){n(true)}))}))}))}else{o.fs.chmod(e,r||438,(function(){n(true)}))}}))}))}))}))};Utils.prototype.findFiles=function(e){const t=this;function findSync(e,A,r){if(typeof A==="boolean"){r=A;A=undefined}let n=[];t.fs.readdirSync(e).forEach((function(o){const i=s.join(e,o);const a=t.fs.statSync(i);if(!A||A.test(i)){n.push(s.normalize(i)+(a.isDirectory()?t.sep:""))}if(a.isDirectory()&&r)n=n.concat(findSync(i,A,r))}));return n}return findSync(e,undefined,true)};Utils.prototype.findFilesAsync=function(e,t){const A=this;let r=[];A.fs.readdir(e,(function(n,o){if(n)return t(n);let i=o.length;if(!i)return t(null,r);o.forEach((function(n){n=s.join(e,n);A.fs.stat(n,(function(e,o){if(e)return t(e);if(o){r.push(s.normalize(n)+(o.isDirectory()?A.sep:""));if(o.isDirectory()){A.findFilesAsync(n,(function(e,A){if(e)return t(e);r=r.concat(A);if(! --i)t(null,r)}))}else{if(! --i)t(null,r)}}}))}))}))};Utils.prototype.getAttributes=function(){};Utils.prototype.setAttributes=function(){};Utils.crc32update=function(e,t){return a[(e^t)&255]^e>>>8};Utils.crc32=function(e){if(typeof e==="string"){e=Buffer.from(e,"utf8")}let t=e.length;let A=~0;for(let r=0;r<t;)A=Utils.crc32update(A,e[r++]);return~A>>>0};Utils.methodToString=function(e){switch(e){case n.STORED:return"STORED ("+e+")";case n.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Utils.canonical=function(e){if(!e)return"";const t=s.posix.normalize("/"+e.split("\\").join("/"));return s.join(".",t)};Utils.zipnamefix=function(e){if(!e)return"";const t=s.posix.normalize("/"+e.split("\\").join("/"));return s.posix.join(".",t)};Utils.findLast=function(e,t){if(!Array.isArray(e))throw new TypeError("arr is not array");const A=e.length>>>0;for(let r=A-1;r>=0;r--){if(t(e[r],r,e)){return e[r]}}return void 0};Utils.sanitize=function(e,t){e=s.resolve(s.normalize(e));var A=t.split("/");for(var r=0,n=A.length;r<n;r++){var o=s.normalize(s.join(e,A.slice(r,n).join(s.sep)));if(o.indexOf(e)===0){return o}}return s.normalize(s.join(e,s.basename(t)))};Utils.toBuffer=function toBuffer(e,t){if(Buffer.isBuffer(e)){return e}else if(e instanceof Uint8Array){return Buffer.from(e)}else{return typeof e==="string"?t(e):Buffer.alloc(0)}};Utils.readBigUInt64LE=function(e,t){var A=Buffer.from(e.slice(t,t+8));A.swap64();return parseInt(`0x${A.toString("hex")}`)};Utils.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)};Utils.fromDate2DOS=function(e){let t=0;let A=0;if(e.getFullYear()>1979){t=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate();A=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1}return t<<16|A};Utils.isWin=i;Utils.crcTable=a},2609:(e,t,A)=>{var r=A(5391),s=A(1907),n=r.Constants,o=A(3667);e.exports=function(e,t){var A=new s.EntryHeader,i=Buffer.alloc(0),a=Buffer.alloc(0),c=false,l=null,g=Buffer.alloc(0),h=Buffer.alloc(0),u=true;const d=e;const Q=typeof d.decoder==="object"?d.decoder:r.decoder;u=Q.hasOwnProperty("efs")?Q.efs:false;function getCompressedDataFromZip(){if(!t||!(t instanceof Uint8Array)){return Buffer.alloc(0)}h=A.loadLocalHeaderFromBinary(t);return t.slice(A.realDataOffset,A.realDataOffset+A.compressedSize)}function crc32OK(e){if(!A.flags_desc){if(r.crc32(e)!==A.localHeader.crc){return false}}else{const s={};const o=A.realDataOffset+A.compressedSize;if(t.readUInt32LE(o)==n.LOCSIG||t.readUInt32LE(o)==n.CENSIG){throw r.Errors.DESCRIPTOR_NOT_EXIST()}if(t.readUInt32LE(o)==n.EXTSIG){s.crc=t.readUInt32LE(o+n.EXTCRC);s.compressedSize=t.readUInt32LE(o+n.EXTSIZ);s.size=t.readUInt32LE(o+n.EXTLEN)}else if(t.readUInt16LE(o+12)===19280){s.crc=t.readUInt32LE(o+n.EXTCRC-4);s.compressedSize=t.readUInt32LE(o+n.EXTSIZ-4);s.size=t.readUInt32LE(o+n.EXTLEN-4)}else{throw r.Errors.DESCRIPTOR_UNKNOWN()}if(s.compressedSize!==A.compressedSize||s.size!==A.size||s.crc!==A.crc){throw r.Errors.DESCRIPTOR_FAULTY()}if(r.crc32(e)!==s.crc){return false}}return true}function decompress(e,t,s){if(typeof t==="undefined"&&typeof e==="string"){s=e;e=void 0}if(c){if(e&&t){t(Buffer.alloc(0),r.Errors.DIRECTORY_CONTENT_ERROR())}return Buffer.alloc(0)}var n=getCompressedDataFromZip();if(n.length===0){if(e&&t)t(n);return n}if(A.encrypted){if("string"!==typeof s&&!Buffer.isBuffer(s)){throw r.Errors.INVALID_PASS_PARAM()}n=o.ZipCrypto.decrypt(n,A,s)}var a=Buffer.alloc(A.size);switch(A.method){case r.Constants.STORED:n.copy(a);if(!crc32OK(a)){if(e&&t)t(a,r.Errors.BAD_CRC());throw r.Errors.BAD_CRC()}else{if(e&&t)t(a);return a}case r.Constants.DEFLATED:var l=new o.Inflater(n,A.size);if(!e){const e=l.inflate(a);e.copy(a,0);if(!crc32OK(a)){throw r.Errors.BAD_CRC(`"${Q.decode(i)}"`)}return a}else{l.inflateAsync((function(e){e.copy(e,0);if(t){if(!crc32OK(e)){t(e,r.Errors.BAD_CRC())}else{t(e)}}}))}break;default:if(e&&t)t(Buffer.alloc(0),r.Errors.UNKNOWN_METHOD());throw r.Errors.UNKNOWN_METHOD()}}function compress(e,s){if((!l||!l.length)&&Buffer.isBuffer(t)){if(e&&s)s(getCompressedDataFromZip());return getCompressedDataFromZip()}if(l.length&&!c){var n;switch(A.method){case r.Constants.STORED:A.compressedSize=A.size;n=Buffer.alloc(l.length);l.copy(n);if(e&&s)s(n);return n;default:case r.Constants.DEFLATED:var i=new o.Deflater(l);if(!e){var a=i.deflate();A.compressedSize=a.length;return a}else{i.deflateAsync((function(e){n=Buffer.alloc(e.length);A.compressedSize=e.length;e.copy(n);s&&s(n)}))}i=null;break}}else if(e&&s){s(Buffer.alloc(0))}else{return Buffer.alloc(0)}}function readUInt64LE(e,t){return(e.readUInt32LE(t+4)<<4)+e.readUInt32LE(t)}function parseExtra(e){try{var t=0;var A,s,o;while(t+4<e.length){A=e.readUInt16LE(t);t+=2;s=e.readUInt16LE(t);t+=2;o=e.slice(t,t+s);t+=s;if(n.ID_ZIP64===A){parseZip64ExtendedInformation(o)}}}catch(e){throw r.Errors.EXTRA_FIELD_PARSE_ERROR()}}function parseZip64ExtendedInformation(e){var t,r,s,o;if(e.length>=n.EF_ZIP64_SCOMP){t=readUInt64LE(e,n.EF_ZIP64_SUNCOMP);if(A.size===n.EF_ZIP64_OR_32){A.size=t}}if(e.length>=n.EF_ZIP64_RHO){r=readUInt64LE(e,n.EF_ZIP64_SCOMP);if(A.compressedSize===n.EF_ZIP64_OR_32){A.compressedSize=r}}if(e.length>=n.EF_ZIP64_DSN){s=readUInt64LE(e,n.EF_ZIP64_RHO);if(A.offset===n.EF_ZIP64_OR_32){A.offset=s}}if(e.length>=n.EF_ZIP64_DSN+4){o=e.readUInt32LE(n.EF_ZIP64_DSN);if(A.diskNumStart===n.EF_ZIP64_OR_16){A.diskNumStart=o}}}return{get entryName(){return Q.decode(i)},get rawEntryName(){return i},set entryName(e){i=r.toBuffer(e,Q.encode);var t=i[i.length-1];c=t===47||t===92;A.fileNameLength=i.length},get efs(){if(typeof u==="function"){return u(this.entryName)}else{return u}},get extra(){return g},set extra(e){g=e;A.extraLength=e.length;parseExtra(e)},get comment(){return Q.decode(a)},set comment(e){a=r.toBuffer(e,Q.encode);A.commentLength=a.length;if(a.length>65535)throw r.Errors.COMMENT_TOO_LONG()},get name(){var e=Q.decode(i);return c?e.substr(e.length-1).split("/").pop():e.split("/").pop()},get isDirectory(){return c},getCompressedData:function(){return compress(false,null)},getCompressedDataAsync:function(e){compress(true,e)},setData:function(e){l=r.toBuffer(e,r.decoder.encode);if(!c&&l.length){A.size=l.length;A.method=r.Constants.DEFLATED;A.crc=r.crc32(e);A.changed=true}else{A.method=r.Constants.STORED}},getData:function(e){if(A.changed){return l}else{return decompress(false,null,e)}},getDataAsync:function(e,t){if(A.changed){e(l)}else{decompress(true,e,t)}},set attr(e){A.attr=e},get attr(){return A.attr},set header(e){A.loadFromBinary(e)},get header(){return A},packCentralHeader:function(){A.flags_efs=this.efs;A.extraLength=g.length;var e=A.centralHeaderToBinary();var t=r.Constants.CENHDR;i.copy(e,t);t+=i.length;g.copy(e,t);t+=A.extraLength;a.copy(e,t);return e},packLocalHeader:function(){let e=0;A.flags_efs=this.efs;A.extraLocalLength=h.length;const t=A.localHeaderToBinary();const r=Buffer.alloc(t.length+i.length+A.extraLocalLength);t.copy(r,e);e+=t.length;i.copy(r,e);e+=i.length;h.copy(r,e);e+=h.length;return r},toJSON:function(){const bytes=function(e){return"<"+(e&&e.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:A.toJSON(),compressedData:bytes(t),data:bytes(l)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},6991:(e,t,A)=>{const r=A(2609);const s=A(1907);const n=A(5391);e.exports=function(e,t){var A=[],o={},i=Buffer.alloc(0),a=new s.MainHeader,c=false;var l=null;const g=new Set;const h=t;const{noSort:u,decoder:d}=h;if(e){readMainHeader(h.readEntries)}else{c=true}function makeTemporaryFolders(){const e=new Set;for(const t of Object.keys(o)){const A=t.split("/");A.pop();if(!A.length)continue;for(let t=0;t<A.length;t++){const r=A.slice(0,t+1).join("/")+"/";e.add(r)}}for(const t of e){if(!(t in o)){const e=new r(h);e.entryName=t;e.attr=16;e.temporary=true;A.push(e);o[e.entryName]=e;g.add(e)}}}function readEntries(){c=true;o={};if(a.diskEntries>(e.length-a.offset)/n.Constants.CENHDR){throw n.Errors.DISK_ENTRY_TOO_LARGE()}A=new Array(a.diskEntries);var t=a.offset;for(var s=0;s<A.length;s++){var i=t,l=new r(h,e);l.header=e.slice(i,i+=n.Constants.CENHDR);l.entryName=e.slice(i,i+=l.header.fileNameLength);if(l.header.extraLength){l.extra=e.slice(i,i+=l.header.extraLength)}if(l.header.commentLength)l.comment=e.slice(i,i+l.header.commentLength);t+=l.header.centralHeaderSize;A[s]=l;o[l.entryName]=l}g.clear();makeTemporaryFolders()}function readMainHeader(t){var A=e.length-n.Constants.ENDHDR,r=Math.max(0,A-65535),s=r,o=e.length,c=-1,l=0;const g=typeof h.trailingSpace==="boolean"?h.trailingSpace:false;if(g)r=0;for(A;A>=s;A--){if(e[A]!==80)continue;if(e.readUInt32LE(A)===n.Constants.ENDSIG){c=A;l=A;o=A+n.Constants.ENDHDR;s=A-n.Constants.END64HDR;continue}if(e.readUInt32LE(A)===n.Constants.END64SIG){s=r;continue}if(e.readUInt32LE(A)===n.Constants.ZIP64SIG){c=A;o=A+n.readBigUInt64LE(e,A+n.Constants.ZIP64SIZE)+n.Constants.ZIP64LEAD;break}}if(c==-1)throw n.Errors.INVALID_FORMAT();a.loadFromBinary(e.slice(c,o));if(a.commentLength){i=e.slice(l+n.Constants.ENDHDR)}if(t)readEntries()}function sortEntries(){if(A.length>1&&!u){A.sort(((e,t)=>e.entryName.toLowerCase().localeCompare(t.entryName.toLowerCase())))}}return{get entries(){if(!c){readEntries()}return A.filter((e=>!g.has(e)))},get comment(){return d.decode(i)},set comment(e){i=n.toBuffer(e,d.encode);a.commentLength=i.length},getEntryCount:function(){if(!c){return a.diskEntries}return A.length},forEach:function(e){this.entries.forEach(e)},getEntry:function(e){if(!c){readEntries()}return o[e]||null},setEntry:function(e){if(!c){readEntries()}A.push(e);o[e.entryName]=e;a.totalEntries=A.length},deleteFile:function(e,t=true){if(!c){readEntries()}const A=o[e];const r=this.getEntryChildren(A,t).map((e=>e.entryName));r.forEach(this.deleteEntry)},deleteEntry:function(e){if(!c){readEntries()}const t=o[e];const r=A.indexOf(t);if(r>=0){A.splice(r,1);delete o[e];a.totalEntries=A.length}},getEntryChildren:function(e,t=true){if(!c){readEntries()}if(typeof e==="object"){if(e.isDirectory&&t){const t=[];const r=e.entryName;for(const e of A){if(e.entryName.startsWith(r)){t.push(e)}}return t}else{return[e]}}return[]},getChildCount:function(e){if(e&&e.isDirectory){const t=this.getEntryChildren(e);return t.includes(e)?t.length-1:t.length}return 0},compressToBuffer:function(){if(!c){readEntries()}sortEntries();const t=[];const A=[];let r=0;let s=0;a.size=0;a.offset=0;let o=0;for(const e of this.entries){const n=e.getCompressedData();e.header.offset=s;const i=e.packLocalHeader();const c=i.length+n.length;s+=c;t.push(i);t.push(n);const l=e.packCentralHeader();A.push(l);a.size+=l.length;r+=c+l.length;o++}r+=a.mainHeaderSize;a.offset=s;a.totalEntries=o;s=0;const l=Buffer.alloc(r);for(const e of t){e.copy(l,s);s+=e.length}for(const e of A){e.copy(l,s);s+=e.length}const g=a.toBinary();if(i){i.copy(g,n.Constants.ENDHDR)}g.copy(l,s);e=l;c=false;return l},toAsyncBuffer:function(t,A,r,s){try{if(!c){readEntries()}sortEntries();const A=[];const o=[];let l=0;let g=0;let h=0;a.size=0;a.offset=0;const compress2Buffer=function(u){if(u.length>0){const e=u.shift();const t=e.entryName+e.extra.toString();if(r)r(t);e.getCompressedDataAsync((function(r){if(s)s(t);e.header.offset=g;const n=e.packLocalHeader();const i=n.length+r.length;g+=i;A.push(n);A.push(r);const c=e.packCentralHeader();o.push(c);a.size+=c.length;l+=i+c.length;h++;compress2Buffer(u)}))}else{l+=a.mainHeaderSize;a.offset=g;a.totalEntries=h;g=0;const r=Buffer.alloc(l);A.forEach((function(e){e.copy(r,g);g+=e.length}));o.forEach((function(e){e.copy(r,g);g+=e.length}));const s=a.toBinary();if(i){i.copy(s,n.Constants.ENDHDR)}s.copy(r,g);e=r;c=false;t(r)}};compress2Buffer(Array.from(this.entries))}catch(e){A(e)}}}}},7777:(e,t,A)=>{var r=A(7016).parse;var s={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var n=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function getProxyForUrl(e){var t=typeof e==="string"?r(e):e||{};var A=t.protocol;var n=t.host;var o=t.port;if(typeof n!=="string"||!n||typeof A!=="string"){return""}A=A.split(":",1)[0];n=n.replace(/:\d*$/,"");o=parseInt(o)||s[A]||0;if(!shouldProxy(n,o)){return""}var i=getEnv("npm_config_"+A+"_proxy")||getEnv(A+"_proxy")||getEnv("npm_config_proxy")||getEnv("all_proxy");if(i&&i.indexOf("://")===-1){i=A+"://"+i}return i}function shouldProxy(e,t){var A=(getEnv("npm_config_no_proxy")||getEnv("no_proxy")).toLowerCase();if(!A){return true}if(A==="*"){return false}return A.split(/[,\s]/).every((function(A){if(!A){return true}var r=A.match(/^(.+):(\d+)$/);var s=r?r[1]:A;var o=r?parseInt(r[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(s)){return e!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!n.call(e,s)}))}function getEnv(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.T=getProxyForUrl},9601:(e,t,A)=>{const{promisify:r}=A(9023);const s=A(1288);e.exports.fileSync=s.fileSync;const n=r(((e,t)=>s.file(e,((e,A,s,n)=>e?t(e):t(undefined,{path:A,fd:s,cleanup:r(n)})))));e.exports.file=async e=>n(e);e.exports.withFile=async function withFile(t,A){const{path:r,fd:s,cleanup:n}=await e.exports.file(A);try{return await t({path:r,fd:s})}finally{await n()}};e.exports.dirSync=s.dirSync;const o=r(((e,t)=>s.dir(e,((e,A,s)=>e?t(e):t(undefined,{path:A,cleanup:r(s)})))));e.exports.dir=async e=>o(e);e.exports.withDir=async function withDir(t,A){const{path:r,cleanup:s}=await e.exports.dir(A);try{return await t({path:r})}finally{await s()}};e.exports.tmpNameSync=s.tmpNameSync;e.exports.tmpName=r(s.tmpName);e.exports.tmpdir=s.tmpdir;e.exports.setGracefulCleanup=s.setGracefulCleanup},1288:(e,t,A)=>{ /*! * Tmp * * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu> * * MIT Licensed */ const r=A(9896);const s=A(857);const n=A(6928);const o=A(6982);const i={fs:r.constants,os:s.constants};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c=/XXXXXX/,l=3,g=(i.O_CREAT||i.fs.O_CREAT)|(i.O_EXCL||i.fs.O_EXCL)|(i.O_RDWR||i.fs.O_RDWR),h=s.platform()==="win32",u=i.EBADF||i.os.errno.EBADF,d=i.ENOENT||i.os.errno.ENOENT,Q=448,C=384,B="exit",I=[],f=r.rmdirSync.bind(r);let p=false;function rimraf(e,t){return r.rm(e,{recursive:true},t)}function FN_RIMRAF_SYNC(e){return r.rmSync(e,{recursive:true})}function tmpName(e,t){const A=_parseArguments(e,t),s=A[0],n=A[1];try{_assertAndSanitizeOptions(s)}catch(e){return n(e)}let o=s.tries;(function _getUniqueName(){try{const e=_generateTmpName(s);r.stat(e,(function(t){if(!t){if(o-- >0)return _getUniqueName();return n(new Error("Could not get a unique tmp filename, max tries reached "+e))}n(null,e)}))}catch(e){n(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),A=t[0];_assertAndSanitizeOptions(A);let s=A.tries;do{const e=_generateTmpName(A);try{r.statSync(e)}catch(t){return e}}while(s-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const A=_parseArguments(e,t),s=A[0],n=A[1];tmpName(s,(function _tmpNameCreated(e,t){if(e)return n(e);r.open(t,g,s.mode||C,(function _fileCreated(e,A){if(e)return n(e);if(s.discardDescriptor){return r.close(A,(function _discardCallback(e){return n(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,s,false))}))}else{const e=s.discardDescriptor||s.detachDescriptor;n(null,t,A,_prepareTmpFileRemoveCallback(t,e?-1:A,s,false))}}))}))}function fileSync(e){const t=_parseArguments(e),A=t[0];const s=A.discardDescriptor||A.detachDescriptor;const n=tmpNameSync(A);var o=r.openSync(n,g,A.mode||C);if(A.discardDescriptor){r.closeSync(o);o=undefined}return{name:n,fd:o,removeCallback:_prepareTmpFileRemoveCallback(n,s?-1:o,A,true)}}function dir(e,t){const A=_parseArguments(e,t),s=A[0],n=A[1];tmpName(s,(function _tmpNameCreated(e,t){if(e)return n(e);r.mkdir(t,s.mode||Q,(function _dirCreated(e){if(e)return n(e);n(null,t,_prepareTmpDirRemoveCallback(t,s,false))}))}))}function dirSync(e){const t=_parseArguments(e),A=t[0];const s=tmpNameSync(A);r.mkdirSync(s,A.mode||Q);return{name:s,removeCallback:_prepareTmpDirRemoveCallback(s,A,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])r.close(e[0],(function(){r.unlink(e[1],_handler)}));else r.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])r.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{r.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,A,r){const s=_prepareRemoveCallback(_removeFileSync,[t,e],r);const n=_prepareRemoveCallback(_removeFileAsync,[t,e],r,s);if(!A.keep)I.unshift(s);return r?s:n}function _prepareTmpDirRemoveCallback(e,t,A){const s=t.unsafeCleanup?rimraf:r.rmdir.bind(r);const n=t.unsafeCleanup?FN_RIMRAF_SYNC:f;const o=_prepareRemoveCallback(n,e,A);const i=_prepareRemoveCallback(s,e,A,o);if(!t.keep)I.unshift(o);return A?o:i}function _prepareRemoveCallback(e,t,A,r){let s=false;return function _cleanupCallback(n){if(!s){const o=r||_cleanupCallback;const i=I.indexOf(o);if(i>=0)I.splice(i,1);s=true;if(A||e===f||e===FN_RIMRAF_SYNC){return e(t)}else{return e(t,n||function(){})}}}}function _garbageCollector(){if(!p)return;while(I.length){try{I[0]()}catch(e){}}}function _randomChars(e){let t=[],A=null;try{A=o.randomBytes(e)}catch(t){A=o.pseudoRandomBytes(e)}for(var r=0;r<e;r++){t.push(a[A[r]%a.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const A={};for(const t of Object.getOwnPropertyNames(e)){A[t]=e[t]}return[A,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return n.join(t,e.dir,e.name);if(!_isUndefined(e.template))return n.join(t,e.dir,e.template).replace(c,_randomChars(6));const A=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.postfix:""].join("");return n.join(t,e.dir,A)}function _assertAndSanitizeOptions(e){e.tmpdir=_getTmpDir(e);const t=e.tmpdir;if(!_isUndefined(e.name))_assertIsRelative(e.name,"name",t);if(!_isUndefined(e.dir))_assertIsRelative(e.dir,"dir",t);if(!_isUndefined(e.template)){_assertIsRelative(e.template,"template",t);if(!e.template.match(c))throw new Error(`Invalid template, found "${e.template}".`)}if(!_isUndefined(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=_isUndefined(e.name)?e.tries||l:1;e.keep=!!e.keep;e.detachDescriptor=!!e.detachDescriptor;e.discardDescriptor=!!e.discardDescriptor;e.unsafeCleanup=!!e.unsafeCleanup;e.dir=_isUndefined(e.dir)?"":n.relative(t,_resolvePath(e.dir,t));e.template=_isUndefined(e.template)?undefined:n.relative(t,_resolvePath(e.template,t));e.template=_isBlank(e.template)?undefined:n.relative(e.dir,e.template);e.name=_isUndefined(e.name)?undefined:e.name;e.prefix=_isUndefined(e.prefix)?"":e.prefix;e.postfix=_isUndefined(e.postfix)?"":e.postfix}function _resolvePath(e,t){if(e.startsWith(t)){return n.resolve(e)}else{return n.resolve(n.join(t,e))}}function _assertIsRelative(e,t,A){if(t==="name"){if(n.isAbsolute(e))throw new Error(`${t} option must not contain an absolute path, found "${e}".`);let A=n.basename(e);if(A===".."||A==="."||A!==e)throw new Error(`${t} option must not contain a path, found "${e}".`)}else{if(n.isAbsolute(e)&&!e.startsWith(A)){throw new Error(`${t} option must be relative to "${A}", found "${e}".`)}let r=_resolvePath(e,A);if(!r.startsWith(A))throw new Error(`${t} option must be relative to "${A}", found "${r}".`)}}function _isEBADF(e){return _isExpectedError(e,-u,"EBADF")}function _isENOENT(e){return _isExpectedError(e,-d,"ENOENT")}function _isExpectedError(e,t,A){return h?e.code===A:e.code===A&&e.errno===t}function setGracefulCleanup(){p=true}function _getTmpDir(e){return n.resolve(e&&e.tmpdir||s.tmpdir())}process.addListener(B,_garbageCollector);Object.defineProperty(e.exports,"tmpdir",{enumerable:true,configurable:false,get:function(){return _getTmpDir()}});e.exports.dir=dir;e.exports.dirSync=dirSync;e.exports.file=file;e.exports.fileSync=fileSync;e.exports.tmpName=tmpName;e.exports.tmpNameSync=tmpNameSync;e.exports.setGracefulCleanup=setGracefulCleanup},6752:(e,t,A)=>{var r;const s=A(3701);const n=A(883);const o=A(628);const i=A(837);const a=A(7405);const c=A(6672);const l=A(3137);const g=A(50);const h=A(8707);const u=A(3440);const{InvalidArgumentError:d}=h;const Q=A(6615);const C=A(9136);const B=A(7365);const I=A(7501);const f=A(4004);const p=A(2429);const m=A(7816);const{getGlobalDispatcher:y,setGlobalDispatcher:w}=A(2581);const b=A(8155);const D=A(8754);const k=A(5092);Object.assign(n.prototype,Q);r=n;r=s;r=o;r=i;r=a;e.exports.kT=c;r=l;r=g;r=m;r=b;r=D;r=k;r={redirect:A(1514),retry:A(2026),dump:A(8060),dns:A(379)};r=C;r=h;r={parseHeaders:u.parseHeaders,headerNameToString:u.headerNameToString};function makeDispatcher(e){return(t,A,r)=>{if(typeof A==="function"){r=A;A=null}if(!t||typeof t!=="string"&&typeof t!=="object"&&!(t instanceof URL)){throw new d("invalid url")}if(A!=null&&typeof A!=="object"){throw new d("invalid opts")}if(A&&A.path!=null){if(typeof A.path!=="string"){throw new d("invalid opts.path")}let e=A.path;if(!A.path.startsWith("/")){e=`/${e}`}t=new URL(u.parseOrigin(t).origin+e)}else{if(!A){A=typeof t==="object"?t:{}}t=u.parseURL(t)}const{agent:s,dispatcher:n=y()}=A;if(s){throw new d("unsupported opts.agent. Did you mean opts.client?")}return e.call(n,{...A,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:A.method||(A.body?"PUT":"GET")},r)}}r=w;r=y;const R=A(4398).fetch;e.exports.hd=async function fetch(e,t=undefined){try{return await R(e,t)}catch(e){if(e&&typeof e==="object"){Error.captureStackTrace(e)}throw e}};A(660).Headers;A(9051).Response;A(9967).Request;A(5910).FormData;r=globalThis.File??A(4573).File;A(8355).FileReader;const{setGlobalOrigin:T,getGlobalOrigin:S}=A(1059);r=T;r=S;const{CacheStorage:F}=A(3245);const{kConstruct:N}=A(109);r=new F(N);const{deleteCookie:U,getCookies:L,getSetCookies:M,setCookie:G}=A(9061);r=U;r=L;r=M;r=G;const{parseMIMEType:v,serializeAMimeType:_}=A(1900);r=v;r=_;const{CloseEvent:O,ErrorEvent:H,MessageEvent:Y}=A(5188);A(3726).WebSocket;r=O;r=H;r=Y;r=makeDispatcher(Q.request);r=makeDispatcher(Q.stream);r=makeDispatcher(Q.pipeline);r=makeDispatcher(Q.connect);r=makeDispatcher(Q.upgrade);r=B;r=f;r=I;r=p;const{EventSource:P}=A(1238);r=P},158:(e,t,A)=>{const{addAbortListener:r}=A(3440);const{RequestAbortedError:s}=A(8707);const n=Symbol("kListener");const o=Symbol("kSignal");function abort(e){if(e.abort){e.abort(e[o]?.reason)}else{e.reason=e[o]?.reason??new s}removeSignal(e)}function addSignal(e,t){e.reason=null;e[o]=null;e[n]=null;if(!t){return}if(t.aborted){abort(e);return}e[o]=t;e[n]=()=>{abort(e)};r(e[o],e[n])}function removeSignal(e){if(!e[o]){return}if("removeEventListener"in e[o]){e[o].removeEventListener("abort",e[n])}else{e[o].removeListener("abort",e[n])}e[o]=null;e[n]=null}e.exports={addSignal:addSignal,removeSignal:removeSignal}},2279:(e,t,A)=>{const r=A(4589);const{AsyncResource:s}=A(6698);const{InvalidArgumentError:n,SocketError:o}=A(8707);const i=A(3440);const{addSignal:a,removeSignal:c}=A(158);class ConnectHandler extends s{constructor(e,t){if(!e||typeof e!=="object"){throw new n("invalid opts")}if(typeof t!=="function"){throw new n("invalid callback")}const{signal:A,opaque:r,responseHeaders:s}=e;if(A&&typeof A.on!=="function"&&typeof A.addEventListener!=="function"){throw new n("signal must be an EventEmitter or EventTarget")}super("UNDICI_CONNECT");this.opaque=r||null;this.responseHeaders=s||null;this.callback=t;this.abort=null;a(this,A)}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback);this.abort=e;this.context=t}onHeaders(){throw new o("bad connect",null)}onUpgrade(e,t,A){const{callback:r,opaque:s,context:n}=this;c(this);this.callback=null;let o=t;if(o!=null){o=this.responseHeaders==="raw"?i.parseRawHeaders(t):i.parseHeaders(t)}this.runInAsyncScope(r,null,null,{statusCode:e,headers:o,socket:A,opaque:s,context:n})}onError(e){const{callback:t,opaque:A}=this;c(this);if(t){this.callback=null;queueMicrotask((()=>{this.runInAsyncScope(t,null,e,{opaque:A})}))}}}function connect(e,t){if(t===undefined){return new Promise(((t,A)=>{connect.call(this,e,((e,r)=>e?A(e):t(r)))}))}try{const A=new ConnectHandler(e,t);this.dispatch({...e,method:"