@kaeawc/auto-mobile 0.0.90 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/README.md.backup +7 -0
- package/dist/build-info.json +12 -11
- package/dist/schemas/prototype-platform-permissions.json +75 -0
- package/dist/schemas/test-plan.schema.json +2 -2
- package/dist/src/index.js +854 -808
- package/dist/src/utils/workers/iosBundleExtractWorker.js +3 -3
- package/node_modules/strtok3/README.md +172 -113
- package/node_modules/strtok3/lib/BufferSizeError.js +1 -1
- package/node_modules/strtok3/lib/TokenWriter.js +151 -0
- package/node_modules/strtok3/lib/core.js +1 -0
- package/node_modules/strtok3/package.json +2 -2
- package/node_modules/token-types/LICENSE.txt +9 -9
- package/node_modules/token-types/README.md +160 -120
- package/node_modules/token-types/{lib → dist/lib}/index.js +21 -3
- package/node_modules/token-types/package.json +81 -81
- package/package.json +7 -7
- package/schemas/prototype-platform-permissions.json +75 -0
- package/schemas/test-plan.schema.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
3
|
-
`).slice(0,3).join(" \u2190 "),o="cause"in e&&e.cause!==void 0?ge(e.cause):"";return[r||"Error",n,o?`cause=${o}`:""].filter(Boolean).join(" | ")}if(e===null||e===void 0)return String(e);if(typeof e==="object"){if(Object.keys(e).length===0)return`${Object.prototype.toString.call(e)} (no enumerable keys)`;return re(()=>JSON.stringify(e),()=>Object.prototype.toString.call(e))}return String(e)}function Q(e){return re(()=>{if(e instanceof Error)return e.message;return String(e)},()=>re(()=>Object.prototype.toString.call(e),()=>"Unknown error"))}var ce=()=>{};function $t(e,r){if(e instanceof V)return e;let n=Q(e);return new V(`${r}: ${n}`,{cause:e})}function Jt(e,r){return new V(`${r} is not supported on platform '${e}'. Supported platforms: android, ios.`)}var V;var Le=J(()=>{ce();V=class V extends Error{constructor(e,r){super(e,r);let n=r?.containerFailure??(r?.cause instanceof V?r.cause.containerFailure:void 0);if(n)this.containerFailure=n}}});import*as pe from"path";function ae(e,r,n={}){let o=n.paths??pe,f=o.resolve(e),E=o.resolve(f,r),i=o.relative(f,E);if(i==="")return n.allowEqual??!0;return!(i===".."||i.startsWith(`..${o.sep}`)||o.isAbsolute(i))}function en(e,r,n,o={}){if(!ae(e,r,o))throw n();let f=o.paths??pe;return f.resolve(f.resolve(e),r)}var De=()=>{};import*as ye from"path";function Ne(e,r,n="CtrlProxy bundle"){let o=ye.resolve(r);for(let f of e.getEntries())if(!ae(o,f.entryName))throw new V(`Refusing to extract ${n}: entry "${f.entryName}" resolves outside the extraction directory ${o} (zip-slip / path traversal).`)}var _e=J(()=>{Le();De()});var ue=H(function(sn,Ce){Ce.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}});var ee=H(function(Oe){var Se={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}",MAX_OUTPUT_EXCEEDED:"Decompressed data exceeds the declared uncompressed size",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",DUPLICATE_ENTRY:"Duplicate entry name {0}",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",ZIP64_VALUE_TOO_LARGE:"Zip64 value exceeds the maximum safe integer",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 pt(e){return function(...r){if(r.length)e=e.replace(/\{(\d)\}/g,(n,o)=>r[o]||"");return Error("ADM-ZIP: "+e)}}for(let e of Object.keys(Se))Oe[e]=pt(Se[e])});var Fe=H(function(cn,xe){var Dt=j("fs"),D=j("path"),oe=ue(),q=ee(),yt=typeof process==="object"&&process.platform==="win32",Te=(e)=>typeof e==="object"&&e!==null,Ae=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=3988292384^r>>>1;else r>>>=1;return r>>>0});function Z(e){if(this.sep=D.sep,this.fs=Dt,Te(e)){if(Te(e.fs)&&typeof e.fs.statSync==="function")this.fs=e.fs}}xe.exports=Z;Z.prototype.makeDir=function(e){let r=this;function n(o){let f=o.split(r.sep)[0];o.split(r.sep).forEach(function(E){if(!E||E.substr(-1,1)===":")return;f+=r.sep+E;var i;try{i=r.fs.statSync(f)}catch(m){if(m.message&&m.message.startsWith("ENOENT"))r.fs.mkdirSync(f);else throw m}if(i&&i.isFile())throw q.FILE_IN_THE_WAY(`"${f}"`)})}n(e)};Z.prototype.writeFileTo=function(e,r,n,o){let f=this;if(f.fs.existsSync(e)){if(!n)return!1;var E=f.fs.statSync(e);if(E.isDirectory())return!1}var i=D.dirname(e);if(!f.fs.existsSync(i))f.makeDir(i);var m;try{m=f.fs.openSync(e,"w",438)}catch(C){f.fs.chmodSync(e,438),m=f.fs.openSync(e,"w",438)}if(m)try{f.fs.writeSync(m,r,0,r.length,0)}finally{f.fs.closeSync(m)}return f.fs.chmodSync(e,o||438),!0};Z.prototype.writeFileToAsync=function(e,r,n,o,f){if(typeof o==="function")f=o,o=void 0;let E=this;E.fs.exists(e,function(i){if(i&&!n)return f(!1);E.fs.stat(e,function(m,C){if(i&&C&&C.isDirectory())return f(!1);var S=D.dirname(e);E.fs.exists(S,function(N){if(!N)try{E.makeDir(S)}catch(O){return f(!1)}let _=function(O){E.fs.write(O,r,0,r.length,0,function(A){E.fs.close(O,function(){if(A)return f(!1);E.fs.chmod(e,o||438,function(){f(!0)})})})};E.fs.open(e,"w",438,function(O,A){if(O)E.fs.chmod(e,438,function(){E.fs.open(e,"w",438,function(s,c){if(s||!c)return f(!1);_(c)})});else if(A)_(A);else f(!1)})})})})};Z.prototype.assertPathSafe=function(e,r){let n=this;if(typeof n.fs.lstatSync!=="function")return;let o=D.resolve(e),f=D.resolve(r);if(f===o)return;let E=D.relative(o,f);if(!E||E===".."||E.startsWith(".."+D.sep)||D.isAbsolute(E))return;let i=o;for(let m of E.split(D.sep)){if(!m||m===".")continue;i=D.join(i,m);let C;try{C=n.fs.lstatSync(i)}catch(S){break}if(C.isSymbolicLink())throw q.FILE_IN_THE_WAY(`"${i}"`)}};Z.prototype.findFiles=function(e){let r=this,n=typeof r.fs.lstatSync==="function",o=r.fs.realpathSync(e);function f(i){if(!n)return!1;if(!r.fs.lstatSync(i).isSymbolicLink())return!1;let m;try{m=r.fs.realpathSync(i)}catch(C){return!0}return!(m===o||m.startsWith(o+D.sep))}function E(i,m,C,S){if(typeof m==="boolean")C=m,m=void 0;let N=[];return r.fs.readdirSync(i).forEach(function(_){let O=D.join(i,_);if(f(O))return;let A=r.fs.statSync(O);if(!m||m.test(O))N.push(D.normalize(O)+(A.isDirectory()?r.sep:""));if(A.isDirectory()&&C){let s=r.fs.realpathSync(O);if(!S.has(s))S.add(s),N=N.concat(E(O,m,C,S))}}),N}return E(e,void 0,!0,new Set([o]))};Z.prototype.findFilesAsync=function(e,r){let n=this,o=[],f=!1,E=function(N){if(f)return;f=!0,r(N,N?void 0:o)},i=typeof n.fs.lstat==="function",m=null,C=function(N,_){if(!i)return _(null,!1);n.fs.lstat(N,function(O,A){if(O)return _(O);if(!A||!A.isSymbolicLink())return _(null,!1);n.fs.realpath(N,function(s,c){if(s)return _(null,!0);_(null,!(c===m||c.startsWith(m+D.sep)))})})},S=function(N,_,O){n.fs.readdir(N,function(A,s){if(A)return O(A);let c=s.length;if(!c)return O();s.forEach(function(a){let l=D.join(N,a);C(l,function(d,t){if(d)return O(d);if(t){if(!--c)O();return}n.fs.stat(l,function(u,I){if(u)return O(u);if(!I){if(!--c)O();return}if(o.push(D.normalize(l)+(I.isDirectory()?n.sep:"")),!I.isDirectory()){if(!--c)O();return}n.fs.realpath(l,function(L,g){if(L)return O(L);if(_.has(g)){if(!--c)O();return}_.add(g),S(l,_,function(p){if(p)return O(p);if(!--c)O()})})})})})})};n.fs.realpath(e,function(N,_){if(N)return E(N);m=_,S(e,new Set([_]),E)})};Z.prototype.getAttributes=function(){};Z.prototype.setAttributes=function(){};Z.crc32update=function(e,r){return Ae[(e^r)&255]^e>>>8};Z.crc32=function(e){if(typeof e==="string")e=Buffer.from(e,"utf8");let r=e.length,n=-1;for(let o=0;o<r;)n=Z.crc32update(n,e[o++]);return~n>>>0};Z.methodToString=function(e){switch(e){case oe.STORED:return"STORED ("+e+")";case oe.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Z.canonical=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.join(".",r)};Z.zipnamefix=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.posix.join(".",r)};Z.findLast=function(e,r){if(!Array.isArray(e))throw TypeError("arr is not array");let n=e.length>>>0;for(let o=n-1;o>=0;o--)if(r(e[o],o,e))return e[o];return};Z.sanitize=function(e,r){e=D.resolve(D.normalize(e));var n=r.split("/");for(var o=0,f=n.length;o<f;o++){var E=D.normalize(D.join(e,n.slice(o,f).join(D.sep)));if(E===e||E.startsWith(e+D.sep))return E}return D.normalize(D.join(e,D.basename(r)))};Z.toBuffer=function(r,n){if(Buffer.isBuffer(r))return r;else if(r instanceof Uint8Array)return Buffer.from(r);else return typeof r==="string"?n(r):Buffer.alloc(0)};Z.readBigUInt64LE=function(e,r){let n=e.readUInt32LE(r),f=e.readUInt32LE(r+4)*4294967296+n;if(f>Number.MAX_SAFE_INTEGER)throw q.ZIP64_VALUE_TOO_LARGE();return f};Z.writeBigUInt64LE=function(e,r,n){let o=r>>>0,f=Math.floor(r/4294967296)>>>0;e.writeUInt32LE(o,n),e.writeUInt32LE(f,n+4)};Z.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)};Z.fromDate2DOS=function(e){let r=0,n=0;if(e.getFullYear()>1979)r=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1;return r<<16|n};Z.isWin=yt;Z.crcTable=Ae});var Ue=H(function(an,Re){var we=j("path");Re.exports=function(e,{fs:r}){var n=e||"",o=E(),f=null;function E(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(n&&r.existsSync(n))f=r.statSync(n),o.directory=f.isDirectory(),o.mtime=f.mtime,o.atime=f.atime,o.executable=(73&f.mode)!==0,o.readonly=(128&f.mode)===0,o.hidden=we.basename(n)[0]===".";else console.warn("Invalid path: "+n);return{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Ze=H(function(un,Be){Be.exports={efs:!0,encode:(e)=>Buffer.from(e,"utf8"),decode:(e)=>e.toString("utf8")}});var K=H(function(ln,X){X.exports=Fe();X.exports.Constants=ue();X.exports.Errors=ee();X.exports.FileAttr=Ue();X.exports.decoder=Ze()});var ve=H(function(En,Pe){var G=K(),h=G.Constants;Pe.exports=function(){var e=20,r=10,n=0,o=0,f=0,E=0,i=0,m=0,C=0,S=0,N=0,_=0,O=0,A=0,s=0;e|=G.isWin?2560:768,n|=h.FLG_EFS;let c={extraLen:0},a=(t)=>Math.max(0,t)>>>0,l=(t)=>Math.max(0,t)&65535,d=(t)=>Math.max(0,t)&255;return f=G.fromDate2DOS(new Date),{get made(){return e},set made(t){e=t},get version(){return r},set version(t){r=t},get flags(){return n},set flags(t){n=t},get flags_efs(){return(n&h.FLG_EFS)>0},set flags_efs(t){if(t)n|=h.FLG_EFS;else n&=~h.FLG_EFS},get flags_desc(){return(n&h.FLG_DESC)>0},set flags_desc(t){if(t)n|=h.FLG_DESC;else n&=~h.FLG_DESC},get method(){return o},set method(t){switch(t){case h.STORED:this.version=10;break;case h.DEFLATED:default:this.version=20}o=t},get time(){return G.fromDOS2Date(this.timeval)},set time(t){t=new Date(t),this.timeval=G.fromDate2DOS(t)},get timeval(){return f},set timeval(t){f=a(t)},get timeHighByte(){return d(f>>>8)},get crc(){return E},set crc(t){E=a(t)},get compressedSize(){return i},set compressedSize(t){i=a(t)},get size(){return m},set size(t){m=a(t)},get fileNameLength(){return C},set fileNameLength(t){C=t},get extraLength(){return S},set extraLength(t){S=t},get extraLocalLength(){return c.extraLen},set extraLocalLength(t){c.extraLen=t},get commentLength(){return N},set commentLength(t){N=t},get diskNumStart(){return _},set diskNumStart(t){_=a(t)},get inAttr(){return O},set inAttr(t){O=a(t)},get attr(){return A},set attr(t){A=a(t)},get fileAttr(){return(A||0)>>16&511},get offset(){return s},set offset(t){s=a(t)},get encrypted(){return(n&h.FLG_ENC)===h.FLG_ENC},get centralHeaderSize(){return h.CENHDR+C+S+N},get realDataOffset(){return s+h.LOCHDR+c.fnameLen+c.extraLen},get localHeader(){return c},loadLocalHeaderFromBinary:function(t){if(s<0||s+h.LOCHDR>t.length)throw G.Errors.INVALID_LOC();var u=t.slice(s,s+h.LOCHDR);if(u.readUInt32LE(0)!==h.LOCSIG)throw G.Errors.INVALID_LOC();c.version=u.readUInt16LE(h.LOCVER),c.flags=u.readUInt16LE(h.LOCFLG),c.flags_desc=(c.flags&h.FLG_DESC)>0,c.method=u.readUInt16LE(h.LOCHOW),c.time=u.readUInt32LE(h.LOCTIM),c.crc=u.readUInt32LE(h.LOCCRC),c.compressedSize=u.readUInt32LE(h.LOCSIZ),c.size=u.readUInt32LE(h.LOCLEN),c.fnameLen=u.readUInt16LE(h.LOCNAM),c.extraLen=u.readUInt16LE(h.LOCEXT);let I=s+h.LOCHDR+c.fnameLen,L=I+c.extraLen;return t.slice(I,L)},loadFromBinary:function(t){if(t.length!==h.CENHDR||t.readUInt32LE(0)!==h.CENSIG)throw G.Errors.INVALID_CEN();e=t.readUInt16LE(h.CENVEM),r=t.readUInt16LE(h.CENVER),n=t.readUInt16LE(h.CENFLG),o=t.readUInt16LE(h.CENHOW),f=t.readUInt32LE(h.CENTIM),E=t.readUInt32LE(h.CENCRC),i=t.readUInt32LE(h.CENSIZ),m=t.readUInt32LE(h.CENLEN),C=t.readUInt16LE(h.CENNAM),S=t.readUInt16LE(h.CENEXT),N=t.readUInt16LE(h.CENCOM),_=t.readUInt16LE(h.CENDSK),O=t.readUInt16LE(h.CENATT),A=t.readUInt32LE(h.CENATX),s=t.readUInt32LE(h.CENOFF)},localHeaderToBinary:function(){var t=Buffer.alloc(h.LOCHDR);return t.writeUInt32LE(h.LOCSIG,0),t.writeUInt16LE(r,h.LOCVER),t.writeUInt16LE(n&~h.FLG_DESC,h.LOCFLG),t.writeUInt16LE(o,h.LOCHOW),t.writeUInt32LE(f,h.LOCTIM),t.writeUInt32LE(E,h.LOCCRC),t.writeUInt32LE(i,h.LOCSIZ),t.writeUInt32LE(m,h.LOCLEN),t.writeUInt16LE(C,h.LOCNAM),t.writeUInt16LE(c.extraLen,h.LOCEXT),t},centralHeaderToBinary:function(){var t=Buffer.alloc(h.CENHDR+C+S+N);return t.writeUInt32LE(h.CENSIG,0),t.writeUInt16LE(e,h.CENVEM),t.writeUInt16LE(r,h.CENVER),t.writeUInt16LE(n&~h.FLG_DESC,h.CENFLG),t.writeUInt16LE(o,h.CENHOW),t.writeUInt32LE(f,h.CENTIM),t.writeUInt32LE(E,h.CENCRC),t.writeUInt32LE(i,h.CENSIZ),t.writeUInt32LE(m,h.CENLEN),t.writeUInt16LE(C,h.CENNAM),t.writeUInt16LE(S,h.CENEXT),t.writeUInt16LE(N,h.CENCOM),t.writeUInt16LE(_,h.CENDSK),t.writeUInt16LE(O,h.CENATT),t.writeUInt32LE(A,h.CENATX),t.writeUInt32LE(s,h.CENOFF),t},toJSON:function(){let t=function(u){return u+" bytes"};return{made:e,version:r,flags:n,method:G.methodToString(o),time:this.time,crc:"0x"+E.toString(16).toUpperCase(),compressedSize:t(i),size:t(m),fileNameLength:t(C),extraLength:t(S),commentLength:t(N),diskNumStart:_,inAttr:O,attr:A,offset:s,centralHeaderSize:t(h.CENHDR+C+S+N)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Me=H(function(dn,He){var z=K(),y=z.Constants;He.exports=function(){var e=0,r=0,n=0,o=0,f=0;let E=()=>e>y.EF_ZIP64_OR_16||r>y.EF_ZIP64_OR_16||n>y.EF_ZIP64_OR_32||o>y.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(i){e=r=i},get totalEntries(){return r},set totalEntries(i){r=e=i},get size(){return n},set size(i){n=i},get offset(){return o},set offset(i){o=i},get commentLength(){return f},set commentLength(i){f=i},get mainHeaderSize(){return(E()?y.ZIP64HDR+y.END64HDR:0)+y.ENDHDR+f},loadFromBinary:function(i){if((i.length!==y.ENDHDR||i.readUInt32LE(0)!==y.ENDSIG)&&(i.length<y.ZIP64HDR||i.readUInt32LE(0)!==y.ZIP64SIG))throw z.Errors.INVALID_END();if(i.readUInt32LE(0)===y.ENDSIG)e=i.readUInt16LE(y.ENDSUB),r=i.readUInt16LE(y.ENDTOT),n=i.readUInt32LE(y.ENDSIZ),o=i.readUInt32LE(y.ENDOFF),f=i.readUInt16LE(y.ENDCOM);else e=z.readBigUInt64LE(i,y.ZIP64SUB),r=z.readBigUInt64LE(i,y.ZIP64TOT),n=z.readBigUInt64LE(i,y.ZIP64SIZB),o=z.readBigUInt64LE(i,y.ZIP64OFF),f=0},toBinary:function(){if(!E()){var i=Buffer.alloc(y.ENDHDR+f);return i.writeUInt32LE(y.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,y.ENDSUB),i.writeUInt16LE(r,y.ENDTOT),i.writeUInt32LE(n,y.ENDSIZ),i.writeUInt32LE(o,y.ENDOFF),i.writeUInt16LE(f,y.ENDCOM),i.fill(" ",y.ENDHDR),i}var i=Buffer.alloc(this.mainHeaderSize);let m=0;i.writeUInt32LE(y.ZIP64SIG,m),z.writeBigUInt64LE(i,y.ZIP64HDR-y.ZIP64LEAD,m+y.ZIP64SIZE),i.writeUInt16LE(45,m+y.ZIP64VEM),i.writeUInt16LE(45,m+y.ZIP64VER),i.writeUInt32LE(0,m+y.ZIP64DSK),i.writeUInt32LE(0,m+y.ZIP64DSKDIR),z.writeBigUInt64LE(i,e,m+y.ZIP64SUB),z.writeBigUInt64LE(i,r,m+y.ZIP64TOT),z.writeBigUInt64LE(i,n,m+y.ZIP64SIZB),z.writeBigUInt64LE(i,o,m+y.ZIP64OFF);let C=o+n;return m+=y.ZIP64HDR,i.writeUInt32LE(y.END64SIG,m),i.writeUInt32LE(0,m+y.END64START),z.writeBigUInt64LE(i,C,m+y.END64OFF),i.writeUInt32LE(1,m+y.END64NUMDISKS),m+=y.END64HDR,i.writeUInt32LE(y.ENDSIG,m),i.writeUInt32LE(0,m+4),i.writeUInt16LE(Math.min(e,y.EF_ZIP64_OR_16),m+y.ENDSUB),i.writeUInt16LE(Math.min(r,y.EF_ZIP64_OR_16),m+y.ENDTOT),i.writeUInt32LE(Math.min(n,y.EF_ZIP64_OR_32),m+y.ENDSIZ),i.writeUInt32LE(Math.min(o,y.EF_ZIP64_OR_32),m+y.ENDOFF),i.writeUInt16LE(f,m+y.ENDCOM),i.fill(" ",m+y.ENDHDR),i},toJSON:function(){let i=function(m,C){let S=m.toString(16).toUpperCase();while(S.length<C)S="0"+S;return"0x"+S};return{diskEntries:e,totalEntries:r,size:n+" bytes",offset:i(o,4),commentLength:f}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var le=H(function(Nt){Nt.EntryHeader=ve();Nt.MainHeader=Me()});var Ge=H(function(hn,ze){ze.exports=function(e){var r=j("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return r.deflateRawSync(e,n)},deflateAsync:function(o){var f=r.createDeflateRaw(n),E=[],i=0;f.on("data",function(m){E.push(m),i+=m.length}),f.on("end",function(){var m=Buffer.alloc(i),C=0;m.fill(0);for(var S=0;S<E.length;S++){var N=E[S];N.copy(m,C),C+=N.length}o&&o(m)}),f.end(e)}}}});var Ve=H(function(In,je){var St=+(process?.versions?.node??"").split(".")[0]||0,be=ee();je.exports=function(e,r){var n=j("zlib");let o=r>0?r:1,f=St>=15?{maxOutputLength:o}:{};return{inflate:function(){return n.inflateRawSync(e,f)},inflateAsync:function(E){var i=n.createInflateRaw(f),m=[],C=0,S=!1;let N=function(_){if(S)return;S=!0,i.destroy(),E&&E(Buffer.alloc(0),_)};i.on("error",function(_){N(_)}),i.on("data",function(_){if(S)return;if(C+=_.length,C>o)return N(be.MAX_OUTPUT_EXCEEDED());m.push(_)}),i.on("end",function(){if(S)return;S=!0;var _=Buffer.alloc(C),O=0;_.fill(0);for(var A=0;A<m.length;A++){var s=m[A];s.copy(_,O),O+=s.length}E&&E(_)}),i.end(e)}}}});var Ye=H(function(gn,ke){var{randomFillSync:We}=j("crypto"),Xe=ee(),Ot=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=r>>>1^3988292384;else r>>>=1;return r>>>0}),Ke=(e,r)=>Math.imul(e,r)>>>0,qe=(e,r)=>Ot[(e^r)&255]^e>>>8,te=()=>{if(typeof We==="function")return We(Buffer.alloc(12));else return te.node()};te.node=()=>{let e=Buffer.alloc(12),r=e.length;for(let n=0;n<r;n++)e[n]=Math.random()*256&255;return e};var ie={genSalt:te};function se(e){let r=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<r.length;n++)this.updateKeys(r[n])}se.prototype.updateKeys=function(e){let r=this.keys;return r[0]=qe(r[0],e),r[1]+=r[0]&255,r[1]=Ke(r[1],134775813)+1,r[2]=qe(r[2],r[1]>>>24),e};se.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return Ke(e,e^1)>>8&255};function Tt(e){let r=new se(e);return function(n){let o=Buffer.alloc(n.length),f=0;for(let E of n)o[f++]=r.updateKeys(E^r.next());return o}}function At(e){let r=new se(e);return function(n,o,f=0){if(!o)o=Buffer.alloc(n.length);for(let E of n){let i=r.next();o[f++]=E^i,r.updateKeys(E)}return o}}function xt(e,r,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let o=Tt(n),f=o(e.slice(0,12)),E=(r.flags&8)===8?r.timeHighByte:r.crc>>>24;if(f[11]!==E)throw Xe.WRONG_PASSWORD();return o(e.slice(12))}function Ft(e){if(Buffer.isBuffer(e)&&e.length>=12)ie.genSalt=function(){return e.slice(0,12)};else if(e==="node")ie.genSalt=te.node;else ie.genSalt=te}function wt(e,r,n,o=!1){if(e==null)e=Buffer.alloc(0);if(!Buffer.isBuffer(e))e=Buffer.from(e.toString());let f=At(n),E=ie.genSalt();if(E[11]=r.crc>>>24&255,o)E[10]=r.crc>>>16&255;let i=Buffer.alloc(e.length+12);return f(E,i),f(e,i,12)}ke.exports={decrypt:xt,encrypt:wt,_salter:Ft}});var $e=H(function(Rt){Rt.Deflater=Ge();Rt.Inflater=Ve();Rt.ZipCrypto=Ye()});var de=H(function(pn,Je){var B=K(),Pt=le(),M=B.Constants,Ee=$e();Je.exports=function(e,r){var n=new Pt.EntryHeader,o=Buffer.alloc(0),f=Buffer.alloc(0),E=!1,i=null,m=Buffer.alloc(0),C=Buffer.alloc(0),S=!0;let N=e,_=typeof N.decoder==="object"?N.decoder:B.decoder;S=_.hasOwnProperty("efs")?_.efs:!1;function O(){if(!r||!(r instanceof Uint8Array))return Buffer.alloc(0);C=n.loadLocalHeaderFromBinary(r);let t=n.realDataOffset,u=t+n.compressedSize;if(t<0||u<t||u>r.length)throw B.Errors.INVALID_LOC();return r.slice(t,u)}function A(t){let u=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return B.crc32(t)===u}function s(t,u,I){if(typeof u>"u"&&typeof t==="string")I=t,t=void 0;if(E){if(t&&u)u(Buffer.alloc(0),B.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var L;try{if(L=O(),L.length===0){if(t&&u)u(L);return L}if(n.encrypted){if(typeof I!=="string"&&!Buffer.isBuffer(I))throw B.Errors.INVALID_PASS_PARAM();L=Ee.ZipCrypto.decrypt(L,n,I)}}catch(x){if(t&&u)return u(Buffer.alloc(0),x),Buffer.alloc(0);throw x}var g;switch(n.method){case B.Constants.STORED:if(g=Buffer.alloc(L.length),L.copy(g),!A(g)){if(t&&u)u(g,B.Errors.BAD_CRC());throw B.Errors.BAD_CRC()}else{if(t&&u)u(g);return g}case B.Constants.DEFLATED:var p=new Ee.Inflater(L,n.size);if(!t){if(g=p.inflate(),!A(g))throw B.Errors.BAD_CRC(`"${_.decode(o)}"`);return g}else p.inflateAsync(function(x,w){if(!u)return;if(w)u(Buffer.alloc(0),w);else if(!A(x))u(x,B.Errors.BAD_CRC());else u(x)});break;default:if(t&&u)u(Buffer.alloc(0),B.Errors.UNKNOWN_METHOD());throw B.Errors.UNKNOWN_METHOD()}}function c(t,u){if((!i||!i.length)&&Buffer.isBuffer(r)){if(t&&u)u(O());return O()}if(i.length&&!E){var I;switch(n.method){case B.Constants.STORED:if(n.compressedSize=n.size,I=Buffer.alloc(i.length),i.copy(I),t&&u)u(I);return I;default:case B.Constants.DEFLATED:var L=new Ee.Deflater(i);if(!t){var g=L.deflate();return n.compressedSize=g.length,g}else L.deflateAsync(function(p){I=Buffer.alloc(p.length),n.compressedSize=p.length,p.copy(I),u&&u(I)});L=null;break}}else if(t&&u)u(Buffer.alloc(0));else return Buffer.alloc(0)}function a(t,u){return B.readBigUInt64LE(t,u)}function l(t){try{var u=0,I,L,g;while(u+4<t.length)if(I=t.readUInt16LE(u),u+=2,L=t.readUInt16LE(u),u+=2,g=t.slice(u,u+L),u+=L,M.ID_ZIP64===I)d(g)}catch(p){throw B.Errors.EXTRA_FIELD_PARSE_ERROR()}}function d(t){var u,I,L,g;if(t.length>=M.EF_ZIP64_SCOMP){if(u=a(t,M.EF_ZIP64_SUNCOMP),n.size===M.EF_ZIP64_OR_32)n.size=u}if(t.length>=M.EF_ZIP64_RHO){if(I=a(t,M.EF_ZIP64_SCOMP),n.compressedSize===M.EF_ZIP64_OR_32)n.compressedSize=I}if(t.length>=M.EF_ZIP64_DSN){if(L=a(t,M.EF_ZIP64_RHO),n.offset===M.EF_ZIP64_OR_32)n.offset=L}if(t.length>=M.EF_ZIP64_DSN+4){if(g=t.readUInt32LE(M.EF_ZIP64_DSN),n.diskNumStart===M.EF_ZIP64_OR_16)n.diskNumStart=g}}return{get entryName(){return _.decode(o)},get rawEntryName(){return o},set entryName(t){o=B.toBuffer(t,_.encode);var u=o[o.length-1];E=u===47||u===92,n.fileNameLength=o.length},get efs(){if(typeof S==="function")return S(this.entryName);else return S},get extra(){return m},set extra(t){m=t,n.extraLength=t.length,l(t)},get comment(){return _.decode(f)},set comment(t){if(f=B.toBuffer(t,_.encode),n.commentLength=f.length,f.length>65535)throw B.Errors.COMMENT_TOO_LONG()},get name(){let t=_.decode(o);return E?t.replace(/[/\\]$/,"").split("/").pop():t.split("/").pop()},get isDirectory(){return E},getCompressedData:function(){return c(!1,null)},getCompressedDataAsync:function(t){c(!0,t)},setData:function(t){if(i=B.toBuffer(t,B.decoder.encode),!E&&i.length)n.size=i.length,n.method=B.Constants.DEFLATED,n.crc=B.crc32(t),n.changed=!0;else n.method=B.Constants.STORED},getData:function(t){if(n.changed)return i;else return s(!1,null,t)},getDataAsync:function(t,u){if(n.changed)t(i);else s(!0,t,u)},set attr(t){n.attr=t},get attr(){return n.attr},set header(t){n.loadFromBinary(t)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=m.length;var t=n.centralHeaderToBinary(),u=B.Constants.CENHDR;return o.copy(t,u),u+=o.length,m.copy(t,u),u+=n.extraLength,f.copy(t,u),t},packLocalHeader:function(){let t=0;n.flags_efs=this.efs,n.extraLocalLength=C.length;let u=n.localHeaderToBinary(),I=Buffer.alloc(u.length+o.length+n.extraLocalLength);return u.copy(I,t),t+=u.length,o.copy(I,t),t+=o.length,C.copy(I,t),t+=C.length,I},toJSON:function(){let t=function(u){return"<"+(u&&u.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:t(r),data:t(i)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var nt=H(function(Dn,tt){var Qe=de(),et=le(),R=K();tt.exports=function(e,r){var n=[],o=Object.create(null),f=Buffer.alloc(0),E=new et.MainHeader,i=!1,m=null;let C=new Set,S=r,{noSort:N,decoder:_}=S;if(e)s(S.readEntries);else i=!0;function O(){let a=new Set;for(let l of Object.keys(o)){let d=l.split("/");if(d.pop(),!d.length)continue;for(let t=0;t<d.length;t++){let u=d.slice(0,t+1).join("/")+"/";a.add(u)}}for(let l of a)if(!(l in o)){let d=new Qe(S);d.entryName=l,d.attr=16,d.temporary=!0,n.push(d),o[d.entryName]=d,C.add(d)}}function A(){if(i=!0,o=Object.create(null),E.diskEntries>(e.length-E.offset)/R.Constants.CENHDR)throw R.Errors.DISK_ENTRY_TOO_LARGE();n=Array(E.diskEntries);var a=E.offset;for(var l=0;l<n.length;l++){var d=a,t=new Qe(S,e);if(t.header=e.slice(d,d+=R.Constants.CENHDR),t.entryName=e.slice(d,d+=t.header.fileNameLength),t.header.extraLength)t.extra=e.slice(d,d+=t.header.extraLength);if(t.header.commentLength)t.comment=e.slice(d,d+t.header.commentLength);if(a+=t.header.centralHeaderSize,t.entryName in o)throw R.Errors.DUPLICATE_ENTRY(`"${t.entryName}"`);n[l]=t,o[t.entryName]=t}C.clear(),O()}function s(a){var l=e.length-R.Constants.ENDHDR,d=Math.max(0,l-65535),t=d,u=e.length,I=-1,L=0;if(typeof S.trailingSpace==="boolean"?S.trailingSpace:!1)d=0;for(l;l>=t;l--){if(e[l]!==80)continue;if(e.readUInt32LE(l)===R.Constants.ENDSIG){I=l,L=l,u=l+R.Constants.ENDHDR,t=l-R.Constants.END64HDR;continue}if(e.readUInt32LE(l)===R.Constants.END64SIG){t=d;continue}if(e.readUInt32LE(l)===R.Constants.ZIP64SIG){I=l,u=l+R.readBigUInt64LE(e,l+R.Constants.ZIP64SIZE)+R.Constants.ZIP64LEAD;break}}if(I==-1)throw R.Errors.INVALID_FORMAT();if(E.loadFromBinary(e.slice(I,u)),E.commentLength)f=e.slice(L+R.Constants.ENDHDR);if(a)A()}function c(){if(n.length>1&&!N)n=n.map((a)=>({entry:a,key:a.entryName.toLowerCase()})).sort((a,l)=>a.key.localeCompare(l.key)).map((a)=>a.entry)}return{get entries(){if(!i)A();return n.filter((a)=>!C.has(a))},get comment(){return _.decode(f)},set comment(a){f=R.toBuffer(a,_.encode),E.commentLength=f.length},getEntryCount:function(){if(!i)return E.diskEntries;return n.length},forEach:function(a){this.entries.forEach(a)},getEntry:function(a){if(!i)A();return o[a]||null},setEntry:function(a){if(!i)A();n.push(a),o[a.entryName]=a,E.totalEntries=n.length},deleteFile:function(a,l=!0){if(!i)A();let d=o[a];this.getEntryChildren(d,l).map((u)=>u.entryName).forEach(this.deleteEntry)},deleteEntry:function(a){if(!i)A();let l=o[a],d=n.indexOf(l);if(d>=0)n.splice(d,1),delete o[a],E.totalEntries=n.length},getEntryChildren:function(a,l=!0){if(!i)A();if(typeof a==="object")if(a.isDirectory&&l){let d=[],t=a.entryName;for(let u of n)if(u.entryName.startsWith(t))d.push(u);return d}else return[a];return[]},getChildCount:function(a){if(a&&a.isDirectory){let l=this.getEntryChildren(a);return l.includes(a)?l.length-1:l.length}return 0},compressToBuffer:function(){if(!i)A();c();let a=[],l=[],d=0,t=0;E.size=0,E.offset=0;let u=0;for(let g of this.entries){let p=g.getCompressedData();g.header.offset=t;let x=g.packLocalHeader(),w=x.length+p.length;t+=w,a.push(x),a.push(p);let U=g.packCentralHeader();l.push(U),E.size+=U.length,d+=w+U.length,u++}d+=E.mainHeaderSize,E.offset=t,E.totalEntries=u,t=0;let I=Buffer.alloc(d);for(let g of a)g.copy(I,t),t+=g.length;for(let g of l)g.copy(I,t),t+=g.length;let L=E.toBinary();if(f)f.copy(L,L.length-f.length);return L.copy(I,t),e=I,i=!1,I},toAsyncBuffer:function(a,l,d,t){try{if(!i)A();c();let u=[],I=[],L=0,g=0,p=0;E.size=0,E.offset=0;let x=function(w){if(w.length>0){let U=w.shift(),P=U.entryName+U.extra.toString();if(d)d(P);U.getCompressedDataAsync(function(v){if(t)t(P);U.header.offset=g;let b=U.packLocalHeader(),ne=b.length+v.length;g+=ne,u.push(b),u.push(v);let k=U.packCentralHeader();I.push(k),E.size+=k.length,L+=ne+k.length,p++,x(w)})}else{L+=E.mainHeaderSize,E.offset=g,E.totalEntries=p,g=0;let U=Buffer.alloc(L);u.forEach(function(v){v.copy(U,g),g+=v.length}),I.forEach(function(v){v.copy(U,g),g+=v.length});let P=E.toBinary();if(f)f.copy(P,P.length-f.length);P.copy(U,g),e=U,i=!1,a(U)}};x(Array.from(this.entries))}catch(u){l(u)}}}}});var it=H(function(yn,ot){var F=K(),T=j("path"),vt=de(),Ht=nt(),W=(...e)=>F.findLast(e,(r)=>typeof r==="boolean"),rt=(...e)=>F.findLast(e,(r)=>typeof r==="string"),Mt=(...e)=>F.findLast(e,(r)=>typeof r==="function"),zt={noSort:!1,readEntries:!1,method:F.Constants.NONE,fs:null};ot.exports=function(e,r){let n=null,o=Object.assign(Object.create(null),zt);if(e&&typeof e==="object"){if(!(e instanceof Uint8Array)){if(Object.assign(o,e),e=o.input?o.input:void 0,o.input)delete o.input}if(Buffer.isBuffer(e))n=e,o.method=F.Constants.BUFFER,e=void 0}Object.assign(o,r);let f=new F(o),E=(s)=>{s.filter((c)=>c.attr).sort((c,a)=>a.path.length-c.path.length).forEach((c)=>f.fs.chmodSync(c.path,c.attr))};if(typeof o.decoder!=="object"||typeof o.decoder.encode!=="function"||typeof o.decoder.decode!=="function")o.decoder=F.decoder;if(e&&typeof e==="string")if(f.fs.existsSync(e))o.method=F.Constants.FILE,o.filename=e,n=f.fs.readFileSync(e);else throw F.Errors.INVALID_FILENAME();let i=new Ht(n,o),{canonical:m,sanitize:C,zipnamefix:S}=F;function N(s){if(s&&i){var c;if(typeof s==="string")c=i.getEntry(T.posix.normalize(s));if(typeof s==="object"&&typeof s.entryName<"u"&&typeof s.header<"u")c=i.getEntry(s.entryName);if(c)return c}return null}function _(s){let{join:c,normalize:a,sep:l}=T.posix;return c(T.isAbsolute(s)?"/":".",a(l+s.split("\\").join(l)+l))}function O(s){if(s instanceof RegExp)return function(c){return function(a){return c.test(a)}}(s);else if(typeof s!=="function")return()=>!0;return s}let A=(s,c)=>{let a=c.slice(-1);return a=a===f.sep?f.sep:"",T.relative(s,c)+a};return{readFile:function(s,c){var a=N(s);return a&&a.getData(c)||null},childCount:function(s){let c=N(s);if(c)return i.getChildCount(c)},readFileAsync:function(s,c){var a=N(s);if(a)a.getDataAsync(c);else c(null,"getEntry failed for:"+s)},readAsText:function(s,c){var a=N(s);if(a){var l=a.getData();if(l&&l.length)return l.toString(c||"utf8")}return""},readAsTextAsync:function(s,c,a){var l=N(s);if(l)l.getDataAsync(function(d,t){if(t){c(d,t);return}if(d&&d.length)c(d.toString(a||"utf8"));else c("")});else c("")},deleteFile:function(s,c=!0){var a=N(s);if(a)i.deleteFile(a.entryName,c)},deleteEntry:function(s){var c=N(s);if(c)i.deleteEntry(c.entryName)},addZipComment:function(s){i.comment=s},getZipComment:function(){return i.comment||""},addZipEntryComment:function(s,c){var a=N(s);if(a)a.comment=c},getZipEntryComment:function(s){var c=N(s);if(c)return c.comment||"";return""},updateFile:function(s,c){var a=N(s);if(a)a.setData(c)},addLocalFile:function(s,c,a,l){if(f.fs.existsSync(s)){c=c?_(c):"";let d=T.win32.basename(T.win32.normalize(s));c+=a?a:d;let t=f.fs.statSync(s),u=t.isFile()?f.fs.readFileSync(s):Buffer.alloc(0);if(t.isDirectory())c+=f.sep;this.addFile(c,u,l,t)}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFileAsync:function(s,c){s=typeof s==="object"?s:{localPath:s};let a=T.resolve(s.localPath),{comment:l}=s,{zipPath:d,zipName:t}=s,u=this;f.fs.stat(a,function(I,L){if(I)return c(I,!1);d=d?_(d):"";let g=T.win32.basename(T.win32.normalize(a));if(d+=t?t:g,L.isFile())f.fs.readFile(a,function(p,x){if(p)return c(p,!1);return u.addFile(d,x,l,L),setImmediate(c,void 0,!0)});else if(L.isDirectory())return d+=f.sep,u.addFile(d,Buffer.alloc(0),l,L),setImmediate(c,void 0,!0)})},addLocalFolder:function(s,c,a){if(a=O(a),c=c?_(c):"",s=T.normalize(s),f.fs.existsSync(s)){let l=f.findFiles(s),d=this;if(l.length)for(let t of l){let u=T.join(c,A(s,t));if(a(u))d.addLocalFile(t,T.dirname(u))}}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFolderAsync:function(s,c,a,l){l=O(l),a=a?_(a):"",s=T.normalize(s);var d=this;f.fs.open(s,"r",function(t){if(t&&t.code==="ENOENT")c(void 0,F.Errors.FILE_NOT_FOUND(s));else if(t)c(void 0,t);else{var u=f.findFiles(s),I=-1,L=function(){if(I+=1,I<u.length){var g=u[I],p=A(s,g).split("\\").join("/");if(p=p.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),l(p))f.fs.stat(g,function(x,w){if(x)c(void 0,x);if(w.isFile())f.fs.readFile(g,function(U,P){if(U)c(void 0,U);else d.addFile(a+p,P,"",w),L()});else d.addFile(a+p+"/",Buffer.alloc(0),"",w),L()});else process.nextTick(()=>{L()})}else c(!0,void 0)};L()}})},addLocalFolderAsync2:function(s,c){let a=this;s=typeof s==="object"?s:{localPath:s};let l=T.resolve(s.localPath),{zipPath:d,filter:t,namefix:u}=s;if(t instanceof RegExp)t=function(g){return function(p){return g.test(p)}}(t);else if(typeof t!=="function")t=function(){return!0};if(d=d?_(d):"",u==="latin1")u=(g)=>g.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof u!=="function")u=(g)=>g;let I=(g)=>T.join(d,u(A(l,g))),L=(g)=>T.win32.basename(T.win32.normalize(u(g)));f.fs.open(l,"r",function(g){if(g&&g.code==="ENOENT")c(F.Errors.FILE_NOT_FOUND(l),!1);else if(g)c(g,!1);else f.findFilesAsync(l,function(p,x){if(p)return c(p,!1);if(x=x.filter((w)=>t(I(w))),!x.length)return c(void 0,!0);setImmediate(x.reverse().reduce(function(w,U){return function(P,v){if(P||v===!1)return setImmediate(w,P,!1);a.addLocalFileAsync({localPath:U,zipPath:T.dirname(I(U)),zipName:L(U)},w)}},c))})})},addLocalFolderPromise:function(s,c){return new Promise((a,l)=>{this.addLocalFolderAsync2(Object.assign({localPath:s},c),(d,t)=>{if(d)return l(d);if(t)a(this)})})},addFile:function(s,c,a,l){s=S(s);let d=N(s),t=d!=null;if(!t)d=new vt(o),d.entryName=s;d.comment=a||"";let u=typeof l==="object"&&l instanceof f.fs.Stats;if(u)d.header.time=l.mtime;var I=d.isDirectory?16:0;let L=d.isDirectory?16384:32768;if(u)L|=4095&l.mode;else if(typeof l==="number")L|=4095&l;else L|=d.isDirectory?493:420;if(I=(I|L<<16)>>>0,d.attr=I,d.setData(c),!t)i.setEntry(d);return d},getEntries:function(s){return i.password=s,i?i.entries:[]},getEntry:function(s){return N(s)},getEntryCount:function(){return i.getEntryCount()},forEach:function(s){return i.forEach(s)},extractEntryTo:function(s,c,a,l,d,t){l=W(!1,l),d=W(!1,d),a=W(!0,a),t=rt(d,t);var u=N(s);if(!u)throw F.Errors.NO_ENTRY();var I=m(u.entryName),L=C(c,t&&!u.isDirectory?m(t):a?I:T.basename(I));if(u.isDirectory){var g=i.getEntryChildren(u);return g.forEach(function(w){if(w.isDirectory)return;var U=w.getData();if(!U)throw F.Errors.CANT_EXTRACT_FILE();var P=m(a?w.entryName:w.entryName.substring(u.entryName.length)),v=C(c,P);f.assertPathSafe(c,v);let b=d?w.header.fileAttr:void 0;f.writeFileTo(v,U,l,b)}),!0}var p=u.getData(i.password);if(!p)throw F.Errors.CANT_EXTRACT_FILE();if(f.assertPathSafe(c,L),f.fs.existsSync(L)&&!l)throw F.Errors.CANT_OVERRIDE();let x=d?s.header.fileAttr:void 0;return f.writeFileTo(L,p,l,x),!0},test:function(s){if(!i)return!1;for(var c of i.entries)try{if(c.isDirectory)continue;var a=c.getData(s);if(!a)return!1}catch(l){return!1}return!0},extractAllTo:function(s,c,a,l){if(a=W(!1,a),l=rt(a,l),c=W(!1,c),!i)throw F.Errors.NO_ZIP();let d=[];i.entries.forEach(function(t){var u=C(s,m(t.entryName));if(f.assertPathSafe(s,u),t.isDirectory){if(f.makeDir(u),a)d.push({path:u,attr:t.header.fileAttr});return}var I=t.getData(l);if(!I)throw F.Errors.CANT_EXTRACT_FILE();let L=a?t.header.fileAttr:void 0;f.writeFileTo(u,I,c,L);try{f.fs.utimesSync(u,t.header.time,t.header.time)}catch(g){}}),E(d)},extractAllToAsync:function(s,c,a,l){if(l=Mt(c,a,l),a=W(!1,a),c=W(!1,c),!l)return new Promise((p,x)=>{this.extractAllToAsync(s,c,a,function(w){if(w)x(w);else p(this)})});if(!i){l(F.Errors.NO_ZIP());return}s=T.resolve(s);let d=(p)=>C(s,T.normalize(m(p.entryName))),t=(p,x)=>Error(p+': "'+x+'"'),u=[],I=[];i.entries.forEach((p)=>{if(p.isDirectory)u.push(p);else I.push(p)});let L=[];for(let p of u){let x=d(p),w=a?p.header.fileAttr:void 0;try{f.assertPathSafe(s,x),f.makeDir(x)}catch(U){l(t("Unable to create folder",x));continue}if(w)L.push({path:x,attr:w});try{f.fs.utimesSync(x,p.header.time,p.header.time)}catch(U){}}let g=(p)=>{if(!p)try{E(L)}catch(x){return l(t("Unable to set folder permissions",x.path||""))}l(p)};I.reverse().reduce(function(p,x){return function(w){if(w)p(w);else{let U=T.normalize(m(x.entryName)),P=C(s,U);try{f.assertPathSafe(s,P)}catch(v){return p(v)}x.getDataAsync(function(v,b){if(b)p(b);else if(!v)p(F.Errors.CANT_EXTRACT_FILE());else{let ne=a?x.header.fileAttr:void 0;f.writeFileToAsync(P,v,c,ne,function(k){if(!k)return p(t("Unable to write file",P));f.fs.utimes(P,x.header.time,x.header.time,function(){p()})})}})}}},g)()},writeZip:function(s,c){if(arguments.length===1){if(typeof s==="function")c=s,s=""}if(!s&&o.filename)s=o.filename;if(!s)return;var a=i.compressToBuffer();if(a){var l=f.writeFileTo(s,a,!0);if(typeof c==="function")c(!l?Error("failed"):null,"")}},writeZipPromise:function(s,c){let{overwrite:a,perm:l}=Object.assign({overwrite:!0},c);return new Promise((d,t)=>{if(!s&&o.filename)s=o.filename;if(!s)t("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((u)=>{let I=(L)=>L?d(L):t("ADM-ZIP: Wasn't able to write zip file");f.writeFileToAsync(s,u,a,l,I)},t)})},toBufferPromise:function(){return new Promise((s,c)=>{i.toAsyncBuffer(s,c)})},toBuffer:function(s,c,a,l){if(typeof s==="function")return i.toAsyncBuffer(s,c,a,l),null;return i.compressToBuffer()}}}});var st=J(()=>{ce()});_e();st();var at=ht(it());import{parentPort as ft,workerData as Gt}from"worker_threads";import*as ct from"path";function bt(){let{bundlePath:e,destination:r}=Gt;try{let n=new at.default(e);Ne(n,r),n.extractAllTo(ct.resolve(r),!0);let o={ok:!0};ft?.postMessage(o)}catch(n){let o={ok:!1,message:Q(n),stack:n instanceof Error?n.stack:void 0};ft?.postMessage(o)}}bt();
|
|
2
|
+
var Et=Object.create;var{getPrototypeOf:dt,defineProperty:Y,getOwnPropertyNames:Ie,getOwnPropertyDescriptor:mt}=Object,ce=Object.prototype.hasOwnProperty;function ge(e){return this[e]}var ht,It,gt=(e,r,n)=>{var o=e!=null&&typeof e==="object";if(o){var f=r?ht??=new WeakMap:It??=new WeakMap,E=f.get(e);if(E)return E}n=e!=null?Et(dt(e)):{};let i=r||!e||!e.__esModule||!ce.call(e,"default")?Y(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let m of Ie(e))if(!ce.call(i,m))Y(i,m,{get:ge.bind(e,m),enumerable:!0})}if(o)f.set(e,i);return i},qt=(e)=>{var r=(he??=new WeakMap).get(e),n;if(r)return r;if(r=Y({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var o of Ie(e))if(!ce.call(r,o))Y(r,o,{get:ge.bind(e,o),enumerable:!(n=mt(e,o))||n.enumerable})}return he.set(e,r),r},he,M=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Lt=(e)=>e;function pt(e,r){this[e]=Lt.bind(null,r)}var Xt=(e,r)=>{for(var n in r)Y(e,n,{get:r[n],enumerable:!0,configurable:!0,set:pt.bind(r,n)})};var J=(e,r,n)=>()=>{if(e)try{r=e(e=0)}catch(o){n=[o]}if(n)throw n[0];return r};var j=import.meta.require;function re(e,r){try{return e()}catch(n){return r(n)}}async function kt(e,r){try{return await e()}catch(n){return r(n)}}function Le(e){if(e instanceof Error){let r=[e.name,e.message].filter(Boolean).join(": "),n=e.stack?.split(`
|
|
3
|
+
`).slice(0,3).join(" \u2190 "),o="cause"in e&&e.cause!==void 0?Le(e.cause):"";return[r||"Error",n,o?`cause=${o}`:""].filter(Boolean).join(" | ")}if(e===null||e===void 0)return String(e);if(typeof e==="object"){if(Object.keys(e).length===0)return`${Object.prototype.toString.call(e)} (no enumerable keys)`;return re(()=>JSON.stringify(e),()=>Object.prototype.toString.call(e))}return String(e)}function Q(e){return re(()=>{if(e instanceof Error)return e.message;return String(e)},()=>re(()=>Object.prototype.toString.call(e),()=>"Unknown error"))}var ae=()=>{};function en(e,r){if(e instanceof V)return e;let n=Q(e);return new V(`${r}: ${n}`,{cause:e})}function tn(e,r){return new V(`${r} is not supported on platform '${e}'. Supported platforms: android, ios.`)}var V;var pe=J(()=>{ae();V=class V extends Error{constructor(e,r){super(e,r);let n=r?.containerFailure??(r?.cause instanceof V?r.cause.containerFailure:void 0);if(n)this.containerFailure=n}}});import*as De from"path";function ue(e,r,n={}){let o=n.paths??De,f=o.resolve(e),E=o.resolve(f,r),i=o.relative(f,E);if(i==="")return n.allowEqual??!0;return!(i===".."||i.startsWith(`..${o.sep}`)||o.isAbsolute(i))}function rn(e,r,n,o={}){if(!ue(e,r,o))throw n();let f=o.paths??De;return f.resolve(f.resolve(e),r)}var ye=()=>{};import*as Ne from"path";function _e(e,r,n="CtrlProxy bundle"){let o=Ne.resolve(r);for(let f of e.getEntries())if(!ue(o,f.entryName))throw new V(`Refusing to extract ${n}: entry "${f.entryName}" resolves outside the extraction directory ${o} (zip-slip / path traversal).`)}var Ce=J(()=>{pe();ye()});var le=M(function(un,Oe){Oe.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}});var ee=M(function(Te){var Ae={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}",MAX_OUTPUT_EXCEEDED:"Decompressed data exceeds the declared uncompressed size",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",DUPLICATE_ENTRY:"Duplicate entry name {0}",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",ZIP64_VALUE_TOO_LARGE:"Zip64 value exceeds the maximum safe integer",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 yt(e){return function(...r){if(r.length)e=e.replace(/\{(\d)\}/g,(n,o)=>r[o]||"");return Error("ADM-ZIP: "+e)}}for(let e of Object.keys(Ae))Te[e]=yt(Ae[e])});var Re=M(function(En,we){var Nt=j("fs"),D=j("path"),oe=le(),q=ee(),_t=typeof process==="object"&&process.platform==="win32",xe=(e)=>typeof e==="object"&&e!==null,Fe=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=3988292384^r>>>1;else r>>>=1;return r>>>0});function Z(e){if(this.sep=D.sep,this.fs=Nt,xe(e)){if(xe(e.fs)&&typeof e.fs.statSync==="function")this.fs=e.fs}}we.exports=Z;Z.prototype.makeDir=function(e){let r=this;function n(o){let f=o.split(r.sep)[0];o.split(r.sep).forEach(function(E){if(!E||E.substr(-1,1)===":")return;f+=r.sep+E;var i;try{i=r.fs.statSync(f)}catch(m){if(m.message&&m.message.startsWith("ENOENT"))r.fs.mkdirSync(f);else throw m}if(i&&i.isFile())throw q.FILE_IN_THE_WAY(`"${f}"`)})}n(e)};Z.prototype.writeFileTo=function(e,r,n,o){let f=this;if(f.fs.existsSync(e)){if(!n)return!1;var E=f.fs.statSync(e);if(E.isDirectory())return!1}var i=D.dirname(e);if(!f.fs.existsSync(i))f.makeDir(i);var m;try{m=f.fs.openSync(e,"w",438)}catch(C){f.fs.chmodSync(e,438),m=f.fs.openSync(e,"w",438)}if(m)try{f.fs.writeSync(m,r,0,r.length,0)}finally{f.fs.closeSync(m)}return f.fs.chmodSync(e,o||438),!0};Z.prototype.writeFileToAsync=function(e,r,n,o,f){if(typeof o==="function")f=o,o=void 0;let E=this;E.fs.exists(e,function(i){if(i&&!n)return f(!1);E.fs.stat(e,function(m,C){if(i&&C&&C.isDirectory())return f(!1);var S=D.dirname(e);E.fs.exists(S,function(N){if(!N)try{E.makeDir(S)}catch(O){return f(!1)}let _=function(O){E.fs.write(O,r,0,r.length,0,function(T){E.fs.close(O,function(){if(T)return f(!1);E.fs.chmod(e,o||438,function(){f(!0)})})})};E.fs.open(e,"w",438,function(O,T){if(O)E.fs.chmod(e,438,function(){E.fs.open(e,"w",438,function(s,c){if(s||!c)return f(!1);_(c)})});else if(T)_(T);else f(!1)})})})})};Z.prototype.assertPathSafe=function(e,r){let n=this;if(typeof n.fs.lstatSync!=="function")return;let o=D.resolve(e),f=D.resolve(r);if(f===o)return;let E=D.relative(o,f);if(!E||E===".."||E.startsWith(".."+D.sep)||D.isAbsolute(E))return;let i=o;for(let m of E.split(D.sep)){if(!m||m===".")continue;i=D.join(i,m);let C;try{C=n.fs.lstatSync(i)}catch(S){break}if(C.isSymbolicLink())throw q.FILE_IN_THE_WAY(`"${i}"`)}};Z.prototype.findFiles=function(e){let r=this,n=typeof r.fs.lstatSync==="function",o=r.fs.realpathSync(e);function f(i){if(!n)return!1;if(!r.fs.lstatSync(i).isSymbolicLink())return!1;let m;try{m=r.fs.realpathSync(i)}catch(C){return!0}return!(m===o||m.startsWith(o+D.sep))}function E(i,m,C,S){if(typeof m==="boolean")C=m,m=void 0;let N=[];return r.fs.readdirSync(i).forEach(function(_){let O=D.join(i,_);if(f(O))return;let T=r.fs.statSync(O);if(!m||m.test(O))N.push(D.normalize(O)+(T.isDirectory()?r.sep:""));if(T.isDirectory()&&C){let s=r.fs.realpathSync(O);if(!S.has(s))S.add(s),N=N.concat(E(O,m,C,S))}}),N}return E(e,void 0,!0,new Set([o]))};Z.prototype.findFilesAsync=function(e,r){let n=this,o=[],f=!1,E=function(N){if(f)return;f=!0,r(N,N?void 0:o)},i=typeof n.fs.lstat==="function",m=null,C=function(N,_){if(!i)return _(null,!1);n.fs.lstat(N,function(O,T){if(O)return _(O);if(!T||!T.isSymbolicLink())return _(null,!1);n.fs.realpath(N,function(s,c){if(s)return _(null,!0);_(null,!(c===m||c.startsWith(m+D.sep)))})})},S=function(N,_,O){n.fs.readdir(N,function(T,s){if(T)return O(T);let c=s.length;if(!c)return O();s.forEach(function(a){let l=D.join(N,a);C(l,function(d,t){if(d)return O(d);if(t){if(!--c)O();return}n.fs.stat(l,function(u,I){if(u)return O(u);if(!I){if(!--c)O();return}if(o.push(D.normalize(l)+(I.isDirectory()?n.sep:"")),!I.isDirectory()){if(!--c)O();return}n.fs.realpath(l,function(L,g){if(L)return O(L);if(_.has(g)){if(!--c)O();return}_.add(g),S(l,_,function(p){if(p)return O(p);if(!--c)O()})})})})})})};n.fs.realpath(e,function(N,_){if(N)return E(N);m=_,S(e,new Set([_]),E)})};Z.prototype.getAttributes=function(){};Z.prototype.setAttributes=function(){};Z.crc32update=function(e,r){return Fe[(e^r)&255]^e>>>8};Z.crc32=function(e){if(typeof e==="string")e=Buffer.from(e,"utf8");let r=e.length,n=-1;for(let o=0;o<r;)n=Z.crc32update(n,e[o++]);return~n>>>0};Z.methodToString=function(e){switch(e){case oe.STORED:return"STORED ("+e+")";case oe.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Z.canonical=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.join(".",r)};Z.zipnamefix=function(e){if(!e)return"";let r=D.posix.normalize("/"+e.split("\\").join("/"));return D.posix.join(".",r)};Z.findLast=function(e,r){if(!Array.isArray(e))throw TypeError("arr is not array");let n=e.length>>>0;for(let o=n-1;o>=0;o--)if(r(e[o],o,e))return e[o];return};Z.sanitize=function(e,r){e=D.resolve(D.normalize(e));var n=r.split("/");for(var o=0,f=n.length;o<f;o++){var E=D.normalize(D.join(e,n.slice(o,f).join(D.sep)));if(E===e||E.startsWith(e+D.sep))return E}return D.normalize(D.join(e,D.basename(r)))};Z.toBuffer=function(r,n){if(Buffer.isBuffer(r))return r;else if(r instanceof Uint8Array)return Buffer.from(r);else return typeof r==="string"?n(r):Buffer.alloc(0)};Z.readBigUInt64LE=function(e,r){let n=e.readUInt32LE(r),f=e.readUInt32LE(r+4)*4294967296+n;if(f>Number.MAX_SAFE_INTEGER)throw q.ZIP64_VALUE_TOO_LARGE();return f};Z.writeBigUInt64LE=function(e,r,n){let o=r>>>0,f=Math.floor(r/4294967296)>>>0;e.writeUInt32LE(o,n),e.writeUInt32LE(f,n+4)};Z.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)};Z.fromDate2DOS=function(e){let r=0,n=0;if(e.getFullYear()>1979)r=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1;return r<<16|n};Z.isWin=_t;Z.crcTable=Fe});var Ze=M(function(dn,Be){var Ue=j("path");Be.exports=function(e,{fs:r}){var n=e||"",o=E(),f=null;function E(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(n&&r.existsSync(n))f=r.statSync(n),o.directory=f.isDirectory(),o.mtime=f.mtime,o.atime=f.atime,o.executable=(73&f.mode)!==0,o.readonly=(128&f.mode)===0,o.hidden=Ue.basename(n)[0]===".";else console.warn("Invalid path: "+n);return{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ve=M(function(mn,Pe){Pe.exports={efs:!0,encode:(e)=>Buffer.from(e,"utf8"),decode:(e)=>e.toString("utf8")}});var K=M(function(hn,X){X.exports=Re();X.exports.Constants=le();X.exports.Errors=ee();X.exports.FileAttr=Ze();X.exports.decoder=ve()});var He=M(function(In,Me){var G=K(),h=G.Constants;Me.exports=function(){var e=20,r=10,n=0,o=0,f=0,E=0,i=0,m=0,C=0,S=0,N=0,_=0,O=0,T=0,s=0;e|=G.isWin?2560:768,n|=h.FLG_EFS;let c={extraLen:0},a=(t)=>Math.max(0,t)>>>0,l=(t)=>Math.max(0,t)&65535,d=(t)=>Math.max(0,t)&255;return f=G.fromDate2DOS(new Date),{get made(){return e},set made(t){e=t},get version(){return r},set version(t){r=t},get flags(){return n},set flags(t){n=t},get flags_efs(){return(n&h.FLG_EFS)>0},set flags_efs(t){if(t)n|=h.FLG_EFS;else n&=~h.FLG_EFS},get flags_desc(){return(n&h.FLG_DESC)>0},set flags_desc(t){if(t)n|=h.FLG_DESC;else n&=~h.FLG_DESC},get method(){return o},set method(t){switch(t){case h.STORED:this.version=10;break;case h.DEFLATED:default:this.version=20}o=t},get time(){return G.fromDOS2Date(this.timeval)},set time(t){t=new Date(t),this.timeval=G.fromDate2DOS(t)},get timeval(){return f},set timeval(t){f=a(t)},get timeHighByte(){return d(f>>>8)},get crc(){return E},set crc(t){E=a(t)},get compressedSize(){return i},set compressedSize(t){i=a(t)},get size(){return m},set size(t){m=a(t)},get fileNameLength(){return C},set fileNameLength(t){C=t},get extraLength(){return S},set extraLength(t){S=t},get extraLocalLength(){return c.extraLen},set extraLocalLength(t){c.extraLen=t},get commentLength(){return N},set commentLength(t){N=t},get diskNumStart(){return _},set diskNumStart(t){_=a(t)},get inAttr(){return O},set inAttr(t){O=a(t)},get attr(){return T},set attr(t){T=a(t)},get fileAttr(){return(T||0)>>16&511},get offset(){return s},set offset(t){s=a(t)},get encrypted(){return(n&h.FLG_ENC)===h.FLG_ENC},get centralHeaderSize(){return h.CENHDR+C+S+N},get realDataOffset(){return s+h.LOCHDR+c.fnameLen+c.extraLen},get localHeader(){return c},loadLocalHeaderFromBinary:function(t){if(s<0||s+h.LOCHDR>t.length)throw G.Errors.INVALID_LOC();var u=t.slice(s,s+h.LOCHDR);if(u.readUInt32LE(0)!==h.LOCSIG)throw G.Errors.INVALID_LOC();c.version=u.readUInt16LE(h.LOCVER),c.flags=u.readUInt16LE(h.LOCFLG),c.flags_desc=(c.flags&h.FLG_DESC)>0,c.method=u.readUInt16LE(h.LOCHOW),c.time=u.readUInt32LE(h.LOCTIM),c.crc=u.readUInt32LE(h.LOCCRC),c.compressedSize=u.readUInt32LE(h.LOCSIZ),c.size=u.readUInt32LE(h.LOCLEN),c.fnameLen=u.readUInt16LE(h.LOCNAM),c.extraLen=u.readUInt16LE(h.LOCEXT);let I=s+h.LOCHDR+c.fnameLen,L=I+c.extraLen;return t.slice(I,L)},loadFromBinary:function(t){if(t.length!==h.CENHDR||t.readUInt32LE(0)!==h.CENSIG)throw G.Errors.INVALID_CEN();e=t.readUInt16LE(h.CENVEM),r=t.readUInt16LE(h.CENVER),n=t.readUInt16LE(h.CENFLG),o=t.readUInt16LE(h.CENHOW),f=t.readUInt32LE(h.CENTIM),E=t.readUInt32LE(h.CENCRC),i=t.readUInt32LE(h.CENSIZ),m=t.readUInt32LE(h.CENLEN),C=t.readUInt16LE(h.CENNAM),S=t.readUInt16LE(h.CENEXT),N=t.readUInt16LE(h.CENCOM),_=t.readUInt16LE(h.CENDSK),O=t.readUInt16LE(h.CENATT),T=t.readUInt32LE(h.CENATX),s=t.readUInt32LE(h.CENOFF)},localHeaderToBinary:function(){var t=Buffer.alloc(h.LOCHDR);return t.writeUInt32LE(h.LOCSIG,0),t.writeUInt16LE(r,h.LOCVER),t.writeUInt16LE(n&~h.FLG_DESC,h.LOCFLG),t.writeUInt16LE(o,h.LOCHOW),t.writeUInt32LE(f,h.LOCTIM),t.writeUInt32LE(E,h.LOCCRC),t.writeUInt32LE(i,h.LOCSIZ),t.writeUInt32LE(m,h.LOCLEN),t.writeUInt16LE(C,h.LOCNAM),t.writeUInt16LE(c.extraLen,h.LOCEXT),t},centralHeaderToBinary:function(){var t=Buffer.alloc(h.CENHDR+C+S+N);return t.writeUInt32LE(h.CENSIG,0),t.writeUInt16LE(e,h.CENVEM),t.writeUInt16LE(r,h.CENVER),t.writeUInt16LE(n&~h.FLG_DESC,h.CENFLG),t.writeUInt16LE(o,h.CENHOW),t.writeUInt32LE(f,h.CENTIM),t.writeUInt32LE(E,h.CENCRC),t.writeUInt32LE(i,h.CENSIZ),t.writeUInt32LE(m,h.CENLEN),t.writeUInt16LE(C,h.CENNAM),t.writeUInt16LE(S,h.CENEXT),t.writeUInt16LE(N,h.CENCOM),t.writeUInt16LE(_,h.CENDSK),t.writeUInt16LE(O,h.CENATT),t.writeUInt32LE(T,h.CENATX),t.writeUInt32LE(s,h.CENOFF),t},toJSON:function(){let t=function(u){return u+" bytes"};return{made:e,version:r,flags:n,method:G.methodToString(o),time:this.time,crc:"0x"+E.toString(16).toUpperCase(),compressedSize:t(i),size:t(m),fileNameLength:t(C),extraLength:t(S),commentLength:t(N),diskNumStart:_,inAttr:O,attr:T,offset:s,centralHeaderSize:t(h.CENHDR+C+S+N)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Ge=M(function(gn,ze){var z=K(),y=z.Constants;ze.exports=function(){var e=0,r=0,n=0,o=0,f=0;let E=()=>e>y.EF_ZIP64_OR_16||r>y.EF_ZIP64_OR_16||n>y.EF_ZIP64_OR_32||o>y.EF_ZIP64_OR_32;return{get diskEntries(){return e},set diskEntries(i){e=r=i},get totalEntries(){return r},set totalEntries(i){r=e=i},get size(){return n},set size(i){n=i},get offset(){return o},set offset(i){o=i},get commentLength(){return f},set commentLength(i){f=i},get mainHeaderSize(){return(E()?y.ZIP64HDR+y.END64HDR:0)+y.ENDHDR+f},loadFromBinary:function(i){if((i.length!==y.ENDHDR||i.readUInt32LE(0)!==y.ENDSIG)&&(i.length<y.ZIP64HDR||i.readUInt32LE(0)!==y.ZIP64SIG))throw z.Errors.INVALID_END();if(i.readUInt32LE(0)===y.ENDSIG)e=i.readUInt16LE(y.ENDSUB),r=i.readUInt16LE(y.ENDTOT),n=i.readUInt32LE(y.ENDSIZ),o=i.readUInt32LE(y.ENDOFF),f=i.readUInt16LE(y.ENDCOM);else e=z.readBigUInt64LE(i,y.ZIP64SUB),r=z.readBigUInt64LE(i,y.ZIP64TOT),n=z.readBigUInt64LE(i,y.ZIP64SIZB),o=z.readBigUInt64LE(i,y.ZIP64OFF),f=0},toBinary:function(){if(!E()){var i=Buffer.alloc(y.ENDHDR+f);return i.writeUInt32LE(y.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,y.ENDSUB),i.writeUInt16LE(r,y.ENDTOT),i.writeUInt32LE(n,y.ENDSIZ),i.writeUInt32LE(o,y.ENDOFF),i.writeUInt16LE(f,y.ENDCOM),i.fill(" ",y.ENDHDR),i}var i=Buffer.alloc(this.mainHeaderSize);let m=0;i.writeUInt32LE(y.ZIP64SIG,m),z.writeBigUInt64LE(i,y.ZIP64HDR-y.ZIP64LEAD,m+y.ZIP64SIZE),i.writeUInt16LE(45,m+y.ZIP64VEM),i.writeUInt16LE(45,m+y.ZIP64VER),i.writeUInt32LE(0,m+y.ZIP64DSK),i.writeUInt32LE(0,m+y.ZIP64DSKDIR),z.writeBigUInt64LE(i,e,m+y.ZIP64SUB),z.writeBigUInt64LE(i,r,m+y.ZIP64TOT),z.writeBigUInt64LE(i,n,m+y.ZIP64SIZB),z.writeBigUInt64LE(i,o,m+y.ZIP64OFF);let C=o+n;return m+=y.ZIP64HDR,i.writeUInt32LE(y.END64SIG,m),i.writeUInt32LE(0,m+y.END64START),z.writeBigUInt64LE(i,C,m+y.END64OFF),i.writeUInt32LE(1,m+y.END64NUMDISKS),m+=y.END64HDR,i.writeUInt32LE(y.ENDSIG,m),i.writeUInt32LE(0,m+4),i.writeUInt16LE(Math.min(e,y.EF_ZIP64_OR_16),m+y.ENDSUB),i.writeUInt16LE(Math.min(r,y.EF_ZIP64_OR_16),m+y.ENDTOT),i.writeUInt32LE(Math.min(n,y.EF_ZIP64_OR_32),m+y.ENDSIZ),i.writeUInt32LE(Math.min(o,y.EF_ZIP64_OR_32),m+y.ENDOFF),i.writeUInt16LE(f,m+y.ENDCOM),i.fill(" ",m+y.ENDHDR),i},toJSON:function(){let i=function(m,C){let S=m.toString(16).toUpperCase();while(S.length<C)S="0"+S;return"0x"+S};return{diskEntries:e,totalEntries:r,size:n+" bytes",offset:i(o,4),commentLength:f}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var Ee=M(function(Ct){Ct.EntryHeader=He();Ct.MainHeader=Ge()});var je=M(function(pn,be){be.exports=function(e){var r=j("zlib"),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return r.deflateRawSync(e,n)},deflateAsync:function(o){var f=r.createDeflateRaw(n),E=[],i=0;f.on("data",function(m){E.push(m),i+=m.length}),f.on("end",function(){var m=Buffer.alloc(i),C=0;m.fill(0);for(var S=0;S<E.length;S++){var N=E[S];N.copy(m,C),C+=N.length}o&&o(m)}),f.end(e)}}}});var qe=M(function(Dn,We){var At=+(process?.versions?.node??"").split(".")[0]||0,Ve=ee();We.exports=function(e,r){var n=j("zlib");let o=r>0?r:1,f=At>=15?{maxOutputLength:o}:{};return{inflate:function(){return n.inflateRawSync(e,f)},inflateAsync:function(E){var i=n.createInflateRaw(f),m=[],C=0,S=!1;let N=function(_){if(S)return;S=!0,i.destroy(),E&&E(Buffer.alloc(0),_)};i.on("error",function(_){N(_)}),i.on("data",function(_){if(S)return;if(C+=_.length,C>o)return N(Ve.MAX_OUTPUT_EXCEEDED());m.push(_)}),i.on("end",function(){if(S)return;S=!0;var _=Buffer.alloc(C),O=0;_.fill(0);for(var T=0;T<m.length;T++){var s=m[T];s.copy(_,O),O+=s.length}E&&E(_)}),i.end(e)}}}});var Je=M(function(yn,$e){var{randomFillSync:Xe}=j("crypto"),ke=ee(),Tt=new Uint32Array(256).map((e,r)=>{for(let n=0;n<8;n++)if((r&1)!==0)r=r>>>1^3988292384;else r>>>=1;return r>>>0}),Ye=(e,r)=>Math.imul(e,r)>>>0,Ke=(e,r)=>Tt[(e^r)&255]^e>>>8,te=()=>{if(typeof Xe==="function")return Xe(Buffer.alloc(12));else return te.node()};te.node=()=>{let e=Buffer.alloc(12),r=e.length;for(let n=0;n<r;n++)e[n]=Math.random()*256&255;return e};var ie={genSalt:te};function se(e){let r=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let n=0;n<r.length;n++)this.updateKeys(r[n])}se.prototype.updateKeys=function(e){let r=this.keys;return r[0]=Ke(r[0],e),r[1]+=r[0]&255,r[1]=Ye(r[1],134775813)+1,r[2]=Ke(r[2],r[1]>>>24),e};se.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return Ye(e,e^1)>>8&255};function xt(e){let r=new se(e);return function(n){let o=Buffer.alloc(n.length),f=0;for(let E of n)o[f++]=r.updateKeys(E^r.next());return o}}function Ft(e){let r=new se(e);return function(n,o,f=0){if(!o)o=Buffer.alloc(n.length);for(let E of n){let i=r.next();o[f++]=E^i,r.updateKeys(E)}return o}}function wt(e,r,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let o=xt(n),f=o(e.slice(0,12)),E=(r.flags&8)===8?r.timeHighByte:r.crc>>>24;if(f[11]!==E)throw ke.WRONG_PASSWORD();return o(e.slice(12))}function Rt(e){if(Buffer.isBuffer(e)&&e.length>=12)ie.genSalt=function(){return e.slice(0,12)};else if(e==="node")ie.genSalt=te.node;else ie.genSalt=te}function Ut(e,r,n,o=!1){if(e==null)e=Buffer.alloc(0);if(!Buffer.isBuffer(e))e=Buffer.from(e.toString());let f=Ft(n),E=ie.genSalt();if(E[11]=r.crc>>>24&255,o)E[10]=r.crc>>>16&255;let i=Buffer.alloc(e.length+12);return f(E,i),f(e,i,12)}$e.exports={decrypt:wt,encrypt:Ut,_salter:Rt}});var Qe=M(function(Bt){Bt.Deflater=je();Bt.Inflater=qe();Bt.ZipCrypto=Je()});var me=M(function(_n,et){var B=K(),Mt=Ee(),H=B.Constants,de=Qe();et.exports=function(e,r){var n=new Mt.EntryHeader,o=Buffer.alloc(0),f=Buffer.alloc(0),E=!1,i=null,m=Buffer.alloc(0),C=Buffer.alloc(0),S=!0;let N=e,_=typeof N.decoder==="object"?N.decoder:B.decoder;S=_.hasOwnProperty("efs")?_.efs:!1;function O(){if(!r||!(r instanceof Uint8Array))return Buffer.alloc(0);C=n.loadLocalHeaderFromBinary(r);let t=n.realDataOffset,u=t+n.compressedSize;if(t<0||u<t||u>r.length)throw B.Errors.INVALID_LOC();return r.slice(t,u)}function T(t){let u=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return B.crc32(t)===u}function s(t,u,I){if(typeof u>"u"&&typeof t==="string")I=t,t=void 0;if(E){if(t&&u)u(Buffer.alloc(0),B.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var L;try{if(L=O(),L.length===0){if(t&&u)u(L);return L}if(n.encrypted){if(typeof I!=="string"&&!Buffer.isBuffer(I))throw B.Errors.INVALID_PASS_PARAM();L=de.ZipCrypto.decrypt(L,n,I)}}catch(x){if(t&&u)return u(Buffer.alloc(0),x),Buffer.alloc(0);throw x}var g;switch(n.method){case B.Constants.STORED:if(g=Buffer.alloc(L.length),L.copy(g),!T(g)){if(t&&u)u(g,B.Errors.BAD_CRC());throw B.Errors.BAD_CRC()}else{if(t&&u)u(g);return g}case B.Constants.DEFLATED:var p=new de.Inflater(L,n.size);if(!t){if(g=p.inflate(),!T(g))throw B.Errors.BAD_CRC(`"${_.decode(o)}"`);return g}else p.inflateAsync(function(x,w){if(!u)return;if(w)u(Buffer.alloc(0),w);else if(!T(x))u(x,B.Errors.BAD_CRC());else u(x)});break;default:if(t&&u)u(Buffer.alloc(0),B.Errors.UNKNOWN_METHOD());throw B.Errors.UNKNOWN_METHOD()}}function c(t,u){if((!i||!i.length)&&Buffer.isBuffer(r)){if(t&&u)u(O());return O()}if(i.length&&!E){var I;switch(n.method){case B.Constants.STORED:if(n.compressedSize=n.size,I=Buffer.alloc(i.length),i.copy(I),t&&u)u(I);return I;default:case B.Constants.DEFLATED:var L=new de.Deflater(i);if(!t){var g=L.deflate();return n.compressedSize=g.length,g}else L.deflateAsync(function(p){I=Buffer.alloc(p.length),n.compressedSize=p.length,p.copy(I),u&&u(I)});L=null;break}}else if(t&&u)u(Buffer.alloc(0));else return Buffer.alloc(0)}function a(t,u){return B.readBigUInt64LE(t,u)}function l(t){try{var u=0,I,L,g;while(u+4<t.length)if(I=t.readUInt16LE(u),u+=2,L=t.readUInt16LE(u),u+=2,g=t.slice(u,u+L),u+=L,H.ID_ZIP64===I)d(g)}catch(p){throw B.Errors.EXTRA_FIELD_PARSE_ERROR()}}function d(t){var u,I,L,g;if(t.length>=H.EF_ZIP64_SCOMP){if(u=a(t,H.EF_ZIP64_SUNCOMP),n.size===H.EF_ZIP64_OR_32)n.size=u}if(t.length>=H.EF_ZIP64_RHO){if(I=a(t,H.EF_ZIP64_SCOMP),n.compressedSize===H.EF_ZIP64_OR_32)n.compressedSize=I}if(t.length>=H.EF_ZIP64_DSN){if(L=a(t,H.EF_ZIP64_RHO),n.offset===H.EF_ZIP64_OR_32)n.offset=L}if(t.length>=H.EF_ZIP64_DSN+4){if(g=t.readUInt32LE(H.EF_ZIP64_DSN),n.diskNumStart===H.EF_ZIP64_OR_16)n.diskNumStart=g}}return{get entryName(){return _.decode(o)},get rawEntryName(){return o},set entryName(t){o=B.toBuffer(t,_.encode);var u=o[o.length-1];E=u===47||u===92,n.fileNameLength=o.length},get efs(){if(typeof S==="function")return S(this.entryName);else return S},get extra(){return m},set extra(t){m=t,n.extraLength=t.length,l(t)},get comment(){return _.decode(f)},set comment(t){if(f=B.toBuffer(t,_.encode),n.commentLength=f.length,f.length>65535)throw B.Errors.COMMENT_TOO_LONG()},get name(){let t=_.decode(o);return E?t.replace(/[/\\]$/,"").split("/").pop():t.split("/").pop()},get isDirectory(){return E},getCompressedData:function(){return c(!1,null)},getCompressedDataAsync:function(t){c(!0,t)},setData:function(t){if(i=B.toBuffer(t,B.decoder.encode),!E&&i.length)n.size=i.length,n.method=B.Constants.DEFLATED,n.crc=B.crc32(t),n.changed=!0;else n.method=B.Constants.STORED},getData:function(t){if(n.changed)return i;else return s(!1,null,t)},getDataAsync:function(t,u){if(n.changed)t(i);else s(!0,t,u)},set attr(t){n.attr=t},get attr(){return n.attr},set header(t){n.loadFromBinary(t)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=m.length;var t=n.centralHeaderToBinary(),u=B.Constants.CENHDR;return o.copy(t,u),u+=o.length,m.copy(t,u),u+=n.extraLength,f.copy(t,u),t},packLocalHeader:function(){let t=0;n.flags_efs=this.efs,n.extraLocalLength=C.length;let u=n.localHeaderToBinary(),I=Buffer.alloc(u.length+o.length+n.extraLocalLength);return u.copy(I,t),t+=u.length,o.copy(I,t),t+=o.length,C.copy(I,t),t+=C.length,I},toJSON:function(){let t=function(u){return"<"+(u&&u.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:t(r),data:t(i)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ot=M(function(Cn,rt){var tt=me(),nt=Ee(),R=K();rt.exports=function(e,r){var n=[],o=Object.create(null),f=Buffer.alloc(0),E=new nt.MainHeader,i=!1,m=null;let C=new Set,S=r,{noSort:N,decoder:_}=S;if(e)s(S.readEntries);else i=!0;function O(){let a=new Set;for(let l of Object.keys(o)){let d=l.split("/");if(d.pop(),!d.length)continue;for(let t=0;t<d.length;t++){let u=d.slice(0,t+1).join("/")+"/";a.add(u)}}for(let l of a)if(!(l in o)){let d=new tt(S);d.entryName=l,d.attr=16,d.temporary=!0,n.push(d),o[d.entryName]=d,C.add(d)}}function T(){if(i=!0,o=Object.create(null),E.diskEntries>(e.length-E.offset)/R.Constants.CENHDR)throw R.Errors.DISK_ENTRY_TOO_LARGE();n=Array(E.diskEntries);var a=E.offset;for(var l=0;l<n.length;l++){var d=a,t=new tt(S,e);if(t.header=e.slice(d,d+=R.Constants.CENHDR),t.entryName=e.slice(d,d+=t.header.fileNameLength),t.header.extraLength)t.extra=e.slice(d,d+=t.header.extraLength);if(t.header.commentLength)t.comment=e.slice(d,d+t.header.commentLength);if(a+=t.header.centralHeaderSize,t.entryName in o)throw R.Errors.DUPLICATE_ENTRY(`"${t.entryName}"`);n[l]=t,o[t.entryName]=t}C.clear(),O()}function s(a){var l=e.length-R.Constants.ENDHDR,d=Math.max(0,l-65535),t=d,u=e.length,I=-1,L=0;if(typeof S.trailingSpace==="boolean"?S.trailingSpace:!1)d=0;for(l;l>=t;l--){if(e[l]!==80)continue;if(e.readUInt32LE(l)===R.Constants.ENDSIG){I=l,L=l,u=l+R.Constants.ENDHDR,t=l-R.Constants.END64HDR;continue}if(e.readUInt32LE(l)===R.Constants.END64SIG){t=d;continue}if(e.readUInt32LE(l)===R.Constants.ZIP64SIG){I=l,u=l+R.readBigUInt64LE(e,l+R.Constants.ZIP64SIZE)+R.Constants.ZIP64LEAD;break}}if(I==-1)throw R.Errors.INVALID_FORMAT();if(E.loadFromBinary(e.slice(I,u)),E.commentLength)f=e.slice(L+R.Constants.ENDHDR);if(a)T()}function c(){if(n.length>1&&!N)n=n.map((a)=>({entry:a,key:a.entryName.toLowerCase()})).sort((a,l)=>a.key.localeCompare(l.key)).map((a)=>a.entry)}return{get entries(){if(!i)T();return n.filter((a)=>!C.has(a))},get comment(){return _.decode(f)},set comment(a){f=R.toBuffer(a,_.encode),E.commentLength=f.length},getEntryCount:function(){if(!i)return E.diskEntries;return n.length},forEach:function(a){this.entries.forEach(a)},getEntry:function(a){if(!i)T();return o[a]||null},setEntry:function(a){if(!i)T();n.push(a),o[a.entryName]=a,E.totalEntries=n.length},deleteFile:function(a,l=!0){if(!i)T();let d=o[a];this.getEntryChildren(d,l).map((u)=>u.entryName).forEach(this.deleteEntry)},deleteEntry:function(a){if(!i)T();let l=o[a],d=n.indexOf(l);if(d>=0)n.splice(d,1),delete o[a],E.totalEntries=n.length},getEntryChildren:function(a,l=!0){if(!i)T();if(typeof a==="object")if(a.isDirectory&&l){let d=[],t=a.entryName;for(let u of n)if(u.entryName.startsWith(t))d.push(u);return d}else return[a];return[]},getChildCount:function(a){if(a&&a.isDirectory){let l=this.getEntryChildren(a);return l.includes(a)?l.length-1:l.length}return 0},compressToBuffer:function(){if(!i)T();c();let a=[],l=[],d=0,t=0;E.size=0,E.offset=0;let u=0;for(let g of this.entries){let p=g.getCompressedData();g.header.offset=t;let x=g.packLocalHeader(),w=x.length+p.length;t+=w,a.push(x),a.push(p);let U=g.packCentralHeader();l.push(U),E.size+=U.length,d+=w+U.length,u++}d+=E.mainHeaderSize,E.offset=t,E.totalEntries=u,t=0;let I=Buffer.alloc(d);for(let g of a)g.copy(I,t),t+=g.length;for(let g of l)g.copy(I,t),t+=g.length;let L=E.toBinary();if(f)f.copy(L,L.length-f.length);return L.copy(I,t),e=I,i=!1,I},toAsyncBuffer:function(a,l,d,t){try{if(!i)T();c();let u=[],I=[],L=0,g=0,p=0;E.size=0,E.offset=0;let x=function(w){if(w.length>0){let U=w.shift(),P=U.entryName+U.extra.toString();if(d)d(P);U.getCompressedDataAsync(function(v){if(t)t(P);U.header.offset=g;let b=U.packLocalHeader(),ne=b.length+v.length;g+=ne,u.push(b),u.push(v);let k=U.packCentralHeader();I.push(k),E.size+=k.length,L+=ne+k.length,p++,x(w)})}else{L+=E.mainHeaderSize,E.offset=g,E.totalEntries=p,g=0;let U=Buffer.alloc(L);u.forEach(function(v){v.copy(U,g),g+=v.length}),I.forEach(function(v){v.copy(U,g),g+=v.length});let P=E.toBinary();if(f)f.copy(P,P.length-f.length);P.copy(U,g),e=U,i=!1,a(U)}};x(Array.from(this.entries))}catch(u){l(u)}}}}});var ft=M(function(Sn,st){var F=K(),A=j("path"),Ht=me(),zt=ot(),W=(...e)=>F.findLast(e,(r)=>typeof r==="boolean"),it=(...e)=>F.findLast(e,(r)=>typeof r==="string"),Gt=(...e)=>F.findLast(e,(r)=>typeof r==="function"),bt={noSort:!1,readEntries:!1,method:F.Constants.NONE,fs:null};st.exports=function(e,r){let n=null,o=Object.assign(Object.create(null),bt);if(e&&typeof e==="object"){if(!(e instanceof Uint8Array)){if(Object.assign(o,e),e=o.input?o.input:void 0,o.input)delete o.input}if(Buffer.isBuffer(e))n=e,o.method=F.Constants.BUFFER,e=void 0}Object.assign(o,r);let f=new F(o),E=(s)=>{s.filter((c)=>c.attr).sort((c,a)=>a.path.length-c.path.length).forEach((c)=>f.fs.chmodSync(c.path,c.attr))};if(typeof o.decoder!=="object"||typeof o.decoder.encode!=="function"||typeof o.decoder.decode!=="function")o.decoder=F.decoder;if(e&&typeof e==="string")if(f.fs.existsSync(e))o.method=F.Constants.FILE,o.filename=e,n=f.fs.readFileSync(e);else throw F.Errors.INVALID_FILENAME();let i=new zt(n,o),{canonical:m,sanitize:C,zipnamefix:S}=F;function N(s){if(s&&i){var c;if(typeof s==="string")c=i.getEntry(A.posix.normalize(s));if(typeof s==="object"&&typeof s.entryName<"u"&&typeof s.header<"u")c=i.getEntry(s.entryName);if(c)return c}return null}function _(s){let{join:c,normalize:a,sep:l}=A.posix;return c(A.isAbsolute(s)?"/":".",a(l+s.split("\\").join(l)+l))}function O(s){if(s instanceof RegExp)return function(c){return function(a){return c.test(a)}}(s);else if(typeof s!=="function")return()=>!0;return s}let T=(s,c)=>{let a=c.slice(-1);return a=a===f.sep?f.sep:"",A.relative(s,c)+a};return{readFile:function(s,c){var a=N(s);return a&&a.getData(c)||null},childCount:function(s){let c=N(s);if(c)return i.getChildCount(c)},readFileAsync:function(s,c){var a=N(s);if(a)a.getDataAsync(c);else c(null,"getEntry failed for:"+s)},readAsText:function(s,c){var a=N(s);if(a){var l=a.getData();if(l&&l.length)return l.toString(c||"utf8")}return""},readAsTextAsync:function(s,c,a){var l=N(s);if(l)l.getDataAsync(function(d,t){if(t){c(d,t);return}if(d&&d.length)c(d.toString(a||"utf8"));else c("")});else c("")},deleteFile:function(s,c=!0){var a=N(s);if(a)i.deleteFile(a.entryName,c)},deleteEntry:function(s){var c=N(s);if(c)i.deleteEntry(c.entryName)},addZipComment:function(s){i.comment=s},getZipComment:function(){return i.comment||""},addZipEntryComment:function(s,c){var a=N(s);if(a)a.comment=c},getZipEntryComment:function(s){var c=N(s);if(c)return c.comment||"";return""},updateFile:function(s,c){var a=N(s);if(a)a.setData(c)},addLocalFile:function(s,c,a,l){if(f.fs.existsSync(s)){c=c?_(c):"";let d=A.win32.basename(A.win32.normalize(s));c+=a?a:d;let t=f.fs.statSync(s),u=t.isFile()?f.fs.readFileSync(s):Buffer.alloc(0);if(t.isDirectory())c+=f.sep;this.addFile(c,u,l,t)}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFileAsync:function(s,c){s=typeof s==="object"?s:{localPath:s};let a=A.resolve(s.localPath),{comment:l}=s,{zipPath:d,zipName:t}=s,u=this;f.fs.stat(a,function(I,L){if(I)return c(I,!1);d=d?_(d):"";let g=A.win32.basename(A.win32.normalize(a));if(d+=t?t:g,L.isFile())f.fs.readFile(a,function(p,x){if(p)return c(p,!1);return u.addFile(d,x,l,L),setImmediate(c,void 0,!0)});else if(L.isDirectory())return d+=f.sep,u.addFile(d,Buffer.alloc(0),l,L),setImmediate(c,void 0,!0)})},addLocalFolder:function(s,c,a){if(a=O(a),c=c?_(c):"",s=A.normalize(s),f.fs.existsSync(s)){let l=f.findFiles(s),d=this;if(l.length)for(let t of l){let u=A.join(c,T(s,t));if(a(u))d.addLocalFile(t,A.dirname(u))}}else throw F.Errors.FILE_NOT_FOUND(s)},addLocalFolderAsync:function(s,c,a,l){l=O(l),a=a?_(a):"",s=A.normalize(s);var d=this;f.fs.open(s,"r",function(t){if(t&&t.code==="ENOENT")c(void 0,F.Errors.FILE_NOT_FOUND(s));else if(t)c(void 0,t);else{var u=f.findFiles(s),I=-1,L=function(){if(I+=1,I<u.length){var g=u[I],p=T(s,g).split("\\").join("/");if(p=p.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),l(p))f.fs.stat(g,function(x,w){if(x)c(void 0,x);if(w.isFile())f.fs.readFile(g,function(U,P){if(U)c(void 0,U);else d.addFile(a+p,P,"",w),L()});else d.addFile(a+p+"/",Buffer.alloc(0),"",w),L()});else process.nextTick(()=>{L()})}else c(!0,void 0)};L()}})},addLocalFolderAsync2:function(s,c){let a=this;s=typeof s==="object"?s:{localPath:s};let l=A.resolve(s.localPath),{zipPath:d,filter:t,namefix:u}=s;if(t instanceof RegExp)t=function(g){return function(p){return g.test(p)}}(t);else if(typeof t!=="function")t=function(){return!0};if(d=d?_(d):"",u==="latin1")u=(g)=>g.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof u!=="function")u=(g)=>g;let I=(g)=>A.join(d,u(T(l,g))),L=(g)=>A.win32.basename(A.win32.normalize(u(g)));f.fs.open(l,"r",function(g){if(g&&g.code==="ENOENT")c(F.Errors.FILE_NOT_FOUND(l),!1);else if(g)c(g,!1);else f.findFilesAsync(l,function(p,x){if(p)return c(p,!1);if(x=x.filter((w)=>t(I(w))),!x.length)return c(void 0,!0);setImmediate(x.reverse().reduce(function(w,U){return function(P,v){if(P||v===!1)return setImmediate(w,P,!1);a.addLocalFileAsync({localPath:U,zipPath:A.dirname(I(U)),zipName:L(U)},w)}},c))})})},addLocalFolderPromise:function(s,c){return new Promise((a,l)=>{this.addLocalFolderAsync2(Object.assign({localPath:s},c),(d,t)=>{if(d)return l(d);if(t)a(this)})})},addFile:function(s,c,a,l){s=S(s);let d=N(s),t=d!=null;if(!t)d=new Ht(o),d.entryName=s;d.comment=a||"";let u=typeof l==="object"&&l instanceof f.fs.Stats;if(u)d.header.time=l.mtime;var I=d.isDirectory?16:0;let L=d.isDirectory?16384:32768;if(u)L|=4095&l.mode;else if(typeof l==="number")L|=4095&l;else L|=d.isDirectory?493:420;if(I=(I|L<<16)>>>0,d.attr=I,d.setData(c),!t)i.setEntry(d);return d},getEntries:function(s){return i.password=s,i?i.entries:[]},getEntry:function(s){return N(s)},getEntryCount:function(){return i.getEntryCount()},forEach:function(s){return i.forEach(s)},extractEntryTo:function(s,c,a,l,d,t){l=W(!1,l),d=W(!1,d),a=W(!0,a),t=it(d,t);var u=N(s);if(!u)throw F.Errors.NO_ENTRY();var I=m(u.entryName),L=C(c,t&&!u.isDirectory?m(t):a?I:A.basename(I));if(u.isDirectory){var g=i.getEntryChildren(u);return g.forEach(function(w){if(w.isDirectory)return;var U=w.getData();if(!U)throw F.Errors.CANT_EXTRACT_FILE();var P=m(a?w.entryName:w.entryName.substring(u.entryName.length)),v=C(c,P);f.assertPathSafe(c,v);let b=d?w.header.fileAttr:void 0;f.writeFileTo(v,U,l,b)}),!0}var p=u.getData(i.password);if(!p)throw F.Errors.CANT_EXTRACT_FILE();if(f.assertPathSafe(c,L),f.fs.existsSync(L)&&!l)throw F.Errors.CANT_OVERRIDE();let x=d?s.header.fileAttr:void 0;return f.writeFileTo(L,p,l,x),!0},test:function(s){if(!i)return!1;for(var c of i.entries)try{if(c.isDirectory)continue;var a=c.getData(s);if(!a)return!1}catch(l){return!1}return!0},extractAllTo:function(s,c,a,l){if(a=W(!1,a),l=it(a,l),c=W(!1,c),!i)throw F.Errors.NO_ZIP();let d=[];i.entries.forEach(function(t){var u=C(s,m(t.entryName));if(f.assertPathSafe(s,u),t.isDirectory){if(f.makeDir(u),a)d.push({path:u,attr:t.header.fileAttr});return}var I=t.getData(l);if(!I)throw F.Errors.CANT_EXTRACT_FILE();let L=a?t.header.fileAttr:void 0;f.writeFileTo(u,I,c,L);try{f.fs.utimesSync(u,t.header.time,t.header.time)}catch(g){}}),E(d)},extractAllToAsync:function(s,c,a,l){if(l=Gt(c,a,l),a=W(!1,a),c=W(!1,c),!l)return new Promise((p,x)=>{this.extractAllToAsync(s,c,a,function(w){if(w)x(w);else p(this)})});if(!i){l(F.Errors.NO_ZIP());return}s=A.resolve(s);let d=(p)=>C(s,A.normalize(m(p.entryName))),t=(p,x)=>Error(p+': "'+x+'"'),u=[],I=[];i.entries.forEach((p)=>{if(p.isDirectory)u.push(p);else I.push(p)});let L=[];for(let p of u){let x=d(p),w=a?p.header.fileAttr:void 0;try{f.assertPathSafe(s,x),f.makeDir(x)}catch(U){l(t("Unable to create folder",x));continue}if(w)L.push({path:x,attr:w});try{f.fs.utimesSync(x,p.header.time,p.header.time)}catch(U){}}let g=(p)=>{if(!p)try{E(L)}catch(x){return l(t("Unable to set folder permissions",x.path||""))}l(p)};I.reverse().reduce(function(p,x){return function(w){if(w)p(w);else{let U=A.normalize(m(x.entryName)),P=C(s,U);try{f.assertPathSafe(s,P)}catch(v){return p(v)}x.getDataAsync(function(v,b){if(b)p(b);else if(!v)p(F.Errors.CANT_EXTRACT_FILE());else{let ne=a?x.header.fileAttr:void 0;f.writeFileToAsync(P,v,c,ne,function(k){if(!k)return p(t("Unable to write file",P));f.fs.utimes(P,x.header.time,x.header.time,function(){p()})})}})}}},g)()},writeZip:function(s,c){if(arguments.length===1){if(typeof s==="function")c=s,s=""}if(!s&&o.filename)s=o.filename;if(!s)return;var a=i.compressToBuffer();if(a){var l=f.writeFileTo(s,a,!0);if(typeof c==="function")c(!l?Error("failed"):null,"")}},writeZipPromise:function(s,c){let{overwrite:a,perm:l}=Object.assign({overwrite:!0},c);return new Promise((d,t)=>{if(!s&&o.filename)s=o.filename;if(!s)t("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((u)=>{let I=(L)=>L?d(L):t("ADM-ZIP: Wasn't able to write zip file");f.writeFileToAsync(s,u,a,l,I)},t)})},toBufferPromise:function(){return new Promise((s,c)=>{i.toAsyncBuffer(s,c)})},toBuffer:function(s,c,a,l){if(typeof s==="function")return i.toAsyncBuffer(s,c,a,l),null;return i.compressToBuffer()}}}});var ct=J(()=>{ae()});Ce();import{parentPort as at,workerData as jt}from"worker_threads";import*as ut from"fs";import*as fe from"path";function Se(e){return(e&73)!==0?448:384}ct();var lt=gt(ft());function Vt(e,r){for(let n of e.getEntries()){if(n.isDirectory)continue;ut.chmodSync(fe.join(r,n.entryName),Se(n.header.fileAttr))}}function Wt(){let{bundlePath:e,destination:r}=jt;try{let n=new lt.default(e);_e(n,r);let o=fe.resolve(r);n.extractAllTo(o,!0),Vt(n,o);let f={ok:!0};at?.postMessage(f)}catch(n){let o={ok:!1,message:Q(n),stack:n instanceof Error?n.stack:void 0};at?.postMessage(o)}}Wt();
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=27DBB6BA8E0AB9AC64756E2164756E21
|