create-turbo 1.12.1 → 1.12.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -51,7 +51,7 @@ Please report this to https://github.com/szmarczak/http2-wrapper/`);m(y)}return}
|
|
51
51
|
`,`1. Your spelling of example ${vr.default.red(`"${e}"`)} might be incorrect.
|
52
52
|
`,"2. You might not be connected to the internet or you are behind a proxy."),process.exit(1))}let o=qn.default.resolve(t);await cm(qn.default.dirname(o))||(gt("The application path is not writable, please check folder permissions and try again."),gt("It is likely you do not have write permissions for this folder."),process.exit(1));let a=qn.default.basename(o);try{await(0,Un.mkdir)(o,{recursive:!0})}catch(p){gt("Unable to create project directory"),gt(p),process.exit(1)}let{isEmpty:u,conflicts:c}=bs(o);u||(gt(`${vr.default.dim(o)} has ${c.length} conflicting ${c.length===1?"file":"files"} - please try a different location`),process.exit(1));let l=process.cwd();process.chdir(o);let h=$h("Downloading files...");try{!r&&n?(qt(`
|
53
53
|
Downloading files from repo ${vr.default.cyan(e)}. This might take a moment.`),qt(),h.start(),await(0,lm.default)(()=>am(o,n),{retries:3})):(qt(`
|
54
|
-
Downloading files${r?"":` for example ${vr.default.cyan(e)}`}. This might take a moment.`),qt(),h.start(),await(0,lm.default)(()=>um(o,e),{retries:3}))}catch(p){throw new Hn(C5(p)?p.message:String(p))}finally{h.stop()}let f=qn.default.join(o,"package.json"),d=(0,Un.existsSync)(f),m=[];if(d){let p;try{p=(0,Un.readJsonSync)(f)}catch{}p&&m.push(...Object.keys(p.scripts||{}))}let y=t;return qn.default.join(l,a)===t&&(y=a),{cdPath:y,hasPackageJson:d,availableScripts:m,repoInfo:n}}var gC=require("proxy-agent");var $n={name:"create-turbo",version:"1.12.1",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{chalk:"2.4.2",commander:"^10.0.0","fs-extra":"^11.1.1",inquirer:"^8.0.0","proxy-agent":"^6.2.2",rimraf:"^3.0.2",semver:"^7.3.8","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/fs-extra":"^9.0.13","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"^5.2.2"},files:["dist"]};var t1=oe(require("chalk")),r1=oe(require("update-check"));var T5=(0,r1.default)($n).catch(()=>null);async function fm(){try{let t=await T5;t!=null&&t.latest&&(fe.log(),fe.log(t1.default.yellow.bold("A new version of `create-turbo` is available!")),fe.log()),process.exit()}catch{}}var ao=oe(require("path")),He=oe(require("chalk"));var Zn=oe(require("chalk"),1),_1=oe(ca(),1),b1=oe(fa(),1),D1=oe(require("os"),1),A1=oe(sn(),1),f7=require("fs-extra");var g7=oe(Yo(),1),b7=require("fs-extra"),w7=require("fs-extra"),S7=require("chalk"),C1=require("stream"),R1=require("util"),C7=require("fs-extra"),O7=require("chalk"),P7=require("fs-extra"),Ri=oe(require("path"),1),Qe=require("fs-extra"),T1=oe(sn(),1),k1=oe(require("path"),1),O1=require("fs-extra"),F1=oe(require("chalk"),1),Dr=oe(require("path"),1),P1=oe(sn(),1),pt=require("fs-extra"),L1=oe(Yo(),1);var Xs=oe(require("path"),1),Zt=require("fs-extra"),Yn=oe(require("path"),1),Jt=require("fs-extra"),Qs=oe(require("path"),1),Xt=require("fs-extra"),dt=oe(require("chalk"),1),q1=oe(fa(),1),H1=oe(sn(),1),U1=oe(ca(),1),$1=require("semver"),G1=oe(require("chalk"),1),k5=Object.create,mm=Object.defineProperty,O5=Object.getOwnPropertyDescriptor,F5=Object.getOwnPropertyNames,P5=Object.getPrototypeOf,L5=Object.prototype.hasOwnProperty,he=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),B5=(t,e)=>()=>(t&&(e=t(t=0)),e),ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),I5=(t,e)=>{for(var r in e)mm(t,r,{get:e[r],enumerable:!0})},N5=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of F5(e))!L5.call(t,n)&&n!==r&&mm(t,n,{get:()=>e[n],enumerable:!(i=O5(e,n))||i.enumerable});return t},oc=(t,e,r)=>(r=t!=null?k5(P5(t)):{},N5(e||!t||!t.__esModule?mm(r,"default",{value:t,enumerable:!0}):r,t)),te=B5(()=>{}),M5=ce((t,e)=>{te();function r(i){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),j5=ce((t,e)=>{te();var r=M5().default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(v,R,$){v[R]=$.value},u=typeof Symbol=="function"?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(v,R,$){return Object.defineProperty(v,R,{value:$,enumerable:!0,configurable:!0,writable:!0}),v[R]}try{f({},"")}catch{f=function(v,R,$){return v[R]=$}}function d(v,R,$,J){var X=R&&R.prototype instanceof p?R:p,E=Object.create(X.prototype),w=new U(J||[]);return a(E,"_invoke",{value:H(v,$,w)}),E}function m(v,R,$){try{return{type:"normal",arg:v.call(R,$)}}catch(J){return{type:"throw",arg:J}}}n.wrap=d;var y={};function p(){}function _(){}function C(){}var L={};f(L,c,function(){return this});var B=Object.getPrototypeOf,T=B&&B(B(G([])));T&&T!==s&&o.call(T,c)&&(L=T);var M=C.prototype=p.prototype=Object.create(L);function D(v){["next","throw","return"].forEach(function(R){f(v,R,function($){return this._invoke(R,$)})})}function A(v,R){function $(X,E,w,S){var j=m(v[X],v,E);if(j.type!=="throw"){var F=j.arg,Y=F.value;return Y&&r(Y)=="object"&&o.call(Y,"__await")?R.resolve(Y.__await).then(function(z){$("next",z,w,S)},function(z){$("throw",z,w,S)}):R.resolve(Y).then(function(z){F.value=z,w(F)},function(z){return $("throw",z,w,S)})}S(j.arg)}var J;a(this,"_invoke",{value:function(X,E){function w(){return new R(function(S,j){$(X,E,S,j)})}return J=J?J.then(w,w):w()}})}function H(v,R,$){var J="suspendedStart";return function(X,E){if(J==="executing")throw new Error("Generator is already running");if(J==="completed"){if(X==="throw")throw E;return P()}for($.method=X,$.arg=E;;){var w=$.delegate;if(w){var S=W(w,$);if(S){if(S===y)continue;return S}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(J==="suspendedStart")throw J="completed",$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);J="executing";var j=m(v,R,$);if(j.type==="normal"){if(J=$.done?"completed":"suspendedYield",j.arg===y)continue;return{value:j.arg,done:$.done}}j.type==="throw"&&(J="completed",$.method="throw",$.arg=j.arg)}}}function W(v,R){var $=R.method,J=v.iterator[$];if(J===void 0)return R.delegate=null,$==="throw"&&v.iterator.return&&(R.method="return",R.arg=void 0,W(v,R),R.method==="throw")||$!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+$+"' method")),y;var X=m(J,v.iterator,R.arg);if(X.type==="throw")return R.method="throw",R.arg=X.arg,R.delegate=null,y;var E=X.arg;return E?E.done?(R[v.resultName]=E.value,R.next=v.nextLoc,R.method!=="return"&&(R.method="next",R.arg=void 0),R.delegate=null,y):E:(R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,y)}function q(v){var R={tryLoc:v[0]};1 in v&&(R.catchLoc=v[1]),2 in v&&(R.finallyLoc=v[2],R.afterLoc=v[3]),this.tryEntries.push(R)}function I(v){var R=v.completion||{};R.type="normal",delete R.arg,v.completion=R}function U(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(q,this),this.reset(!0)}function G(v){if(v){var R=v[c];if(R)return R.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var $=-1,J=function X(){for(;++$<v.length;)if(o.call(v,$))return X.value=v[$],X.done=!1,X;return X.value=void 0,X.done=!0,X};return J.next=J}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=C,a(M,"constructor",{value:C,configurable:!0}),a(C,"constructor",{value:_,configurable:!0}),_.displayName=f(C,h,"GeneratorFunction"),n.isGeneratorFunction=function(v){var R=typeof v=="function"&&v.constructor;return!!R&&(R===_||(R.displayName||R.name)==="GeneratorFunction")},n.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,C):(v.__proto__=C,f(v,h,"GeneratorFunction")),v.prototype=Object.create(M),v},n.awrap=function(v){return{__await:v}},D(A.prototype),f(A.prototype,l,function(){return this}),n.AsyncIterator=A,n.async=function(v,R,$,J,X){X===void 0&&(X=Promise);var E=new A(d(v,R,$,J),X);return n.isGeneratorFunction(R)?E:E.next().then(function(w){return w.done?w.value:E.next()})},D(M),f(M,h,"Generator"),f(M,c,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),n.keys=function(v){var R=Object(v),$=[];for(var J in R)$.push(J);return $.reverse(),function X(){for(;$.length;){var E=$.pop();if(E in R)return X.value=E,X.done=!1,X}return X.done=!0,X}},n.values=G,U.prototype={constructor:U,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!v)for(var R in this)R.charAt(0)==="t"&&o.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=void 0)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var R=this;function $(j,F){return E.type="throw",E.arg=v,R.next=j,F&&(R.method="next",R.arg=void 0),!!F}for(var J=this.tryEntries.length-1;J>=0;--J){var X=this.tryEntries[J],E=X.completion;if(X.tryLoc==="root")return $("end");if(X.tryLoc<=this.prev){var w=o.call(X,"catchLoc"),S=o.call(X,"finallyLoc");if(w&&S){if(this.prev<X.catchLoc)return $(X.catchLoc,!0);if(this.prev<X.finallyLoc)return $(X.finallyLoc)}else if(w){if(this.prev<X.catchLoc)return $(X.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return $(X.finallyLoc)}}}},abrupt:function(v,R){for(var $=this.tryEntries.length-1;$>=0;--$){var J=this.tryEntries[$];if(J.tryLoc<=this.prev&&o.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var X=J;break}}X&&(v==="break"||v==="continue")&&X.tryLoc<=R&&R<=X.finallyLoc&&(X=null);var E=X?X.completion:{};return E.type=v,E.arg=R,X?(this.method="next",this.next=X.finallyLoc,y):this.complete(E)},complete:function(v,R){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&R&&(this.next=R),y},finish:function(v){for(var R=this.tryEntries.length-1;R>=0;--R){var $=this.tryEntries[R];if($.finallyLoc===v)return this.complete($.completion,$.afterLoc),I($),y}},catch:function(v){for(var R=this.tryEntries.length-1;R>=0;--R){var $=this.tryEntries[R];if($.tryLoc===v){var J=$.completion;if(J.type==="throw"){var X=J.arg;I($)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(v,R,$){return this.delegate={iterator:G(v),resultName:R,nextLoc:$},this.method==="next"&&(this.arg=void 0),y}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),q5=ce((t,e)=>{te();var r=j5()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),H5=ce((t,e)=>{"use strict";te();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),U5=ce((t,e)=>{"use strict";te();var r=H5(),i=n=>{if(!((Number.isInteger(n)||n===1/0)&&n>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let s=[],o=0,a=()=>{o--,s.length>0&&s.shift()()},u=(h,f,...d)=>{o++;let m=r(h,...d);f(m),m.then(a,a)},c=(h,f,...d)=>{o<n?u(h,f,...d):s.push(u.bind(null,h,f,...d))},l=(h,...f)=>new Promise(d=>c(h,d,...f));return Object.defineProperties(l,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),l};e.exports=i,e.exports.default=i}),$5=ce((t,e)=>{"use strict";te();var r=U5(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,u)=>u(await a),s=async a=>{let u=await Promise.all(a);if(u[1]===!0)throw new i(u[0]);return!1},o=async(a,u,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let l=r(c.concurrency),h=[...a].map(d=>[d,l(n,d,u)]),f=r(c.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>f(s,d)))}catch(d){if(d instanceof i)return d.value;throw d}};e.exports=o,e.exports.default=o}),G5=ce((t,e)=>{"use strict";te();var r=he("path"),i=he("fs"),{promisify:n}=he("util"),s=$5(),o=n(i.stat),a=n(i.lstat),u={directory:"isDirectory",file:"isFile"};function c({type:h}){if(!(h in u))throw new Error(`Invalid type specified: ${h}`)}var l=(h,f)=>h===void 0||f[u[h]]();e.exports=async(h,f)=>{f={cwd:process.cwd(),type:"file",allowSymlinks:!0,...f},c(f);let d=f.allowSymlinks?o:a;return s(h,async m=>{try{let y=await d(r.resolve(f.cwd,m));return l(f.type,y)}catch{return!1}},f)},e.exports.sync=(h,f)=>{f={cwd:process.cwd(),allowSymlinks:!0,type:"file",...f},c(f);let d=f.allowSymlinks?i.statSync:i.lstatSync;for(let m of h)try{let y=d(r.resolve(f.cwd,m));if(l(f.type,y))return m}catch{}}}),z5=ce((t,e)=>{"use strict";te();var r=he("fs"),{promisify:i}=he("util"),n=i(r.access);e.exports=async s=>{try{return await n(s),!0}catch{return!1}},e.exports.sync=s=>{try{return r.accessSync(s),!0}catch{return!1}}}),W5=ce((t,e)=>{"use strict";te();var r=he("path"),i=G5(),n=z5(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let u=r.resolve(a.cwd||""),{root:c}=r.parse(u),l=[].concat(o),h=async f=>{if(typeof o!="function")return i(l,f);let d=await o(f.cwd);return typeof d=="string"?i([d],f):d};for(;;){let f=await h({...a,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.sync=(o,a={})=>{let u=r.resolve(a.cwd||""),{root:c}=r.parse(u),l=[].concat(o),h=f=>{if(typeof o!="function")return i.sync(l,f);let d=o(f.cwd);return typeof d=="string"?i.sync([d],f):d};for(;;){let f=h({...a,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),eo=ce((t,e)=>{"use strict";te();var r=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=i=>i?Object.keys(i).map(n=>[r.has(n)?r.get(n):n,i[n]]).reduce((n,s)=>(n[s[0]]=s[1],n),Object.create(null)):{}}),ym=ce((t,e)=>{"use strict";te();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=he("events"),n=he("stream"),s=he("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),c=Symbol("emittingEnd"),l=Symbol("emittedError"),h=Symbol("closed"),f=Symbol("read"),d=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),p=Symbol("decoder"),_=Symbol("flowing"),C=Symbol("paused"),L=Symbol("resume"),B=Symbol("buffer"),T=Symbol("pipes"),M=Symbol("bufferLength"),D=Symbol("bufferPush"),A=Symbol("bufferShift"),H=Symbol("objectMode"),W=Symbol("destroyed"),q=Symbol("emitData"),I=Symbol("emitEnd"),U=Symbol("emitEnd2"),G=Symbol("async"),P=j=>Promise.resolve().then(j),v=global._MP_NO_ITERATOR_SYMBOLS_!=="1",R=v&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),$=v&&Symbol.iterator||Symbol("iterator not implemented"),J=j=>j==="end"||j==="finish"||j==="prefinish",X=j=>j instanceof ArrayBuffer||typeof j=="object"&&j.constructor&&j.constructor.name==="ArrayBuffer"&&j.byteLength>=0,E=j=>!Buffer.isBuffer(j)&&ArrayBuffer.isView(j),w=class{constructor(j,F,Y){this.src=j,this.dest=F,this.opts=Y,this.ondrain=()=>j[L](),F.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},S=class extends w{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(j,F,Y){super(j,F,Y),this.proxyErrors=z=>F.emit("error",z),j.on("error",this.proxyErrors)}};e.exports=class s1 extends n{constructor(F){super(),this[_]=!1,this[C]=!1,this[T]=[],this[B]=[],this[H]=F&&F.objectMode||!1,this[H]?this[y]=null:this[y]=F&&F.encoding||null,this[y]==="buffer"&&(this[y]=null),this[G]=F&&!!F.async||!1,this[p]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[c]=!1,this[h]=!1,this[l]=null,this.writable=!0,this.readable=!0,this[M]=0,this[W]=!1,F&&F.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[B]}),F&&F.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]})}get bufferLength(){return this[M]}get encoding(){return this[y]}set encoding(F){if(this[H])throw new Error("cannot set encoding in objectMode");if(this[y]&&F!==this[y]&&(this[p]&&this[p].lastNeed||this[M]))throw new Error("cannot change encoding");this[y]!==F&&(this[p]=F?new s(F):null,this[B].length&&(this[B]=this[B].map(Y=>this[p].write(Y)))),this[y]=F}setEncoding(F){this.encoding=F}get objectMode(){return this[H]}set objectMode(F){this[H]=this[H]||!!F}get async(){return this[G]}set async(F){this[G]=this[G]||!!F}write(F,Y,z){if(this[o])throw new Error("write after end");if(this[W])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof Y=="function"&&(z=Y,Y="utf8"),Y||(Y="utf8");let ne=this[G]?P:Z=>Z();return!this[H]&&!Buffer.isBuffer(F)&&(E(F)?F=Buffer.from(F.buffer,F.byteOffset,F.byteLength):X(F)?F=Buffer.from(F):typeof F!="string"&&(this.objectMode=!0)),this[H]?(this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",F):this[D](F),this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing):F.length?(typeof F=="string"&&!(Y===this[y]&&!this[p].lastNeed)&&(F=Buffer.from(F,Y)),Buffer.isBuffer(F)&&this[y]&&(F=this[p].write(F)),this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",F):this[D](F),this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing):(this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing)}read(F){if(this[W])return null;if(this[M]===0||F===0||F>this[M])return this[a](),null;this[H]&&(F=null),this[B].length>1&&!this[H]&&(this.encoding?this[B]=[this[B].join("")]:this[B]=[Buffer.concat(this[B],this[M])]);let Y=this[f](F||null,this[B][0]);return this[a](),Y}[f](F,Y){return F===Y.length||F===null?this[A]():(this[B][0]=Y.slice(F),Y=Y.slice(0,F),this[M]-=F),this.emit("data",Y),!this[B].length&&!this[o]&&this.emit("drain"),Y}end(F,Y,z){return typeof F=="function"&&(z=F,F=null),typeof Y=="function"&&(z=Y,Y="utf8"),F&&this.write(F,Y),z&&this.once("end",z),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[L](){this[W]||(this[C]=!1,this[_]=!0,this.emit("resume"),this[B].length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[L]()}pause(){this[_]=!1,this[C]=!0}get destroyed(){return this[W]}get flowing(){return this[_]}get paused(){return this[C]}[D](F){this[H]?this[M]+=1:this[M]+=F.length,this[B].push(F)}[A](){return this[B].length&&(this[H]?this[M]-=1:this[M]-=this[B][0].length),this[B].shift()}[d](F){do;while(this[m](this[A]()));!F&&!this[B].length&&!this[o]&&this.emit("drain")}[m](F){return F?(this.emit("data",F),this.flowing):!1}pipe(F,Y){if(this[W])return;let z=this[u];return Y=Y||{},F===r.stdout||F===r.stderr?Y.end=!1:Y.end=Y.end!==!1,Y.proxyErrors=!!Y.proxyErrors,z?Y.end&&F.end():(this[T].push(Y.proxyErrors?new S(this,F,Y):new w(this,F,Y)),this[G]?P(()=>this[L]()):this[L]()),F}unpipe(F){let Y=this[T].find(z=>z.dest===F);Y&&(this[T].splice(this[T].indexOf(Y),1),Y.unpipe())}addListener(F,Y){return this.on(F,Y)}on(F,Y){let z=super.on(F,Y);return F==="data"&&!this[T].length&&!this.flowing?this[L]():F==="readable"&&this[M]!==0?super.emit("readable"):J(F)&&this[u]?(super.emit(F),this.removeAllListeners(F)):F==="error"&&this[l]&&(this[G]?P(()=>Y.call(this,this[l])):Y.call(this,this[l])),z}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[W]&&this[B].length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[c]=!1)}emit(F,Y,...z){if(F!=="error"&&F!=="close"&&F!==W&&this[W])return;if(F==="data")return Y?this[G]?P(()=>this[q](Y)):this[q](Y):!1;if(F==="end")return this[I]();if(F==="close"){if(this[h]=!0,!this[u]&&!this[W])return;let Z=super.emit("close");return this.removeAllListeners("close"),Z}else if(F==="error"){this[l]=Y;let Z=super.emit("error",Y);return this[a](),Z}else if(F==="resume"){let Z=super.emit("resume");return this[a](),Z}else if(F==="finish"||F==="prefinish"){let Z=super.emit(F);return this.removeAllListeners(F),Z}let ne=super.emit(F,Y,...z);return this[a](),ne}[q](F){for(let z of this[T])z.dest.write(F)===!1&&this.pause();let Y=super.emit("data",F);return this[a](),Y}[I](){this[u]||(this[u]=!0,this.readable=!1,this[G]?P(()=>this[U]()):this[U]())}[U](){if(this[p]){let Y=this[p].end();if(Y){for(let z of this[T])z.dest.write(Y);super.emit("data",Y)}}for(let Y of this[T])Y.end();let F=super.emit("end");return this.removeAllListeners("end"),F}collect(){let F=[];this[H]||(F.dataLength=0);let Y=this.promise();return this.on("data",z=>{F.push(z),this[H]||(F.dataLength+=z.length)}),Y.then(()=>F)}concat(){return this[H]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(F=>this[H]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?F.join(""):Buffer.concat(F,F.dataLength))}promise(){return new Promise((F,Y)=>{this.on(W,()=>Y(new Error("stream destroyed"))),this.on("error",z=>Y(z)),this.on("end",()=>F())})}[R](){return{next:()=>{let F=this.read();if(F!==null)return Promise.resolve({done:!1,value:F});if(this[o])return Promise.resolve({done:!0});let Y=null,z=null,ne=b=>{this.removeListener("data",Z),this.removeListener("end",ue),z(b)},Z=b=>{this.removeListener("error",ne),this.removeListener("end",ue),this.pause(),Y({value:b,done:!!this[o]})},ue=()=>{this.removeListener("error",ne),this.removeListener("data",Z),Y({done:!0})},Q=()=>ne(new Error("stream destroyed"));return new Promise((b,N)=>{z=N,Y=b,this.once(W,Q),this.once("error",ne),this.once("end",ue),this.once("data",Z)})}}}[$](){return{next:()=>{let F=this.read();return{value:F,done:F===null}}}}destroy(F){return this[W]?(F?this.emit("error",F):this.emit(W),this):(this[W]=!0,this[B].length=0,this[M]=0,typeof this.close=="function"&&!this[h]&&this.close(),F?this.emit("error",F):this.emit(W),this)}static isStream(F){return!!F&&(F instanceof s1||F instanceof n||F instanceof i&&(typeof F.pipe=="function"||typeof F.write=="function"&&typeof F.end=="function"))}}}),V5=ce((t,e)=>{te();var r=he("zlib").constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))}),o1=ce((t,e)=>{"use strict";te();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=he("events"),n=he("stream"),s=he("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),c=Symbol("emittingEnd"),l=Symbol("emittedError"),h=Symbol("closed"),f=Symbol("read"),d=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),p=Symbol("decoder"),_=Symbol("flowing"),C=Symbol("paused"),L=Symbol("resume"),B=Symbol("bufferLength"),T=Symbol("bufferPush"),M=Symbol("bufferShift"),D=Symbol("objectMode"),A=Symbol("destroyed"),H=Symbol("emitData"),W=Symbol("emitEnd"),q=Symbol("emitEnd2"),I=Symbol("async"),U=w=>Promise.resolve().then(w),G=global._MP_NO_ITERATOR_SYMBOLS_!=="1",P=G&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),v=G&&Symbol.iterator||Symbol("iterator not implemented"),R=w=>w==="end"||w==="finish"||w==="prefinish",$=w=>w instanceof ArrayBuffer||typeof w=="object"&&w.constructor&&w.constructor.name==="ArrayBuffer"&&w.byteLength>=0,J=w=>!Buffer.isBuffer(w)&&ArrayBuffer.isView(w),X=class{constructor(w,S,j){this.src=w,this.dest=S,this.opts=j,this.ondrain=()=>w[L](),S.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},E=class extends X{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(w,S,j){super(w,S,j),this.proxyErrors=F=>S.emit("error",F),w.on("error",this.proxyErrors)}};e.exports=class a1 extends n{constructor(S){super(),this[_]=!1,this[C]=!1,this.pipes=[],this.buffer=[],this[D]=S&&S.objectMode||!1,this[D]?this[y]=null:this[y]=S&&S.encoding||null,this[y]==="buffer"&&(this[y]=null),this[I]=S&&!!S.async||!1,this[p]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[c]=!1,this[h]=!1,this[l]=null,this.writable=!0,this.readable=!0,this[B]=0,this[A]=!1}get bufferLength(){return this[B]}get encoding(){return this[y]}set encoding(S){if(this[D])throw new Error("cannot set encoding in objectMode");if(this[y]&&S!==this[y]&&(this[p]&&this[p].lastNeed||this[B]))throw new Error("cannot change encoding");this[y]!==S&&(this[p]=S?new s(S):null,this.buffer.length&&(this.buffer=this.buffer.map(j=>this[p].write(j)))),this[y]=S}setEncoding(S){this.encoding=S}get objectMode(){return this[D]}set objectMode(S){this[D]=this[D]||!!S}get async(){return this[I]}set async(S){this[I]=this[I]||!!S}write(S,j,F){if(this[o])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof j=="function"&&(F=j,j="utf8"),j||(j="utf8");let Y=this[I]?U:z=>z();return!this[D]&&!Buffer.isBuffer(S)&&(J(S)?S=Buffer.from(S.buffer,S.byteOffset,S.byteLength):$(S)?S=Buffer.from(S):typeof S!="string"&&(this.objectMode=!0)),this[D]?(this.flowing&&this[B]!==0&&this[d](!0),this.flowing?this.emit("data",S):this[T](S),this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing):S.length?(typeof S=="string"&&!(j===this[y]&&!this[p].lastNeed)&&(S=Buffer.from(S,j)),Buffer.isBuffer(S)&&this[y]&&(S=this[p].write(S)),this.flowing&&this[B]!==0&&this[d](!0),this.flowing?this.emit("data",S):this[T](S),this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing):(this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing)}read(S){if(this[A])return null;if(this[B]===0||S===0||S>this[B])return this[a](),null;this[D]&&(S=null),this.buffer.length>1&&!this[D]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[B])]);let j=this[f](S||null,this.buffer[0]);return this[a](),j}[f](S,j){return S===j.length||S===null?this[M]():(this.buffer[0]=j.slice(S),j=j.slice(0,S),this[B]-=S),this.emit("data",j),!this.buffer.length&&!this[o]&&this.emit("drain"),j}end(S,j,F){return typeof S=="function"&&(F=S,S=null),typeof j=="function"&&(F=j,j="utf8"),S&&this.write(S,j),F&&this.once("end",F),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[L](){this[A]||(this[C]=!1,this[_]=!0,this.emit("resume"),this.buffer.length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[L]()}pause(){this[_]=!1,this[C]=!0}get destroyed(){return this[A]}get flowing(){return this[_]}get paused(){return this[C]}[T](S){this[D]?this[B]+=1:this[B]+=S.length,this.buffer.push(S)}[M](){return this.buffer.length&&(this[D]?this[B]-=1:this[B]-=this.buffer[0].length),this.buffer.shift()}[d](S){do;while(this[m](this[M]()));!S&&!this.buffer.length&&!this[o]&&this.emit("drain")}[m](S){return S?(this.emit("data",S),this.flowing):!1}pipe(S,j){if(this[A])return;let F=this[u];return j=j||{},S===r.stdout||S===r.stderr?j.end=!1:j.end=j.end!==!1,j.proxyErrors=!!j.proxyErrors,F?j.end&&S.end():(this.pipes.push(j.proxyErrors?new E(this,S,j):new X(this,S,j)),this[I]?U(()=>this[L]()):this[L]()),S}unpipe(S){let j=this.pipes.find(F=>F.dest===S);j&&(this.pipes.splice(this.pipes.indexOf(j),1),j.unpipe())}addListener(S,j){return this.on(S,j)}on(S,j){let F=super.on(S,j);return S==="data"&&!this.pipes.length&&!this.flowing?this[L]():S==="readable"&&this[B]!==0?super.emit("readable"):R(S)&&this[u]?(super.emit(S),this.removeAllListeners(S)):S==="error"&&this[l]&&(this[I]?U(()=>j.call(this,this[l])):j.call(this,this[l])),F}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[A]&&this.buffer.length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[c]=!1)}emit(S,j,...F){if(S!=="error"&&S!=="close"&&S!==A&&this[A])return;if(S==="data")return j?this[I]?U(()=>this[H](j)):this[H](j):!1;if(S==="end")return this[W]();if(S==="close"){if(this[h]=!0,!this[u]&&!this[A])return;let z=super.emit("close");return this.removeAllListeners("close"),z}else if(S==="error"){this[l]=j;let z=super.emit("error",j);return this[a](),z}else if(S==="resume"){let z=super.emit("resume");return this[a](),z}else if(S==="finish"||S==="prefinish"){let z=super.emit(S);return this.removeAllListeners(S),z}let Y=super.emit(S,j,...F);return this[a](),Y}[H](S){for(let F of this.pipes)F.dest.write(S)===!1&&this.pause();let j=super.emit("data",S);return this[a](),j}[W](){this[u]||(this[u]=!0,this.readable=!1,this[I]?U(()=>this[q]()):this[q]())}[q](){if(this[p]){let j=this[p].end();if(j){for(let F of this.pipes)F.dest.write(j);super.emit("data",j)}}for(let j of this.pipes)j.end();let S=super.emit("end");return this.removeAllListeners("end"),S}collect(){let S=[];this[D]||(S.dataLength=0);let j=this.promise();return this.on("data",F=>{S.push(F),this[D]||(S.dataLength+=F.length)}),j.then(()=>S)}concat(){return this[D]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(S=>this[D]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?S.join(""):Buffer.concat(S,S.dataLength))}promise(){return new Promise((S,j)=>{this.on(A,()=>j(new Error("stream destroyed"))),this.on("error",F=>j(F)),this.on("end",()=>S())})}[P](){return{next:()=>{let S=this.read();if(S!==null)return Promise.resolve({done:!1,value:S});if(this[o])return Promise.resolve({done:!0});let j=null,F=null,Y=ue=>{this.removeListener("data",z),this.removeListener("end",ne),F(ue)},z=ue=>{this.removeListener("error",Y),this.removeListener("end",ne),this.pause(),j({value:ue,done:!!this[o]})},ne=()=>{this.removeListener("error",Y),this.removeListener("data",z),j({done:!0})},Z=()=>Y(new Error("stream destroyed"));return new Promise((ue,Q)=>{F=Q,j=ue,this.once(A,Z),this.once("error",Y),this.once("end",ne),this.once("data",z)})}}}[v](){return{next:()=>{let S=this.read();return{value:S,done:S===null}}}}destroy(S){return this[A]?(S?this.emit("error",S):this.emit(A),this):(this[A]=!0,this.buffer.length=0,this[B]=0,typeof this.close=="function"&&!this[h]&&this.close(),S?this.emit("error",S):this.emit(A),this)}static isStream(S){return!!S&&(S instanceof a1||S instanceof n||S instanceof i&&(typeof S.pipe=="function"||typeof S.write=="function"&&typeof S.end=="function"))}}}),u1=ce(t=>{"use strict";te();var e=he("assert"),r=he("buffer").Buffer,i=he("zlib"),n=t.constants=V5(),s=o1(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(R){super("zlib: "+R.message),this.code=R.code,this.errno=R.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+R.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},c=Symbol("opts"),l=Symbol("flushFlag"),h=Symbol("finishFlushFlag"),f=Symbol("fullFlushFlag"),d=Symbol("handle"),m=Symbol("onError"),y=Symbol("sawError"),p=Symbol("level"),_=Symbol("strategy"),C=Symbol("ended"),L=Symbol("_defaultFullFlush"),B=class extends s{constructor(R,$){if(!R||typeof R!="object")throw new TypeError("invalid options for ZlibBase constructor");super(R),this[y]=!1,this[C]=!1,this[c]=R,this[l]=R.flush,this[h]=R.finishFlush;try{this[d]=new i[$](R)}catch(J){throw new u(J)}this[m]=J=>{this[y]||(this[y]=!0,this.close(),this.emit("error",J))},this[d].on("error",J=>this[m](new u(J))),this.once("end",()=>this.close)}close(){this[d]&&(this[d].close(),this[d]=null,this.emit("close"))}reset(){if(!this[y])return e(this[d],"zlib binding closed"),this[d].reset()}flush(R){this.ended||(typeof R!="number"&&(R=this[f]),this.write(Object.assign(r.alloc(0),{[l]:R})))}end(R,$,J){return R&&this.write(R,$),this.flush(this[h]),this[C]=!0,super.end(null,null,J)}get ended(){return this[C]}write(R,$,J){if(typeof $=="function"&&(J=$,$="utf8"),typeof R=="string"&&(R=r.from(R,$)),this[y])return;e(this[d],"zlib binding closed");let X=this[d]._handle,E=X.close;X.close=()=>{};let w=this[d].close;this[d].close=()=>{},r.concat=F=>F;let S;try{let F=typeof R[l]=="number"?R[l]:this[l];S=this[d]._processChunk(R,F),r.concat=o}catch(F){r.concat=o,this[m](new u(F))}finally{this[d]&&(this[d]._handle=X,X.close=E,this[d].close=w,this[d].removeAllListeners("error"))}this[d]&&this[d].on("error",F=>this[m](new u(F)));let j;if(S)if(Array.isArray(S)&&S.length>0){j=this[a](r.from(S[0]));for(let F=1;F<S.length;F++)j=this[a](S[F])}else j=this[a](r.from(S));return J&&J(),j}[a](R){return super.write(R)}},T=class extends B{constructor(R,$){R=R||{},R.flush=R.flush||n.Z_NO_FLUSH,R.finishFlush=R.finishFlush||n.Z_FINISH,super(R,$),this[f]=n.Z_FULL_FLUSH,this[p]=R.level,this[_]=R.strategy}params(R,$){if(!this[y]){if(!this[d])throw new Error("cannot switch params when binding is closed");if(!this[d].params)throw new Error("not supported in this implementation");if(this[p]!==R||this[_]!==$){this.flush(n.Z_SYNC_FLUSH),e(this[d],"zlib binding closed");let J=this[d].flush;this[d].flush=(X,E)=>{this.flush(X),E()};try{this[d].params(R,$)}finally{this[d].flush=J}this[d]&&(this[p]=R,this[_]=$)}}}},M=class extends T{constructor(R){super(R,"Deflate")}},D=class extends T{constructor(R){super(R,"Inflate")}},A=Symbol("_portable"),H=class extends T{constructor(R){super(R,"Gzip"),this[A]=R&&!!R.portable}[a](R){return this[A]?(this[A]=!1,R[9]=255,super[a](R)):super[a](R)}},W=class extends T{constructor(R){super(R,"Gunzip")}},q=class extends T{constructor(R){super(R,"DeflateRaw")}},I=class extends T{constructor(R){super(R,"InflateRaw")}},U=class extends T{constructor(R){super(R,"Unzip")}},G=class extends B{constructor(R,$){R=R||{},R.flush=R.flush||n.BROTLI_OPERATION_PROCESS,R.finishFlush=R.finishFlush||n.BROTLI_OPERATION_FINISH,super(R,$),this[f]=n.BROTLI_OPERATION_FLUSH}},P=class extends G{constructor(R){super(R,"BrotliCompress")}},v=class extends G{constructor(R){super(R,"BrotliDecompress")}};t.Deflate=M,t.Inflate=D,t.Gzip=H,t.Gunzip=W,t.DeflateRaw=q,t.InflateRaw=I,t.Unzip=U,typeof i.BrotliCompress=="function"?(t.BrotliCompress=P,t.BrotliDecompress=v):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),to=ce((t,e)=>{te();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),gm=ce((t,e)=>{"use strict";te();var r=ym(),i=to(),n=Symbol("slurp");e.exports=class extends r{constructor(s,o,a){switch(super(),this.pause(),this.extended=o,this.globalExtended=a,this.header=s,this.startBlockSize=512*Math.ceil(s.size/512),this.blockRemain=this.startBlockSize,this.remain=s.size,this.type=s.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(s.path),this.mode=s.mode,this.mode&&(this.mode=this.mode&4095),this.uid=s.uid,this.gid=s.gid,this.uname=s.uname,this.gname=s.gname,this.size=s.size,this.mtime=s.mtime,this.atime=s.atime,this.ctime=s.ctime,this.linkpath=i(s.linkpath),this.uname=s.uname,this.gname=s.gname,o&&this[n](o),a&&this[n](a,!0)}write(s){let o=s.length;if(o>this.blockRemain)throw new Error("writing more to entry than is appropriate");let a=this.remain,u=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,u-o),this.ignore?!0:a>=o?super.write(s):super.write(s.slice(0,a))}[n](s,o){for(let a in s)s[a]!==null&&s[a]!==void 0&&!(o&&a==="path")&&(this[a]=a==="path"||a==="linkpath"?i(s[a]):s[a])}}}),c1=ce(t=>{"use strict";te(),t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))}),Y5=ce((t,e)=>{"use strict";te();var r=(l,h)=>{if(Number.isSafeInteger(l))l<0?n(l,h):i(l,h);else throw Error("cannot encode number outside of javascript safe integer range");return h},i=(l,h)=>{h[0]=128;for(var f=h.length;f>1;f--)h[f-1]=l&255,l=Math.floor(l/256)},n=(l,h)=>{h[0]=255;var f=!1;l=l*-1;for(var d=h.length;d>1;d--){var m=l&255;l=Math.floor(l/256),f?h[d-1]=u(m):m===0?h[d-1]=0:(f=!0,h[d-1]=c(m))}},s=l=>{let h=l[0],f=h===128?a(l.slice(1,l.length)):h===255?o(l):null;if(f===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(f))throw Error("parsed number outside of javascript safe integer range");return f},o=l=>{for(var h=l.length,f=0,d=!1,m=h-1;m>-1;m--){var y=l[m],p;d?p=u(y):y===0?p=y:(d=!0,p=c(y)),p!==0&&(f-=p*Math.pow(256,h-m-1))}return f},a=l=>{for(var h=l.length,f=0,d=h-1;d>-1;d--){var m=l[d];m!==0&&(f+=m*Math.pow(256,h-d-1))}return f},u=l=>(255^l)&255,c=l=>(255^l)+1&255;e.exports={encode:r,parse:s}}),ro=ce((t,e)=>{"use strict";te();var r=c1(),i=he("path").posix,n=Y5(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(D,A,H,W){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[o]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(D)?this.decode(D,A||0,H,W):D&&this.set(D)}decode(D,A,H,W){if(A||(A=0),!D||!(D.length>=A+512))throw new Error("need 512 bytes for header");if(this.path=c(D,A,100),this.mode=f(D,A+100,8),this.uid=f(D,A+108,8),this.gid=f(D,A+116,8),this.size=f(D,A+124,12),this.mtime=l(D,A+136,12),this.cksum=f(D,A+148,12),this[s](H),this[s](W,!0),this[o]=c(D,A+156,1),this[o]===""&&(this[o]="0"),this[o]==="0"&&this.path.slice(-1)==="/"&&(this[o]="5"),this[o]==="5"&&(this.size=0),this.linkpath=c(D,A+157,100),D.slice(A+257,A+265).toString()==="ustar\x0000")if(this.uname=c(D,A+265,32),this.gname=c(D,A+297,32),this.devmaj=f(D,A+329,8),this.devmin=f(D,A+337,8),D[A+475]!==0){let I=c(D,A+345,155);this.path=I+"/"+this.path}else{let I=c(D,A+345,130);I&&(this.path=I+"/"+this.path),this.atime=l(D,A+476,12),this.ctime=l(D,A+488,12)}let q=8*32;for(let I=A;I<A+148;I++)q+=D[I];for(let I=A+156;I<A+512;I++)q+=D[I];this.cksumValid=q===this.cksum,this.cksum===null&&q===8*32&&(this.nullBlock=!0)}[s](D,A){for(let H in D)D[H]!==null&&D[H]!==void 0&&!(A&&H==="path")&&(this[H]=D[H])}encode(D,A){if(D||(D=this.block=Buffer.alloc(512),A=0),A||(A=0),!(D.length>=A+512))throw new Error("need 512 bytes for header");let H=this.ctime||this.atime?130:155,W=u(this.path||"",H),q=W[0],I=W[1];this.needPax=W[2],this.needPax=M(D,A,100,q)||this.needPax,this.needPax=p(D,A+100,8,this.mode)||this.needPax,this.needPax=p(D,A+108,8,this.uid)||this.needPax,this.needPax=p(D,A+116,8,this.gid)||this.needPax,this.needPax=p(D,A+124,12,this.size)||this.needPax,this.needPax=B(D,A+136,12,this.mtime)||this.needPax,D[A+156]=this[o].charCodeAt(0),this.needPax=M(D,A+157,100,this.linkpath)||this.needPax,D.write("ustar\x0000",A+257,8),this.needPax=M(D,A+265,32,this.uname)||this.needPax,this.needPax=M(D,A+297,32,this.gname)||this.needPax,this.needPax=p(D,A+329,8,this.devmaj)||this.needPax,this.needPax=p(D,A+337,8,this.devmin)||this.needPax,this.needPax=M(D,A+345,H,I)||this.needPax,D[A+475]!==0?this.needPax=M(D,A+345,155,I)||this.needPax:(this.needPax=M(D,A+345,130,I)||this.needPax,this.needPax=B(D,A+476,12,this.atime)||this.needPax,this.needPax=B(D,A+488,12,this.ctime)||this.needPax);let U=8*32;for(let G=A;G<A+148;G++)U+=D[G];for(let G=A+156;G<A+512;G++)U+=D[G];return this.cksum=U,p(D,A+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(D){for(let A in D)D[A]!==null&&D[A]!==void 0&&(this[A]=D[A])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(D){r.code.has(D)?this[o]=r.code.get(D):this[o]=D}},u=(D,A)=>{let H=D,W="",q,I=i.parse(D).root||".";if(Buffer.byteLength(H)<100)q=[H,W,!1];else{W=i.dirname(H),H=i.basename(H);do Buffer.byteLength(H)<=100&&Buffer.byteLength(W)<=A?q=[H,W,!1]:Buffer.byteLength(H)>100&&Buffer.byteLength(W)<=A?q=[H.slice(0,100-1),W,!0]:(H=i.join(i.basename(W),H),W=i.dirname(W));while(W!==I&&!q);q||(q=[D.slice(0,100-1),"",!0])}return q},c=(D,A,H)=>D.slice(A,A+H).toString("utf8").replace(/\0.*/,""),l=(D,A,H)=>h(f(D,A,H)),h=D=>D===null?null:new Date(D*1e3),f=(D,A,H)=>D[A]&128?n.parse(D.slice(A,A+H)):m(D,A,H),d=D=>isNaN(D)?null:D,m=(D,A,H)=>d(parseInt(D.slice(A,A+H).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},p=(D,A,H,W)=>W===null?!1:W>y[H]||W<0?(n.encode(W,D.slice(A,A+H)),!0):(_(D,A,H,W),!1),_=(D,A,H,W)=>D.write(C(W,H),A,H,"ascii"),C=(D,A)=>L(Math.floor(D).toString(8),A),L=(D,A)=>(D.length===A-1?D:new Array(A-D.length-1).join("0")+D+" ")+"\0",B=(D,A,H,W)=>W===null?!1:p(D,A,H,W.getTime()/1e3),T=new Array(156).join("\0"),M=(D,A,H,W)=>W===null?!1:(D.write(W+T,A,H,"utf8"),W.length!==Buffer.byteLength(W)||W.length>H);e.exports=a}),_m=ce((t,e)=>{"use strict";te();var r=ro(),i=he("path"),n=class{constructor(u,c){this.atime=u.atime||null,this.charset=u.charset||null,this.comment=u.comment||null,this.ctime=u.ctime||null,this.gid=u.gid||null,this.gname=u.gname||null,this.linkpath=u.linkpath||null,this.mtime=u.mtime||null,this.path=u.path||null,this.size=u.size||null,this.uid=u.uid||null,this.uname=u.uname||null,this.dev=u.dev||null,this.ino=u.ino||null,this.nlink=u.nlink||null,this.global=c||!1}encode(){let u=this.encodeBody();if(u==="")return null;let c=Buffer.byteLength(u),l=512*Math.ceil(1+c/512),h=Buffer.allocUnsafe(l);for(let f=0;f<512;f++)h[f]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:c,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(h),h.write(u,512,c,"utf8");for(let f=c+512;f<h.length;f++)h[f]=0;return h}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(u){if(this[u]===null||this[u]===void 0)return"";let c=this[u]instanceof Date?this[u].getTime()/1e3:this[u],l=" "+(u==="dev"||u==="ino"||u==="nlink"?"SCHILY.":"")+u+"="+c+`
|
54
|
+
Downloading files${r?"":` for example ${vr.default.cyan(e)}`}. This might take a moment.`),qt(),h.start(),await(0,lm.default)(()=>um(o,e),{retries:3}))}catch(p){throw new Hn(C5(p)?p.message:String(p))}finally{h.stop()}let f=qn.default.join(o,"package.json"),d=(0,Un.existsSync)(f),m=[];if(d){let p;try{p=(0,Un.readJsonSync)(f)}catch{}p&&m.push(...Object.keys(p.scripts||{}))}let y=t;return qn.default.join(l,a)===t&&(y=a),{cdPath:y,hasPackageJson:d,availableScripts:m,repoInfo:n}}var gC=require("proxy-agent");var $n={name:"create-turbo",version:"1.12.2",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{chalk:"2.4.2",commander:"^10.0.0","fs-extra":"^11.1.1",inquirer:"^8.0.0","proxy-agent":"^6.2.2",rimraf:"^3.0.2",semver:"^7.3.8","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/fs-extra":"^9.0.13","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"^5.2.2"},files:["dist"]};var t1=oe(require("chalk")),r1=oe(require("update-check"));var T5=(0,r1.default)($n).catch(()=>null);async function fm(){try{let t=await T5;t!=null&&t.latest&&(fe.log(),fe.log(t1.default.yellow.bold("A new version of `create-turbo` is available!")),fe.log()),process.exit()}catch{}}var ao=oe(require("path")),He=oe(require("chalk"));var Zn=oe(require("chalk"),1),_1=oe(ca(),1),b1=oe(fa(),1),D1=oe(require("os"),1),A1=oe(sn(),1),f7=require("fs-extra");var g7=oe(Yo(),1),b7=require("fs-extra"),w7=require("fs-extra"),S7=require("chalk"),C1=require("stream"),R1=require("util"),C7=require("fs-extra"),O7=require("chalk"),P7=require("fs-extra"),Ri=oe(require("path"),1),Qe=require("fs-extra"),T1=oe(sn(),1),k1=oe(require("path"),1),O1=require("fs-extra"),F1=oe(require("chalk"),1),Dr=oe(require("path"),1),P1=oe(sn(),1),pt=require("fs-extra"),L1=oe(Yo(),1);var Xs=oe(require("path"),1),Zt=require("fs-extra"),Yn=oe(require("path"),1),Jt=require("fs-extra"),Qs=oe(require("path"),1),Xt=require("fs-extra"),dt=oe(require("chalk"),1),q1=oe(fa(),1),H1=oe(sn(),1),U1=oe(ca(),1),$1=require("semver"),G1=oe(require("chalk"),1),k5=Object.create,mm=Object.defineProperty,O5=Object.getOwnPropertyDescriptor,F5=Object.getOwnPropertyNames,P5=Object.getPrototypeOf,L5=Object.prototype.hasOwnProperty,he=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),B5=(t,e)=>()=>(t&&(e=t(t=0)),e),ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),I5=(t,e)=>{for(var r in e)mm(t,r,{get:e[r],enumerable:!0})},N5=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of F5(e))!L5.call(t,n)&&n!==r&&mm(t,n,{get:()=>e[n],enumerable:!(i=O5(e,n))||i.enumerable});return t},oc=(t,e,r)=>(r=t!=null?k5(P5(t)):{},N5(e||!t||!t.__esModule?mm(r,"default",{value:t,enumerable:!0}):r,t)),te=B5(()=>{}),M5=ce((t,e)=>{te();function r(i){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),j5=ce((t,e)=>{te();var r=M5().default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(v,R,$){v[R]=$.value},u=typeof Symbol=="function"?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(v,R,$){return Object.defineProperty(v,R,{value:$,enumerable:!0,configurable:!0,writable:!0}),v[R]}try{f({},"")}catch{f=function(v,R,$){return v[R]=$}}function d(v,R,$,J){var X=R&&R.prototype instanceof p?R:p,E=Object.create(X.prototype),w=new U(J||[]);return a(E,"_invoke",{value:H(v,$,w)}),E}function m(v,R,$){try{return{type:"normal",arg:v.call(R,$)}}catch(J){return{type:"throw",arg:J}}}n.wrap=d;var y={};function p(){}function _(){}function C(){}var L={};f(L,c,function(){return this});var B=Object.getPrototypeOf,T=B&&B(B(G([])));T&&T!==s&&o.call(T,c)&&(L=T);var M=C.prototype=p.prototype=Object.create(L);function D(v){["next","throw","return"].forEach(function(R){f(v,R,function($){return this._invoke(R,$)})})}function A(v,R){function $(X,E,w,S){var j=m(v[X],v,E);if(j.type!=="throw"){var F=j.arg,Y=F.value;return Y&&r(Y)=="object"&&o.call(Y,"__await")?R.resolve(Y.__await).then(function(z){$("next",z,w,S)},function(z){$("throw",z,w,S)}):R.resolve(Y).then(function(z){F.value=z,w(F)},function(z){return $("throw",z,w,S)})}S(j.arg)}var J;a(this,"_invoke",{value:function(X,E){function w(){return new R(function(S,j){$(X,E,S,j)})}return J=J?J.then(w,w):w()}})}function H(v,R,$){var J="suspendedStart";return function(X,E){if(J==="executing")throw new Error("Generator is already running");if(J==="completed"){if(X==="throw")throw E;return P()}for($.method=X,$.arg=E;;){var w=$.delegate;if(w){var S=W(w,$);if(S){if(S===y)continue;return S}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(J==="suspendedStart")throw J="completed",$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);J="executing";var j=m(v,R,$);if(j.type==="normal"){if(J=$.done?"completed":"suspendedYield",j.arg===y)continue;return{value:j.arg,done:$.done}}j.type==="throw"&&(J="completed",$.method="throw",$.arg=j.arg)}}}function W(v,R){var $=R.method,J=v.iterator[$];if(J===void 0)return R.delegate=null,$==="throw"&&v.iterator.return&&(R.method="return",R.arg=void 0,W(v,R),R.method==="throw")||$!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+$+"' method")),y;var X=m(J,v.iterator,R.arg);if(X.type==="throw")return R.method="throw",R.arg=X.arg,R.delegate=null,y;var E=X.arg;return E?E.done?(R[v.resultName]=E.value,R.next=v.nextLoc,R.method!=="return"&&(R.method="next",R.arg=void 0),R.delegate=null,y):E:(R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,y)}function q(v){var R={tryLoc:v[0]};1 in v&&(R.catchLoc=v[1]),2 in v&&(R.finallyLoc=v[2],R.afterLoc=v[3]),this.tryEntries.push(R)}function I(v){var R=v.completion||{};R.type="normal",delete R.arg,v.completion=R}function U(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(q,this),this.reset(!0)}function G(v){if(v){var R=v[c];if(R)return R.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var $=-1,J=function X(){for(;++$<v.length;)if(o.call(v,$))return X.value=v[$],X.done=!1,X;return X.value=void 0,X.done=!0,X};return J.next=J}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=C,a(M,"constructor",{value:C,configurable:!0}),a(C,"constructor",{value:_,configurable:!0}),_.displayName=f(C,h,"GeneratorFunction"),n.isGeneratorFunction=function(v){var R=typeof v=="function"&&v.constructor;return!!R&&(R===_||(R.displayName||R.name)==="GeneratorFunction")},n.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,C):(v.__proto__=C,f(v,h,"GeneratorFunction")),v.prototype=Object.create(M),v},n.awrap=function(v){return{__await:v}},D(A.prototype),f(A.prototype,l,function(){return this}),n.AsyncIterator=A,n.async=function(v,R,$,J,X){X===void 0&&(X=Promise);var E=new A(d(v,R,$,J),X);return n.isGeneratorFunction(R)?E:E.next().then(function(w){return w.done?w.value:E.next()})},D(M),f(M,h,"Generator"),f(M,c,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),n.keys=function(v){var R=Object(v),$=[];for(var J in R)$.push(J);return $.reverse(),function X(){for(;$.length;){var E=$.pop();if(E in R)return X.value=E,X.done=!1,X}return X.done=!0,X}},n.values=G,U.prototype={constructor:U,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!v)for(var R in this)R.charAt(0)==="t"&&o.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=void 0)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var R=this;function $(j,F){return E.type="throw",E.arg=v,R.next=j,F&&(R.method="next",R.arg=void 0),!!F}for(var J=this.tryEntries.length-1;J>=0;--J){var X=this.tryEntries[J],E=X.completion;if(X.tryLoc==="root")return $("end");if(X.tryLoc<=this.prev){var w=o.call(X,"catchLoc"),S=o.call(X,"finallyLoc");if(w&&S){if(this.prev<X.catchLoc)return $(X.catchLoc,!0);if(this.prev<X.finallyLoc)return $(X.finallyLoc)}else if(w){if(this.prev<X.catchLoc)return $(X.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return $(X.finallyLoc)}}}},abrupt:function(v,R){for(var $=this.tryEntries.length-1;$>=0;--$){var J=this.tryEntries[$];if(J.tryLoc<=this.prev&&o.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var X=J;break}}X&&(v==="break"||v==="continue")&&X.tryLoc<=R&&R<=X.finallyLoc&&(X=null);var E=X?X.completion:{};return E.type=v,E.arg=R,X?(this.method="next",this.next=X.finallyLoc,y):this.complete(E)},complete:function(v,R){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&R&&(this.next=R),y},finish:function(v){for(var R=this.tryEntries.length-1;R>=0;--R){var $=this.tryEntries[R];if($.finallyLoc===v)return this.complete($.completion,$.afterLoc),I($),y}},catch:function(v){for(var R=this.tryEntries.length-1;R>=0;--R){var $=this.tryEntries[R];if($.tryLoc===v){var J=$.completion;if(J.type==="throw"){var X=J.arg;I($)}return X}}throw new Error("illegal catch attempt")},delegateYield:function(v,R,$){return this.delegate={iterator:G(v),resultName:R,nextLoc:$},this.method==="next"&&(this.arg=void 0),y}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),q5=ce((t,e)=>{te();var r=j5()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),H5=ce((t,e)=>{"use strict";te();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),U5=ce((t,e)=>{"use strict";te();var r=H5(),i=n=>{if(!((Number.isInteger(n)||n===1/0)&&n>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let s=[],o=0,a=()=>{o--,s.length>0&&s.shift()()},u=(h,f,...d)=>{o++;let m=r(h,...d);f(m),m.then(a,a)},c=(h,f,...d)=>{o<n?u(h,f,...d):s.push(u.bind(null,h,f,...d))},l=(h,...f)=>new Promise(d=>c(h,d,...f));return Object.defineProperties(l,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),l};e.exports=i,e.exports.default=i}),$5=ce((t,e)=>{"use strict";te();var r=U5(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,u)=>u(await a),s=async a=>{let u=await Promise.all(a);if(u[1]===!0)throw new i(u[0]);return!1},o=async(a,u,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let l=r(c.concurrency),h=[...a].map(d=>[d,l(n,d,u)]),f=r(c.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>f(s,d)))}catch(d){if(d instanceof i)return d.value;throw d}};e.exports=o,e.exports.default=o}),G5=ce((t,e)=>{"use strict";te();var r=he("path"),i=he("fs"),{promisify:n}=he("util"),s=$5(),o=n(i.stat),a=n(i.lstat),u={directory:"isDirectory",file:"isFile"};function c({type:h}){if(!(h in u))throw new Error(`Invalid type specified: ${h}`)}var l=(h,f)=>h===void 0||f[u[h]]();e.exports=async(h,f)=>{f={cwd:process.cwd(),type:"file",allowSymlinks:!0,...f},c(f);let d=f.allowSymlinks?o:a;return s(h,async m=>{try{let y=await d(r.resolve(f.cwd,m));return l(f.type,y)}catch{return!1}},f)},e.exports.sync=(h,f)=>{f={cwd:process.cwd(),allowSymlinks:!0,type:"file",...f},c(f);let d=f.allowSymlinks?i.statSync:i.lstatSync;for(let m of h)try{let y=d(r.resolve(f.cwd,m));if(l(f.type,y))return m}catch{}}}),z5=ce((t,e)=>{"use strict";te();var r=he("fs"),{promisify:i}=he("util"),n=i(r.access);e.exports=async s=>{try{return await n(s),!0}catch{return!1}},e.exports.sync=s=>{try{return r.accessSync(s),!0}catch{return!1}}}),W5=ce((t,e)=>{"use strict";te();var r=he("path"),i=G5(),n=z5(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let u=r.resolve(a.cwd||""),{root:c}=r.parse(u),l=[].concat(o),h=async f=>{if(typeof o!="function")return i(l,f);let d=await o(f.cwd);return typeof d=="string"?i([d],f):d};for(;;){let f=await h({...a,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.sync=(o,a={})=>{let u=r.resolve(a.cwd||""),{root:c}=r.parse(u),l=[].concat(o),h=f=>{if(typeof o!="function")return i.sync(l,f);let d=o(f.cwd);return typeof d=="string"?i.sync([d],f):d};for(;;){let f=h({...a,cwd:u});if(f===s)return;if(f)return r.resolve(u,f);if(u===c)return;u=r.dirname(u)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),eo=ce((t,e)=>{"use strict";te();var r=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=i=>i?Object.keys(i).map(n=>[r.has(n)?r.get(n):n,i[n]]).reduce((n,s)=>(n[s[0]]=s[1],n),Object.create(null)):{}}),ym=ce((t,e)=>{"use strict";te();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=he("events"),n=he("stream"),s=he("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),c=Symbol("emittingEnd"),l=Symbol("emittedError"),h=Symbol("closed"),f=Symbol("read"),d=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),p=Symbol("decoder"),_=Symbol("flowing"),C=Symbol("paused"),L=Symbol("resume"),B=Symbol("buffer"),T=Symbol("pipes"),M=Symbol("bufferLength"),D=Symbol("bufferPush"),A=Symbol("bufferShift"),H=Symbol("objectMode"),W=Symbol("destroyed"),q=Symbol("emitData"),I=Symbol("emitEnd"),U=Symbol("emitEnd2"),G=Symbol("async"),P=j=>Promise.resolve().then(j),v=global._MP_NO_ITERATOR_SYMBOLS_!=="1",R=v&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),$=v&&Symbol.iterator||Symbol("iterator not implemented"),J=j=>j==="end"||j==="finish"||j==="prefinish",X=j=>j instanceof ArrayBuffer||typeof j=="object"&&j.constructor&&j.constructor.name==="ArrayBuffer"&&j.byteLength>=0,E=j=>!Buffer.isBuffer(j)&&ArrayBuffer.isView(j),w=class{constructor(j,F,Y){this.src=j,this.dest=F,this.opts=Y,this.ondrain=()=>j[L](),F.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},S=class extends w{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(j,F,Y){super(j,F,Y),this.proxyErrors=z=>F.emit("error",z),j.on("error",this.proxyErrors)}};e.exports=class s1 extends n{constructor(F){super(),this[_]=!1,this[C]=!1,this[T]=[],this[B]=[],this[H]=F&&F.objectMode||!1,this[H]?this[y]=null:this[y]=F&&F.encoding||null,this[y]==="buffer"&&(this[y]=null),this[G]=F&&!!F.async||!1,this[p]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[c]=!1,this[h]=!1,this[l]=null,this.writable=!0,this.readable=!0,this[M]=0,this[W]=!1,F&&F.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[B]}),F&&F.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]})}get bufferLength(){return this[M]}get encoding(){return this[y]}set encoding(F){if(this[H])throw new Error("cannot set encoding in objectMode");if(this[y]&&F!==this[y]&&(this[p]&&this[p].lastNeed||this[M]))throw new Error("cannot change encoding");this[y]!==F&&(this[p]=F?new s(F):null,this[B].length&&(this[B]=this[B].map(Y=>this[p].write(Y)))),this[y]=F}setEncoding(F){this.encoding=F}get objectMode(){return this[H]}set objectMode(F){this[H]=this[H]||!!F}get async(){return this[G]}set async(F){this[G]=this[G]||!!F}write(F,Y,z){if(this[o])throw new Error("write after end");if(this[W])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof Y=="function"&&(z=Y,Y="utf8"),Y||(Y="utf8");let ne=this[G]?P:Z=>Z();return!this[H]&&!Buffer.isBuffer(F)&&(E(F)?F=Buffer.from(F.buffer,F.byteOffset,F.byteLength):X(F)?F=Buffer.from(F):typeof F!="string"&&(this.objectMode=!0)),this[H]?(this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",F):this[D](F),this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing):F.length?(typeof F=="string"&&!(Y===this[y]&&!this[p].lastNeed)&&(F=Buffer.from(F,Y)),Buffer.isBuffer(F)&&this[y]&&(F=this[p].write(F)),this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",F):this[D](F),this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing):(this[M]!==0&&this.emit("readable"),z&&ne(z),this.flowing)}read(F){if(this[W])return null;if(this[M]===0||F===0||F>this[M])return this[a](),null;this[H]&&(F=null),this[B].length>1&&!this[H]&&(this.encoding?this[B]=[this[B].join("")]:this[B]=[Buffer.concat(this[B],this[M])]);let Y=this[f](F||null,this[B][0]);return this[a](),Y}[f](F,Y){return F===Y.length||F===null?this[A]():(this[B][0]=Y.slice(F),Y=Y.slice(0,F),this[M]-=F),this.emit("data",Y),!this[B].length&&!this[o]&&this.emit("drain"),Y}end(F,Y,z){return typeof F=="function"&&(z=F,F=null),typeof Y=="function"&&(z=Y,Y="utf8"),F&&this.write(F,Y),z&&this.once("end",z),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[L](){this[W]||(this[C]=!1,this[_]=!0,this.emit("resume"),this[B].length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[L]()}pause(){this[_]=!1,this[C]=!0}get destroyed(){return this[W]}get flowing(){return this[_]}get paused(){return this[C]}[D](F){this[H]?this[M]+=1:this[M]+=F.length,this[B].push(F)}[A](){return this[B].length&&(this[H]?this[M]-=1:this[M]-=this[B][0].length),this[B].shift()}[d](F){do;while(this[m](this[A]()));!F&&!this[B].length&&!this[o]&&this.emit("drain")}[m](F){return F?(this.emit("data",F),this.flowing):!1}pipe(F,Y){if(this[W])return;let z=this[u];return Y=Y||{},F===r.stdout||F===r.stderr?Y.end=!1:Y.end=Y.end!==!1,Y.proxyErrors=!!Y.proxyErrors,z?Y.end&&F.end():(this[T].push(Y.proxyErrors?new S(this,F,Y):new w(this,F,Y)),this[G]?P(()=>this[L]()):this[L]()),F}unpipe(F){let Y=this[T].find(z=>z.dest===F);Y&&(this[T].splice(this[T].indexOf(Y),1),Y.unpipe())}addListener(F,Y){return this.on(F,Y)}on(F,Y){let z=super.on(F,Y);return F==="data"&&!this[T].length&&!this.flowing?this[L]():F==="readable"&&this[M]!==0?super.emit("readable"):J(F)&&this[u]?(super.emit(F),this.removeAllListeners(F)):F==="error"&&this[l]&&(this[G]?P(()=>Y.call(this,this[l])):Y.call(this,this[l])),z}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[W]&&this[B].length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[c]=!1)}emit(F,Y,...z){if(F!=="error"&&F!=="close"&&F!==W&&this[W])return;if(F==="data")return Y?this[G]?P(()=>this[q](Y)):this[q](Y):!1;if(F==="end")return this[I]();if(F==="close"){if(this[h]=!0,!this[u]&&!this[W])return;let Z=super.emit("close");return this.removeAllListeners("close"),Z}else if(F==="error"){this[l]=Y;let Z=super.emit("error",Y);return this[a](),Z}else if(F==="resume"){let Z=super.emit("resume");return this[a](),Z}else if(F==="finish"||F==="prefinish"){let Z=super.emit(F);return this.removeAllListeners(F),Z}let ne=super.emit(F,Y,...z);return this[a](),ne}[q](F){for(let z of this[T])z.dest.write(F)===!1&&this.pause();let Y=super.emit("data",F);return this[a](),Y}[I](){this[u]||(this[u]=!0,this.readable=!1,this[G]?P(()=>this[U]()):this[U]())}[U](){if(this[p]){let Y=this[p].end();if(Y){for(let z of this[T])z.dest.write(Y);super.emit("data",Y)}}for(let Y of this[T])Y.end();let F=super.emit("end");return this.removeAllListeners("end"),F}collect(){let F=[];this[H]||(F.dataLength=0);let Y=this.promise();return this.on("data",z=>{F.push(z),this[H]||(F.dataLength+=z.length)}),Y.then(()=>F)}concat(){return this[H]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(F=>this[H]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?F.join(""):Buffer.concat(F,F.dataLength))}promise(){return new Promise((F,Y)=>{this.on(W,()=>Y(new Error("stream destroyed"))),this.on("error",z=>Y(z)),this.on("end",()=>F())})}[R](){return{next:()=>{let F=this.read();if(F!==null)return Promise.resolve({done:!1,value:F});if(this[o])return Promise.resolve({done:!0});let Y=null,z=null,ne=b=>{this.removeListener("data",Z),this.removeListener("end",ue),z(b)},Z=b=>{this.removeListener("error",ne),this.removeListener("end",ue),this.pause(),Y({value:b,done:!!this[o]})},ue=()=>{this.removeListener("error",ne),this.removeListener("data",Z),Y({done:!0})},Q=()=>ne(new Error("stream destroyed"));return new Promise((b,N)=>{z=N,Y=b,this.once(W,Q),this.once("error",ne),this.once("end",ue),this.once("data",Z)})}}}[$](){return{next:()=>{let F=this.read();return{value:F,done:F===null}}}}destroy(F){return this[W]?(F?this.emit("error",F):this.emit(W),this):(this[W]=!0,this[B].length=0,this[M]=0,typeof this.close=="function"&&!this[h]&&this.close(),F?this.emit("error",F):this.emit(W),this)}static isStream(F){return!!F&&(F instanceof s1||F instanceof n||F instanceof i&&(typeof F.pipe=="function"||typeof F.write=="function"&&typeof F.end=="function"))}}}),V5=ce((t,e)=>{te();var r=he("zlib").constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))}),o1=ce((t,e)=>{"use strict";te();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=he("events"),n=he("stream"),s=he("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),c=Symbol("emittingEnd"),l=Symbol("emittedError"),h=Symbol("closed"),f=Symbol("read"),d=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),p=Symbol("decoder"),_=Symbol("flowing"),C=Symbol("paused"),L=Symbol("resume"),B=Symbol("bufferLength"),T=Symbol("bufferPush"),M=Symbol("bufferShift"),D=Symbol("objectMode"),A=Symbol("destroyed"),H=Symbol("emitData"),W=Symbol("emitEnd"),q=Symbol("emitEnd2"),I=Symbol("async"),U=w=>Promise.resolve().then(w),G=global._MP_NO_ITERATOR_SYMBOLS_!=="1",P=G&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),v=G&&Symbol.iterator||Symbol("iterator not implemented"),R=w=>w==="end"||w==="finish"||w==="prefinish",$=w=>w instanceof ArrayBuffer||typeof w=="object"&&w.constructor&&w.constructor.name==="ArrayBuffer"&&w.byteLength>=0,J=w=>!Buffer.isBuffer(w)&&ArrayBuffer.isView(w),X=class{constructor(w,S,j){this.src=w,this.dest=S,this.opts=j,this.ondrain=()=>w[L](),S.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},E=class extends X{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(w,S,j){super(w,S,j),this.proxyErrors=F=>S.emit("error",F),w.on("error",this.proxyErrors)}};e.exports=class a1 extends n{constructor(S){super(),this[_]=!1,this[C]=!1,this.pipes=[],this.buffer=[],this[D]=S&&S.objectMode||!1,this[D]?this[y]=null:this[y]=S&&S.encoding||null,this[y]==="buffer"&&(this[y]=null),this[I]=S&&!!S.async||!1,this[p]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[c]=!1,this[h]=!1,this[l]=null,this.writable=!0,this.readable=!0,this[B]=0,this[A]=!1}get bufferLength(){return this[B]}get encoding(){return this[y]}set encoding(S){if(this[D])throw new Error("cannot set encoding in objectMode");if(this[y]&&S!==this[y]&&(this[p]&&this[p].lastNeed||this[B]))throw new Error("cannot change encoding");this[y]!==S&&(this[p]=S?new s(S):null,this.buffer.length&&(this.buffer=this.buffer.map(j=>this[p].write(j)))),this[y]=S}setEncoding(S){this.encoding=S}get objectMode(){return this[D]}set objectMode(S){this[D]=this[D]||!!S}get async(){return this[I]}set async(S){this[I]=this[I]||!!S}write(S,j,F){if(this[o])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof j=="function"&&(F=j,j="utf8"),j||(j="utf8");let Y=this[I]?U:z=>z();return!this[D]&&!Buffer.isBuffer(S)&&(J(S)?S=Buffer.from(S.buffer,S.byteOffset,S.byteLength):$(S)?S=Buffer.from(S):typeof S!="string"&&(this.objectMode=!0)),this[D]?(this.flowing&&this[B]!==0&&this[d](!0),this.flowing?this.emit("data",S):this[T](S),this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing):S.length?(typeof S=="string"&&!(j===this[y]&&!this[p].lastNeed)&&(S=Buffer.from(S,j)),Buffer.isBuffer(S)&&this[y]&&(S=this[p].write(S)),this.flowing&&this[B]!==0&&this[d](!0),this.flowing?this.emit("data",S):this[T](S),this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing):(this[B]!==0&&this.emit("readable"),F&&Y(F),this.flowing)}read(S){if(this[A])return null;if(this[B]===0||S===0||S>this[B])return this[a](),null;this[D]&&(S=null),this.buffer.length>1&&!this[D]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[B])]);let j=this[f](S||null,this.buffer[0]);return this[a](),j}[f](S,j){return S===j.length||S===null?this[M]():(this.buffer[0]=j.slice(S),j=j.slice(0,S),this[B]-=S),this.emit("data",j),!this.buffer.length&&!this[o]&&this.emit("drain"),j}end(S,j,F){return typeof S=="function"&&(F=S,S=null),typeof j=="function"&&(F=j,j="utf8"),S&&this.write(S,j),F&&this.once("end",F),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[L](){this[A]||(this[C]=!1,this[_]=!0,this.emit("resume"),this.buffer.length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[L]()}pause(){this[_]=!1,this[C]=!0}get destroyed(){return this[A]}get flowing(){return this[_]}get paused(){return this[C]}[T](S){this[D]?this[B]+=1:this[B]+=S.length,this.buffer.push(S)}[M](){return this.buffer.length&&(this[D]?this[B]-=1:this[B]-=this.buffer[0].length),this.buffer.shift()}[d](S){do;while(this[m](this[M]()));!S&&!this.buffer.length&&!this[o]&&this.emit("drain")}[m](S){return S?(this.emit("data",S),this.flowing):!1}pipe(S,j){if(this[A])return;let F=this[u];return j=j||{},S===r.stdout||S===r.stderr?j.end=!1:j.end=j.end!==!1,j.proxyErrors=!!j.proxyErrors,F?j.end&&S.end():(this.pipes.push(j.proxyErrors?new E(this,S,j):new X(this,S,j)),this[I]?U(()=>this[L]()):this[L]()),S}unpipe(S){let j=this.pipes.find(F=>F.dest===S);j&&(this.pipes.splice(this.pipes.indexOf(j),1),j.unpipe())}addListener(S,j){return this.on(S,j)}on(S,j){let F=super.on(S,j);return S==="data"&&!this.pipes.length&&!this.flowing?this[L]():S==="readable"&&this[B]!==0?super.emit("readable"):R(S)&&this[u]?(super.emit(S),this.removeAllListeners(S)):S==="error"&&this[l]&&(this[I]?U(()=>j.call(this,this[l])):j.call(this,this[l])),F}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[A]&&this.buffer.length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[c]=!1)}emit(S,j,...F){if(S!=="error"&&S!=="close"&&S!==A&&this[A])return;if(S==="data")return j?this[I]?U(()=>this[H](j)):this[H](j):!1;if(S==="end")return this[W]();if(S==="close"){if(this[h]=!0,!this[u]&&!this[A])return;let z=super.emit("close");return this.removeAllListeners("close"),z}else if(S==="error"){this[l]=j;let z=super.emit("error",j);return this[a](),z}else if(S==="resume"){let z=super.emit("resume");return this[a](),z}else if(S==="finish"||S==="prefinish"){let z=super.emit(S);return this.removeAllListeners(S),z}let Y=super.emit(S,j,...F);return this[a](),Y}[H](S){for(let F of this.pipes)F.dest.write(S)===!1&&this.pause();let j=super.emit("data",S);return this[a](),j}[W](){this[u]||(this[u]=!0,this.readable=!1,this[I]?U(()=>this[q]()):this[q]())}[q](){if(this[p]){let j=this[p].end();if(j){for(let F of this.pipes)F.dest.write(j);super.emit("data",j)}}for(let j of this.pipes)j.end();let S=super.emit("end");return this.removeAllListeners("end"),S}collect(){let S=[];this[D]||(S.dataLength=0);let j=this.promise();return this.on("data",F=>{S.push(F),this[D]||(S.dataLength+=F.length)}),j.then(()=>S)}concat(){return this[D]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(S=>this[D]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?S.join(""):Buffer.concat(S,S.dataLength))}promise(){return new Promise((S,j)=>{this.on(A,()=>j(new Error("stream destroyed"))),this.on("error",F=>j(F)),this.on("end",()=>S())})}[P](){return{next:()=>{let S=this.read();if(S!==null)return Promise.resolve({done:!1,value:S});if(this[o])return Promise.resolve({done:!0});let j=null,F=null,Y=ue=>{this.removeListener("data",z),this.removeListener("end",ne),F(ue)},z=ue=>{this.removeListener("error",Y),this.removeListener("end",ne),this.pause(),j({value:ue,done:!!this[o]})},ne=()=>{this.removeListener("error",Y),this.removeListener("data",z),j({done:!0})},Z=()=>Y(new Error("stream destroyed"));return new Promise((ue,Q)=>{F=Q,j=ue,this.once(A,Z),this.once("error",Y),this.once("end",ne),this.once("data",z)})}}}[v](){return{next:()=>{let S=this.read();return{value:S,done:S===null}}}}destroy(S){return this[A]?(S?this.emit("error",S):this.emit(A),this):(this[A]=!0,this.buffer.length=0,this[B]=0,typeof this.close=="function"&&!this[h]&&this.close(),S?this.emit("error",S):this.emit(A),this)}static isStream(S){return!!S&&(S instanceof a1||S instanceof n||S instanceof i&&(typeof S.pipe=="function"||typeof S.write=="function"&&typeof S.end=="function"))}}}),u1=ce(t=>{"use strict";te();var e=he("assert"),r=he("buffer").Buffer,i=he("zlib"),n=t.constants=V5(),s=o1(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(R){super("zlib: "+R.message),this.code=R.code,this.errno=R.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+R.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},c=Symbol("opts"),l=Symbol("flushFlag"),h=Symbol("finishFlushFlag"),f=Symbol("fullFlushFlag"),d=Symbol("handle"),m=Symbol("onError"),y=Symbol("sawError"),p=Symbol("level"),_=Symbol("strategy"),C=Symbol("ended"),L=Symbol("_defaultFullFlush"),B=class extends s{constructor(R,$){if(!R||typeof R!="object")throw new TypeError("invalid options for ZlibBase constructor");super(R),this[y]=!1,this[C]=!1,this[c]=R,this[l]=R.flush,this[h]=R.finishFlush;try{this[d]=new i[$](R)}catch(J){throw new u(J)}this[m]=J=>{this[y]||(this[y]=!0,this.close(),this.emit("error",J))},this[d].on("error",J=>this[m](new u(J))),this.once("end",()=>this.close)}close(){this[d]&&(this[d].close(),this[d]=null,this.emit("close"))}reset(){if(!this[y])return e(this[d],"zlib binding closed"),this[d].reset()}flush(R){this.ended||(typeof R!="number"&&(R=this[f]),this.write(Object.assign(r.alloc(0),{[l]:R})))}end(R,$,J){return R&&this.write(R,$),this.flush(this[h]),this[C]=!0,super.end(null,null,J)}get ended(){return this[C]}write(R,$,J){if(typeof $=="function"&&(J=$,$="utf8"),typeof R=="string"&&(R=r.from(R,$)),this[y])return;e(this[d],"zlib binding closed");let X=this[d]._handle,E=X.close;X.close=()=>{};let w=this[d].close;this[d].close=()=>{},r.concat=F=>F;let S;try{let F=typeof R[l]=="number"?R[l]:this[l];S=this[d]._processChunk(R,F),r.concat=o}catch(F){r.concat=o,this[m](new u(F))}finally{this[d]&&(this[d]._handle=X,X.close=E,this[d].close=w,this[d].removeAllListeners("error"))}this[d]&&this[d].on("error",F=>this[m](new u(F)));let j;if(S)if(Array.isArray(S)&&S.length>0){j=this[a](r.from(S[0]));for(let F=1;F<S.length;F++)j=this[a](S[F])}else j=this[a](r.from(S));return J&&J(),j}[a](R){return super.write(R)}},T=class extends B{constructor(R,$){R=R||{},R.flush=R.flush||n.Z_NO_FLUSH,R.finishFlush=R.finishFlush||n.Z_FINISH,super(R,$),this[f]=n.Z_FULL_FLUSH,this[p]=R.level,this[_]=R.strategy}params(R,$){if(!this[y]){if(!this[d])throw new Error("cannot switch params when binding is closed");if(!this[d].params)throw new Error("not supported in this implementation");if(this[p]!==R||this[_]!==$){this.flush(n.Z_SYNC_FLUSH),e(this[d],"zlib binding closed");let J=this[d].flush;this[d].flush=(X,E)=>{this.flush(X),E()};try{this[d].params(R,$)}finally{this[d].flush=J}this[d]&&(this[p]=R,this[_]=$)}}}},M=class extends T{constructor(R){super(R,"Deflate")}},D=class extends T{constructor(R){super(R,"Inflate")}},A=Symbol("_portable"),H=class extends T{constructor(R){super(R,"Gzip"),this[A]=R&&!!R.portable}[a](R){return this[A]?(this[A]=!1,R[9]=255,super[a](R)):super[a](R)}},W=class extends T{constructor(R){super(R,"Gunzip")}},q=class extends T{constructor(R){super(R,"DeflateRaw")}},I=class extends T{constructor(R){super(R,"InflateRaw")}},U=class extends T{constructor(R){super(R,"Unzip")}},G=class extends B{constructor(R,$){R=R||{},R.flush=R.flush||n.BROTLI_OPERATION_PROCESS,R.finishFlush=R.finishFlush||n.BROTLI_OPERATION_FINISH,super(R,$),this[f]=n.BROTLI_OPERATION_FLUSH}},P=class extends G{constructor(R){super(R,"BrotliCompress")}},v=class extends G{constructor(R){super(R,"BrotliDecompress")}};t.Deflate=M,t.Inflate=D,t.Gzip=H,t.Gunzip=W,t.DeflateRaw=q,t.InflateRaw=I,t.Unzip=U,typeof i.BrotliCompress=="function"?(t.BrotliCompress=P,t.BrotliDecompress=v):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),to=ce((t,e)=>{te();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),gm=ce((t,e)=>{"use strict";te();var r=ym(),i=to(),n=Symbol("slurp");e.exports=class extends r{constructor(s,o,a){switch(super(),this.pause(),this.extended=o,this.globalExtended=a,this.header=s,this.startBlockSize=512*Math.ceil(s.size/512),this.blockRemain=this.startBlockSize,this.remain=s.size,this.type=s.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(s.path),this.mode=s.mode,this.mode&&(this.mode=this.mode&4095),this.uid=s.uid,this.gid=s.gid,this.uname=s.uname,this.gname=s.gname,this.size=s.size,this.mtime=s.mtime,this.atime=s.atime,this.ctime=s.ctime,this.linkpath=i(s.linkpath),this.uname=s.uname,this.gname=s.gname,o&&this[n](o),a&&this[n](a,!0)}write(s){let o=s.length;if(o>this.blockRemain)throw new Error("writing more to entry than is appropriate");let a=this.remain,u=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,u-o),this.ignore?!0:a>=o?super.write(s):super.write(s.slice(0,a))}[n](s,o){for(let a in s)s[a]!==null&&s[a]!==void 0&&!(o&&a==="path")&&(this[a]=a==="path"||a==="linkpath"?i(s[a]):s[a])}}}),c1=ce(t=>{"use strict";te(),t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))}),Y5=ce((t,e)=>{"use strict";te();var r=(l,h)=>{if(Number.isSafeInteger(l))l<0?n(l,h):i(l,h);else throw Error("cannot encode number outside of javascript safe integer range");return h},i=(l,h)=>{h[0]=128;for(var f=h.length;f>1;f--)h[f-1]=l&255,l=Math.floor(l/256)},n=(l,h)=>{h[0]=255;var f=!1;l=l*-1;for(var d=h.length;d>1;d--){var m=l&255;l=Math.floor(l/256),f?h[d-1]=u(m):m===0?h[d-1]=0:(f=!0,h[d-1]=c(m))}},s=l=>{let h=l[0],f=h===128?a(l.slice(1,l.length)):h===255?o(l):null;if(f===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(f))throw Error("parsed number outside of javascript safe integer range");return f},o=l=>{for(var h=l.length,f=0,d=!1,m=h-1;m>-1;m--){var y=l[m],p;d?p=u(y):y===0?p=y:(d=!0,p=c(y)),p!==0&&(f-=p*Math.pow(256,h-m-1))}return f},a=l=>{for(var h=l.length,f=0,d=h-1;d>-1;d--){var m=l[d];m!==0&&(f+=m*Math.pow(256,h-d-1))}return f},u=l=>(255^l)&255,c=l=>(255^l)+1&255;e.exports={encode:r,parse:s}}),ro=ce((t,e)=>{"use strict";te();var r=c1(),i=he("path").posix,n=Y5(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(D,A,H,W){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[o]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(D)?this.decode(D,A||0,H,W):D&&this.set(D)}decode(D,A,H,W){if(A||(A=0),!D||!(D.length>=A+512))throw new Error("need 512 bytes for header");if(this.path=c(D,A,100),this.mode=f(D,A+100,8),this.uid=f(D,A+108,8),this.gid=f(D,A+116,8),this.size=f(D,A+124,12),this.mtime=l(D,A+136,12),this.cksum=f(D,A+148,12),this[s](H),this[s](W,!0),this[o]=c(D,A+156,1),this[o]===""&&(this[o]="0"),this[o]==="0"&&this.path.slice(-1)==="/"&&(this[o]="5"),this[o]==="5"&&(this.size=0),this.linkpath=c(D,A+157,100),D.slice(A+257,A+265).toString()==="ustar\x0000")if(this.uname=c(D,A+265,32),this.gname=c(D,A+297,32),this.devmaj=f(D,A+329,8),this.devmin=f(D,A+337,8),D[A+475]!==0){let I=c(D,A+345,155);this.path=I+"/"+this.path}else{let I=c(D,A+345,130);I&&(this.path=I+"/"+this.path),this.atime=l(D,A+476,12),this.ctime=l(D,A+488,12)}let q=8*32;for(let I=A;I<A+148;I++)q+=D[I];for(let I=A+156;I<A+512;I++)q+=D[I];this.cksumValid=q===this.cksum,this.cksum===null&&q===8*32&&(this.nullBlock=!0)}[s](D,A){for(let H in D)D[H]!==null&&D[H]!==void 0&&!(A&&H==="path")&&(this[H]=D[H])}encode(D,A){if(D||(D=this.block=Buffer.alloc(512),A=0),A||(A=0),!(D.length>=A+512))throw new Error("need 512 bytes for header");let H=this.ctime||this.atime?130:155,W=u(this.path||"",H),q=W[0],I=W[1];this.needPax=W[2],this.needPax=M(D,A,100,q)||this.needPax,this.needPax=p(D,A+100,8,this.mode)||this.needPax,this.needPax=p(D,A+108,8,this.uid)||this.needPax,this.needPax=p(D,A+116,8,this.gid)||this.needPax,this.needPax=p(D,A+124,12,this.size)||this.needPax,this.needPax=B(D,A+136,12,this.mtime)||this.needPax,D[A+156]=this[o].charCodeAt(0),this.needPax=M(D,A+157,100,this.linkpath)||this.needPax,D.write("ustar\x0000",A+257,8),this.needPax=M(D,A+265,32,this.uname)||this.needPax,this.needPax=M(D,A+297,32,this.gname)||this.needPax,this.needPax=p(D,A+329,8,this.devmaj)||this.needPax,this.needPax=p(D,A+337,8,this.devmin)||this.needPax,this.needPax=M(D,A+345,H,I)||this.needPax,D[A+475]!==0?this.needPax=M(D,A+345,155,I)||this.needPax:(this.needPax=M(D,A+345,130,I)||this.needPax,this.needPax=B(D,A+476,12,this.atime)||this.needPax,this.needPax=B(D,A+488,12,this.ctime)||this.needPax);let U=8*32;for(let G=A;G<A+148;G++)U+=D[G];for(let G=A+156;G<A+512;G++)U+=D[G];return this.cksum=U,p(D,A+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(D){for(let A in D)D[A]!==null&&D[A]!==void 0&&(this[A]=D[A])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(D){r.code.has(D)?this[o]=r.code.get(D):this[o]=D}},u=(D,A)=>{let H=D,W="",q,I=i.parse(D).root||".";if(Buffer.byteLength(H)<100)q=[H,W,!1];else{W=i.dirname(H),H=i.basename(H);do Buffer.byteLength(H)<=100&&Buffer.byteLength(W)<=A?q=[H,W,!1]:Buffer.byteLength(H)>100&&Buffer.byteLength(W)<=A?q=[H.slice(0,100-1),W,!0]:(H=i.join(i.basename(W),H),W=i.dirname(W));while(W!==I&&!q);q||(q=[D.slice(0,100-1),"",!0])}return q},c=(D,A,H)=>D.slice(A,A+H).toString("utf8").replace(/\0.*/,""),l=(D,A,H)=>h(f(D,A,H)),h=D=>D===null?null:new Date(D*1e3),f=(D,A,H)=>D[A]&128?n.parse(D.slice(A,A+H)):m(D,A,H),d=D=>isNaN(D)?null:D,m=(D,A,H)=>d(parseInt(D.slice(A,A+H).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},p=(D,A,H,W)=>W===null?!1:W>y[H]||W<0?(n.encode(W,D.slice(A,A+H)),!0):(_(D,A,H,W),!1),_=(D,A,H,W)=>D.write(C(W,H),A,H,"ascii"),C=(D,A)=>L(Math.floor(D).toString(8),A),L=(D,A)=>(D.length===A-1?D:new Array(A-D.length-1).join("0")+D+" ")+"\0",B=(D,A,H,W)=>W===null?!1:p(D,A,H,W.getTime()/1e3),T=new Array(156).join("\0"),M=(D,A,H,W)=>W===null?!1:(D.write(W+T,A,H,"utf8"),W.length!==Buffer.byteLength(W)||W.length>H);e.exports=a}),_m=ce((t,e)=>{"use strict";te();var r=ro(),i=he("path"),n=class{constructor(u,c){this.atime=u.atime||null,this.charset=u.charset||null,this.comment=u.comment||null,this.ctime=u.ctime||null,this.gid=u.gid||null,this.gname=u.gname||null,this.linkpath=u.linkpath||null,this.mtime=u.mtime||null,this.path=u.path||null,this.size=u.size||null,this.uid=u.uid||null,this.uname=u.uname||null,this.dev=u.dev||null,this.ino=u.ino||null,this.nlink=u.nlink||null,this.global=c||!1}encode(){let u=this.encodeBody();if(u==="")return null;let c=Buffer.byteLength(u),l=512*Math.ceil(1+c/512),h=Buffer.allocUnsafe(l);for(let f=0;f<512;f++)h[f]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:c,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(h),h.write(u,512,c,"utf8");for(let f=c+512;f<h.length;f++)h[f]=0;return h}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(u){if(this[u]===null||this[u]===void 0)return"";let c=this[u]instanceof Date?this[u].getTime()/1e3:this[u],l=" "+(u==="dev"||u==="ino"||u==="nlink"?"SCHILY.":"")+u+"="+c+`
|
55
55
|
`,h=Buffer.byteLength(l),f=Math.floor(Math.log(h)/Math.log(10))+1;return h+f>=Math.pow(10,f)&&(f+=1),f+h+l}};n.parse=(u,c,l)=>new n(s(o(u),c),l);var s=(u,c)=>c?Object.keys(u).reduce((l,h)=>(l[h]=u[h],l),c):u,o=u=>u.replace(/\n$/,"").split(`
|
56
56
|
`).reduce(a,Object.create(null)),a=(u,c)=>{let l=parseInt(c,10);if(l!==Buffer.byteLength(c)+1)return u;c=c.slice((l+" ").length);let h=c.split("="),f=h.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!f)return u;let d=h.join("=");return u[f]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(f)?new Date(d*1e3):/^[0-9]+$/.test(d)?+d:d,u};e.exports=n}),io=ce((t,e)=>{te(),e.exports=r=>{let i=r.length-1,n=-1;for(;i>-1&&r.charAt(i)==="/";)n=i,i--;return n===-1?r:r.slice(0,n)}}),bm=ce((t,e)=>{"use strict";te(),e.exports=r=>class extends r{warn(i,n,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=n instanceof Error&&n.code||i,s.tarCode=i,!this.strict&&s.recoverable!==!1?(n instanceof Error&&(s=Object.assign(n,s),n=n.message),this.emit("warn",s.tarCode,n,s)):n instanceof Error?this.emit("error",Object.assign(n,s)):this.emit("error",Object.assign(new Error(`${i}: ${n}`),s))}}}),l1=ce((t,e)=>{"use strict";te();var r=["|","<",">","?",":"],i=r.map(o=>String.fromCharCode(61440+o.charCodeAt(0))),n=new Map(r.map((o,a)=>[o,i[a]])),s=new Map(i.map((o,a)=>[o,r[a]]));e.exports={encode:o=>r.reduce((a,u)=>a.split(u).join(n.get(u)),o),decode:o=>i.reduce((a,u)=>a.split(u).join(s.get(u)),o)}}),h1=ce((t,e)=>{te();var{isAbsolute:r,parse:i}=he("path").win32;e.exports=n=>{let s="",o=i(n);for(;r(n)||o.root;){let a=n.charAt(0)==="/"&&n.slice(0,4)!=="//?/"?"/":o.root;n=n.slice(a.length),s+=a,o=i(n)}return[s,n]}}),K5=ce((t,e)=>{"use strict";te(),e.exports=(r,i,n)=>(r&=4095,n&&(r=(r|384)&-19),i&&(r&256&&(r|=64),r&32&&(r|=8),r&4&&(r|=1)),r)}),f1=ce((t,e)=>{"use strict";te();var r=ym(),i=_m(),n=ro(),s=he("fs"),o=he("path"),a=to(),u=io(),c=(w,S)=>S?(w=a(w).replace(/^\.(\/|$)/,""),u(S)+"/"+w):a(w),l=16*1024*1024,h=Symbol("process"),f=Symbol("file"),d=Symbol("directory"),m=Symbol("symlink"),y=Symbol("hardlink"),p=Symbol("header"),_=Symbol("read"),C=Symbol("lstat"),L=Symbol("onlstat"),B=Symbol("onread"),T=Symbol("onreadlink"),M=Symbol("openfile"),D=Symbol("onopenfile"),A=Symbol("close"),H=Symbol("mode"),W=Symbol("awaitDrain"),q=Symbol("ondrain"),I=Symbol("prefix"),U=Symbol("hadError"),G=bm(),P=l1(),v=h1(),R=K5(),$=G(class extends r{constructor(w,S){if(S=S||{},super(S),typeof w!="string")throw new TypeError("path is required");this.path=a(w),this.portable=!!S.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=S.maxReadSize||l,this.linkCache=S.linkCache||new Map,this.statCache=S.statCache||new Map,this.preservePaths=!!S.preservePaths,this.cwd=a(S.cwd||process.cwd()),this.strict=!!S.strict,this.noPax=!!S.noPax,this.noMtime=!!S.noMtime,this.mtime=S.mtime||null,this.prefix=S.prefix?a(S.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof S.onwarn=="function"&&this.on("warn",S.onwarn);let j=!1;if(!this.preservePaths){let[F,Y]=v(this.path);F&&(this.path=Y,j=F)}this.win32=!!S.win32||process.platform==="win32",this.win32&&(this.path=P.decode(this.path.replace(/\\/g,"/")),w=w.replace(/\\/g,"/")),this.absolute=a(S.absolute||o.resolve(this.cwd,w)),this.path===""&&(this.path="./"),j&&this.warn("TAR_ENTRY_INFO",`stripping ${j} from absolute path`,{entry:this,path:j+this.path}),this.statCache.has(this.absolute)?this[L](this.statCache.get(this.absolute)):this[C]()}emit(w,...S){return w==="error"&&(this[U]=!0),super.emit(w,...S)}[C](){s.lstat(this.absolute,(w,S)=>{if(w)return this.emit("error",w);this[L](S)})}[L](w){this.statCache.set(this.absolute,w),this.stat=w,w.isFile()||(w.size=0),this.type=E(w),this.emit("stat",w),this[h]()}[h](){switch(this.type){case"File":return this[f]();case"Directory":return this[d]();case"SymbolicLink":return this[m]();default:return this.end()}}[H](w){return R(w,this.type==="Directory",this.portable)}[I](w){return c(w,this.prefix)}[p](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new n({path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,mode:this[H](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[d](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[p](),this.end()}[m](){s.readlink(this.absolute,(w,S)=>{if(w)return this.emit("error",w);this[T](S)})}[T](w){this.linkpath=a(w),this[p](),this.end()}[y](w){this.type="Link",this.linkpath=a(o.relative(this.cwd,w)),this.stat.size=0,this[p](),this.end()}[f](){if(this.stat.nlink>1){let w=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(w)){let S=this.linkCache.get(w);if(S.indexOf(this.cwd)===0)return this[y](S)}this.linkCache.set(w,this.absolute)}if(this[p](),this.stat.size===0)return this.end();this[M]()}[M](){s.open(this.absolute,"r",(w,S)=>{if(w)return this.emit("error",w);this[D](S)})}[D](w){if(this.fd=w,this[U])return this[A]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let S=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(S),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[_]()}[_](){let{fd:w,buf:S,offset:j,length:F,pos:Y}=this;s.read(w,S,j,F,Y,(z,ne)=>{if(z)return this[A](()=>this.emit("error",z));this[B](ne)})}[A](w){s.close(this.fd,w)}[B](w){if(w<=0&&this.remain>0){let j=new Error("encountered unexpected EOF");return j.path=this.absolute,j.syscall="read",j.code="EOF",this[A](()=>this.emit("error",j))}if(w>this.remain){let j=new Error("did not encounter expected EOF");return j.path=this.absolute,j.syscall="read",j.code="EOF",this[A](()=>this.emit("error",j))}if(w===this.remain)for(let j=w;j<this.length&&w<this.blockRemain;j++)this.buf[j+this.offset]=0,w++,this.remain++;let S=this.offset===0&&w===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+w);this.write(S)?this[q]():this[W](()=>this[q]())}[W](w){this.once("drain",w)}write(w){if(this.blockRemain<w.length){let S=new Error("writing more data than expected");return S.path=this.absolute,this.emit("error",S)}return this.remain-=w.length,this.blockRemain-=w.length,this.pos+=w.length,this.offset+=w.length,super.write(w)}[q](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[A](w=>w?this.emit("error",w):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[_]()}}),J=class extends ${[C](){this[L](s.lstatSync(this.absolute))}[m](){this[T](s.readlinkSync(this.absolute))}[M](){this[D](s.openSync(this.absolute,"r"))}[_](){let w=!0;try{let{fd:S,buf:j,offset:F,length:Y,pos:z}=this,ne=s.readSync(S,j,F,Y,z);this[B](ne),w=!1}finally{if(w)try{this[A](()=>{})}catch{}}}[W](w){w()}[A](w){s.closeSync(this.fd),w()}},X=G(class extends r{constructor(w,S){S=S||{},super(S),this.preservePaths=!!S.preservePaths,this.portable=!!S.portable,this.strict=!!S.strict,this.noPax=!!S.noPax,this.noMtime=!!S.noMtime,this.readEntry=w,this.type=w.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=S.prefix||null,this.path=a(w.path),this.mode=this[H](w.mode),this.uid=this.portable?null:w.uid,this.gid=this.portable?null:w.gid,this.uname=this.portable?null:w.uname,this.gname=this.portable?null:w.gname,this.size=w.size,this.mtime=this.noMtime?null:S.mtime||w.mtime,this.atime=this.portable?null:w.atime,this.ctime=this.portable?null:w.ctime,this.linkpath=a(w.linkpath),typeof S.onwarn=="function"&&this.on("warn",S.onwarn);let j=!1;if(!this.preservePaths){let[F,Y]=v(this.path);F&&(this.path=Y,j=F)}this.remain=w.size,this.blockRemain=w.startBlockSize,this.header=new n({path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),j&&this.warn("TAR_ENTRY_INFO",`stripping ${j} from absolute path`,{entry:this,path:j+this.path}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),w.pipe(this)}[I](w){return c(w,this.prefix)}[H](w){return R(w,this.type==="Directory",this.portable)}write(w){let S=w.length;if(S>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=S,super.write(w)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});$.Sync=J,$.Tar=X;var E=w=>w.isFile()?"File":w.isDirectory()?"Directory":w.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=$}),Z5=ce((t,e)=>{"use strict";te(),e.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}}),d1=ce((t,e)=>{"use strict";te(),e.exports=r,r.Node=o,r.create=r;function r(a){var u=this;if(u instanceof r||(u=new r),u.tail=null,u.head=null,u.length=0,a&&typeof a.forEach=="function")a.forEach(function(h){u.push(h)});else if(arguments.length>0)for(var c=0,l=arguments.length;c<l;c++)u.push(arguments[c]);return u}r.prototype.removeNode=function(a){if(a.list!==this)throw new Error("removing node which does not belong to this list");var u=a.next,c=a.prev;return u&&(u.prev=c),c&&(c.next=u),a===this.head&&(this.head=u),a===this.tail&&(this.tail=c),a.list.length--,a.next=null,a.prev=null,a.list=null,u},r.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var u=this.head;a.list=this,a.next=u,u&&(u.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},r.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var u=this.tail;a.list=this,a.prev=u,u&&(u.next=a),this.tail=a,this.head||(this.head=a),this.length++}},r.prototype.push=function(){for(var a=0,u=arguments.length;a<u;a++)n(this,arguments[a]);return this.length},r.prototype.unshift=function(){for(var a=0,u=arguments.length;a<u;a++)s(this,arguments[a]);return this.length},r.prototype.pop=function(){if(this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},r.prototype.shift=function(){if(this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},r.prototype.forEach=function(a,u){u=u||this;for(var c=this.head,l=0;c!==null;l++)a.call(u,c.value,l,this),c=c.next},r.prototype.forEachReverse=function(a,u){u=u||this;for(var c=this.tail,l=this.length-1;c!==null;l--)a.call(u,c.value,l,this),c=c.prev},r.prototype.get=function(a){for(var u=0,c=this.head;c!==null&&u<a;u++)c=c.next;if(u===a&&c!==null)return c.value},r.prototype.getReverse=function(a){for(var u=0,c=this.tail;c!==null&&u<a;u++)c=c.prev;if(u===a&&c!==null)return c.value},r.prototype.map=function(a,u){u=u||this;for(var c=new r,l=this.head;l!==null;)c.push(a.call(u,l.value,this)),l=l.next;return c},r.prototype.mapReverse=function(a,u){u=u||this;for(var c=new r,l=this.tail;l!==null;)c.push(a.call(u,l.value,this)),l=l.prev;return c},r.prototype.reduce=function(a,u){var c,l=this.head;if(arguments.length>1)c=u;else if(this.head)l=this.head.next,c=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var h=0;l!==null;h++)c=a(c,l.value,h),l=l.next;return c},r.prototype.reduceReverse=function(a,u){var c,l=this.tail;if(arguments.length>1)c=u;else if(this.tail)l=this.tail.prev,c=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var h=this.length-1;l!==null;h--)c=a(c,l.value,h),l=l.prev;return c},r.prototype.toArray=function(){for(var a=new Array(this.length),u=0,c=this.head;c!==null;u++)a[u]=c.value,c=c.next;return a},r.prototype.toArrayReverse=function(){for(var a=new Array(this.length),u=0,c=this.tail;c!==null;u++)a[u]=c.value,c=c.prev;return a},r.prototype.slice=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var c=new r;if(u<a||u<0)return c;a<0&&(a=0),u>this.length&&(u=this.length);for(var l=0,h=this.head;h!==null&&l<a;l++)h=h.next;for(;h!==null&&l<u;l++,h=h.next)c.push(h.value);return c},r.prototype.sliceReverse=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var c=new r;if(u<a||u<0)return c;a<0&&(a=0),u>this.length&&(u=this.length);for(var l=this.length,h=this.tail;h!==null&&l>u;l--)h=h.prev;for(;h!==null&&l>a;l--,h=h.prev)c.push(h.value);return c},r.prototype.splice=function(a,u,...c){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var l=0,h=this.head;h!==null&&l<a;l++)h=h.next;for(var f=[],l=0;h&&l<u;l++)f.push(h.value),h=this.removeNode(h);h===null&&(h=this.tail),h!==this.head&&h!==this.tail&&(h=h.prev);for(var l=0;l<c.length;l++)h=i(this,h,c[l]);return f},r.prototype.reverse=function(){for(var a=this.head,u=this.tail,c=a;c!==null;c=c.prev){var l=c.prev;c.prev=c.next,c.next=l}return this.head=u,this.tail=a,this};function i(a,u,c){var l=u===a.head?new o(c,null,u,a):new o(c,u,u.next,a);return l.next===null&&(a.tail=l),l.prev===null&&(a.head=l),a.length++,l}function n(a,u){a.tail=new o(u,a.tail,null,a),a.head||(a.head=a.tail),a.length++}function s(a,u){a.head=new o(u,null,a.head,a),a.tail||(a.tail=a.head),a.length++}function o(a,u,c,l){if(!(this instanceof o))return new o(a,u,c,l);this.list=l,this.value=a,u?(u.next=this,this.prev=u):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}try{Z5()(r)}catch{}}),Em=ce((t,e)=>{"use strict";te();var r=class{constructor(E,w){this.path=E||"./",this.absolute=w,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},i=ym(),n=u1(),s=gm(),o=f1(),a=o.Sync,u=o.Tar,c=d1(),l=Buffer.alloc(1024),h=Symbol("onStat"),f=Symbol("ended"),d=Symbol("queue"),m=Symbol("current"),y=Symbol("process"),p=Symbol("processing"),_=Symbol("processJob"),C=Symbol("jobs"),L=Symbol("jobDone"),B=Symbol("addFSEntry"),T=Symbol("addTarEntry"),M=Symbol("stat"),D=Symbol("readdir"),A=Symbol("onreaddir"),H=Symbol("pipe"),W=Symbol("entry"),q=Symbol("entryOpt"),I=Symbol("writeEntryClass"),U=Symbol("write"),G=Symbol("ondrain"),P=he("fs"),v=he("path"),R=bm(),$=to(),J=R(class extends i{constructor(E){super(E),E=E||Object.create(null),this.opt=E,this.file=E.file||"",this.cwd=E.cwd||process.cwd(),this.maxReadSize=E.maxReadSize,this.preservePaths=!!E.preservePaths,this.strict=!!E.strict,this.noPax=!!E.noPax,this.prefix=$(E.prefix||""),this.linkCache=E.linkCache||new Map,this.statCache=E.statCache||new Map,this.readdirCache=E.readdirCache||new Map,this[I]=o,typeof E.onwarn=="function"&&this.on("warn",E.onwarn),this.portable=!!E.portable,this.zip=null,E.gzip?(typeof E.gzip!="object"&&(E.gzip={}),this.portable&&(E.gzip.portable=!0),this.zip=new n.Gzip(E.gzip),this.zip.on("data",w=>super.write(w)),this.zip.on("end",w=>super.end()),this.zip.on("drain",w=>this[G]()),this.on("resume",w=>this.zip.resume())):this.on("drain",this[G]),this.noDirRecurse=!!E.noDirRecurse,this.follow=!!E.follow,this.noMtime=!!E.noMtime,this.mtime=E.mtime||null,this.filter=typeof E.filter=="function"?E.filter:w=>!0,this[d]=new c,this[C]=0,this.jobs=+E.jobs||4,this[p]=!1,this[f]=!1}[U](E){return super.write(E)}add(E){return this.write(E),this}end(E){return E&&this.write(E),this[f]=!0,this[y](),this}write(E){if(this[f])throw new Error("write after end");return E instanceof s?this[T](E):this[B](E),this.flowing}[T](E){let w=$(v.resolve(this.cwd,E.path));if(!this.filter(E.path,E))E.resume();else{let S=new r(E.path,w,!1);S.entry=new u(E,this[q](S)),S.entry.on("end",j=>this[L](S)),this[C]+=1,this[d].push(S)}this[y]()}[B](E){let w=$(v.resolve(this.cwd,E));this[d].push(new r(E,w)),this[y]()}[M](E){E.pending=!0,this[C]+=1;let w=this.follow?"stat":"lstat";P[w](E.absolute,(S,j)=>{E.pending=!1,this[C]-=1,S?this.emit("error",S):this[h](E,j)})}[h](E,w){this.statCache.set(E.absolute,w),E.stat=w,this.filter(E.path,w)||(E.ignore=!0),this[y]()}[D](E){E.pending=!0,this[C]+=1,P.readdir(E.absolute,(w,S)=>{if(E.pending=!1,this[C]-=1,w)return this.emit("error",w);this[A](E,S)})}[A](E,w){this.readdirCache.set(E.absolute,w),E.readdir=w,this[y]()}[y](){if(!this[p]){this[p]=!0;for(let E=this[d].head;E!==null&&this[C]<this.jobs;E=E.next)if(this[_](E.value),E.value.ignore){let w=E.next;this[d].removeNode(E),E.next=w}this[p]=!1,this[f]&&!this[d].length&&this[C]===0&&(this.zip?this.zip.end(l):(super.write(l),super.end()))}}get[m](){return this[d]&&this[d].head&&this[d].head.value}[L](E){this[d].shift(),this[C]-=1,this[y]()}[_](E){if(!E.pending){if(E.entry){E===this[m]&&!E.piped&&this[H](E);return}if(E.stat||(this.statCache.has(E.absolute)?this[h](E,this.statCache.get(E.absolute)):this[M](E)),!!E.stat&&!E.ignore&&!(!this.noDirRecurse&&E.stat.isDirectory()&&!E.readdir&&(this.readdirCache.has(E.absolute)?this[A](E,this.readdirCache.get(E.absolute)):this[D](E),!E.readdir))){if(E.entry=this[W](E),!E.entry){E.ignore=!0;return}E===this[m]&&!E.piped&&this[H](E)}}}[q](E){return{onwarn:(w,S,j)=>this.warn(w,S,j),noPax:this.noPax,cwd:this.cwd,absolute:E.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[W](E){this[C]+=1;try{return new this[I](E.path,this[q](E)).on("end",()=>this[L](E)).on("error",w=>this.emit("error",w))}catch(w){this.emit("error",w)}}[G](){this[m]&&this[m].entry&&this[m].entry.resume()}[H](E){E.piped=!0,E.readdir&&E.readdir.forEach(j=>{let F=E.path,Y=F==="./"?"":F.replace(/\/*$/,"/");this[B](Y+j)});let w=E.entry,S=this.zip;S?w.on("data",j=>{S.write(j)||w.pause()}):w.on("data",j=>{super.write(j)||w.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),X=class extends J{constructor(E){super(E),this[I]=a}pause(){}resume(){}[M](E){let w=this.follow?"statSync":"lstatSync";this[h](E,P[w](E.absolute))}[D](E,w){this[A](E,P.readdirSync(E.absolute))}[H](E){let w=E.entry,S=this.zip;E.readdir&&E.readdir.forEach(j=>{let F=E.path,Y=F==="./"?"":F.replace(/\/*$/,"/");this[B](Y+j)}),S?w.on("data",j=>{S.write(j)}):w.on("data",j=>{super[U](j)})}};J.Sync=X,e.exports=J}),no=ce(t=>{"use strict";te();var e=o1(),r=he("events").EventEmitter,i=he("fs"),n=i.writev;if(!n){let E=process.binding("fs"),w=E.FSReqWrap||E.FSReqCallback;n=(S,j,F,Y)=>{let z=(Z,ue)=>Y(Z,ue,j),ne=new w;ne.oncomplete=z,E.writeBuffers(S,j,F,ne)}}var s=Symbol("_autoClose"),o=Symbol("_close"),a=Symbol("_ended"),u=Symbol("_fd"),c=Symbol("_finished"),l=Symbol("_flags"),h=Symbol("_flush"),f=Symbol("_handleChunk"),d=Symbol("_makeBuf"),m=Symbol("_mode"),y=Symbol("_needDrain"),p=Symbol("_onerror"),_=Symbol("_onopen"),C=Symbol("_onread"),L=Symbol("_onwrite"),B=Symbol("_open"),T=Symbol("_path"),M=Symbol("_pos"),D=Symbol("_queue"),A=Symbol("_read"),H=Symbol("_readSize"),W=Symbol("_reading"),q=Symbol("_remain"),I=Symbol("_size"),U=Symbol("_write"),G=Symbol("_writing"),P=Symbol("_defaultFlag"),v=Symbol("_errored"),R=class extends e{constructor(E,w){if(w=w||{},super(w),this.readable=!0,this.writable=!1,typeof E!="string")throw new TypeError("path must be a string");this[v]=!1,this[u]=typeof w.fd=="number"?w.fd:null,this[T]=E,this[H]=w.readSize||16*1024*1024,this[W]=!1,this[I]=typeof w.size=="number"?w.size:1/0,this[q]=this[I],this[s]=typeof w.autoClose=="boolean"?w.autoClose:!0,typeof this[u]=="number"?this[A]():this[B]()}get fd(){return this[u]}get path(){return this[T]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[B](){i.open(this[T],"r",(E,w)=>this[_](E,w))}[_](E,w){E?this[p](E):(this[u]=w,this.emit("open",w),this[A]())}[d](){return Buffer.allocUnsafe(Math.min(this[H],this[q]))}[A](){if(!this[W]){this[W]=!0;let E=this[d]();if(E.length===0)return process.nextTick(()=>this[C](null,0,E));i.read(this[u],E,0,E.length,null,(w,S,j)=>this[C](w,S,j))}}[C](E,w,S){this[W]=!1,E?this[p](E):this[f](w,S)&&this[A]()}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.close(E,w=>w?this.emit("error",w):this.emit("close"))}}[p](E){this[W]=!0,this[o](),this.emit("error",E)}[f](E,w){let S=!1;return this[q]-=E,E>0&&(S=super.write(E<w.length?w.slice(0,E):w)),(E===0||this[q]<=0)&&(S=!1,this[o](),super.end()),S}emit(E,w){switch(E){case"prefinish":case"finish":break;case"drain":typeof this[u]=="number"&&this[A]();break;case"error":return this[v]?void 0:(this[v]=!0,super.emit(E,w));default:return super.emit(E,w)}}},$=class extends R{[B](){let E=!0;try{this[_](null,i.openSync(this[T],"r")),E=!1}finally{E&&this[o]()}}[A](){let E=!0;try{if(!this[W]){this[W]=!0;do{let w=this[d](),S=w.length===0?0:i.readSync(this[u],w,0,w.length,null);if(!this[f](S,w))break}while(!0);this[W]=!1}E=!1}finally{E&&this[o]()}}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.closeSync(E),this.emit("close")}}},J=class extends r{constructor(E,w){w=w||{},super(w),this.readable=!1,this.writable=!0,this[v]=!1,this[G]=!1,this[a]=!1,this[y]=!1,this[D]=[],this[T]=E,this[u]=typeof w.fd=="number"?w.fd:null,this[m]=w.mode===void 0?438:w.mode,this[M]=typeof w.start=="number"?w.start:null,this[s]=typeof w.autoClose=="boolean"?w.autoClose:!0;let S=this[M]!==null?"r+":"w";this[P]=w.flags===void 0,this[l]=this[P]?S:w.flags,this[u]===null&&this[B]()}emit(E,w){if(E==="error"){if(this[v])return;this[v]=!0}return super.emit(E,w)}get fd(){return this[u]}get path(){return this[T]}[p](E){this[o](),this[G]=!0,this.emit("error",E)}[B](){i.open(this[T],this[l],this[m],(E,w)=>this[_](E,w))}[_](E,w){this[P]&&this[l]==="r+"&&E&&E.code==="ENOENT"?(this[l]="w",this[B]()):E?this[p](E):(this[u]=w,this.emit("open",w),this[h]())}end(E,w){return E&&this.write(E,w),this[a]=!0,!this[G]&&!this[D].length&&typeof this[u]=="number"&&this[L](null,0),this}write(E,w){return typeof E=="string"&&(E=Buffer.from(E,w)),this[a]?(this.emit("error",new Error("write() after end()")),!1):this[u]===null||this[G]||this[D].length?(this[D].push(E),this[y]=!0,!1):(this[G]=!0,this[U](E),!0)}[U](E){i.write(this[u],E,0,E.length,this[M],(w,S)=>this[L](w,S))}[L](E,w){E?this[p](E):(this[M]!==null&&(this[M]+=w),this[D].length?this[h]():(this[G]=!1,this[a]&&!this[c]?(this[c]=!0,this[o](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[h](){if(this[D].length===0)this[a]&&this[L](null,0);else if(this[D].length===1)this[U](this[D].pop());else{let E=this[D];this[D]=[],n(this[u],E,this[M],(w,S)=>this[L](w,S))}}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.close(E,w=>w?this.emit("error",w):this.emit("close"))}}},X=class extends J{[B](){let E;if(this[P]&&this[l]==="r+")try{E=i.openSync(this[T],this[l],this[m])}catch(w){if(w.code==="ENOENT")return this[l]="w",this[B]();throw w}else E=i.openSync(this[T],this[l],this[m]);this[_](null,E)}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.closeSync(E),this.emit("close")}}[U](E){let w=!0;try{this[L](null,i.writeSync(this[u],E,0,E.length,this[M])),w=!1}finally{if(w)try{this[o]()}catch{}}}};t.ReadStream=R,t.ReadStreamSync=$,t.WriteStream=J,t.WriteStreamSync=X}),wm=ce((t,e)=>{"use strict";te();var r=bm(),i=ro(),n=he("events"),s=d1(),o=1024*1024,a=gm(),u=_m(),c=u1(),{nextTick:l}=he("process"),h=Buffer.from([31,139]),f=Symbol("state"),d=Symbol("writeEntry"),m=Symbol("readEntry"),y=Symbol("nextEntry"),p=Symbol("processEntry"),_=Symbol("extendedHeader"),C=Symbol("globalExtendedHeader"),L=Symbol("meta"),B=Symbol("emitMeta"),T=Symbol("buffer"),M=Symbol("queue"),D=Symbol("ended"),A=Symbol("emittedEnd"),H=Symbol("emit"),W=Symbol("unzip"),q=Symbol("consumeChunk"),I=Symbol("consumeChunkSub"),U=Symbol("consumeBody"),G=Symbol("consumeMeta"),P=Symbol("consumeHeader"),v=Symbol("consuming"),R=Symbol("bufferConcat"),$=Symbol("maybeEnd"),J=Symbol("writing"),X=Symbol("aborted"),E=Symbol("onDone"),w=Symbol("sawValidEntry"),S=Symbol("sawNullBlock"),j=Symbol("sawEOF"),F=Symbol("closeStream"),Y=z=>!0;e.exports=r(class extends n{constructor(z){z=z||{},super(z),this.file=z.file||"",this[w]=null,this.on(E,ne=>{(this[f]==="begin"||this[w]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),z.ondone?this.on(E,z.ondone):this.on(E,ne=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!z.strict,this.maxMetaEntrySize=z.maxMetaEntrySize||o,this.filter=typeof z.filter=="function"?z.filter:Y,this.writable=!0,this.readable=!1,this[M]=new s,this[T]=null,this[m]=null,this[d]=null,this[f]="begin",this[L]="",this[_]=null,this[C]=null,this[D]=!1,this[W]=null,this[X]=!1,this[S]=!1,this[j]=!1,this.on("end",()=>this[F]()),typeof z.onwarn=="function"&&this.on("warn",z.onwarn),typeof z.onentry=="function"&&this.on("entry",z.onentry)}[P](z,ne){this[w]===null&&(this[w]=!1);let Z;try{Z=new i(z,ne,this[_],this[C])}catch(ue){return this.warn("TAR_ENTRY_INVALID",ue)}if(Z.nullBlock)this[S]?(this[j]=!0,this[f]==="begin"&&(this[f]="header"),this[H]("eof")):(this[S]=!0,this[H]("nullBlock"));else if(this[S]=!1,!Z.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:Z});else if(!Z.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:Z});else{let ue=Z.type;if(/^(Symbolic)?Link$/.test(ue)&&!Z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:Z});else if(!/^(Symbolic)?Link$/.test(ue)&&Z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:Z});else{let Q=this[d]=new a(Z,this[_],this[C]);if(!this[w])if(Q.remain){let b=()=>{Q.invalid||(this[w]=!0)};Q.on("end",b)}else this[w]=!0;Q.meta?Q.size>this.maxMetaEntrySize?(Q.ignore=!0,this[H]("ignoredEntry",Q),this[f]="ignore",Q.resume()):Q.size>0&&(this[L]="",Q.on("data",b=>this[L]+=b),this[f]="meta"):(this[_]=null,Q.ignore=Q.ignore||!this.filter(Q.path,Q),Q.ignore?(this[H]("ignoredEntry",Q),this[f]=Q.remain?"ignore":"header",Q.resume()):(Q.remain?this[f]="body":(this[f]="header",Q.end()),this[m]?this[M].push(Q):(this[M].push(Q),this[y]())))}}}[F](){l(()=>this.emit("close"))}[p](z){let ne=!0;return z?Array.isArray(z)?this.emit.apply(this,z):(this[m]=z,this.emit("entry",z),z.emittedEnd||(z.on("end",Z=>this[y]()),ne=!1)):(this[m]=null,ne=!1),ne}[y](){do;while(this[p](this[M].shift()));if(!this[M].length){let z=this[m];!z||z.flowing||z.size===z.remain?this[J]||this.emit("drain"):z.once("drain",ne=>this.emit("drain"))}}[U](z,ne){let Z=this[d],ue=Z.blockRemain,Q=ue>=z.length&&ne===0?z:z.slice(ne,ne+ue);return Z.write(Q),Z.blockRemain||(this[f]="header",this[d]=null,Z.end()),Q.length}[G](z,ne){let Z=this[d],ue=this[U](z,ne);return this[d]||this[B](Z),ue}[H](z,ne,Z){!this[M].length&&!this[m]?this.emit(z,ne,Z):this[M].push([z,ne,Z])}[B](z){switch(this[H]("meta",this[L]),z.type){case"ExtendedHeader":case"OldExtendedHeader":this[_]=u.parse(this[L],this[_],!1);break;case"GlobalExtendedHeader":this[C]=u.parse(this[L],this[C],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[_]=this[_]||Object.create(null),this[_].path=this[L].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[_]=this[_]||Object.create(null),this[_].linkpath=this[L].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+z.type)}}abort(z){this[X]=!0,this.emit("abort",z),this.warn("TAR_ABORT",z,{recoverable:!1})}write(z){if(this[X])return;if(this[W]===null&&z){if(this[T]&&(z=Buffer.concat([this[T],z]),this[T]=null),z.length<h.length)return this[T]=z,!0;for(let Z=0;this[W]===null&&Z<h.length;Z++)z[Z]!==h[Z]&&(this[W]=!1);if(this[W]===null){let Z=this[D];this[D]=!1,this[W]=new c.Unzip,this[W].on("data",Q=>this[q](Q)),this[W].on("error",Q=>this.abort(Q)),this[W].on("end",Q=>{this[D]=!0,this[q]()}),this[J]=!0;let ue=this[W][Z?"end":"write"](z);return this[J]=!1,ue}}this[J]=!0,this[W]?this[W].write(z):this[q](z),this[J]=!1;let ne=this[M].length?!1:this[m]?this[m].flowing:!0;return!ne&&!this[M].length&&this[m].once("drain",Z=>this.emit("drain")),ne}[R](z){z&&!this[X]&&(this[T]=this[T]?Buffer.concat([this[T],z]):z)}[$](){if(this[D]&&!this[A]&&!this[X]&&!this[v]){this[A]=!0;let z=this[d];if(z&&z.blockRemain){let ne=this[T]?this[T].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${z.blockRemain} more bytes, only ${ne} available)`,{entry:z}),this[T]&&z.write(this[T]),z.end()}this[H](E)}}[q](z){if(this[v])this[R](z);else if(!z&&!this[T])this[$]();else{if(this[v]=!0,this[T]){this[R](z);let ne=this[T];this[T]=null,this[I](ne)}else this[I](z);for(;this[T]&&this[T].length>=512&&!this[X]&&!this[j];){let ne=this[T];this[T]=null,this[I](ne)}this[v]=!1}(!this[T]||this[D])&&this[$]()}[I](z){let ne=0,Z=z.length;for(;ne+512<=Z&&!this[X]&&!this[j];)switch(this[f]){case"begin":case"header":this[P](z,ne),ne+=512;break;case"ignore":case"body":ne+=this[U](z,ne);break;case"meta":ne+=this[G](z,ne);break;default:throw new Error("invalid state: "+this[f])}ne<Z&&(this[T]?this[T]=Buffer.concat([z.slice(ne),this[T]]):this[T]=z.slice(ne))}end(z){this[X]||(this[W]?this[W].end(z):(this[D]=!0,this.write(z)))}})}),vm=ce((t,e)=>{"use strict";te();var r=eo(),i=wm(),n=he("fs"),s=no(),o=he("path"),a=io();e.exports=(d,m,y)=>{typeof d=="function"?(y=d,m=null,d={}):Array.isArray(d)&&(m=d,d={}),typeof m=="function"&&(y=m,m=null),m?m=Array.from(m):m=[];let p=r(d);if(p.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!p.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return m.length&&c(p,m),p.noResume||u(p),p.file&&p.sync?l(p):p.file?h(p,y):f(p)};var u=d=>{let m=d.onentry;d.onentry=m?y=>{m(y),y.resume()}:y=>y.resume()},c=(d,m)=>{let y=new Map(m.map(C=>[a(C),!0])),p=d.filter,_=(C,L)=>{let B=L||o.parse(C).root||".",T=C===B?!1:y.has(C)?y.get(C):_(o.dirname(C),B);return y.set(C,T),T};d.filter=p?(C,L)=>p(C,L)&&_(a(C)):C=>_(a(C))},l=d=>{let m=f(d),y=d.file,p=!0,_;try{let C=n.statSync(y),L=d.maxReadSize||16*1024*1024;if(C.size<L)m.end(n.readFileSync(y));else{let B=0,T=Buffer.allocUnsafe(L);for(_=n.openSync(y,"r");B<C.size;){let M=n.readSync(_,T,0,L,B);B+=M,m.write(T.slice(0,M))}m.end()}p=!1}finally{if(p&&_)try{n.closeSync(_)}catch{}}},h=(d,m)=>{let y=new i(d),p=d.maxReadSize||16*1024*1024,_=d.file,C=new Promise((L,B)=>{y.on("error",B),y.on("end",L),n.stat(_,(T,M)=>{if(T)B(T);else{let D=new s.ReadStream(_,{readSize:p,size:M.size});D.on("error",B),D.pipe(y)}})});return m?C.then(m,m):C},f=d=>new i(d)}),J5=ce((t,e)=>{"use strict";te();var r=eo(),i=Em(),n=no(),s=vm(),o=he("path");e.exports=(d,m,y)=>{if(typeof m=="function"&&(y=m),Array.isArray(d)&&(m=d,d={}),!m||!Array.isArray(m)||!m.length)throw new TypeError("no files or directories specified");m=Array.from(m);let p=r(d);if(p.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!p.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return p.file&&p.sync?a(p,m):p.file?u(p,m,y):p.sync?h(p,m):f(p,m)};var a=(d,m)=>{let y=new i.Sync(d),p=new n.WriteStreamSync(d.file,{mode:d.mode||438});y.pipe(p),c(y,m)},u=(d,m,y)=>{let p=new i(d),_=new n.WriteStream(d.file,{mode:d.mode||438});p.pipe(_);let C=new Promise((L,B)=>{_.on("error",B),_.on("close",L),p.on("error",B)});return l(p,m),y?C.then(y,y):C},c=(d,m)=>{m.forEach(y=>{y.charAt(0)==="@"?s({file:o.resolve(d.cwd,y.slice(1)),sync:!0,noResume:!0,onentry:p=>d.add(p)}):d.add(y)}),d.end()},l=(d,m)=>{for(;m.length;){let y=m.shift();if(y.charAt(0)==="@")return s({file:o.resolve(d.cwd,y.slice(1)),noResume:!0,onentry:p=>d.add(p)}).then(p=>l(d,m));d.add(y)}d.end()},h=(d,m)=>{let y=new i.Sync(d);return c(y,m),y},f=(d,m)=>{let y=new i(d);return l(y,m),y}}),p1=ce((t,e)=>{"use strict";te();var r=eo(),i=Em(),n=he("fs"),s=no(),o=vm(),a=he("path"),u=ro();e.exports=(m,y,p)=>{let _=r(m);if(!_.file)throw new TypeError("file is required");if(_.gzip)throw new TypeError("cannot append to compressed archives");if(!y||!Array.isArray(y)||!y.length)throw new TypeError("no files or directories specified");return y=Array.from(y),_.sync?c(_,y):h(_,y,p)};var c=(m,y)=>{let p=new i.Sync(m),_=!0,C,L;try{try{C=n.openSync(m.file,"r+")}catch(M){if(M.code==="ENOENT")C=n.openSync(m.file,"w+");else throw M}let B=n.fstatSync(C),T=Buffer.alloc(512);e:for(L=0;L<B.size;L+=512){for(let A=0,H=0;A<512;A+=H){if(H=n.readSync(C,T,A,T.length-A,L+A),L===0&&T[0]===31&&T[1]===139)throw new Error("cannot append to compressed archives");if(!H)break e}let M=new u(T);if(!M.cksumValid)break;let D=512*Math.ceil(M.size/512);if(L+D+512>B.size)break;L+=D,m.mtimeCache&&m.mtimeCache.set(M.path,M.mtime)}_=!1,l(m,p,L,C,y)}finally{if(_)try{n.closeSync(C)}catch{}}},l=(m,y,p,_,C)=>{let L=new s.WriteStreamSync(m.file,{fd:_,start:p});y.pipe(L),f(y,C)},h=(m,y,p)=>{y=Array.from(y);let _=new i(m),C=(B,T,M)=>{let D=(I,U)=>{I?n.close(B,G=>M(I)):M(null,U)},A=0;if(T===0)return D(null,0);let H=0,W=Buffer.alloc(512),q=(I,U)=>{if(I)return D(I);if(H+=U,H<512&&U)return n.read(B,W,H,W.length-H,A+H,q);if(A===0&&W[0]===31&&W[1]===139)return D(new Error("cannot append to compressed archives"));if(H<512)return D(null,A);let G=new u(W);if(!G.cksumValid)return D(null,A);let P=512*Math.ceil(G.size/512);if(A+P+512>T||(A+=P+512,A>=T))return D(null,A);m.mtimeCache&&m.mtimeCache.set(G.path,G.mtime),H=0,n.read(B,W,0,512,A,q)};n.read(B,W,0,512,A,q)},L=new Promise((B,T)=>{_.on("error",T);let M="r+",D=(A,H)=>{if(A&&A.code==="ENOENT"&&M==="r+")return M="w+",n.open(m.file,M,D);if(A)return T(A);n.fstat(H,(W,q)=>{if(W)return n.close(H,()=>T(W));C(H,q.size,(I,U)=>{if(I)return T(I);let G=new s.WriteStream(m.file,{fd:H,start:U});_.pipe(G),G.on("error",T),G.on("close",B),d(_,y)})})};n.open(m.file,M,D)});return p?L.then(p,p):L},f=(m,y)=>{y.forEach(p=>{p.charAt(0)==="@"?o({file:a.resolve(m.cwd,p.slice(1)),sync:!0,noResume:!0,onentry:_=>m.add(_)}):m.add(p)}),m.end()},d=(m,y)=>{for(;y.length;){let p=y.shift();if(p.charAt(0)==="@")return o({file:a.resolve(m.cwd,p.slice(1)),noResume:!0,onentry:_=>m.add(_)}).then(_=>d(m,y));m.add(p)}m.end()}}),X5=ce((t,e)=>{"use strict";te();var r=eo(),i=p1();e.exports=(s,o,a)=>{let u=r(s);if(!u.file)throw new TypeError("file is required");if(u.gzip)throw new TypeError("cannot append to compressed archives");if(!o||!Array.isArray(o)||!o.length)throw new TypeError("no files or directories specified");return o=Array.from(o),n(u),i(u,o,a)};var n=s=>{let o=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=o?(a,u)=>o(a,u)&&!(s.mtimeCache.get(a)>u.mtime):(a,u)=>!(s.mtimeCache.get(a)>u.mtime)}}),Q5=ce((t,e)=>{te();var{promisify:r}=he("util"),i=he("fs"),n=s=>{if(!s)s={mode:511,fs:i};else if(typeof s=="object")s={mode:511,fs:i,...s};else if(typeof s=="number")s={mode:s,fs:i};else if(typeof s=="string")s={mode:parseInt(s,8),fs:i};else throw new TypeError("invalid options argument");return s.mkdir=s.mkdir||s.fs.mkdir||i.mkdir,s.mkdirAsync=r(s.mkdir),s.stat=s.stat||s.fs.stat||i.stat,s.statAsync=r(s.stat),s.statSync=s.statSync||s.fs.statSync||i.statSync,s.mkdirSync=s.mkdirSync||s.fs.mkdirSync||i.mkdirSync,s};e.exports=n}),ej=ce((t,e)=>{te();var r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:n}=he("path"),s=o=>{if(/\0/.test(o))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:o,code:"ERR_INVALID_ARG_VALUE"});if(o=i(o),r==="win32"){let a=/[*|"<>?:]/,{root:u}=n(o);if(a.test(o.substr(u.length)))throw Object.assign(new Error("Illegal characters in path."),{path:o,code:"EINVAL"})}return o};e.exports=s}),tj=ce((t,e)=>{te();var{dirname:r}=he("path"),i=(s,o,a=void 0)=>a===o?Promise.resolve():s.statAsync(o).then(u=>u.isDirectory()?a:void 0,u=>u.code==="ENOENT"?i(s,r(o),o):void 0),n=(s,o,a=void 0)=>{if(a!==o)try{return s.statSync(o).isDirectory()?a:void 0}catch(u){return u.code==="ENOENT"?n(s,r(o),o):void 0}};e.exports={findMade:i,findMadeSync:n}}),m1=ce((t,e)=>{te();var{dirname:r}=he("path"),i=(s,o,a)=>{o.recursive=!1;let u=r(s);return u===s?o.mkdirAsync(s,o).catch(c=>{if(c.code!=="EISDIR")throw c}):o.mkdirAsync(s,o).then(()=>a||s,c=>{if(c.code==="ENOENT")return i(u,o).then(l=>i(s,o,l));if(c.code!=="EEXIST"&&c.code!=="EROFS")throw c;return o.statAsync(s).then(l=>{if(l.isDirectory())return a;throw c},()=>{throw c})})},n=(s,o,a)=>{let u=r(s);if(o.recursive=!1,u===s)try{return o.mkdirSync(s,o)}catch(c){if(c.code!=="EISDIR")throw c;return}try{return o.mkdirSync(s,o),a||s}catch(c){if(c.code==="ENOENT")return n(s,o,n(u,o,a));if(c.code!=="EEXIST"&&c.code!=="EROFS")throw c;try{if(!o.statSync(s).isDirectory())throw c}catch{throw c}}};e.exports={mkdirpManual:i,mkdirpManualSync:n}}),rj=ce((t,e)=>{te();var{dirname:r}=he("path"),{findMade:i,findMadeSync:n}=tj(),{mkdirpManual:s,mkdirpManualSync:o}=m1(),a=(c,l)=>(l.recursive=!0,r(c)===c?l.mkdirAsync(c,l):i(l,c).then(h=>l.mkdirAsync(c,l).then(()=>h).catch(f=>{if(f.code==="ENOENT")return s(c,l);throw f}))),u=(c,l)=>{if(l.recursive=!0,r(c)===c)return l.mkdirSync(c,l);let h=n(l,c);try{return l.mkdirSync(c,l),h}catch(f){if(f.code==="ENOENT")return o(c,l);throw f}};e.exports={mkdirpNative:a,mkdirpNativeSync:u}}),ij=ce((t,e)=>{te();var r=he("fs"),i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,n=i.replace(/^v/,"").split("."),s=+n[0]>10||+n[0]==10&&+n[1]>=12,o=s?u=>u.mkdir===r.mkdir:()=>!1,a=s?u=>u.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:o,useNativeSync:a}}),nj=ce((t,e)=>{te();var r=Q5(),i=ej(),{mkdirpNative:n,mkdirpNativeSync:s}=rj(),{mkdirpManual:o,mkdirpManualSync:a}=m1(),{useNative:u,useNativeSync:c}=ij(),l=(f,d)=>(f=i(f),d=r(d),u(d)?n(f,d):o(f,d)),h=(f,d)=>(f=i(f),d=r(d),c(d)?s(f,d):a(f,d));l.sync=h,l.native=(f,d)=>n(i(f),r(d)),l.manual=(f,d)=>o(i(f),r(d)),l.nativeSync=(f,d)=>s(i(f),r(d)),l.manualSync=(f,d)=>a(i(f),r(d)),e.exports=l}),sj=ce((t,e)=>{"use strict";te();var r=he("fs"),i=he("path"),n=r.lchown?"lchown":"chown",s=r.lchownSync?"lchownSync":"chownSync",o=r.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),a=(L,B,T)=>{try{return r[s](L,B,T)}catch(M){if(M.code!=="ENOENT")throw M}},u=(L,B,T)=>{try{return r.chownSync(L,B,T)}catch(M){if(M.code!=="ENOENT")throw M}},c=o?(L,B,T,M)=>D=>{!D||D.code!=="EISDIR"?M(D):r.chown(L,B,T,M)}:(L,B,T,M)=>M,l=o?(L,B,T)=>{try{return a(L,B,T)}catch(M){if(M.code!=="EISDIR")throw M;u(L,B,T)}}:(L,B,T)=>a(L,B,T),h=process.version,f=(L,B,T)=>r.readdir(L,B,T),d=(L,B)=>r.readdirSync(L,B);/^v4\./.test(h)&&(f=(L,B,T)=>r.readdir(L,T));var m=(L,B,T,M)=>{r[n](L,B,T,c(L,B,T,D=>{M(D&&D.code!=="ENOENT"?D:null)}))},y=(L,B,T,M,D)=>{if(typeof B=="string")return r.lstat(i.resolve(L,B),(A,H)=>{if(A)return D(A.code!=="ENOENT"?A:null);H.name=B,y(L,H,T,M,D)});if(B.isDirectory())p(i.resolve(L,B.name),T,M,A=>{if(A)return D(A);let H=i.resolve(L,B.name);m(H,T,M,D)});else{let A=i.resolve(L,B.name);m(A,T,M,D)}},p=(L,B,T,M)=>{f(L,{withFileTypes:!0},(D,A)=>{if(D){if(D.code==="ENOENT")return M();if(D.code!=="ENOTDIR"&&D.code!=="ENOTSUP")return M(D)}if(D||!A.length)return m(L,B,T,M);let H=A.length,W=null,q=I=>{if(!W){if(I)return M(W=I);if(--H===0)return m(L,B,T,M)}};A.forEach(I=>y(L,I,B,T,q))})},_=(L,B,T,M)=>{if(typeof B=="string")try{let D=r.lstatSync(i.resolve(L,B));D.name=B,B=D}catch(D){if(D.code==="ENOENT")return;throw D}B.isDirectory()&&C(i.resolve(L,B.name),T,M),l(i.resolve(L,B.name),T,M)},C=(L,B,T)=>{let M;try{M=d(L,{withFileTypes:!0})}catch(D){if(D.code==="ENOENT")return;if(D.code==="ENOTDIR"||D.code==="ENOTSUP")return l(L,B,T);throw D}return M&&M.length&&M.forEach(D=>_(L,D,B,T)),l(L,B,T)};e.exports=p,p.sync=C}),oj=ce((t,e)=>{"use strict";te();var r=nj(),i=he("fs"),n=he("path"),s=sj(),o=to(),a=class extends Error{constructor(y,p){super("Cannot extract through symbolic link"),this.path=p,this.symlink=y}get name(){return"SylinkError"}},u=class extends Error{constructor(y,p){super(p+": Cannot cd into '"+y+"'"),this.path=y,this.code=p}get name(){return"CwdError"}},c=(y,p)=>y.get(o(p)),l=(y,p,_)=>y.set(o(p),_),h=(y,p)=>{i.stat(y,(_,C)=>{(_||!C.isDirectory())&&(_=new u(y,_&&_.code||"ENOTDIR")),p(_)})};e.exports=(y,p,_)=>{y=o(y);let C=p.umask,L=p.mode|448,B=(L&C)!==0,T=p.uid,M=p.gid,D=typeof T=="number"&&typeof M=="number"&&(T!==p.processUid||M!==p.processGid),A=p.preserve,H=p.unlink,W=p.cache,q=o(p.cwd),I=(G,P)=>{G?_(G):(l(W,y,!0),P&&D?s(P,T,M,v=>I(v)):B?i.chmod(y,L,_):_())};if(W&&c(W,y)===!0)return I();if(y===q)return h(y,I);if(A)return r(y,{mode:L}).then(G=>I(null,G),I);let U=o(n.relative(q,y)).split("/");f(q,U,L,W,H,q,null,I)};var f=(y,p,_,C,L,B,T,M)=>{if(!p.length)return M(null,T);let D=p.shift(),A=o(n.resolve(y+"/"+D));if(c(C,A))return f(A,p,_,C,L,B,T,M);i.mkdir(A,_,d(A,p,_,C,L,B,T,M))},d=(y,p,_,C,L,B,T,M)=>D=>{D?i.lstat(y,(A,H)=>{if(A)A.path=A.path&&o(A.path),M(A);else if(H.isDirectory())f(y,p,_,C,L,B,T,M);else if(L)i.unlink(y,W=>{if(W)return M(W);i.mkdir(y,_,d(y,p,_,C,L,B,T,M))});else{if(H.isSymbolicLink())return M(new a(y,y+"/"+p.join("/")));M(D)}}):(T=T||y,f(y,p,_,C,L,B,T,M))},m=y=>{let p=!1,_="ENOTDIR";try{p=i.statSync(y).isDirectory()}catch(C){_=C.code}finally{if(!p)throw new u(y,_)}};e.exports.sync=(y,p)=>{y=o(y);let _=p.umask,C=p.mode|448,L=(C&_)!==0,B=p.uid,T=p.gid,M=typeof B=="number"&&typeof T=="number"&&(B!==p.processUid||T!==p.processGid),D=p.preserve,A=p.unlink,H=p.cache,W=o(p.cwd),q=G=>{l(H,y,!0),G&&M&&s.sync(G,B,T),L&&i.chmodSync(y,C)};if(H&&c(H,y)===!0)return q();if(y===W)return m(W),q();if(D)return q(r.sync(y,C));let I=o(n.relative(W,y)).split("/"),U=null;for(let G=I.shift(),P=W;G&&(P+="/"+G);G=I.shift())if(P=o(n.resolve(P)),!c(H,P))try{i.mkdirSync(P,C),U=U||P,l(H,P,!0)}catch{let v=i.lstatSync(P);if(v.isDirectory()){l(H,P,!0);continue}else if(A){i.unlinkSync(P),i.mkdirSync(P,C),U=U||P,l(H,P,!0);continue}else if(v.isSymbolicLink())return new a(P,P+"/"+I.join("/"))}return q(U)}}),y1=ce((t,e)=>{te();var r=Object.create(null),{hasOwnProperty:i}=Object.prototype;e.exports=n=>(i.call(r,n)||(r[n]=n.normalize("NFKD")),r[n])}),aj=ce((t,e)=>{te();var r=he("assert"),i=y1(),n=io(),{join:s}=he("path"),o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,a=o==="win32";e.exports=()=>{let u=new Map,c=new Map,l=p=>p.split("/").slice(0,-1).reduce((_,C)=>(_.length&&(C=s(_[_.length-1],C)),_.push(C||"/"),_),[]),h=new Set,f=p=>{let _=c.get(p);if(!_)throw new Error("function does not have any path reservations");return{paths:_.paths.map(C=>u.get(C)),dirs:[..._.dirs].map(C=>u.get(C))}},d=p=>{let{paths:_,dirs:C}=f(p);return _.every(L=>L[0]===p)&&C.every(L=>L[0]instanceof Set&&L[0].has(p))},m=p=>h.has(p)||!d(p)?!1:(h.add(p),p(()=>y(p)),!0),y=p=>{if(!h.has(p))return!1;let{paths:_,dirs:C}=c.get(p),L=new Set;return _.forEach(B=>{let T=u.get(B);r.equal(T[0],p),T.length===1?u.delete(B):(T.shift(),typeof T[0]=="function"?L.add(T[0]):T[0].forEach(M=>L.add(M)))}),C.forEach(B=>{let T=u.get(B);r(T[0]instanceof Set),T[0].size===1&&T.length===1?u.delete(B):T[0].size===1?(T.shift(),L.add(T[0])):T[0].delete(p)}),h.delete(p),L.forEach(B=>m(B)),!0};return{check:d,reserve:(p,_)=>{p=a?["win32 parallelization disabled"]:p.map(L=>i(n(s(L))).toLowerCase());let C=new Set(p.map(L=>l(L)).reduce((L,B)=>L.concat(B)));return c.set(_,{dirs:C,paths:p}),p.forEach(L=>{let B=u.get(L);B?B.push(_):u.set(L,[_])}),C.forEach(L=>{let B=u.get(L);B?B[B.length-1]instanceof Set?B[B.length-1].add(_):B.push(new Set([_])):u.set(L,[new Set([_])])}),m(_)}}}}),uj=ce((t,e)=>{te();var r=process.env.__FAKE_PLATFORM__||process.platform,i=r==="win32",n=global.__FAKE_TESTING_FS__||he("fs"),{O_CREAT:s,O_TRUNC:o,O_WRONLY:a,UV_FS_O_FILEMAP:u=0}=n.constants,c=i&&!!u,l=512*1024,h=u|o|s|a;e.exports=c?f=>f<l?h:"w":()=>"w"}),g1=ce((t,e)=>{"use strict";te();var r=he("assert"),i=wm(),n=he("fs"),s=no(),o=he("path"),a=oj(),u=l1(),c=aj(),l=h1(),h=to(),f=io(),d=y1(),m=Symbol("onEntry"),y=Symbol("checkFs"),p=Symbol("checkFs2"),_=Symbol("pruneCache"),C=Symbol("isReusable"),L=Symbol("makeFs"),B=Symbol("file"),T=Symbol("directory"),M=Symbol("link"),D=Symbol("symlink"),A=Symbol("hardlink"),H=Symbol("unsupported"),W=Symbol("checkPath"),q=Symbol("mkdir"),I=Symbol("onError"),U=Symbol("pending"),G=Symbol("pend"),P=Symbol("unpend"),v=Symbol("ended"),R=Symbol("maybeClose"),$=Symbol("skip"),J=Symbol("doChown"),X=Symbol("uid"),E=Symbol("gid"),w=Symbol("checkedCwd"),S=he("crypto"),j=uj(),F=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Y=F==="win32",z=(g,V)=>{if(!Y)return n.unlink(g,V);let re=g+".DELETE."+S.randomBytes(16).toString("hex");n.rename(g,re,se=>{if(se)return V(se);n.unlink(re,V)})},ne=g=>{if(!Y)return n.unlinkSync(g);let V=g+".DELETE."+S.randomBytes(16).toString("hex");n.renameSync(g,V),n.unlinkSync(V)},Z=(g,V,re)=>g===g>>>0?g:V===V>>>0?V:re,ue=g=>d(f(h(g))).toLowerCase(),Q=(g,V)=>{V=ue(V);for(let re of g.keys()){let se=ue(re);(se===V||se.indexOf(V+"/")===0)&&g.delete(re)}},b=g=>{for(let V of g.keys())g.delete(V)},N=class extends i{constructor(g){if(g||(g={}),g.ondone=V=>{this[v]=!0,this[R]()},super(g),this[w]=!1,this.reservations=c(),this.transform=typeof g.transform=="function"?g.transform:null,this.writable=!0,this.readable=!1,this[U]=0,this[v]=!1,this.dirCache=g.dirCache||new Map,typeof g.uid=="number"||typeof g.gid=="number"){if(typeof g.uid!="number"||typeof g.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(g.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=g.uid,this.gid=g.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;g.preserveOwner===void 0&&typeof g.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!g.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=g.forceChown===!0,this.win32=!!g.win32||Y,this.newer=!!g.newer,this.keep=!!g.keep,this.noMtime=!!g.noMtime,this.preservePaths=!!g.preservePaths,this.unlink=!!g.unlink,this.cwd=h(o.resolve(g.cwd||process.cwd())),this.strip=+g.strip||0,this.processUmask=g.noChmod?0:process.umask(),this.umask=typeof g.umask=="number"?g.umask:this.processUmask,this.dmode=g.dmode||511&~this.umask,this.fmode=g.fmode||438&~this.umask,this.on("entry",V=>this[m](V))}warn(g,V,re={}){return(g==="TAR_BAD_ARCHIVE"||g==="TAR_ABORT")&&(re.recoverable=!1),super.warn(g,V,re)}[R](){this[v]&&this[U]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[W](g){if(this.strip){let V=h(g.path).split("/");if(V.length<this.strip)return!1;if(g.path=V.slice(this.strip).join("/"),g.type==="Link"){let re=h(g.linkpath).split("/");if(re.length>=this.strip)g.linkpath=re.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let V=h(g.path),re=V.split("/");if(re.includes("..")||Y&&/^[a-z]:\.\.$/i.test(re[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:g,path:V}),!1;let[se,le]=l(V);se&&(g.path=le,this.warn("TAR_ENTRY_INFO",`stripping ${se} from absolute path`,{entry:g,path:V}))}if(o.isAbsolute(g.path)?g.absolute=h(o.resolve(g.path)):g.absolute=h(o.resolve(this.cwd,g.path)),!this.preservePaths&&g.absolute.indexOf(this.cwd+"/")!==0&&g.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:g,path:h(g.path),resolvedPath:g.absolute,cwd:this.cwd}),!1;if(g.absolute===this.cwd&&g.type!=="Directory"&&g.type!=="GNUDumpDir")return!1;if(this.win32){let{root:V}=o.win32.parse(g.absolute);g.absolute=V+u.encode(g.absolute.slice(V.length));let{root:re}=o.win32.parse(g.path);g.path=re+u.encode(g.path.slice(re.length))}return!0}[m](g){if(!this[W](g))return g.resume();switch(r.equal(typeof g.absolute,"string"),g.type){case"Directory":case"GNUDumpDir":g.mode&&(g.mode=g.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](g);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[H](g)}}[I](g,V){g.name==="CwdError"?this.emit("error",g):(this.warn("TAR_ENTRY_ERROR",g,{entry:V}),this[P](),V.resume())}[q](g,V,re){a(h(g),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:V,noChmod:this.noChmod},re)}[J](g){return this.forceChown||this.preserveOwner&&(typeof g.uid=="number"&&g.uid!==this.processUid||typeof g.gid=="number"&&g.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[X](g){return Z(this.uid,g.uid,this.processUid)}[E](g){return Z(this.gid,g.gid,this.processGid)}[B](g,V){let re=g.mode&4095||this.fmode,se=new s.WriteStream(g.absolute,{flags:j(g.size),mode:re,autoClose:!1});se.on("error",pe=>{se.fd&&n.close(se.fd,()=>{}),se.write=()=>!0,this[I](pe,g),V()});let le=1,me=pe=>{if(pe){se.fd&&n.close(se.fd,()=>{}),this[I](pe,g),V();return}--le===0&&n.close(se.fd,Fe=>{Fe?this[I](Fe,g):this[P](),V()})};se.on("finish",pe=>{let Fe=g.absolute,Ct=se.fd;if(g.mtime&&!this.noMtime){le++;let Rt=g.atime||new Date,Jn=g.mtime;n.futimes(Ct,Rt,Jn,Xn=>Xn?n.utimes(Fe,Rt,Jn,gc=>me(gc&&Xn)):me())}if(this[J](g)){le++;let Rt=this[X](g),Jn=this[E](g);n.fchown(Ct,Rt,Jn,Xn=>Xn?n.chown(Fe,Rt,Jn,gc=>me(gc&&Xn)):me())}me()});let ye=this.transform&&this.transform(g)||g;ye!==g&&(ye.on("error",pe=>{this[I](pe,g),V()}),g.pipe(ye)),ye.pipe(se)}[T](g,V){let re=g.mode&4095||this.dmode;this[q](g.absolute,re,se=>{if(se){this[I](se,g),V();return}let le=1,me=ye=>{--le===0&&(V(),this[P](),g.resume())};g.mtime&&!this.noMtime&&(le++,n.utimes(g.absolute,g.atime||new Date,g.mtime,me)),this[J](g)&&(le++,n.chown(g.absolute,this[X](g),this[E](g),me)),me()})}[H](g){g.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${g.type}`,{entry:g}),g.resume()}[D](g,V){this[M](g,g.linkpath,"symlink",V)}[A](g,V){let re=h(o.resolve(this.cwd,g.linkpath));this[M](g,re,"link",V)}[G](){this[U]++}[P](){this[U]--,this[R]()}[$](g){this[P](),g.resume()}[C](g,V){return g.type==="File"&&!this.unlink&&V.isFile()&&V.nlink<=1&&!Y}[y](g){this[G]();let V=[g.path];g.linkpath&&V.push(g.linkpath),this.reservations.reserve(V,re=>this[p](g,re))}[_](g){g.type==="SymbolicLink"?b(this.dirCache):g.type!=="Directory"&&Q(this.dirCache,g.absolute)}[p](g,V){this[_](g);let re=ye=>{this[_](g),V(ye)},se=()=>{this[q](this.cwd,this.dmode,ye=>{if(ye){this[I](ye,g),re();return}this[w]=!0,le()})},le=()=>{if(g.absolute!==this.cwd){let ye=h(o.dirname(g.absolute));if(ye!==this.cwd)return this[q](ye,this.dmode,pe=>{if(pe){this[I](pe,g),re();return}me()})}me()},me=()=>{n.lstat(g.absolute,(ye,pe)=>{if(pe&&(this.keep||this.newer&&pe.mtime>g.mtime)){this[$](g),re();return}if(ye||this[C](g,pe))return this[L](null,g,re);if(pe.isDirectory()){if(g.type==="Directory"){let Fe=!this.noChmod&&g.mode&&(pe.mode&4095)!==g.mode,Ct=Rt=>this[L](Rt,g,re);return Fe?n.chmod(g.absolute,g.mode,Ct):Ct()}if(g.absolute!==this.cwd)return n.rmdir(g.absolute,Fe=>this[L](Fe,g,re))}if(g.absolute===this.cwd)return this[L](null,g,re);z(g.absolute,Fe=>this[L](Fe,g,re))})};this[w]?le():se()}[L](g,V,re){if(g){this[I](g,V),re();return}switch(V.type){case"File":case"OldFile":case"ContiguousFile":return this[B](V,re);case"Link":return this[A](V,re);case"SymbolicLink":return this[D](V,re);case"Directory":case"GNUDumpDir":return this[T](V,re)}}[M](g,V,re,se){n[re](V,g.absolute,le=>{le?this[I](le,g):(this[P](),g.resume()),se()})}},x=g=>{try{return[null,g()]}catch(V){return[V,null]}},ee=class extends N{[L](g,V){return super[L](g,V,()=>{})}[y](g){if(this[_](g),!this[w]){let le=this[q](this.cwd,this.dmode);if(le)return this[I](le,g);this[w]=!0}if(g.absolute!==this.cwd){let le=h(o.dirname(g.absolute));if(le!==this.cwd){let me=this[q](le,this.dmode);if(me)return this[I](me,g)}}let[V,re]=x(()=>n.lstatSync(g.absolute));if(re&&(this.keep||this.newer&&re.mtime>g.mtime))return this[$](g);if(V||this[C](g,re))return this[L](null,g);if(re.isDirectory()){if(g.type==="Directory"){let me=!this.noChmod&&g.mode&&(re.mode&4095)!==g.mode,[ye]=me?x(()=>{n.chmodSync(g.absolute,g.mode)}):[];return this[L](ye,g)}let[le]=x(()=>n.rmdirSync(g.absolute));this[L](le,g)}let[se]=g.absolute===this.cwd?[]:x(()=>ne(g.absolute));this[L](se,g)}[B](g,V){let re=g.mode&4095||this.fmode,se=ye=>{let pe;try{n.closeSync(le)}catch(Fe){pe=Fe}(ye||pe)&&this[I](ye||pe,g),V()},le;try{le=n.openSync(g.absolute,j(g.size),re)}catch(ye){return se(ye)}let me=this.transform&&this.transform(g)||g;me!==g&&(me.on("error",ye=>this[I](ye,g)),g.pipe(me)),me.on("data",ye=>{try{n.writeSync(le,ye,0,ye.length)}catch(pe){se(pe)}}),me.on("end",ye=>{let pe=null;if(g.mtime&&!this.noMtime){let Fe=g.atime||new Date,Ct=g.mtime;try{n.futimesSync(le,Fe,Ct)}catch(Rt){try{n.utimesSync(g.absolute,Fe,Ct)}catch{pe=Rt}}}if(this[J](g)){let Fe=this[X](g),Ct=this[E](g);try{n.fchownSync(le,Fe,Ct)}catch(Rt){try{n.chownSync(g.absolute,Fe,Ct)}catch{pe=pe||Rt}}}se(pe)})}[T](g,V){let re=g.mode&4095||this.dmode,se=this[q](g.absolute,re);if(se){this[I](se,g),V();return}if(g.mtime&&!this.noMtime)try{n.utimesSync(g.absolute,g.atime||new Date,g.mtime)}catch{}if(this[J](g))try{n.chownSync(g.absolute,this[X](g),this[E](g))}catch{}V(),g.resume()}[q](g,V){try{return a.sync(h(g),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:V})}catch(re){return re}}[M](g,V,re,se){try{n[re+"Sync"](V,g.absolute),se(),g.resume()}catch(le){return this[I](le,g)}}};N.Sync=ee,e.exports=N}),cj=ce((t,e)=>{"use strict";te();var r=eo(),i=g1(),n=he("fs"),s=no(),o=he("path"),a=io();e.exports=(d,m,y)=>{typeof d=="function"?(y=d,m=null,d={}):Array.isArray(d)&&(m=d,d={}),typeof m=="function"&&(y=m,m=null),m?m=Array.from(m):m=[];let p=r(d);if(p.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!p.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return m.length&&u(p,m),p.file&&p.sync?c(p):p.file?l(p,y):p.sync?h(p):f(p)};var u=(d,m)=>{let y=new Map(m.map(C=>[a(C),!0])),p=d.filter,_=(C,L)=>{let B=L||o.parse(C).root||".",T=C===B?!1:y.has(C)?y.get(C):_(o.dirname(C),B);return y.set(C,T),T};d.filter=p?(C,L)=>p(C,L)&&_(a(C)):C=>_(a(C))},c=d=>{let m=new i.Sync(d),y=d.file,p=n.statSync(y),_=d.maxReadSize||16*1024*1024;new s.ReadStreamSync(y,{readSize:_,size:p.size}).pipe(m)},l=(d,m)=>{let y=new i(d),p=d.maxReadSize||16*1024*1024,_=d.file,C=new Promise((L,B)=>{y.on("error",B),y.on("close",L),n.stat(_,(T,M)=>{if(T)B(T);else{let D=new s.ReadStream(_,{readSize:p,size:M.size});D.on("error",B),D.pipe(y)}})});return m?C.then(m,m):C},h=d=>new i.Sync(d),f=d=>new i(d)}),lj=ce(t=>{"use strict";te(),t.c=t.create=J5(),t.r=t.replace=p1(),t.t=t.list=vm(),t.u=t.update=X5(),t.x=t.extract=cj(),t.Pack=Em(),t.Unpack=g1(),t.Parse=wm(),t.ReadEntry=gm(),t.WriteEntry=f1(),t.Header=ro(),t.Pax=_m(),t.types=c1()}),hj=ce((t,e)=>{te();function r(i,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var n=new Date().getTime();if(i&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(i),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(i,n){this._fn=i,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)},r.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},n=null,s=0,o=0;o<this._errors.length;o++){var a=this._errors[o],u=a.message,c=(i[u]||0)+1;i[u]=c,c>=s&&(n=a,s=c)}return n}}),fj=ce(t=>{te();var e=hj();t.operation=function(r){var i=t.timeouts(r);return new e(i,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(r){if(r instanceof Array)return[].concat(r);var i={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in r)i[n]=r[n];if(i.minTimeout>i.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<i.retries;o++)s.push(this.createTimeout(o,i));return r&&r.forever&&!s.length&&s.push(this.createTimeout(o,i)),s.sort(function(a,u){return a-u}),s},t.createTimeout=function(r,i){var n=i.randomize?Math.random()+1:1,s=Math.round(n*Math.max(i.minTimeout,1)*Math.pow(i.factor,r));return s=Math.min(s,i.maxTimeout),s},t.wrap=function(r,i,n){if(i instanceof Array&&(n=i,i=null),!n){n=[];for(var s in r)typeof r[s]=="function"&&n.push(s)}for(var o=0;o<n.length;o++){var a=n[o],u=r[a];r[a]=function(c){var l=t.operation(i),h=Array.prototype.slice.call(arguments,1),f=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),f.apply(this,arguments))}),l.attempt(function(){c.apply(r,h)})}.bind(r,u),r[a].options=i}}}),dj=ce((t,e)=>{te(),e.exports=fj()}),pj=ce((t,e)=>{te();var r=dj();function i(n,s){function o(a,u){var c=s||{},l;"randomize"in c||(c.randomize=!0),l=r.operation(c);function h(m){u(m||new Error("Aborted"))}function f(m,y){if(m.bail){h(m);return}l.retry(m)?c.onRetry&&c.onRetry(m,y):u(l.mainError())}function d(m){var y;try{y=n(h,m)}catch(p){f(p,m);return}Promise.resolve(y).then(a).catch(function(p){f(p,m)})}l.attempt(d)}return new Promise(o)}e.exports=i}),mj={};I5(mj,{bold:()=>Ej,dimmed:()=>wj,error:()=>Dj,info:()=>bj,item:()=>vj,log:()=>so,turboBlue:()=>Wn,turboGradient:()=>gj,turboLoader:()=>_j,turboRed:()=>v1,warn:()=>Sj,yellow:()=>S1});te();var E1="#0099F7",w1="#F11712",yj="#FFFF00",gj=(0,b1.default)(E1,w1),Wn=Zn.default.hex(E1),v1=Zn.default.hex(w1),S1=Zn.default.hex(yj),_j=t=>(0,_1.default)({text:t,spinner:{frames:[" ",Wn("> "),Wn(">> "),Wn(">>>")]}}),bj=(...t)=>{so(Wn.bold(">>>"),...t)},Ej=(...t)=>{so(Zn.default.bold(...t))},wj=(...t)=>{so(Zn.default.dim(...t))},vj=(...t)=>{so(Wn.bold(" \u2022"),...t)},so=(...t)=>{console.log(...t)},Sj=(...t)=>{console.error(S1.bold(">>>"),...t)},Dj=(...t)=>{console.error(v1.bold(">>>"),...t)};te();async function ic(t,e=[],r){let i={cwd:D1.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,A1.default)(t,e,i);return n.trim()}catch{return}}async function x1(){let[t,e,r,i]=await Promise.all([ic("yarnpkg",["--version"]),ic("npm",["--version"]),ic("pnpm",["--version"]),ic("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}te();te();te();var l7=oc(q5());te();te();function Aj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}te();te();function dm(t){return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dm(t)}te();function xj(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cj(t,e){if(e&&(dm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xj(t)}te();function sc(t){return sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sc(t)}te();te();function Js(t,e){return Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Js(t,e)}function Rj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)}te();te();function Tj(t){return Function.toString.call(t).indexOf("[native code]")!==-1}te();te();function kj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nc(t,e,r){return kj()?nc=Reflect.construct.bind():nc=function(i,n,s){var o=[null];o.push.apply(o,n);var a=Function.bind.apply(i,o),u=new a;return s&&Js(u,s.prototype),u},nc.apply(null,arguments)}function pm(t){var e=typeof Map=="function"?new Map:void 0;return pm=function(r){if(r===null||!Tj(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return nc(r,arguments,sc(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Js(i,r)},pm(t)}var h7=oc(W5()),p7=function(t){Rj(e,t);function e(r){var i;return Aj(this,e),i=Cj(this,sc(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(pm(Error));te();te();te();te();te();te();var A7=oc(lj()),x7=(0,R1.promisify)(C1.Stream.pipeline);te();te();var k7=oc(pj());te();te();te();var ke=class extends Error{constructor(t,e){var r;super(t),this.name="ConvertError",this.type=(r=e==null?void 0:e.type)!=null?r:"unknown",Error.captureStackTrace(this,ke)}};te();te();te();te();var Oj=/^(?!_)(?<manager>.+)@(?<version>.+)$/;function ot({workspaceRoot:t}){let e=Dr.default.join(t,"package.json");try{return(0,pt.readJsonSync)(e,"utf8")}catch(r){if(r&&typeof r=="object"&&"code"in r){if(r.code==="ENOENT")throw new ke(`no "package.json" found at ${t}`,{type:"package_json-missing"});if(r.code==="EJSONPARSE")throw new ke(`failed to parse "package.json" at ${t}`,{type:"package_json-parse_error"})}throw new Error(`unexpected error reading "package.json" at ${t}`)}}function ac({workspaceRoot:t}){let{packageManager:e}=ot({workspaceRoot:t});if(e)try{let r=Oj.exec(e);if(r){let[i,n]=r;return n}}catch{}}function oo({workspaceRoot:t}){let e=ot({workspaceRoot:t}),r=Dr.default.basename(t),{name:i=r,description:n}=e;return{name:i,description:n}}function i1({workspaceRoot:t}){let e=Dr.default.join(t,"pnpm-workspace.yaml");if((0,pt.existsSync)(e))try{let r=Wc.load((0,pt.readFileSync)(e,"utf8"));if(r instanceof Object&&"packages"in r&&Array.isArray(r.packages))return r.packages}catch{throw new ke(`failed to parse ${e}`,{type:"pnpm-workspace_parse_error"})}return[]}function uc({root:t,lockFile:e,workspaceConfig:r}){let i=s=>Dr.default.join(t,s),n={root:t,lockfile:i(e),packageJson:i("package.json"),nodeModules:i("node_modules")};return r&&(n.workspaceConfig=i(r)),n}function Sm({workspaces:t}){var e;return t?Array.isArray(t)?t:"packages"in t?(e=t.packages)!=null?e:[]:[]:[]}function cc({workspaceRoot:t,workspaceGlobs:e}){return e?e.flatMap(r=>{let i=[`${r}/package.json`];return(0,L1.sync)(i,{onlyFiles:!0,absolute:!0,cwd:t,ignore:["**/node_modules/**"]})}).map(r=>{let i=Dr.default.dirname(r),{name:n,description:s}=oo({workspaceRoot:i});return{name:n,description:s,paths:{root:i,packageJson:r,nodeModules:Dr.default.join(i,"node_modules")}}}):[]}function Fj({directory:t}){let e=Dr.default.resolve(process.cwd(),t);return{exists:(0,pt.existsSync)(e),absolute:e}}function ei({packageManager:t,action:e,project:r}){let i=r.workspaceData.globs.length>0;return`${e==="remove"?"Removing":"Adding"} ${t} ${i?"workspaces":""} ${e==="remove"?"from":"to"} ${r.name}`}function Pj({project:t}){let e=r=>!(r.includes("*")&&(r.includes("**")||r.split("/").slice(0,-1).join("/").includes("*"))||["!","[","]","{","}"].some(i=>r.includes(i)));return t.workspaceData.globs.every(e)}function Sr({project:t,options:e}){e!=null&&e.dry||(0,pt.rmSync)(t.paths.lockfile,{force:!0})}async function B1({project:t,options:e}){if(!(e!=null&&e.dry)&&(0,pt.existsSync)(t.paths.lockfile))try{let{stdout:r}=await(0,P1.default)("bun",["bun.lockb"],{stdin:"ignore",cwd:t.paths.root});await(0,pt.writeFile)(Dr.default.join(t.paths.root,"yarn.lock"),r)}catch{}finally{(0,pt.rmSync)(t.paths.lockfile,{force:!0})}}function Lj({dependencyList:t,project:e,to:r}){let i=[];return e.workspaceData.workspaces.forEach(n=>{let{name:s}=n;if(t[s]){let o=t[s],a=o.startsWith("workspace:")?o.slice(10):o;t[s]=r.name==="pnpm"?`workspace:${a}`:a,i.push(s)}}),{dependencyList:t,updated:i}}function Xr({project:t,workspace:e,to:r,logger:i,options:n}){if(["yarn","npm","bun"].includes(r.name)&&["yarn","npm","bun"].includes(t.packageManager))return;let s=ot({workspaceRoot:e.paths.root}),o={dependencies:[],devDependencies:[],peerDependencies:[],optionalDependencies:[]},a=["dependencies","devDependencies","peerDependencies","optionalDependencies"];a.forEach(h=>{let f=s[h];if(f){let{updated:d,dependencyList:m}=Lj({dependencyList:f,project:t,to:r});s[h]=m,o[h]=d}});let u=h=>{let f=o[h].length;if(f>0)return`${F1.default.green(f.toString())} ${h}`},c=a.map(u).filter(Boolean),l=`./${k1.default.relative(t.paths.root,e.paths.packageJson)}`;if(c.length>=1){let h="updating";c.forEach((f,d)=>{c.length===1?h+=` ${f} in ${l}`:d===c.length-1?h+=`and ${f} in ${l}`:h+=` ${f}, `}),i.workspaceStep(h)}else i.workspaceStep(`no workspace dependencies found in ${l}`);n!=null&&n.dry||(0,O1.writeJSONSync)(e.paths.packageJson,s,{spaces:2})}var Qr={name:"pnpm",lock:"pnpm-lock.yaml"};async function I1(t){let e=Ri.default.join(t.workspaceRoot,Qr.lock),r=Ri.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=ac({workspaceRoot:t.workspaceRoot});return(0,Qe.existsSync)(e)||(0,Qe.existsSync)(r)||i===Qr.name}async function Bj(t){if(!await I1(t))throw new ke("Not a pnpm project",{type:"package_manager-unexpected"});let{name:e,description:r}=oo(t);return{name:e,description:r,packageManager:Qr.name,paths:uc({root:t.workspaceRoot,lockFile:Qr.lock,workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:i1(t),workspaces:cc({workspaceGlobs:i1(t),...t})}}}async function Ij(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(ei({action:"create",packageManager:Qr.name,project:e}));let o=ot({workspaceRoot:e.paths.root});i.rootHeader(),o.packageManager=`${r.name}@${r.version}`,i.rootStep(`adding "packageManager" field to ${e.name} root "package.json"`),n!=null&&n.dry||((0,Qe.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),(0,Qe.writeFileSync)(Ri.default.join(e.paths.root,"pnpm-workspace.yaml"),`packages:
|
57
57
|
${e.workspaceData.globs.map(a=>` - "${a}"`).join(`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-turbo",
|
3
|
-
"version": "1.12.
|
3
|
+
"version": "1.12.2",
|
4
4
|
"description": "Create a new Turborepo",
|
5
5
|
"homepage": "https://turbo.build/repo",
|
6
6
|
"license": "MPL-2.0",
|
@@ -37,10 +37,10 @@
|
|
37
37
|
"tsup": "^6.7.0",
|
38
38
|
"typescript": "^5.2.2",
|
39
39
|
"@turbo/eslint-config": "0.0.0",
|
40
|
-
"@turbo/test-utils": "0.0.0",
|
41
|
-
"@turbo/utils": "0.0.0",
|
42
40
|
"@turbo/tsconfig": "0.0.0",
|
43
|
-
"@turbo/
|
41
|
+
"@turbo/test-utils": "0.0.0",
|
42
|
+
"@turbo/workspaces": "1.12.2",
|
43
|
+
"@turbo/utils": "0.0.0"
|
44
44
|
},
|
45
45
|
"files": [
|
46
46
|
"dist"
|