create-turbo 1.13.2 → 1.13.3-canary.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/cli.js +1 -1
  2. 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 ${Dr.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=Vn.default.resolve(t);await Sm(Vn.default.dirname(o))||(bt("The application path is not writable, please check folder permissions and try again."),bt("It is likely you do not have write permissions for this folder."),process.exit(1));let a=Vn.default.basename(o);try{await(0,Kn.mkdir)(o,{recursive:!0})}catch(p){bt("Unable to create project directory"),bt(p),process.exit(1)}let{isEmpty:u,conflicts:c}=Ds(o);u||(bt(`${Dr.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=rf("Downloading files...");try{!r&&n?(_t(`
53
53
  Downloading files from repo ${Dr.default.cyan(e)}. This might take a moment.`),_t(),h.start(),await(0,Dm.default)(()=>wm(o,n),{retries:3})):(_t(`
54
- Downloading files${r?"":` for example ${Dr.default.cyan(e)}`}. This might take a moment.`),_t(),h.start(),await(0,Dm.default)(()=>vm(o,e),{retries:3}))}catch(p){throw new Yn(bj(p)?p.message:String(p))}finally{h.stop()}let f=Vn.default.join(o,"package.json"),d=(0,Kn.existsSync)(f),m=[];if(d){let p;try{p=(0,Kn.readJsonSync)(f)}catch{}p&&m.push(...Object.keys(p.scripts||{}))}let y=t;return Vn.default.join(l,a)===t&&(y=a),{cdPath:y,hasPackageJson:d,availableScripts:m,repoInfo:n}}var hc=require("fs");var q1=oe(require("chalk"));var Om=oe(require("os")),L1=oe(require("crypto")),B1=oe(require("path")),I1=oe(P1());function N1(t){let e=process.version,r=Om.default.type(),i=Om.default.arch();return`${t.name} ${t.version} ${e} ${r} ${i}`}async function M1(){let t=process.env.TURBO_CONFIG_DIR_PATH?process.env.TURBO_CONFIG_DIR_PATH:await(0,I1.configDir)();if(!t)throw new Error("Could not find telemetry config directory");return B1.default.join(t,"turborepo","telemetry.json")}function j1({input:t,salt:e}){return L1.default.createHash("sha256").update(`${e}${t}`).digest("hex")}var Tj="TURBO_TELEMETRY_DEBUG",kj="TURBO_TELEMETRY_DISABLED",Oj="TURBO_TELEMETRY_MESSAGE_DISABLED",Fj="DO_NOT_TRACK",xr=class{constructor({configPath:e,config:r}){this.config=r,this.configPath=e}static async fromDefaultConfig(){try{let e=await M1(),r=(0,hc.readFileSync)(e,"utf-8"),i=JSON.parse(r);return new xr({configPath:e,config:i})}catch{return}}write(){let e=JSON.stringify(this.config,null,2);(0,hc.writeFileSync)(this.configPath,e)}hasSeenAlert(){return this.config.telemetry_alerted!==void 0}isEnabled(){let e=process.env[Fj]||"0",r=process.env[kj]||"0";return e==="1"||e.toLowerCase()==="true"||r==="1"||r.toLowerCase()==="true"?!1:this.config.telemetry_enabled}isTelemetryWarningEnabled(){let e=process.env[Oj]||"0";return!(e==="1"||e.toLowerCase()==="true")}get id(){return this.config.telemetry_id}showAlert(){!this.hasSeenAlert()&&this.isEnabled()&&this.isTelemetryWarningEnabled()&&(se.log(),se.bold("Attention:"),se.grey("Turborepo now collects completely anonymous telemetry regarding usage."),se.grey("This information is used to shape the Turborepo roadmap and prioritize features."),se.grey("You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"),se.underline(q1.default.grey("https://turbo.build/repo/docs/telemetry"))),this.alertShown()}enable(){this.config.telemetry_enabled=!0,this.write()}disable(){this.config.telemetry_enabled=!1,this.write()}alertShown(){return this.hasSeenAlert()||(this.config.telemetry_alerted=new Date,this.write()),!0}oneWayHash(e){return j1({input:e,salt:this.config.telemetry_salt})}static isDebug(){let e=process.env[Tj]||"0";return e==="1"||e.toLowerCase()==="true"}};var G1=oe(ym());var H1=oe(require("crypto")),dc=new Uint8Array(256),fc=dc.length;function Fm(){return fc>dc.length-16&&(H1.default.randomFillSync(dc),fc=0),dc.slice(fc,fc+=16)}var He=[];for(let t=0;t<256;++t)He.push((t+256).toString(16).slice(1));function U1(t,e=0){return(He[t[e+0]]+He[t[e+1]]+He[t[e+2]]+He[t[e+3]]+"-"+He[t[e+4]]+He[t[e+5]]+"-"+He[t[e+6]]+He[t[e+7]]+"-"+He[t[e+8]]+He[t[e+9]]+"-"+He[t[e+10]]+He[t[e+11]]+He[t[e+12]]+He[t[e+13]]+He[t[e+14]]+He[t[e+15]]).toLowerCase()}var $1=oe(require("crypto")),Pm={randomUUID:$1.default.randomUUID};function Pj(t,e,r){if(Pm.randomUUID&&!e&&!t)return Pm.randomUUID();t=t||{};let i=t.random||(t.rng||Fm)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let n=0;n<16;++n)e[r+n]=i[n];return e}return U1(i)}var pc=Pj;var Lj=20,Bj="/api/turborepo/v1/events",Pi=class{constructor({api:e,packageInfo:r,config:i,opts:n}){this.batchSize=Lj;this.timeout=250;this.sessionId=pc();this.eventBatches=[];this.events=[];let s=new URL(Bj,e);this.api=s.toString(),this.packageInfo=r,this.config=i,n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.batchSize&&(this.batchSize=n.batchSize)}hasPendingEvents(){return this.events.length!==0}async waitForFlush(){await Promise.all(this.eventBatches)}flushEvents(){let e=this.events.splice(0,this.batchSize);this.config.isEnabled()&&this.eventBatches.push(G1.default.post(this.api,{timeout:this.timeout,json:e,headers:{"x-turbo-telemetry-id":this.config.id,"x-turbo-session-id":this.sessionId,"User-Agent":N1(this.packageInfo)}}))}track({key:e,value:r,parentId:i,isSensitive:n}){let s={id:pc(),key:e,value:n?this.config.oneWayHash(r):r,package_name:this.packageInfo.name,package_version:this.packageInfo.version,parent_id:i};return xr.isDebug()&&(se.log(),se.bold("[telemetry event]"),se.dimmed(JSON.stringify(s,null,2)),se.log()),this.config.isEnabled()&&(this.events.push({package:s}),this.events.length>=this.batchSize&&this.flushEvents()),s}async close(){for(;this.hasPendingEvents();)this.flushEvents();try{await this.waitForFlush()}catch{}}trackCliOption({option:e,value:r}){return this.track({key:`option:${e}`,value:r})}trackCliArgument({argument:e,value:r}){return this.track({key:`argument:${e}`,value:r})}trackCliCommand({command:e,value:r}){return this.track({key:`command:${e}`,value:r})}trackCommandStatus({command:e,status:r}){return this.trackCliCommand({command:e,value:r})}};var ro=class extends Pi{trackOptionExample(e){if(e)return this.trackCliOption({option:"example",value:e})}trackOptionPackageManager(e){if(e)return this.trackCliOption({option:"package_manager",value:e})}trackOptionSkipInstall(e){if(e)return this.trackCliOption({option:"skip_install",value:e.toString()})}trackOptionSkipTransforms(e){if(e)return this.trackCliOption({option:"skip_transforms",value:e.toString()})}trackOptionTurboVersion(e){if(e)return this.trackCliOption({option:"turbo_version",value:e})}trackOptionExamplePath(e){if(e)return this.trackCliOption({option:"example_path",value:e})}trackArgumentDirectory(e){if(e)return this.trackCliArgument({argument:"project_directory",value:e.toString()})}trackArgumentPackageManager(e){if(e)return this.trackCliArgument({argument:"package_manager",value:e})}};var mc=class extends Pi{trackExecutionEnv(){return this.track({key:"execution_env",value:process.env.VERCEL==="1"?"vercel":"local"})}};var Ij={"create-turbo":ro,"turbo-ignore":mc},Nj="https://telemetry.vercel.com";async function Lm({packageInfo:t,opts:e}){let r=Ij[t.name],i=await xr.fromDefaultConfig();return i?(i.showAlert(),{telemetry:new r({api:Nj,packageInfo:t,config:i,opts:e})}):{telemetry:void 0}}var io=oe(require("chalk"));var z1=require("commander"),W1="status",Mj=["enable","disable",W1];function jj(t){var r;let e=(r=t.telemetry)==null?void 0:r.config.isEnabled();se.log(`Status: ${e?io.default.bold(io.default.green("Enabled")):io.default.bold(io.default.red("Disabled"))}`),se.log(),e?se.log("Turborepo telemetry is completely anonymous. Thank you for participating!"):se.log("You have opted-out of Turborepo anonymous telemetry. No data will be collected from your machine."),se.log("Learn more: https://turbo.build/repo/docs/telemetry")}function qj(t,e){if(!e.telemetry){se.error("Telemetry client not found");return}t==="enable"?(e.telemetry.config.enable(),se.bold("Success!")):t==="disable"&&(e.telemetry.config.disable(),se.bold("Success!")),se.log(),jj(e)}function Bm(t){t.command("telemetry").description("Manage telemetry settings").addArgument(new z1.Argument("[action]","Action to perform").choices(Mj).default(W1)).action(qj)}var cR=require("proxy-agent");var Li={name:"create-turbo",version:"1.13.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:"4.1.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/telemetry":"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 V1=oe(require("chalk")),Y1=oe(require("update-check"));var Uj=(0,Y1.default)(Li).catch(()=>null);async function Im(){try{let t=await Uj;t!=null&&t.latest&&(se.log(),se.log(V1.default.yellow.bold("A new version of `create-turbo` is available!")),se.log()),process.exit()}catch{}}var po=oe(require("path")),Ue=oe(require("chalk"));var ni=oe(require("chalk"),1),lC=oe(ya(),1),hC=oe(ba(),1),yC=oe(require("os"),1),gC=oe(fn(),1),lG=require("fs-extra");var mG=oe(ta(),1),gG=require("fs-extra"),bG=require("fs-extra"),wG=require("chalk"),bC=require("stream"),EC=require("util"),xG=require("fs-extra"),TG=require("chalk"),OG=require("fs-extra"),Bi=oe(require("path"),1),et=require("fs-extra"),wC=oe(fn(),1),vC=oe(require("path"),1),SC=require("fs-extra"),DC=oe(require("chalk"),1),Cr=oe(require("path"),1),xC=oe(fn(),1),mt=require("fs-extra"),AC=oe(ta(),1);var so=oe(require("path"),1),Xt=require("fs-extra"),es=oe(require("path"),1),Qt=require("fs-extra"),oo=oe(require("path"),1),er=require("fs-extra"),pt=oe(require("chalk"),1),FC=oe(ba(),1),PC=oe(fn(),1),LC=oe(ya(),1),BC=require("semver"),IC=oe(require("chalk"),1),$j=Object.create,jm=Object.defineProperty,Gj=Object.getOwnPropertyDescriptor,zj=Object.getOwnPropertyNames,Wj=Object.getPrototypeOf,Vj=Object.prototype.hasOwnProperty,fe=(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')}),Yj=(t,e)=>()=>(t&&(e=t(t=0)),e),le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kj=(t,e)=>{for(var r in e)jm(t,r,{get:e[r],enumerable:!0})},Zj=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zj(e))!Vj.call(t,n)&&n!==r&&jm(t,n,{get:()=>e[n],enumerable:!(i=Gj(e,n))||i.enumerable});return t},bc=(t,e,r)=>(r=t!=null?$j(Wj(t)):{},Zj(e||!t||!t.__esModule?jm(r,"default",{value:t,enumerable:!0}):r,t)),ee=Yj(()=>{}),Jj=le((t,e)=>{ee();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}),Xj=le((t,e)=>{ee();var r=Jj().default;function i(){"use strict";e.exports=i=function(){return s},e.exports.__esModule=!0,e.exports.default=e.exports;var n,s={},o=Object.prototype,a=o.hasOwnProperty,u=Object.defineProperty||function(q,g,_){q[g]=_.value},c=typeof Symbol=="function"?Symbol:{},l=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(q,g,_){return Object.defineProperty(q,g,{value:_,enumerable:!0,configurable:!0,writable:!0}),q[g]}try{d({},"")}catch{d=function(q,g,_){return q[g]=_}}function m(q,g,_,E){var R=g&&g.prototype instanceof T?g:T,D=Object.create(R.prototype),U=new G(E||[]);return u(D,"_invoke",{value:te(q,_,U)}),D}function y(q,g,_){try{return{type:"normal",arg:q.call(g,_)}}catch(E){return{type:"throw",arg:E}}}s.wrap=m;var p="suspendedStart",w="suspendedYield",C="executing",F="completed",P={};function T(){}function M(){}function S(){}var x={};d(x,l,function(){return this});var H=Object.getPrototypeOf,W=H&&H(H(Z([])));W&&W!==o&&a.call(W,l)&&(x=W);var N=S.prototype=T.prototype=Object.create(x);function V(q){["next","throw","return"].forEach(function(g){d(q,g,function(_){return this._invoke(g,_)})})}function Q(q,g){function _(R,D,U,$){var ie=y(q[R],q,D);if(ie.type!=="throw"){var Y=ie.arg,ue=Y.value;return ue&&r(ue)=="object"&&a.call(ue,"__await")?g.resolve(ue.__await).then(function(J){_("next",J,U,$)},function(J){_("throw",J,U,$)}):g.resolve(ue).then(function(J){Y.value=J,U(Y)},function(J){return _("throw",J,U,$)})}$(ie.arg)}var E;u(this,"_invoke",{value:function(R,D){function U(){return new g(function($,ie){_(R,D,$,ie)})}return E=E?E.then(U,U):U()}})}function te(q,g,_){var E=p;return function(R,D){if(E===C)throw new Error("Generator is already running");if(E===F){if(R==="throw")throw D;return{value:n,done:!0}}for(_.method=R,_.arg=D;;){var U=_.delegate;if(U){var $=j(U,_);if($){if($===P)continue;return $}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(E===p)throw E=F,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);E=C;var ie=y(q,g,_);if(ie.type==="normal"){if(E=_.done?F:w,ie.arg===P)continue;return{value:ie.arg,done:_.done}}ie.type==="throw"&&(E=F,_.method="throw",_.arg=ie.arg)}}}function j(q,g){var _=g.method,E=q.iterator[_];if(E===n)return g.delegate=null,_==="throw"&&q.iterator.return&&(g.method="return",g.arg=n,j(q,g),g.method==="throw")||_!=="return"&&(g.method="throw",g.arg=new TypeError("The iterator does not provide a '"+_+"' method")),P;var R=y(E,q.iterator,g.arg);if(R.type==="throw")return g.method="throw",g.arg=R.arg,g.delegate=null,P;var D=R.arg;return D?D.done?(g[q.resultName]=D.value,g.next=q.nextLoc,g.method!=="return"&&(g.method="next",g.arg=n),g.delegate=null,P):D:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,P)}function L(q){var g={tryLoc:q[0]};1 in q&&(g.catchLoc=q[1]),2 in q&&(g.finallyLoc=q[2],g.afterLoc=q[3]),this.tryEntries.push(g)}function B(q){var g=q.completion||{};g.type="normal",delete g.arg,q.completion=g}function G(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(L,this),this.reset(!0)}function Z(q){if(q||q===""){var g=q[l];if(g)return g.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length)){var _=-1,E=function R(){for(;++_<q.length;)if(a.call(q,_))return R.value=q[_],R.done=!1,R;return R.value=n,R.done=!0,R};return E.next=E}}throw new TypeError(r(q)+" is not iterable")}return M.prototype=S,u(N,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:M,configurable:!0}),M.displayName=d(S,f,"GeneratorFunction"),s.isGeneratorFunction=function(q){var g=typeof q=="function"&&q.constructor;return!!g&&(g===M||(g.displayName||g.name)==="GeneratorFunction")},s.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,S):(q.__proto__=S,d(q,f,"GeneratorFunction")),q.prototype=Object.create(N),q},s.awrap=function(q){return{__await:q}},V(Q.prototype),d(Q.prototype,h,function(){return this}),s.AsyncIterator=Q,s.async=function(q,g,_,E,R){R===void 0&&(R=Promise);var D=new Q(m(q,g,_,E),R);return s.isGeneratorFunction(g)?D:D.next().then(function(U){return U.done?U.value:D.next()})},V(N),d(N,f,"Generator"),d(N,l,function(){return this}),d(N,"toString",function(){return"[object Generator]"}),s.keys=function(q){var g=Object(q),_=[];for(var E in g)_.push(E);return _.reverse(),function R(){for(;_.length;){var D=_.pop();if(D in g)return R.value=D,R.done=!1,R}return R.done=!0,R}},s.values=Z,G.prototype={constructor:G,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(B),!q)for(var g in this)g.charAt(0)==="t"&&a.call(this,g)&&!isNaN(+g.slice(1))&&(this[g]=n)},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval},dispatchException:function(q){if(this.done)throw q;var g=this;function _(ie,Y){return D.type="throw",D.arg=q,g.next=ie,Y&&(g.method="next",g.arg=n),!!Y}for(var E=this.tryEntries.length-1;E>=0;--E){var R=this.tryEntries[E],D=R.completion;if(R.tryLoc==="root")return _("end");if(R.tryLoc<=this.prev){var U=a.call(R,"catchLoc"),$=a.call(R,"finallyLoc");if(U&&$){if(this.prev<R.catchLoc)return _(R.catchLoc,!0);if(this.prev<R.finallyLoc)return _(R.finallyLoc)}else if(U){if(this.prev<R.catchLoc)return _(R.catchLoc,!0)}else{if(!$)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return _(R.finallyLoc)}}}},abrupt:function(q,g){for(var _=this.tryEntries.length-1;_>=0;--_){var E=this.tryEntries[_];if(E.tryLoc<=this.prev&&a.call(E,"finallyLoc")&&this.prev<E.finallyLoc){var R=E;break}}R&&(q==="break"||q==="continue")&&R.tryLoc<=g&&g<=R.finallyLoc&&(R=null);var D=R?R.completion:{};return D.type=q,D.arg=g,R?(this.method="next",this.next=R.finallyLoc,P):this.complete(D)},complete:function(q,g){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&g&&(this.next=g),P},finish:function(q){for(var g=this.tryEntries.length-1;g>=0;--g){var _=this.tryEntries[g];if(_.finallyLoc===q)return this.complete(_.completion,_.afterLoc),B(_),P}},catch:function(q){for(var g=this.tryEntries.length-1;g>=0;--g){var _=this.tryEntries[g];if(_.tryLoc===q){var E=_.completion;if(E.type==="throw"){var R=E.arg;B(_)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(q,g,_){return this.delegate={iterator:Z(q),resultName:g,nextLoc:_},this.method==="next"&&(this.arg=n),P}},s}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),Qj=le((t,e)=>{ee();var r=Xj()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),eq=le((t,e)=>{"use strict";ee();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),tq=le((t,e)=>{"use strict";ee();var r=eq(),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}),rq=le((t,e)=>{"use strict";ee();var r=tq(),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}),iq=le((t,e)=>{"use strict";ee();var r=fe("path"),i=fe("fs"),{promisify:n}=fe("util"),s=rq(),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{}}}),nq=le((t,e)=>{"use strict";ee();var r=fe("fs"),{promisify:i}=fe("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}}}),sq=le((t,e)=>{"use strict";ee();var r=fe("path"),i=iq(),n=nq(),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}),ao=le((t,e)=>{"use strict";ee();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)):{}}),qm=le((t,e)=>{"use strict";ee();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=fe("events"),n=fe("stream"),s=fe("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"),w=Symbol("flowing"),C=Symbol("paused"),F=Symbol("resume"),P=Symbol("buffer"),T=Symbol("pipes"),M=Symbol("bufferLength"),S=Symbol("bufferPush"),x=Symbol("bufferShift"),H=Symbol("objectMode"),W=Symbol("destroyed"),N=Symbol("emitData"),V=Symbol("emitEnd"),Q=Symbol("emitEnd2"),te=Symbol("async"),j=R=>Promise.resolve().then(R),L=global._MP_NO_ITERATOR_SYMBOLS_!=="1",B=L&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),G=L&&Symbol.iterator||Symbol("iterator not implemented"),Z=R=>R==="end"||R==="finish"||R==="prefinish",q=R=>R instanceof ArrayBuffer||typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,g=R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),_=class{constructor(R,D,U){this.src=R,this.dest=D,this.opts=U,this.ondrain=()=>R[F](),D.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},E=class extends _{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,D,U){super(R,D,U),this.proxyErrors=$=>D.emit("error",$),R.on("error",this.proxyErrors)}};e.exports=class J1 extends n{constructor(D){super(),this[w]=!1,this[C]=!1,this[T]=[],this[P]=[],this[H]=D&&D.objectMode||!1,this[H]?this[y]=null:this[y]=D&&D.encoding||null,this[y]==="buffer"&&(this[y]=null),this[te]=D&&!!D.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,D&&D.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),D&&D.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]})}get bufferLength(){return this[M]}get encoding(){return this[y]}set encoding(D){if(this[H])throw new Error("cannot set encoding in objectMode");if(this[y]&&D!==this[y]&&(this[p]&&this[p].lastNeed||this[M]))throw new Error("cannot change encoding");this[y]!==D&&(this[p]=D?new s(D):null,this[P].length&&(this[P]=this[P].map(U=>this[p].write(U)))),this[y]=D}setEncoding(D){this.encoding=D}get objectMode(){return this[H]}set objectMode(D){this[H]=this[H]||!!D}get async(){return this[te]}set async(D){this[te]=this[te]||!!D}write(D,U,$){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 U=="function"&&($=U,U="utf8"),U||(U="utf8");let ie=this[te]?j:Y=>Y();return!this[H]&&!Buffer.isBuffer(D)&&(g(D)?D=Buffer.from(D.buffer,D.byteOffset,D.byteLength):q(D)?D=Buffer.from(D):typeof D!="string"&&(this.objectMode=!0)),this[H]?(this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",D):this[S](D),this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing):D.length?(typeof D=="string"&&!(U===this[y]&&!this[p].lastNeed)&&(D=Buffer.from(D,U)),Buffer.isBuffer(D)&&this[y]&&(D=this[p].write(D)),this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",D):this[S](D),this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing):(this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing)}read(D){if(this[W])return null;if(this[M]===0||D===0||D>this[M])return this[a](),null;this[H]&&(D=null),this[P].length>1&&!this[H]&&(this.encoding?this[P]=[this[P].join("")]:this[P]=[Buffer.concat(this[P],this[M])]);let U=this[f](D||null,this[P][0]);return this[a](),U}[f](D,U){return D===U.length||D===null?this[x]():(this[P][0]=U.slice(D),U=U.slice(0,D),this[M]-=D),this.emit("data",U),!this[P].length&&!this[o]&&this.emit("drain"),U}end(D,U,$){return typeof D=="function"&&($=D,D=null),typeof U=="function"&&($=U,U="utf8"),D&&this.write(D,U),$&&this.once("end",$),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[F](){this[W]||(this[C]=!1,this[w]=!0,this.emit("resume"),this[P].length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[F]()}pause(){this[w]=!1,this[C]=!0}get destroyed(){return this[W]}get flowing(){return this[w]}get paused(){return this[C]}[S](D){this[H]?this[M]+=1:this[M]+=D.length,this[P].push(D)}[x](){return this[P].length&&(this[H]?this[M]-=1:this[M]-=this[P][0].length),this[P].shift()}[d](D){do;while(this[m](this[x]()));!D&&!this[P].length&&!this[o]&&this.emit("drain")}[m](D){return D?(this.emit("data",D),this.flowing):!1}pipe(D,U){if(this[W])return;let $=this[u];return U=U||{},D===r.stdout||D===r.stderr?U.end=!1:U.end=U.end!==!1,U.proxyErrors=!!U.proxyErrors,$?U.end&&D.end():(this[T].push(U.proxyErrors?new E(this,D,U):new _(this,D,U)),this[te]?j(()=>this[F]()):this[F]()),D}unpipe(D){let U=this[T].find($=>$.dest===D);U&&(this[T].splice(this[T].indexOf(U),1),U.unpipe())}addListener(D,U){return this.on(D,U)}on(D,U){let $=super.on(D,U);return D==="data"&&!this[T].length&&!this.flowing?this[F]():D==="readable"&&this[M]!==0?super.emit("readable"):Z(D)&&this[u]?(super.emit(D),this.removeAllListeners(D)):D==="error"&&this[l]&&(this[te]?j(()=>U.call(this,this[l])):U.call(this,this[l])),$}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[W]&&this[P].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(D,U,...$){if(D!=="error"&&D!=="close"&&D!==W&&this[W])return;if(D==="data")return U?this[te]?j(()=>this[N](U)):this[N](U):!1;if(D==="end")return this[V]();if(D==="close"){if(this[h]=!0,!this[u]&&!this[W])return;let Y=super.emit("close");return this.removeAllListeners("close"),Y}else if(D==="error"){this[l]=U;let Y=super.emit("error",U);return this[a](),Y}else if(D==="resume"){let Y=super.emit("resume");return this[a](),Y}else if(D==="finish"||D==="prefinish"){let Y=super.emit(D);return this.removeAllListeners(D),Y}let ie=super.emit(D,U,...$);return this[a](),ie}[N](D){for(let $ of this[T])$.dest.write(D)===!1&&this.pause();let U=super.emit("data",D);return this[a](),U}[V](){this[u]||(this[u]=!0,this.readable=!1,this[te]?j(()=>this[Q]()):this[Q]())}[Q](){if(this[p]){let U=this[p].end();if(U){for(let $ of this[T])$.dest.write(U);super.emit("data",U)}}for(let U of this[T])U.end();let D=super.emit("end");return this.removeAllListeners("end"),D}collect(){let D=[];this[H]||(D.dataLength=0);let U=this.promise();return this.on("data",$=>{D.push($),this[H]||(D.dataLength+=$.length)}),U.then(()=>D)}concat(){return this[H]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(D=>this[H]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?D.join(""):Buffer.concat(D,D.dataLength))}promise(){return new Promise((D,U)=>{this.on(W,()=>U(new Error("stream destroyed"))),this.on("error",$=>U($)),this.on("end",()=>D())})}[B](){return{next:()=>{let D=this.read();if(D!==null)return Promise.resolve({done:!1,value:D});if(this[o])return Promise.resolve({done:!0});let U=null,$=null,ie=v=>{this.removeListener("data",Y),this.removeListener("end",ue),$(v)},Y=v=>{this.removeListener("error",ie),this.removeListener("end",ue),this.pause(),U({value:v,done:!!this[o]})},ue=()=>{this.removeListener("error",ie),this.removeListener("data",Y),U({done:!0})},J=()=>ie(new Error("stream destroyed"));return new Promise((v,I)=>{$=I,U=v,this.once(W,J),this.once("error",ie),this.once("end",ue),this.once("data",Y)})}}}[G](){return{next:()=>{let D=this.read();return{value:D,done:D===null}}}}destroy(D){return this[W]?(D?this.emit("error",D):this.emit(W),this):(this[W]=!0,this[P].length=0,this[M]=0,typeof this.close=="function"&&!this[h]&&this.close(),D?this.emit("error",D):this.emit(W),this)}static isStream(D){return!!D&&(D instanceof J1||D instanceof n||D instanceof i&&(typeof D.pipe=="function"||typeof D.write=="function"&&typeof D.end=="function"))}}}),oq=le((t,e)=>{ee();var r=fe("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))}),X1=le((t,e)=>{"use strict";ee();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=fe("events"),n=fe("stream"),s=fe("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"),w=Symbol("flowing"),C=Symbol("paused"),F=Symbol("resume"),P=Symbol("bufferLength"),T=Symbol("bufferPush"),M=Symbol("bufferShift"),S=Symbol("objectMode"),x=Symbol("destroyed"),H=Symbol("emitData"),W=Symbol("emitEnd"),N=Symbol("emitEnd2"),V=Symbol("async"),Q=_=>Promise.resolve().then(_),te=global._MP_NO_ITERATOR_SYMBOLS_!=="1",j=te&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),L=te&&Symbol.iterator||Symbol("iterator not implemented"),B=_=>_==="end"||_==="finish"||_==="prefinish",G=_=>_ instanceof ArrayBuffer||typeof _=="object"&&_.constructor&&_.constructor.name==="ArrayBuffer"&&_.byteLength>=0,Z=_=>!Buffer.isBuffer(_)&&ArrayBuffer.isView(_),q=class{constructor(_,E,R){this.src=_,this.dest=E,this.opts=R,this.ondrain=()=>_[F](),E.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},g=class extends q{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(_,E,R){super(_,E,R),this.proxyErrors=D=>E.emit("error",D),_.on("error",this.proxyErrors)}};e.exports=class Q1 extends n{constructor(E){super(),this[w]=!1,this[C]=!1,this.pipes=[],this.buffer=[],this[S]=E&&E.objectMode||!1,this[S]?this[y]=null:this[y]=E&&E.encoding||null,this[y]==="buffer"&&(this[y]=null),this[V]=E&&!!E.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[P]=0,this[x]=!1}get bufferLength(){return this[P]}get encoding(){return this[y]}set encoding(E){if(this[S])throw new Error("cannot set encoding in objectMode");if(this[y]&&E!==this[y]&&(this[p]&&this[p].lastNeed||this[P]))throw new Error("cannot change encoding");this[y]!==E&&(this[p]=E?new s(E):null,this.buffer.length&&(this.buffer=this.buffer.map(R=>this[p].write(R)))),this[y]=E}setEncoding(E){this.encoding=E}get objectMode(){return this[S]}set objectMode(E){this[S]=this[S]||!!E}get async(){return this[V]}set async(E){this[V]=this[V]||!!E}write(E,R,D){if(this[o])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof R=="function"&&(D=R,R="utf8"),R||(R="utf8");let U=this[V]?Q:$=>$();return!this[S]&&!Buffer.isBuffer(E)&&(Z(E)?E=Buffer.from(E.buffer,E.byteOffset,E.byteLength):G(E)?E=Buffer.from(E):typeof E!="string"&&(this.objectMode=!0)),this[S]?(this.flowing&&this[P]!==0&&this[d](!0),this.flowing?this.emit("data",E):this[T](E),this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing):E.length?(typeof E=="string"&&!(R===this[y]&&!this[p].lastNeed)&&(E=Buffer.from(E,R)),Buffer.isBuffer(E)&&this[y]&&(E=this[p].write(E)),this.flowing&&this[P]!==0&&this[d](!0),this.flowing?this.emit("data",E):this[T](E),this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing):(this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing)}read(E){if(this[x])return null;if(this[P]===0||E===0||E>this[P])return this[a](),null;this[S]&&(E=null),this.buffer.length>1&&!this[S]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[P])]);let R=this[f](E||null,this.buffer[0]);return this[a](),R}[f](E,R){return E===R.length||E===null?this[M]():(this.buffer[0]=R.slice(E),R=R.slice(0,E),this[P]-=E),this.emit("data",R),!this.buffer.length&&!this[o]&&this.emit("drain"),R}end(E,R,D){return typeof E=="function"&&(D=E,E=null),typeof R=="function"&&(D=R,R="utf8"),E&&this.write(E,R),D&&this.once("end",D),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[F](){this[x]||(this[C]=!1,this[w]=!0,this.emit("resume"),this.buffer.length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[F]()}pause(){this[w]=!1,this[C]=!0}get destroyed(){return this[x]}get flowing(){return this[w]}get paused(){return this[C]}[T](E){this[S]?this[P]+=1:this[P]+=E.length,this.buffer.push(E)}[M](){return this.buffer.length&&(this[S]?this[P]-=1:this[P]-=this.buffer[0].length),this.buffer.shift()}[d](E){do;while(this[m](this[M]()));!E&&!this.buffer.length&&!this[o]&&this.emit("drain")}[m](E){return E?(this.emit("data",E),this.flowing):!1}pipe(E,R){if(this[x])return;let D=this[u];return R=R||{},E===r.stdout||E===r.stderr?R.end=!1:R.end=R.end!==!1,R.proxyErrors=!!R.proxyErrors,D?R.end&&E.end():(this.pipes.push(R.proxyErrors?new g(this,E,R):new q(this,E,R)),this[V]?Q(()=>this[F]()):this[F]()),E}unpipe(E){let R=this.pipes.find(D=>D.dest===E);R&&(this.pipes.splice(this.pipes.indexOf(R),1),R.unpipe())}addListener(E,R){return this.on(E,R)}on(E,R){let D=super.on(E,R);return E==="data"&&!this.pipes.length&&!this.flowing?this[F]():E==="readable"&&this[P]!==0?super.emit("readable"):B(E)&&this[u]?(super.emit(E),this.removeAllListeners(E)):E==="error"&&this[l]&&(this[V]?Q(()=>R.call(this,this[l])):R.call(this,this[l])),D}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[x]&&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(E,R,...D){if(E!=="error"&&E!=="close"&&E!==x&&this[x])return;if(E==="data")return R?this[V]?Q(()=>this[H](R)):this[H](R):!1;if(E==="end")return this[W]();if(E==="close"){if(this[h]=!0,!this[u]&&!this[x])return;let $=super.emit("close");return this.removeAllListeners("close"),$}else if(E==="error"){this[l]=R;let $=super.emit("error",R);return this[a](),$}else if(E==="resume"){let $=super.emit("resume");return this[a](),$}else if(E==="finish"||E==="prefinish"){let $=super.emit(E);return this.removeAllListeners(E),$}let U=super.emit(E,R,...D);return this[a](),U}[H](E){for(let D of this.pipes)D.dest.write(E)===!1&&this.pause();let R=super.emit("data",E);return this[a](),R}[W](){this[u]||(this[u]=!0,this.readable=!1,this[V]?Q(()=>this[N]()):this[N]())}[N](){if(this[p]){let R=this[p].end();if(R){for(let D of this.pipes)D.dest.write(R);super.emit("data",R)}}for(let R of this.pipes)R.end();let E=super.emit("end");return this.removeAllListeners("end"),E}collect(){let E=[];this[S]||(E.dataLength=0);let R=this.promise();return this.on("data",D=>{E.push(D),this[S]||(E.dataLength+=D.length)}),R.then(()=>E)}concat(){return this[S]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(E=>this[S]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?E.join(""):Buffer.concat(E,E.dataLength))}promise(){return new Promise((E,R)=>{this.on(x,()=>R(new Error("stream destroyed"))),this.on("error",D=>R(D)),this.on("end",()=>E())})}[j](){return{next:()=>{let E=this.read();if(E!==null)return Promise.resolve({done:!1,value:E});if(this[o])return Promise.resolve({done:!0});let R=null,D=null,U=ue=>{this.removeListener("data",$),this.removeListener("end",ie),D(ue)},$=ue=>{this.removeListener("error",U),this.removeListener("end",ie),this.pause(),R({value:ue,done:!!this[o]})},ie=()=>{this.removeListener("error",U),this.removeListener("data",$),R({done:!0})},Y=()=>U(new Error("stream destroyed"));return new Promise((ue,J)=>{D=J,R=ue,this.once(x,Y),this.once("error",U),this.once("end",ie),this.once("data",$)})}}}[L](){return{next:()=>{let E=this.read();return{value:E,done:E===null}}}}destroy(E){return this[x]?(E?this.emit("error",E):this.emit(x),this):(this[x]=!0,this.buffer.length=0,this[P]=0,typeof this.close=="function"&&!this[h]&&this.close(),E?this.emit("error",E):this.emit(x),this)}static isStream(E){return!!E&&(E instanceof Q1||E instanceof n||E instanceof i&&(typeof E.pipe=="function"||typeof E.write=="function"&&typeof E.end=="function"))}}}),eC=le(t=>{"use strict";ee();var e=fe("assert"),r=fe("buffer").Buffer,i=fe("zlib"),n=t.constants=oq(),s=X1(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(B){super("zlib: "+B.message),this.code=B.code,this.errno=B.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+B.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"),w=Symbol("strategy"),C=Symbol("ended"),F=Symbol("_defaultFullFlush"),P=class extends s{constructor(B,G){if(!B||typeof B!="object")throw new TypeError("invalid options for ZlibBase constructor");super(B),this[y]=!1,this[C]=!1,this[c]=B,this[l]=B.flush,this[h]=B.finishFlush;try{this[d]=new i[G](B)}catch(Z){throw new u(Z)}this[m]=Z=>{this[y]||(this[y]=!0,this.close(),this.emit("error",Z))},this[d].on("error",Z=>this[m](new u(Z))),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(B){this.ended||(typeof B!="number"&&(B=this[f]),this.write(Object.assign(r.alloc(0),{[l]:B})))}end(B,G,Z){return B&&this.write(B,G),this.flush(this[h]),this[C]=!0,super.end(null,null,Z)}get ended(){return this[C]}write(B,G,Z){if(typeof G=="function"&&(Z=G,G="utf8"),typeof B=="string"&&(B=r.from(B,G)),this[y])return;e(this[d],"zlib binding closed");let q=this[d]._handle,g=q.close;q.close=()=>{};let _=this[d].close;this[d].close=()=>{},r.concat=D=>D;let E;try{let D=typeof B[l]=="number"?B[l]:this[l];E=this[d]._processChunk(B,D),r.concat=o}catch(D){r.concat=o,this[m](new u(D))}finally{this[d]&&(this[d]._handle=q,q.close=g,this[d].close=_,this[d].removeAllListeners("error"))}this[d]&&this[d].on("error",D=>this[m](new u(D)));let R;if(E)if(Array.isArray(E)&&E.length>0){R=this[a](r.from(E[0]));for(let D=1;D<E.length;D++)R=this[a](E[D])}else R=this[a](r.from(E));return Z&&Z(),R}[a](B){return super.write(B)}},T=class extends P{constructor(B,G){B=B||{},B.flush=B.flush||n.Z_NO_FLUSH,B.finishFlush=B.finishFlush||n.Z_FINISH,super(B,G),this[f]=n.Z_FULL_FLUSH,this[p]=B.level,this[w]=B.strategy}params(B,G){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]!==B||this[w]!==G){this.flush(n.Z_SYNC_FLUSH),e(this[d],"zlib binding closed");let Z=this[d].flush;this[d].flush=(q,g)=>{this.flush(q),g()};try{this[d].params(B,G)}finally{this[d].flush=Z}this[d]&&(this[p]=B,this[w]=G)}}}},M=class extends T{constructor(B){super(B,"Deflate")}},S=class extends T{constructor(B){super(B,"Inflate")}},x=Symbol("_portable"),H=class extends T{constructor(B){super(B,"Gzip"),this[x]=B&&!!B.portable}[a](B){return this[x]?(this[x]=!1,B[9]=255,super[a](B)):super[a](B)}},W=class extends T{constructor(B){super(B,"Gunzip")}},N=class extends T{constructor(B){super(B,"DeflateRaw")}},V=class extends T{constructor(B){super(B,"InflateRaw")}},Q=class extends T{constructor(B){super(B,"Unzip")}},te=class extends P{constructor(B,G){B=B||{},B.flush=B.flush||n.BROTLI_OPERATION_PROCESS,B.finishFlush=B.finishFlush||n.BROTLI_OPERATION_FINISH,super(B,G),this[f]=n.BROTLI_OPERATION_FLUSH}},j=class extends te{constructor(B){super(B,"BrotliCompress")}},L=class extends te{constructor(B){super(B,"BrotliDecompress")}};t.Deflate=M,t.Inflate=S,t.Gzip=H,t.Gunzip=W,t.DeflateRaw=N,t.InflateRaw=V,t.Unzip=Q,typeof i.BrotliCompress=="function"?(t.BrotliCompress=j,t.BrotliDecompress=L):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),uo=le((t,e)=>{ee();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),Hm=le((t,e)=>{"use strict";ee();var r=qm(),i=uo(),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])}}}),tC=le(t=>{"use strict";ee(),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]]))}),aq=le((t,e)=>{"use strict";ee();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}}),co=le((t,e)=>{"use strict";ee();var r=tC(),i=fe("path").posix,n=aq(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(S,x,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(S)?this.decode(S,x||0,H,W):S&&this.set(S)}decode(S,x,H,W){if(x||(x=0),!S||!(S.length>=x+512))throw new Error("need 512 bytes for header");if(this.path=c(S,x,100),this.mode=f(S,x+100,8),this.uid=f(S,x+108,8),this.gid=f(S,x+116,8),this.size=f(S,x+124,12),this.mtime=l(S,x+136,12),this.cksum=f(S,x+148,12),this[s](H),this[s](W,!0),this[o]=c(S,x+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(S,x+157,100),S.slice(x+257,x+265).toString()==="ustar\x0000")if(this.uname=c(S,x+265,32),this.gname=c(S,x+297,32),this.devmaj=f(S,x+329,8),this.devmin=f(S,x+337,8),S[x+475]!==0){let V=c(S,x+345,155);this.path=V+"/"+this.path}else{let V=c(S,x+345,130);V&&(this.path=V+"/"+this.path),this.atime=l(S,x+476,12),this.ctime=l(S,x+488,12)}let N=8*32;for(let V=x;V<x+148;V++)N+=S[V];for(let V=x+156;V<x+512;V++)N+=S[V];this.cksumValid=N===this.cksum,this.cksum===null&&N===8*32&&(this.nullBlock=!0)}[s](S,x){for(let H in S)S[H]!==null&&S[H]!==void 0&&!(x&&H==="path")&&(this[H]=S[H])}encode(S,x){if(S||(S=this.block=Buffer.alloc(512),x=0),x||(x=0),!(S.length>=x+512))throw new Error("need 512 bytes for header");let H=this.ctime||this.atime?130:155,W=u(this.path||"",H),N=W[0],V=W[1];this.needPax=W[2],this.needPax=M(S,x,100,N)||this.needPax,this.needPax=p(S,x+100,8,this.mode)||this.needPax,this.needPax=p(S,x+108,8,this.uid)||this.needPax,this.needPax=p(S,x+116,8,this.gid)||this.needPax,this.needPax=p(S,x+124,12,this.size)||this.needPax,this.needPax=P(S,x+136,12,this.mtime)||this.needPax,S[x+156]=this[o].charCodeAt(0),this.needPax=M(S,x+157,100,this.linkpath)||this.needPax,S.write("ustar\x0000",x+257,8),this.needPax=M(S,x+265,32,this.uname)||this.needPax,this.needPax=M(S,x+297,32,this.gname)||this.needPax,this.needPax=p(S,x+329,8,this.devmaj)||this.needPax,this.needPax=p(S,x+337,8,this.devmin)||this.needPax,this.needPax=M(S,x+345,H,V)||this.needPax,S[x+475]!==0?this.needPax=M(S,x+345,155,V)||this.needPax:(this.needPax=M(S,x+345,130,V)||this.needPax,this.needPax=P(S,x+476,12,this.atime)||this.needPax,this.needPax=P(S,x+488,12,this.ctime)||this.needPax);let Q=8*32;for(let te=x;te<x+148;te++)Q+=S[te];for(let te=x+156;te<x+512;te++)Q+=S[te];return this.cksum=Q,p(S,x+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(S){for(let x in S)S[x]!==null&&S[x]!==void 0&&(this[x]=S[x])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(S){r.code.has(S)?this[o]=r.code.get(S):this[o]=S}},u=(S,x)=>{let H=S,W="",N,V=i.parse(S).root||".";if(Buffer.byteLength(H)<100)N=[H,W,!1];else{W=i.dirname(H),H=i.basename(H);do Buffer.byteLength(H)<=100&&Buffer.byteLength(W)<=x?N=[H,W,!1]:Buffer.byteLength(H)>100&&Buffer.byteLength(W)<=x?N=[H.slice(0,100-1),W,!0]:(H=i.join(i.basename(W),H),W=i.dirname(W));while(W!==V&&!N);N||(N=[S.slice(0,100-1),"",!0])}return N},c=(S,x,H)=>S.slice(x,x+H).toString("utf8").replace(/\0.*/,""),l=(S,x,H)=>h(f(S,x,H)),h=S=>S===null?null:new Date(S*1e3),f=(S,x,H)=>S[x]&128?n.parse(S.slice(x,x+H)):m(S,x,H),d=S=>isNaN(S)?null:S,m=(S,x,H)=>d(parseInt(S.slice(x,x+H).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},p=(S,x,H,W)=>W===null?!1:W>y[H]||W<0?(n.encode(W,S.slice(x,x+H)),!0):(w(S,x,H,W),!1),w=(S,x,H,W)=>S.write(C(W,H),x,H,"ascii"),C=(S,x)=>F(Math.floor(S).toString(8),x),F=(S,x)=>(S.length===x-1?S:new Array(x-S.length-1).join("0")+S+" ")+"\0",P=(S,x,H,W)=>W===null?!1:p(S,x,H,W.getTime()/1e3),T=new Array(156).join("\0"),M=(S,x,H,W)=>W===null?!1:(S.write(W+T,x,H,"utf8"),W.length!==Buffer.byteLength(W)||W.length>H);e.exports=a}),Um=le((t,e)=>{"use strict";ee();var r=co(),i=fe("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 ${Dr.default.cyan(e)}`}. This might take a moment.`),_t(),h.start(),await(0,Dm.default)(()=>vm(o,e),{retries:3}))}catch(p){throw new Yn(bj(p)?p.message:String(p))}finally{h.stop()}let f=Vn.default.join(o,"package.json"),d=(0,Kn.existsSync)(f),m=[];if(d){let p;try{p=(0,Kn.readJsonSync)(f)}catch{}p&&m.push(...Object.keys(p.scripts||{}))}let y=t;return Vn.default.join(l,a)===t&&(y=a),{cdPath:y,hasPackageJson:d,availableScripts:m,repoInfo:n}}var hc=require("fs");var q1=oe(require("chalk"));var Om=oe(require("os")),L1=oe(require("crypto")),B1=oe(require("path")),I1=oe(P1());function N1(t){let e=process.version,r=Om.default.type(),i=Om.default.arch();return`${t.name} ${t.version} ${e} ${r} ${i}`}async function M1(){let t=process.env.TURBO_CONFIG_DIR_PATH?process.env.TURBO_CONFIG_DIR_PATH:await(0,I1.configDir)();if(!t)throw new Error("Could not find telemetry config directory");return B1.default.join(t,"turborepo","telemetry.json")}function j1({input:t,salt:e}){return L1.default.createHash("sha256").update(`${e}${t}`).digest("hex")}var Tj="TURBO_TELEMETRY_DEBUG",kj="TURBO_TELEMETRY_DISABLED",Oj="TURBO_TELEMETRY_MESSAGE_DISABLED",Fj="DO_NOT_TRACK",xr=class{constructor({configPath:e,config:r}){this.config=r,this.configPath=e}static async fromDefaultConfig(){try{let e=await M1(),r=(0,hc.readFileSync)(e,"utf-8"),i=JSON.parse(r);return new xr({configPath:e,config:i})}catch{return}}write(){let e=JSON.stringify(this.config,null,2);(0,hc.writeFileSync)(this.configPath,e)}hasSeenAlert(){return this.config.telemetry_alerted!==void 0}isEnabled(){let e=process.env[Fj]||"0",r=process.env[kj]||"0";return e==="1"||e.toLowerCase()==="true"||r==="1"||r.toLowerCase()==="true"?!1:this.config.telemetry_enabled}isTelemetryWarningEnabled(){let e=process.env[Oj]||"0";return!(e==="1"||e.toLowerCase()==="true")}get id(){return this.config.telemetry_id}showAlert(){!this.hasSeenAlert()&&this.isEnabled()&&this.isTelemetryWarningEnabled()&&(se.log(),se.bold("Attention:"),se.grey("Turborepo now collects completely anonymous telemetry regarding usage."),se.grey("This information is used to shape the Turborepo roadmap and prioritize features."),se.grey("You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"),se.underline(q1.default.grey("https://turbo.build/repo/docs/telemetry"))),this.alertShown()}enable(){this.config.telemetry_enabled=!0,this.write()}disable(){this.config.telemetry_enabled=!1,this.write()}alertShown(){return this.hasSeenAlert()||(this.config.telemetry_alerted=new Date,this.write()),!0}oneWayHash(e){return j1({input:e,salt:this.config.telemetry_salt})}static isDebug(){let e=process.env[Tj]||"0";return e==="1"||e.toLowerCase()==="true"}};var G1=oe(ym());var H1=oe(require("crypto")),dc=new Uint8Array(256),fc=dc.length;function Fm(){return fc>dc.length-16&&(H1.default.randomFillSync(dc),fc=0),dc.slice(fc,fc+=16)}var He=[];for(let t=0;t<256;++t)He.push((t+256).toString(16).slice(1));function U1(t,e=0){return(He[t[e+0]]+He[t[e+1]]+He[t[e+2]]+He[t[e+3]]+"-"+He[t[e+4]]+He[t[e+5]]+"-"+He[t[e+6]]+He[t[e+7]]+"-"+He[t[e+8]]+He[t[e+9]]+"-"+He[t[e+10]]+He[t[e+11]]+He[t[e+12]]+He[t[e+13]]+He[t[e+14]]+He[t[e+15]]).toLowerCase()}var $1=oe(require("crypto")),Pm={randomUUID:$1.default.randomUUID};function Pj(t,e,r){if(Pm.randomUUID&&!e&&!t)return Pm.randomUUID();t=t||{};let i=t.random||(t.rng||Fm)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let n=0;n<16;++n)e[r+n]=i[n];return e}return U1(i)}var pc=Pj;var Lj=20,Bj="/api/turborepo/v1/events",Pi=class{constructor({api:e,packageInfo:r,config:i,opts:n}){this.batchSize=Lj;this.timeout=250;this.sessionId=pc();this.eventBatches=[];this.events=[];let s=new URL(Bj,e);this.api=s.toString(),this.packageInfo=r,this.config=i,n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.batchSize&&(this.batchSize=n.batchSize)}hasPendingEvents(){return this.events.length!==0}async waitForFlush(){await Promise.all(this.eventBatches)}flushEvents(){let e=this.events.splice(0,this.batchSize);this.config.isEnabled()&&this.eventBatches.push(G1.default.post(this.api,{timeout:this.timeout,json:e,headers:{"x-turbo-telemetry-id":this.config.id,"x-turbo-session-id":this.sessionId,"User-Agent":N1(this.packageInfo)}}))}track({key:e,value:r,parentId:i,isSensitive:n}){let s={id:pc(),key:e,value:n?this.config.oneWayHash(r):r,package_name:this.packageInfo.name,package_version:this.packageInfo.version,parent_id:i};return xr.isDebug()&&(se.log(),se.bold("[telemetry event]"),se.dimmed(JSON.stringify(s,null,2)),se.log()),this.config.isEnabled()&&(this.events.push({package:s}),this.events.length>=this.batchSize&&this.flushEvents()),s}async close(){for(;this.hasPendingEvents();)this.flushEvents();try{await this.waitForFlush()}catch{}}trackCliOption({option:e,value:r}){return this.track({key:`option:${e}`,value:r})}trackCliArgument({argument:e,value:r}){return this.track({key:`argument:${e}`,value:r})}trackCliCommand({command:e,value:r}){return this.track({key:`command:${e}`,value:r})}trackCommandStatus({command:e,status:r}){return this.trackCliCommand({command:e,value:r})}};var ro=class extends Pi{trackOptionExample(e){if(e)return this.trackCliOption({option:"example",value:e})}trackOptionPackageManager(e){if(e)return this.trackCliOption({option:"package_manager",value:e})}trackOptionSkipInstall(e){if(e)return this.trackCliOption({option:"skip_install",value:e.toString()})}trackOptionSkipTransforms(e){if(e)return this.trackCliOption({option:"skip_transforms",value:e.toString()})}trackOptionTurboVersion(e){if(e)return this.trackCliOption({option:"turbo_version",value:e})}trackOptionExamplePath(e){if(e)return this.trackCliOption({option:"example_path",value:e})}trackArgumentDirectory(e){if(e)return this.trackCliArgument({argument:"project_directory",value:e.toString()})}trackArgumentPackageManager(e){if(e)return this.trackCliArgument({argument:"package_manager",value:e})}};var mc=class extends Pi{trackExecutionEnv(){return this.track({key:"execution_env",value:process.env.VERCEL==="1"?"vercel":"local"})}};var Ij={"create-turbo":ro,"turbo-ignore":mc},Nj="https://telemetry.vercel.com";async function Lm({packageInfo:t,opts:e}){let r=Ij[t.name],i=await xr.fromDefaultConfig();return i?(i.showAlert(),{telemetry:new r({api:Nj,packageInfo:t,config:i,opts:e})}):{telemetry:void 0}}var io=oe(require("chalk"));var z1=require("commander"),W1="status",Mj=["enable","disable",W1];function jj(t){var r;let e=(r=t.telemetry)==null?void 0:r.config.isEnabled();se.log(`Status: ${e?io.default.bold(io.default.green("Enabled")):io.default.bold(io.default.red("Disabled"))}`),se.log(),e?se.log("Turborepo telemetry is completely anonymous. Thank you for participating!"):se.log("You have opted-out of Turborepo anonymous telemetry. No data will be collected from your machine."),se.log("Learn more: https://turbo.build/repo/docs/telemetry")}function qj(t,e){if(!e.telemetry){se.error("Telemetry client not found");return}t==="enable"?(e.telemetry.config.enable(),se.bold("Success!")):t==="disable"&&(e.telemetry.config.disable(),se.bold("Success!")),se.log(),jj(e)}function Bm(t){t.command("telemetry").description("Manage telemetry settings").addArgument(new z1.Argument("[action]","Action to perform").choices(Mj).default(W1)).action(qj)}var cR=require("proxy-agent");var Li={name:"create-turbo",version:"1.13.3-canary.0",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:"4.1.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/telemetry":"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 V1=oe(require("chalk")),Y1=oe(require("update-check"));var Uj=(0,Y1.default)(Li).catch(()=>null);async function Im(){try{let t=await Uj;t!=null&&t.latest&&(se.log(),se.log(V1.default.yellow.bold("A new version of `create-turbo` is available!")),se.log()),process.exit()}catch{}}var po=oe(require("path")),Ue=oe(require("chalk"));var ni=oe(require("chalk"),1),lC=oe(ya(),1),hC=oe(ba(),1),yC=oe(require("os"),1),gC=oe(fn(),1),lG=require("fs-extra");var mG=oe(ta(),1),gG=require("fs-extra"),bG=require("fs-extra"),wG=require("chalk"),bC=require("stream"),EC=require("util"),xG=require("fs-extra"),TG=require("chalk"),OG=require("fs-extra"),Bi=oe(require("path"),1),et=require("fs-extra"),wC=oe(fn(),1),vC=oe(require("path"),1),SC=require("fs-extra"),DC=oe(require("chalk"),1),Cr=oe(require("path"),1),xC=oe(fn(),1),mt=require("fs-extra"),AC=oe(ta(),1);var so=oe(require("path"),1),Xt=require("fs-extra"),es=oe(require("path"),1),Qt=require("fs-extra"),oo=oe(require("path"),1),er=require("fs-extra"),pt=oe(require("chalk"),1),FC=oe(ba(),1),PC=oe(fn(),1),LC=oe(ya(),1),BC=require("semver"),IC=oe(require("chalk"),1),$j=Object.create,jm=Object.defineProperty,Gj=Object.getOwnPropertyDescriptor,zj=Object.getOwnPropertyNames,Wj=Object.getPrototypeOf,Vj=Object.prototype.hasOwnProperty,fe=(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')}),Yj=(t,e)=>()=>(t&&(e=t(t=0)),e),le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kj=(t,e)=>{for(var r in e)jm(t,r,{get:e[r],enumerable:!0})},Zj=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zj(e))!Vj.call(t,n)&&n!==r&&jm(t,n,{get:()=>e[n],enumerable:!(i=Gj(e,n))||i.enumerable});return t},bc=(t,e,r)=>(r=t!=null?$j(Wj(t)):{},Zj(e||!t||!t.__esModule?jm(r,"default",{value:t,enumerable:!0}):r,t)),ee=Yj(()=>{}),Jj=le((t,e)=>{ee();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}),Xj=le((t,e)=>{ee();var r=Jj().default;function i(){"use strict";e.exports=i=function(){return s},e.exports.__esModule=!0,e.exports.default=e.exports;var n,s={},o=Object.prototype,a=o.hasOwnProperty,u=Object.defineProperty||function(q,g,_){q[g]=_.value},c=typeof Symbol=="function"?Symbol:{},l=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(q,g,_){return Object.defineProperty(q,g,{value:_,enumerable:!0,configurable:!0,writable:!0}),q[g]}try{d({},"")}catch{d=function(q,g,_){return q[g]=_}}function m(q,g,_,E){var R=g&&g.prototype instanceof T?g:T,D=Object.create(R.prototype),U=new G(E||[]);return u(D,"_invoke",{value:te(q,_,U)}),D}function y(q,g,_){try{return{type:"normal",arg:q.call(g,_)}}catch(E){return{type:"throw",arg:E}}}s.wrap=m;var p="suspendedStart",w="suspendedYield",C="executing",F="completed",P={};function T(){}function M(){}function S(){}var x={};d(x,l,function(){return this});var H=Object.getPrototypeOf,W=H&&H(H(Z([])));W&&W!==o&&a.call(W,l)&&(x=W);var N=S.prototype=T.prototype=Object.create(x);function V(q){["next","throw","return"].forEach(function(g){d(q,g,function(_){return this._invoke(g,_)})})}function Q(q,g){function _(R,D,U,$){var ie=y(q[R],q,D);if(ie.type!=="throw"){var Y=ie.arg,ue=Y.value;return ue&&r(ue)=="object"&&a.call(ue,"__await")?g.resolve(ue.__await).then(function(J){_("next",J,U,$)},function(J){_("throw",J,U,$)}):g.resolve(ue).then(function(J){Y.value=J,U(Y)},function(J){return _("throw",J,U,$)})}$(ie.arg)}var E;u(this,"_invoke",{value:function(R,D){function U(){return new g(function($,ie){_(R,D,$,ie)})}return E=E?E.then(U,U):U()}})}function te(q,g,_){var E=p;return function(R,D){if(E===C)throw new Error("Generator is already running");if(E===F){if(R==="throw")throw D;return{value:n,done:!0}}for(_.method=R,_.arg=D;;){var U=_.delegate;if(U){var $=j(U,_);if($){if($===P)continue;return $}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(E===p)throw E=F,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);E=C;var ie=y(q,g,_);if(ie.type==="normal"){if(E=_.done?F:w,ie.arg===P)continue;return{value:ie.arg,done:_.done}}ie.type==="throw"&&(E=F,_.method="throw",_.arg=ie.arg)}}}function j(q,g){var _=g.method,E=q.iterator[_];if(E===n)return g.delegate=null,_==="throw"&&q.iterator.return&&(g.method="return",g.arg=n,j(q,g),g.method==="throw")||_!=="return"&&(g.method="throw",g.arg=new TypeError("The iterator does not provide a '"+_+"' method")),P;var R=y(E,q.iterator,g.arg);if(R.type==="throw")return g.method="throw",g.arg=R.arg,g.delegate=null,P;var D=R.arg;return D?D.done?(g[q.resultName]=D.value,g.next=q.nextLoc,g.method!=="return"&&(g.method="next",g.arg=n),g.delegate=null,P):D:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,P)}function L(q){var g={tryLoc:q[0]};1 in q&&(g.catchLoc=q[1]),2 in q&&(g.finallyLoc=q[2],g.afterLoc=q[3]),this.tryEntries.push(g)}function B(q){var g=q.completion||{};g.type="normal",delete g.arg,q.completion=g}function G(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(L,this),this.reset(!0)}function Z(q){if(q||q===""){var g=q[l];if(g)return g.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length)){var _=-1,E=function R(){for(;++_<q.length;)if(a.call(q,_))return R.value=q[_],R.done=!1,R;return R.value=n,R.done=!0,R};return E.next=E}}throw new TypeError(r(q)+" is not iterable")}return M.prototype=S,u(N,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:M,configurable:!0}),M.displayName=d(S,f,"GeneratorFunction"),s.isGeneratorFunction=function(q){var g=typeof q=="function"&&q.constructor;return!!g&&(g===M||(g.displayName||g.name)==="GeneratorFunction")},s.mark=function(q){return Object.setPrototypeOf?Object.setPrototypeOf(q,S):(q.__proto__=S,d(q,f,"GeneratorFunction")),q.prototype=Object.create(N),q},s.awrap=function(q){return{__await:q}},V(Q.prototype),d(Q.prototype,h,function(){return this}),s.AsyncIterator=Q,s.async=function(q,g,_,E,R){R===void 0&&(R=Promise);var D=new Q(m(q,g,_,E),R);return s.isGeneratorFunction(g)?D:D.next().then(function(U){return U.done?U.value:D.next()})},V(N),d(N,f,"Generator"),d(N,l,function(){return this}),d(N,"toString",function(){return"[object Generator]"}),s.keys=function(q){var g=Object(q),_=[];for(var E in g)_.push(E);return _.reverse(),function R(){for(;_.length;){var D=_.pop();if(D in g)return R.value=D,R.done=!1,R}return R.done=!0,R}},s.values=Z,G.prototype={constructor:G,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(B),!q)for(var g in this)g.charAt(0)==="t"&&a.call(this,g)&&!isNaN(+g.slice(1))&&(this[g]=n)},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval},dispatchException:function(q){if(this.done)throw q;var g=this;function _(ie,Y){return D.type="throw",D.arg=q,g.next=ie,Y&&(g.method="next",g.arg=n),!!Y}for(var E=this.tryEntries.length-1;E>=0;--E){var R=this.tryEntries[E],D=R.completion;if(R.tryLoc==="root")return _("end");if(R.tryLoc<=this.prev){var U=a.call(R,"catchLoc"),$=a.call(R,"finallyLoc");if(U&&$){if(this.prev<R.catchLoc)return _(R.catchLoc,!0);if(this.prev<R.finallyLoc)return _(R.finallyLoc)}else if(U){if(this.prev<R.catchLoc)return _(R.catchLoc,!0)}else{if(!$)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return _(R.finallyLoc)}}}},abrupt:function(q,g){for(var _=this.tryEntries.length-1;_>=0;--_){var E=this.tryEntries[_];if(E.tryLoc<=this.prev&&a.call(E,"finallyLoc")&&this.prev<E.finallyLoc){var R=E;break}}R&&(q==="break"||q==="continue")&&R.tryLoc<=g&&g<=R.finallyLoc&&(R=null);var D=R?R.completion:{};return D.type=q,D.arg=g,R?(this.method="next",this.next=R.finallyLoc,P):this.complete(D)},complete:function(q,g){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&g&&(this.next=g),P},finish:function(q){for(var g=this.tryEntries.length-1;g>=0;--g){var _=this.tryEntries[g];if(_.finallyLoc===q)return this.complete(_.completion,_.afterLoc),B(_),P}},catch:function(q){for(var g=this.tryEntries.length-1;g>=0;--g){var _=this.tryEntries[g];if(_.tryLoc===q){var E=_.completion;if(E.type==="throw"){var R=E.arg;B(_)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(q,g,_){return this.delegate={iterator:Z(q),resultName:g,nextLoc:_},this.method==="next"&&(this.arg=n),P}},s}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),Qj=le((t,e)=>{ee();var r=Xj()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),eq=le((t,e)=>{"use strict";ee();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),tq=le((t,e)=>{"use strict";ee();var r=eq(),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}),rq=le((t,e)=>{"use strict";ee();var r=tq(),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}),iq=le((t,e)=>{"use strict";ee();var r=fe("path"),i=fe("fs"),{promisify:n}=fe("util"),s=rq(),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{}}}),nq=le((t,e)=>{"use strict";ee();var r=fe("fs"),{promisify:i}=fe("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}}}),sq=le((t,e)=>{"use strict";ee();var r=fe("path"),i=iq(),n=nq(),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}),ao=le((t,e)=>{"use strict";ee();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)):{}}),qm=le((t,e)=>{"use strict";ee();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=fe("events"),n=fe("stream"),s=fe("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"),w=Symbol("flowing"),C=Symbol("paused"),F=Symbol("resume"),P=Symbol("buffer"),T=Symbol("pipes"),M=Symbol("bufferLength"),S=Symbol("bufferPush"),x=Symbol("bufferShift"),H=Symbol("objectMode"),W=Symbol("destroyed"),N=Symbol("emitData"),V=Symbol("emitEnd"),Q=Symbol("emitEnd2"),te=Symbol("async"),j=R=>Promise.resolve().then(R),L=global._MP_NO_ITERATOR_SYMBOLS_!=="1",B=L&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),G=L&&Symbol.iterator||Symbol("iterator not implemented"),Z=R=>R==="end"||R==="finish"||R==="prefinish",q=R=>R instanceof ArrayBuffer||typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,g=R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),_=class{constructor(R,D,U){this.src=R,this.dest=D,this.opts=U,this.ondrain=()=>R[F](),D.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},E=class extends _{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,D,U){super(R,D,U),this.proxyErrors=$=>D.emit("error",$),R.on("error",this.proxyErrors)}};e.exports=class J1 extends n{constructor(D){super(),this[w]=!1,this[C]=!1,this[T]=[],this[P]=[],this[H]=D&&D.objectMode||!1,this[H]?this[y]=null:this[y]=D&&D.encoding||null,this[y]==="buffer"&&(this[y]=null),this[te]=D&&!!D.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,D&&D.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[P]}),D&&D.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]})}get bufferLength(){return this[M]}get encoding(){return this[y]}set encoding(D){if(this[H])throw new Error("cannot set encoding in objectMode");if(this[y]&&D!==this[y]&&(this[p]&&this[p].lastNeed||this[M]))throw new Error("cannot change encoding");this[y]!==D&&(this[p]=D?new s(D):null,this[P].length&&(this[P]=this[P].map(U=>this[p].write(U)))),this[y]=D}setEncoding(D){this.encoding=D}get objectMode(){return this[H]}set objectMode(D){this[H]=this[H]||!!D}get async(){return this[te]}set async(D){this[te]=this[te]||!!D}write(D,U,$){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 U=="function"&&($=U,U="utf8"),U||(U="utf8");let ie=this[te]?j:Y=>Y();return!this[H]&&!Buffer.isBuffer(D)&&(g(D)?D=Buffer.from(D.buffer,D.byteOffset,D.byteLength):q(D)?D=Buffer.from(D):typeof D!="string"&&(this.objectMode=!0)),this[H]?(this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",D):this[S](D),this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing):D.length?(typeof D=="string"&&!(U===this[y]&&!this[p].lastNeed)&&(D=Buffer.from(D,U)),Buffer.isBuffer(D)&&this[y]&&(D=this[p].write(D)),this.flowing&&this[M]!==0&&this[d](!0),this.flowing?this.emit("data",D):this[S](D),this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing):(this[M]!==0&&this.emit("readable"),$&&ie($),this.flowing)}read(D){if(this[W])return null;if(this[M]===0||D===0||D>this[M])return this[a](),null;this[H]&&(D=null),this[P].length>1&&!this[H]&&(this.encoding?this[P]=[this[P].join("")]:this[P]=[Buffer.concat(this[P],this[M])]);let U=this[f](D||null,this[P][0]);return this[a](),U}[f](D,U){return D===U.length||D===null?this[x]():(this[P][0]=U.slice(D),U=U.slice(0,D),this[M]-=D),this.emit("data",U),!this[P].length&&!this[o]&&this.emit("drain"),U}end(D,U,$){return typeof D=="function"&&($=D,D=null),typeof U=="function"&&($=U,U="utf8"),D&&this.write(D,U),$&&this.once("end",$),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[F](){this[W]||(this[C]=!1,this[w]=!0,this.emit("resume"),this[P].length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[F]()}pause(){this[w]=!1,this[C]=!0}get destroyed(){return this[W]}get flowing(){return this[w]}get paused(){return this[C]}[S](D){this[H]?this[M]+=1:this[M]+=D.length,this[P].push(D)}[x](){return this[P].length&&(this[H]?this[M]-=1:this[M]-=this[P][0].length),this[P].shift()}[d](D){do;while(this[m](this[x]()));!D&&!this[P].length&&!this[o]&&this.emit("drain")}[m](D){return D?(this.emit("data",D),this.flowing):!1}pipe(D,U){if(this[W])return;let $=this[u];return U=U||{},D===r.stdout||D===r.stderr?U.end=!1:U.end=U.end!==!1,U.proxyErrors=!!U.proxyErrors,$?U.end&&D.end():(this[T].push(U.proxyErrors?new E(this,D,U):new _(this,D,U)),this[te]?j(()=>this[F]()):this[F]()),D}unpipe(D){let U=this[T].find($=>$.dest===D);U&&(this[T].splice(this[T].indexOf(U),1),U.unpipe())}addListener(D,U){return this.on(D,U)}on(D,U){let $=super.on(D,U);return D==="data"&&!this[T].length&&!this.flowing?this[F]():D==="readable"&&this[M]!==0?super.emit("readable"):Z(D)&&this[u]?(super.emit(D),this.removeAllListeners(D)):D==="error"&&this[l]&&(this[te]?j(()=>U.call(this,this[l])):U.call(this,this[l])),$}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[W]&&this[P].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(D,U,...$){if(D!=="error"&&D!=="close"&&D!==W&&this[W])return;if(D==="data")return U?this[te]?j(()=>this[N](U)):this[N](U):!1;if(D==="end")return this[V]();if(D==="close"){if(this[h]=!0,!this[u]&&!this[W])return;let Y=super.emit("close");return this.removeAllListeners("close"),Y}else if(D==="error"){this[l]=U;let Y=super.emit("error",U);return this[a](),Y}else if(D==="resume"){let Y=super.emit("resume");return this[a](),Y}else if(D==="finish"||D==="prefinish"){let Y=super.emit(D);return this.removeAllListeners(D),Y}let ie=super.emit(D,U,...$);return this[a](),ie}[N](D){for(let $ of this[T])$.dest.write(D)===!1&&this.pause();let U=super.emit("data",D);return this[a](),U}[V](){this[u]||(this[u]=!0,this.readable=!1,this[te]?j(()=>this[Q]()):this[Q]())}[Q](){if(this[p]){let U=this[p].end();if(U){for(let $ of this[T])$.dest.write(U);super.emit("data",U)}}for(let U of this[T])U.end();let D=super.emit("end");return this.removeAllListeners("end"),D}collect(){let D=[];this[H]||(D.dataLength=0);let U=this.promise();return this.on("data",$=>{D.push($),this[H]||(D.dataLength+=$.length)}),U.then(()=>D)}concat(){return this[H]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(D=>this[H]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?D.join(""):Buffer.concat(D,D.dataLength))}promise(){return new Promise((D,U)=>{this.on(W,()=>U(new Error("stream destroyed"))),this.on("error",$=>U($)),this.on("end",()=>D())})}[B](){return{next:()=>{let D=this.read();if(D!==null)return Promise.resolve({done:!1,value:D});if(this[o])return Promise.resolve({done:!0});let U=null,$=null,ie=v=>{this.removeListener("data",Y),this.removeListener("end",ue),$(v)},Y=v=>{this.removeListener("error",ie),this.removeListener("end",ue),this.pause(),U({value:v,done:!!this[o]})},ue=()=>{this.removeListener("error",ie),this.removeListener("data",Y),U({done:!0})},J=()=>ie(new Error("stream destroyed"));return new Promise((v,I)=>{$=I,U=v,this.once(W,J),this.once("error",ie),this.once("end",ue),this.once("data",Y)})}}}[G](){return{next:()=>{let D=this.read();return{value:D,done:D===null}}}}destroy(D){return this[W]?(D?this.emit("error",D):this.emit(W),this):(this[W]=!0,this[P].length=0,this[M]=0,typeof this.close=="function"&&!this[h]&&this.close(),D?this.emit("error",D):this.emit(W),this)}static isStream(D){return!!D&&(D instanceof J1||D instanceof n||D instanceof i&&(typeof D.pipe=="function"||typeof D.write=="function"&&typeof D.end=="function"))}}}),oq=le((t,e)=>{ee();var r=fe("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))}),X1=le((t,e)=>{"use strict";ee();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=fe("events"),n=fe("stream"),s=fe("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"),w=Symbol("flowing"),C=Symbol("paused"),F=Symbol("resume"),P=Symbol("bufferLength"),T=Symbol("bufferPush"),M=Symbol("bufferShift"),S=Symbol("objectMode"),x=Symbol("destroyed"),H=Symbol("emitData"),W=Symbol("emitEnd"),N=Symbol("emitEnd2"),V=Symbol("async"),Q=_=>Promise.resolve().then(_),te=global._MP_NO_ITERATOR_SYMBOLS_!=="1",j=te&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),L=te&&Symbol.iterator||Symbol("iterator not implemented"),B=_=>_==="end"||_==="finish"||_==="prefinish",G=_=>_ instanceof ArrayBuffer||typeof _=="object"&&_.constructor&&_.constructor.name==="ArrayBuffer"&&_.byteLength>=0,Z=_=>!Buffer.isBuffer(_)&&ArrayBuffer.isView(_),q=class{constructor(_,E,R){this.src=_,this.dest=E,this.opts=R,this.ondrain=()=>_[F](),E.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},g=class extends q{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(_,E,R){super(_,E,R),this.proxyErrors=D=>E.emit("error",D),_.on("error",this.proxyErrors)}};e.exports=class Q1 extends n{constructor(E){super(),this[w]=!1,this[C]=!1,this.pipes=[],this.buffer=[],this[S]=E&&E.objectMode||!1,this[S]?this[y]=null:this[y]=E&&E.encoding||null,this[y]==="buffer"&&(this[y]=null),this[V]=E&&!!E.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[P]=0,this[x]=!1}get bufferLength(){return this[P]}get encoding(){return this[y]}set encoding(E){if(this[S])throw new Error("cannot set encoding in objectMode");if(this[y]&&E!==this[y]&&(this[p]&&this[p].lastNeed||this[P]))throw new Error("cannot change encoding");this[y]!==E&&(this[p]=E?new s(E):null,this.buffer.length&&(this.buffer=this.buffer.map(R=>this[p].write(R)))),this[y]=E}setEncoding(E){this.encoding=E}get objectMode(){return this[S]}set objectMode(E){this[S]=this[S]||!!E}get async(){return this[V]}set async(E){this[V]=this[V]||!!E}write(E,R,D){if(this[o])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof R=="function"&&(D=R,R="utf8"),R||(R="utf8");let U=this[V]?Q:$=>$();return!this[S]&&!Buffer.isBuffer(E)&&(Z(E)?E=Buffer.from(E.buffer,E.byteOffset,E.byteLength):G(E)?E=Buffer.from(E):typeof E!="string"&&(this.objectMode=!0)),this[S]?(this.flowing&&this[P]!==0&&this[d](!0),this.flowing?this.emit("data",E):this[T](E),this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing):E.length?(typeof E=="string"&&!(R===this[y]&&!this[p].lastNeed)&&(E=Buffer.from(E,R)),Buffer.isBuffer(E)&&this[y]&&(E=this[p].write(E)),this.flowing&&this[P]!==0&&this[d](!0),this.flowing?this.emit("data",E):this[T](E),this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing):(this[P]!==0&&this.emit("readable"),D&&U(D),this.flowing)}read(E){if(this[x])return null;if(this[P]===0||E===0||E>this[P])return this[a](),null;this[S]&&(E=null),this.buffer.length>1&&!this[S]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[P])]);let R=this[f](E||null,this.buffer[0]);return this[a](),R}[f](E,R){return E===R.length||E===null?this[M]():(this.buffer[0]=R.slice(E),R=R.slice(0,E),this[P]-=E),this.emit("data",R),!this.buffer.length&&!this[o]&&this.emit("drain"),R}end(E,R,D){return typeof E=="function"&&(D=E,E=null),typeof R=="function"&&(D=R,R="utf8"),E&&this.write(E,R),D&&this.once("end",D),this[o]=!0,this.writable=!1,(this.flowing||!this[C])&&this[a](),this}[F](){this[x]||(this[C]=!1,this[w]=!0,this.emit("resume"),this.buffer.length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[F]()}pause(){this[w]=!1,this[C]=!0}get destroyed(){return this[x]}get flowing(){return this[w]}get paused(){return this[C]}[T](E){this[S]?this[P]+=1:this[P]+=E.length,this.buffer.push(E)}[M](){return this.buffer.length&&(this[S]?this[P]-=1:this[P]-=this.buffer[0].length),this.buffer.shift()}[d](E){do;while(this[m](this[M]()));!E&&!this.buffer.length&&!this[o]&&this.emit("drain")}[m](E){return E?(this.emit("data",E),this.flowing):!1}pipe(E,R){if(this[x])return;let D=this[u];return R=R||{},E===r.stdout||E===r.stderr?R.end=!1:R.end=R.end!==!1,R.proxyErrors=!!R.proxyErrors,D?R.end&&E.end():(this.pipes.push(R.proxyErrors?new g(this,E,R):new q(this,E,R)),this[V]?Q(()=>this[F]()):this[F]()),E}unpipe(E){let R=this.pipes.find(D=>D.dest===E);R&&(this.pipes.splice(this.pipes.indexOf(R),1),R.unpipe())}addListener(E,R){return this.on(E,R)}on(E,R){let D=super.on(E,R);return E==="data"&&!this.pipes.length&&!this.flowing?this[F]():E==="readable"&&this[P]!==0?super.emit("readable"):B(E)&&this[u]?(super.emit(E),this.removeAllListeners(E)):E==="error"&&this[l]&&(this[V]?Q(()=>R.call(this,this[l])):R.call(this,this[l])),D}get emittedEnd(){return this[u]}[a](){!this[c]&&!this[u]&&!this[x]&&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(E,R,...D){if(E!=="error"&&E!=="close"&&E!==x&&this[x])return;if(E==="data")return R?this[V]?Q(()=>this[H](R)):this[H](R):!1;if(E==="end")return this[W]();if(E==="close"){if(this[h]=!0,!this[u]&&!this[x])return;let $=super.emit("close");return this.removeAllListeners("close"),$}else if(E==="error"){this[l]=R;let $=super.emit("error",R);return this[a](),$}else if(E==="resume"){let $=super.emit("resume");return this[a](),$}else if(E==="finish"||E==="prefinish"){let $=super.emit(E);return this.removeAllListeners(E),$}let U=super.emit(E,R,...D);return this[a](),U}[H](E){for(let D of this.pipes)D.dest.write(E)===!1&&this.pause();let R=super.emit("data",E);return this[a](),R}[W](){this[u]||(this[u]=!0,this.readable=!1,this[V]?Q(()=>this[N]()):this[N]())}[N](){if(this[p]){let R=this[p].end();if(R){for(let D of this.pipes)D.dest.write(R);super.emit("data",R)}}for(let R of this.pipes)R.end();let E=super.emit("end");return this.removeAllListeners("end"),E}collect(){let E=[];this[S]||(E.dataLength=0);let R=this.promise();return this.on("data",D=>{E.push(D),this[S]||(E.dataLength+=D.length)}),R.then(()=>E)}concat(){return this[S]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(E=>this[S]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?E.join(""):Buffer.concat(E,E.dataLength))}promise(){return new Promise((E,R)=>{this.on(x,()=>R(new Error("stream destroyed"))),this.on("error",D=>R(D)),this.on("end",()=>E())})}[j](){return{next:()=>{let E=this.read();if(E!==null)return Promise.resolve({done:!1,value:E});if(this[o])return Promise.resolve({done:!0});let R=null,D=null,U=ue=>{this.removeListener("data",$),this.removeListener("end",ie),D(ue)},$=ue=>{this.removeListener("error",U),this.removeListener("end",ie),this.pause(),R({value:ue,done:!!this[o]})},ie=()=>{this.removeListener("error",U),this.removeListener("data",$),R({done:!0})},Y=()=>U(new Error("stream destroyed"));return new Promise((ue,J)=>{D=J,R=ue,this.once(x,Y),this.once("error",U),this.once("end",ie),this.once("data",$)})}}}[L](){return{next:()=>{let E=this.read();return{value:E,done:E===null}}}}destroy(E){return this[x]?(E?this.emit("error",E):this.emit(x),this):(this[x]=!0,this.buffer.length=0,this[P]=0,typeof this.close=="function"&&!this[h]&&this.close(),E?this.emit("error",E):this.emit(x),this)}static isStream(E){return!!E&&(E instanceof Q1||E instanceof n||E instanceof i&&(typeof E.pipe=="function"||typeof E.write=="function"&&typeof E.end=="function"))}}}),eC=le(t=>{"use strict";ee();var e=fe("assert"),r=fe("buffer").Buffer,i=fe("zlib"),n=t.constants=oq(),s=X1(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(B){super("zlib: "+B.message),this.code=B.code,this.errno=B.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+B.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"),w=Symbol("strategy"),C=Symbol("ended"),F=Symbol("_defaultFullFlush"),P=class extends s{constructor(B,G){if(!B||typeof B!="object")throw new TypeError("invalid options for ZlibBase constructor");super(B),this[y]=!1,this[C]=!1,this[c]=B,this[l]=B.flush,this[h]=B.finishFlush;try{this[d]=new i[G](B)}catch(Z){throw new u(Z)}this[m]=Z=>{this[y]||(this[y]=!0,this.close(),this.emit("error",Z))},this[d].on("error",Z=>this[m](new u(Z))),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(B){this.ended||(typeof B!="number"&&(B=this[f]),this.write(Object.assign(r.alloc(0),{[l]:B})))}end(B,G,Z){return B&&this.write(B,G),this.flush(this[h]),this[C]=!0,super.end(null,null,Z)}get ended(){return this[C]}write(B,G,Z){if(typeof G=="function"&&(Z=G,G="utf8"),typeof B=="string"&&(B=r.from(B,G)),this[y])return;e(this[d],"zlib binding closed");let q=this[d]._handle,g=q.close;q.close=()=>{};let _=this[d].close;this[d].close=()=>{},r.concat=D=>D;let E;try{let D=typeof B[l]=="number"?B[l]:this[l];E=this[d]._processChunk(B,D),r.concat=o}catch(D){r.concat=o,this[m](new u(D))}finally{this[d]&&(this[d]._handle=q,q.close=g,this[d].close=_,this[d].removeAllListeners("error"))}this[d]&&this[d].on("error",D=>this[m](new u(D)));let R;if(E)if(Array.isArray(E)&&E.length>0){R=this[a](r.from(E[0]));for(let D=1;D<E.length;D++)R=this[a](E[D])}else R=this[a](r.from(E));return Z&&Z(),R}[a](B){return super.write(B)}},T=class extends P{constructor(B,G){B=B||{},B.flush=B.flush||n.Z_NO_FLUSH,B.finishFlush=B.finishFlush||n.Z_FINISH,super(B,G),this[f]=n.Z_FULL_FLUSH,this[p]=B.level,this[w]=B.strategy}params(B,G){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]!==B||this[w]!==G){this.flush(n.Z_SYNC_FLUSH),e(this[d],"zlib binding closed");let Z=this[d].flush;this[d].flush=(q,g)=>{this.flush(q),g()};try{this[d].params(B,G)}finally{this[d].flush=Z}this[d]&&(this[p]=B,this[w]=G)}}}},M=class extends T{constructor(B){super(B,"Deflate")}},S=class extends T{constructor(B){super(B,"Inflate")}},x=Symbol("_portable"),H=class extends T{constructor(B){super(B,"Gzip"),this[x]=B&&!!B.portable}[a](B){return this[x]?(this[x]=!1,B[9]=255,super[a](B)):super[a](B)}},W=class extends T{constructor(B){super(B,"Gunzip")}},N=class extends T{constructor(B){super(B,"DeflateRaw")}},V=class extends T{constructor(B){super(B,"InflateRaw")}},Q=class extends T{constructor(B){super(B,"Unzip")}},te=class extends P{constructor(B,G){B=B||{},B.flush=B.flush||n.BROTLI_OPERATION_PROCESS,B.finishFlush=B.finishFlush||n.BROTLI_OPERATION_FINISH,super(B,G),this[f]=n.BROTLI_OPERATION_FLUSH}},j=class extends te{constructor(B){super(B,"BrotliCompress")}},L=class extends te{constructor(B){super(B,"BrotliDecompress")}};t.Deflate=M,t.Inflate=S,t.Gzip=H,t.Gunzip=W,t.DeflateRaw=N,t.InflateRaw=V,t.Unzip=Q,typeof i.BrotliCompress=="function"?(t.BrotliCompress=j,t.BrotliDecompress=L):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),uo=le((t,e)=>{ee();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),Hm=le((t,e)=>{"use strict";ee();var r=qm(),i=uo(),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])}}}),tC=le(t=>{"use strict";ee(),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]]))}),aq=le((t,e)=>{"use strict";ee();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}}),co=le((t,e)=>{"use strict";ee();var r=tC(),i=fe("path").posix,n=aq(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(S,x,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(S)?this.decode(S,x||0,H,W):S&&this.set(S)}decode(S,x,H,W){if(x||(x=0),!S||!(S.length>=x+512))throw new Error("need 512 bytes for header");if(this.path=c(S,x,100),this.mode=f(S,x+100,8),this.uid=f(S,x+108,8),this.gid=f(S,x+116,8),this.size=f(S,x+124,12),this.mtime=l(S,x+136,12),this.cksum=f(S,x+148,12),this[s](H),this[s](W,!0),this[o]=c(S,x+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(S,x+157,100),S.slice(x+257,x+265).toString()==="ustar\x0000")if(this.uname=c(S,x+265,32),this.gname=c(S,x+297,32),this.devmaj=f(S,x+329,8),this.devmin=f(S,x+337,8),S[x+475]!==0){let V=c(S,x+345,155);this.path=V+"/"+this.path}else{let V=c(S,x+345,130);V&&(this.path=V+"/"+this.path),this.atime=l(S,x+476,12),this.ctime=l(S,x+488,12)}let N=8*32;for(let V=x;V<x+148;V++)N+=S[V];for(let V=x+156;V<x+512;V++)N+=S[V];this.cksumValid=N===this.cksum,this.cksum===null&&N===8*32&&(this.nullBlock=!0)}[s](S,x){for(let H in S)S[H]!==null&&S[H]!==void 0&&!(x&&H==="path")&&(this[H]=S[H])}encode(S,x){if(S||(S=this.block=Buffer.alloc(512),x=0),x||(x=0),!(S.length>=x+512))throw new Error("need 512 bytes for header");let H=this.ctime||this.atime?130:155,W=u(this.path||"",H),N=W[0],V=W[1];this.needPax=W[2],this.needPax=M(S,x,100,N)||this.needPax,this.needPax=p(S,x+100,8,this.mode)||this.needPax,this.needPax=p(S,x+108,8,this.uid)||this.needPax,this.needPax=p(S,x+116,8,this.gid)||this.needPax,this.needPax=p(S,x+124,12,this.size)||this.needPax,this.needPax=P(S,x+136,12,this.mtime)||this.needPax,S[x+156]=this[o].charCodeAt(0),this.needPax=M(S,x+157,100,this.linkpath)||this.needPax,S.write("ustar\x0000",x+257,8),this.needPax=M(S,x+265,32,this.uname)||this.needPax,this.needPax=M(S,x+297,32,this.gname)||this.needPax,this.needPax=p(S,x+329,8,this.devmaj)||this.needPax,this.needPax=p(S,x+337,8,this.devmin)||this.needPax,this.needPax=M(S,x+345,H,V)||this.needPax,S[x+475]!==0?this.needPax=M(S,x+345,155,V)||this.needPax:(this.needPax=M(S,x+345,130,V)||this.needPax,this.needPax=P(S,x+476,12,this.atime)||this.needPax,this.needPax=P(S,x+488,12,this.ctime)||this.needPax);let Q=8*32;for(let te=x;te<x+148;te++)Q+=S[te];for(let te=x+156;te<x+512;te++)Q+=S[te];return this.cksum=Q,p(S,x+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(S){for(let x in S)S[x]!==null&&S[x]!==void 0&&(this[x]=S[x])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(S){r.code.has(S)?this[o]=r.code.get(S):this[o]=S}},u=(S,x)=>{let H=S,W="",N,V=i.parse(S).root||".";if(Buffer.byteLength(H)<100)N=[H,W,!1];else{W=i.dirname(H),H=i.basename(H);do Buffer.byteLength(H)<=100&&Buffer.byteLength(W)<=x?N=[H,W,!1]:Buffer.byteLength(H)>100&&Buffer.byteLength(W)<=x?N=[H.slice(0,100-1),W,!0]:(H=i.join(i.basename(W),H),W=i.dirname(W));while(W!==V&&!N);N||(N=[S.slice(0,100-1),"",!0])}return N},c=(S,x,H)=>S.slice(x,x+H).toString("utf8").replace(/\0.*/,""),l=(S,x,H)=>h(f(S,x,H)),h=S=>S===null?null:new Date(S*1e3),f=(S,x,H)=>S[x]&128?n.parse(S.slice(x,x+H)):m(S,x,H),d=S=>isNaN(S)?null:S,m=(S,x,H)=>d(parseInt(S.slice(x,x+H).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},p=(S,x,H,W)=>W===null?!1:W>y[H]||W<0?(n.encode(W,S.slice(x,x+H)),!0):(w(S,x,H,W),!1),w=(S,x,H,W)=>S.write(C(W,H),x,H,"ascii"),C=(S,x)=>F(Math.floor(S).toString(8),x),F=(S,x)=>(S.length===x-1?S:new Array(x-S.length-1).join("0")+S+" ")+"\0",P=(S,x,H,W)=>W===null?!1:p(S,x,H,W.getTime()/1e3),T=new Array(156).join("\0"),M=(S,x,H,W)=>W===null?!1:(S.write(W+T,x,H,"utf8"),W.length!==Buffer.byteLength(W)||W.length>H);e.exports=a}),Um=le((t,e)=>{"use strict";ee();var r=co(),i=fe("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}),lo=le((t,e)=>{ee(),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)}}),$m=le((t,e)=>{"use strict";ee(),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))}}}),rC=le((t,e)=>{"use strict";ee();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)}}),iC=le((t,e)=>{ee();var{isAbsolute:r,parse:i}=fe("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]}}),uq=le((t,e)=>{"use strict";ee(),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)}),nC=le((t,e)=>{"use strict";ee();var r=qm(),i=Um(),n=co(),s=fe("fs"),o=fe("path"),a=uo(),u=lo(),c=(_,E)=>E?(_=a(_).replace(/^\.(\/|$)/,""),u(E)+"/"+_):a(_),l=16*1024*1024,h=Symbol("process"),f=Symbol("file"),d=Symbol("directory"),m=Symbol("symlink"),y=Symbol("hardlink"),p=Symbol("header"),w=Symbol("read"),C=Symbol("lstat"),F=Symbol("onlstat"),P=Symbol("onread"),T=Symbol("onreadlink"),M=Symbol("openfile"),S=Symbol("onopenfile"),x=Symbol("close"),H=Symbol("mode"),W=Symbol("awaitDrain"),N=Symbol("ondrain"),V=Symbol("prefix"),Q=Symbol("hadError"),te=$m(),j=rC(),L=iC(),B=uq(),G=te(class extends r{constructor(_,E){if(E=E||{},super(E),typeof _!="string")throw new TypeError("path is required");this.path=a(_),this.portable=!!E.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=E.maxReadSize||l,this.linkCache=E.linkCache||new Map,this.statCache=E.statCache||new Map,this.preservePaths=!!E.preservePaths,this.cwd=a(E.cwd||process.cwd()),this.strict=!!E.strict,this.noPax=!!E.noPax,this.noMtime=!!E.noMtime,this.mtime=E.mtime||null,this.prefix=E.prefix?a(E.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 E.onwarn=="function"&&this.on("warn",E.onwarn);let R=!1;if(!this.preservePaths){let[D,U]=L(this.path);D&&(this.path=U,R=D)}this.win32=!!E.win32||process.platform==="win32",this.win32&&(this.path=j.decode(this.path.replace(/\\/g,"/")),_=_.replace(/\\/g,"/")),this.absolute=a(E.absolute||o.resolve(this.cwd,_)),this.path===""&&(this.path="./"),R&&this.warn("TAR_ENTRY_INFO",`stripping ${R} from absolute path`,{entry:this,path:R+this.path}),this.statCache.has(this.absolute)?this[F](this.statCache.get(this.absolute)):this[C]()}emit(_,...E){return _==="error"&&(this[Q]=!0),super.emit(_,...E)}[C](){s.lstat(this.absolute,(_,E)=>{if(_)return this.emit("error",_);this[F](E)})}[F](_){this.statCache.set(this.absolute,_),this.stat=_,_.isFile()||(_.size=0),this.type=g(_),this.emit("stat",_),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](_){return B(_,this.type==="Directory",this.portable)}[V](_){return c(_,this.prefix)}[p](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new n({path:this[V](this.path),linkpath:this.type==="Link"?this[V](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[V](this.path),linkpath:this.type==="Link"?this[V](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,(_,E)=>{if(_)return this.emit("error",_);this[T](E)})}[T](_){this.linkpath=a(_),this[p](),this.end()}[y](_){this.type="Link",this.linkpath=a(o.relative(this.cwd,_)),this.stat.size=0,this[p](),this.end()}[f](){if(this.stat.nlink>1){let _=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(_)){let E=this.linkCache.get(_);if(E.indexOf(this.cwd)===0)return this[y](E)}this.linkCache.set(_,this.absolute)}if(this[p](),this.stat.size===0)return this.end();this[M]()}[M](){s.open(this.absolute,"r",(_,E)=>{if(_)return this.emit("error",_);this[S](E)})}[S](_){if(this.fd=_,this[Q])return this[x]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let E=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(E),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[w]()}[w](){let{fd:_,buf:E,offset:R,length:D,pos:U}=this;s.read(_,E,R,D,U,($,ie)=>{if($)return this[x](()=>this.emit("error",$));this[P](ie)})}[x](_){s.close(this.fd,_)}[P](_){if(_<=0&&this.remain>0){let R=new Error("encountered unexpected EOF");return R.path=this.absolute,R.syscall="read",R.code="EOF",this[x](()=>this.emit("error",R))}if(_>this.remain){let R=new Error("did not encounter expected EOF");return R.path=this.absolute,R.syscall="read",R.code="EOF",this[x](()=>this.emit("error",R))}if(_===this.remain)for(let R=_;R<this.length&&_<this.blockRemain;R++)this.buf[R+this.offset]=0,_++,this.remain++;let E=this.offset===0&&_===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+_);this.write(E)?this[N]():this[W](()=>this[N]())}[W](_){this.once("drain",_)}write(_){if(this.blockRemain<_.length){let E=new Error("writing more data than expected");return E.path=this.absolute,this.emit("error",E)}return this.remain-=_.length,this.blockRemain-=_.length,this.pos+=_.length,this.offset+=_.length,super.write(_)}[N](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[x](_=>_?this.emit("error",_):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[w]()}}),Z=class extends G{[C](){this[F](s.lstatSync(this.absolute))}[m](){this[T](s.readlinkSync(this.absolute))}[M](){this[S](s.openSync(this.absolute,"r"))}[w](){let _=!0;try{let{fd:E,buf:R,offset:D,length:U,pos:$}=this,ie=s.readSync(E,R,D,U,$);this[P](ie),_=!1}finally{if(_)try{this[x](()=>{})}catch{}}}[W](_){_()}[x](_){s.closeSync(this.fd),_()}},q=te(class extends r{constructor(_,E){E=E||{},super(E),this.preservePaths=!!E.preservePaths,this.portable=!!E.portable,this.strict=!!E.strict,this.noPax=!!E.noPax,this.noMtime=!!E.noMtime,this.readEntry=_,this.type=_.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=E.prefix||null,this.path=a(_.path),this.mode=this[H](_.mode),this.uid=this.portable?null:_.uid,this.gid=this.portable?null:_.gid,this.uname=this.portable?null:_.uname,this.gname=this.portable?null:_.gname,this.size=_.size,this.mtime=this.noMtime?null:E.mtime||_.mtime,this.atime=this.portable?null:_.atime,this.ctime=this.portable?null:_.ctime,this.linkpath=a(_.linkpath),typeof E.onwarn=="function"&&this.on("warn",E.onwarn);let R=!1;if(!this.preservePaths){let[D,U]=L(this.path);D&&(this.path=U,R=D)}this.remain=_.size,this.blockRemain=_.startBlockSize,this.header=new n({path:this[V](this.path),linkpath:this.type==="Link"?this[V](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}),R&&this.warn("TAR_ENTRY_INFO",`stripping ${R} from absolute path`,{entry:this,path:R+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[V](this.path),linkpath:this.type==="Link"?this[V](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),_.pipe(this)}[V](_){return c(_,this.prefix)}[H](_){return B(_,this.type==="Directory",this.portable)}write(_){let E=_.length;if(E>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=E,super.write(_)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});G.Sync=Z,G.Tar=q;var g=_=>_.isFile()?"File":_.isDirectory()?"Directory":_.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=G}),cq=le((t,e)=>{"use strict";ee(),e.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}}),sC=le((t,e)=>{"use strict";ee(),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{cq()(r)}catch{}}),Gm=le((t,e)=>{"use strict";ee();var r=class{constructor(g,_){this.path=g||"./",this.absolute=_,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},i=qm(),n=eC(),s=Hm(),o=nC(),a=o.Sync,u=o.Tar,c=sC(),l=Buffer.alloc(1024),h=Symbol("onStat"),f=Symbol("ended"),d=Symbol("queue"),m=Symbol("current"),y=Symbol("process"),p=Symbol("processing"),w=Symbol("processJob"),C=Symbol("jobs"),F=Symbol("jobDone"),P=Symbol("addFSEntry"),T=Symbol("addTarEntry"),M=Symbol("stat"),S=Symbol("readdir"),x=Symbol("onreaddir"),H=Symbol("pipe"),W=Symbol("entry"),N=Symbol("entryOpt"),V=Symbol("writeEntryClass"),Q=Symbol("write"),te=Symbol("ondrain"),j=fe("fs"),L=fe("path"),B=$m(),G=uo(),Z=B(class extends i{constructor(g){super(g),g=g||Object.create(null),this.opt=g,this.file=g.file||"",this.cwd=g.cwd||process.cwd(),this.maxReadSize=g.maxReadSize,this.preservePaths=!!g.preservePaths,this.strict=!!g.strict,this.noPax=!!g.noPax,this.prefix=G(g.prefix||""),this.linkCache=g.linkCache||new Map,this.statCache=g.statCache||new Map,this.readdirCache=g.readdirCache||new Map,this[V]=o,typeof g.onwarn=="function"&&this.on("warn",g.onwarn),this.portable=!!g.portable,this.zip=null,g.gzip?(typeof g.gzip!="object"&&(g.gzip={}),this.portable&&(g.gzip.portable=!0),this.zip=new n.Gzip(g.gzip),this.zip.on("data",_=>super.write(_)),this.zip.on("end",_=>super.end()),this.zip.on("drain",_=>this[te]()),this.on("resume",_=>this.zip.resume())):this.on("drain",this[te]),this.noDirRecurse=!!g.noDirRecurse,this.follow=!!g.follow,this.noMtime=!!g.noMtime,this.mtime=g.mtime||null,this.filter=typeof g.filter=="function"?g.filter:_=>!0,this[d]=new c,this[C]=0,this.jobs=+g.jobs||4,this[p]=!1,this[f]=!1}[Q](g){return super.write(g)}add(g){return this.write(g),this}end(g){return g&&this.write(g),this[f]=!0,this[y](),this}write(g){if(this[f])throw new Error("write after end");return g instanceof s?this[T](g):this[P](g),this.flowing}[T](g){let _=G(L.resolve(this.cwd,g.path));if(!this.filter(g.path,g))g.resume();else{let E=new r(g.path,_,!1);E.entry=new u(g,this[N](E)),E.entry.on("end",R=>this[F](E)),this[C]+=1,this[d].push(E)}this[y]()}[P](g){let _=G(L.resolve(this.cwd,g));this[d].push(new r(g,_)),this[y]()}[M](g){g.pending=!0,this[C]+=1;let _=this.follow?"stat":"lstat";j[_](g.absolute,(E,R)=>{g.pending=!1,this[C]-=1,E?this.emit("error",E):this[h](g,R)})}[h](g,_){this.statCache.set(g.absolute,_),g.stat=_,this.filter(g.path,_)||(g.ignore=!0),this[y]()}[S](g){g.pending=!0,this[C]+=1,j.readdir(g.absolute,(_,E)=>{if(g.pending=!1,this[C]-=1,_)return this.emit("error",_);this[x](g,E)})}[x](g,_){this.readdirCache.set(g.absolute,_),g.readdir=_,this[y]()}[y](){if(!this[p]){this[p]=!0;for(let g=this[d].head;g!==null&&this[C]<this.jobs;g=g.next)if(this[w](g.value),g.value.ignore){let _=g.next;this[d].removeNode(g),g.next=_}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}[F](g){this[d].shift(),this[C]-=1,this[y]()}[w](g){if(!g.pending){if(g.entry){g===this[m]&&!g.piped&&this[H](g);return}if(g.stat||(this.statCache.has(g.absolute)?this[h](g,this.statCache.get(g.absolute)):this[M](g)),!!g.stat&&!g.ignore&&!(!this.noDirRecurse&&g.stat.isDirectory()&&!g.readdir&&(this.readdirCache.has(g.absolute)?this[x](g,this.readdirCache.get(g.absolute)):this[S](g),!g.readdir))){if(g.entry=this[W](g),!g.entry){g.ignore=!0;return}g===this[m]&&!g.piped&&this[H](g)}}}[N](g){return{onwarn:(_,E,R)=>this.warn(_,E,R),noPax:this.noPax,cwd:this.cwd,absolute:g.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](g){this[C]+=1;try{return new this[V](g.path,this[N](g)).on("end",()=>this[F](g)).on("error",_=>this.emit("error",_))}catch(_){this.emit("error",_)}}[te](){this[m]&&this[m].entry&&this[m].entry.resume()}[H](g){g.piped=!0,g.readdir&&g.readdir.forEach(R=>{let D=g.path,U=D==="./"?"":D.replace(/\/*$/,"/");this[P](U+R)});let _=g.entry,E=this.zip;E?_.on("data",R=>{E.write(R)||_.pause()}):_.on("data",R=>{super.write(R)||_.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),q=class extends Z{constructor(g){super(g),this[V]=a}pause(){}resume(){}[M](g){let _=this.follow?"statSync":"lstatSync";this[h](g,j[_](g.absolute))}[S](g,_){this[x](g,j.readdirSync(g.absolute))}[H](g){let _=g.entry,E=this.zip;g.readdir&&g.readdir.forEach(R=>{let D=g.path,U=D==="./"?"":D.replace(/\/*$/,"/");this[P](U+R)}),E?_.on("data",R=>{E.write(R)}):_.on("data",R=>{super[Q](R)})}};Z.Sync=q,e.exports=Z}),ho=le(t=>{"use strict";ee();var e=X1(),r=fe("events").EventEmitter,i=fe("fs"),n=i.writev;if(!n){let g=process.binding("fs"),_=g.FSReqWrap||g.FSReqCallback;n=(E,R,D,U)=>{let $=(Y,ue)=>U(Y,ue,R),ie=new _;ie.oncomplete=$,g.writeBuffers(E,R,D,ie)}}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"),w=Symbol("_onopen"),C=Symbol("_onread"),F=Symbol("_onwrite"),P=Symbol("_open"),T=Symbol("_path"),M=Symbol("_pos"),S=Symbol("_queue"),x=Symbol("_read"),H=Symbol("_readSize"),W=Symbol("_reading"),N=Symbol("_remain"),V=Symbol("_size"),Q=Symbol("_write"),te=Symbol("_writing"),j=Symbol("_defaultFlag"),L=Symbol("_errored"),B=class extends e{constructor(g,_){if(_=_||{},super(_),this.readable=!0,this.writable=!1,typeof g!="string")throw new TypeError("path must be a string");this[L]=!1,this[u]=typeof _.fd=="number"?_.fd:null,this[T]=g,this[H]=_.readSize||16*1024*1024,this[W]=!1,this[V]=typeof _.size=="number"?_.size:1/0,this[N]=this[V],this[s]=typeof _.autoClose=="boolean"?_.autoClose:!0,typeof this[u]=="number"?this[x]():this[P]()}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")}[P](){i.open(this[T],"r",(g,_)=>this[w](g,_))}[w](g,_){g?this[p](g):(this[u]=_,this.emit("open",_),this[x]())}[d](){return Buffer.allocUnsafe(Math.min(this[H],this[N]))}[x](){if(!this[W]){this[W]=!0;let g=this[d]();if(g.length===0)return process.nextTick(()=>this[C](null,0,g));i.read(this[u],g,0,g.length,null,(_,E,R)=>this[C](_,E,R))}}[C](g,_,E){this[W]=!1,g?this[p](g):this[f](_,E)&&this[x]()}[o](){if(this[s]&&typeof this[u]=="number"){let g=this[u];this[u]=null,i.close(g,_=>_?this.emit("error",_):this.emit("close"))}}[p](g){this[W]=!0,this[o](),this.emit("error",g)}[f](g,_){let E=!1;return this[N]-=g,g>0&&(E=super.write(g<_.length?_.slice(0,g):_)),(g===0||this[N]<=0)&&(E=!1,this[o](),super.end()),E}emit(g,_){switch(g){case"prefinish":case"finish":break;case"drain":typeof this[u]=="number"&&this[x]();break;case"error":return this[L]?void 0:(this[L]=!0,super.emit(g,_));default:return super.emit(g,_)}}},G=class extends B{[P](){let g=!0;try{this[w](null,i.openSync(this[T],"r")),g=!1}finally{g&&this[o]()}}[x](){let g=!0;try{if(!this[W]){this[W]=!0;do{let _=this[d](),E=_.length===0?0:i.readSync(this[u],_,0,_.length,null);if(!this[f](E,_))break}while(!0);this[W]=!1}g=!1}finally{g&&this[o]()}}[o](){if(this[s]&&typeof this[u]=="number"){let g=this[u];this[u]=null,i.closeSync(g),this.emit("close")}}},Z=class extends r{constructor(g,_){_=_||{},super(_),this.readable=!1,this.writable=!0,this[L]=!1,this[te]=!1,this[a]=!1,this[y]=!1,this[S]=[],this[T]=g,this[u]=typeof _.fd=="number"?_.fd:null,this[m]=_.mode===void 0?438:_.mode,this[M]=typeof _.start=="number"?_.start:null,this[s]=typeof _.autoClose=="boolean"?_.autoClose:!0;let E=this[M]!==null?"r+":"w";this[j]=_.flags===void 0,this[l]=this[j]?E:_.flags,this[u]===null&&this[P]()}emit(g,_){if(g==="error"){if(this[L])return;this[L]=!0}return super.emit(g,_)}get fd(){return this[u]}get path(){return this[T]}[p](g){this[o](),this[te]=!0,this.emit("error",g)}[P](){i.open(this[T],this[l],this[m],(g,_)=>this[w](g,_))}[w](g,_){this[j]&&this[l]==="r+"&&g&&g.code==="ENOENT"?(this[l]="w",this[P]()):g?this[p](g):(this[u]=_,this.emit("open",_),this[h]())}end(g,_){return g&&this.write(g,_),this[a]=!0,!this[te]&&!this[S].length&&typeof this[u]=="number"&&this[F](null,0),this}write(g,_){return typeof g=="string"&&(g=Buffer.from(g,_)),this[a]?(this.emit("error",new Error("write() after end()")),!1):this[u]===null||this[te]||this[S].length?(this[S].push(g),this[y]=!0,!1):(this[te]=!0,this[Q](g),!0)}[Q](g){i.write(this[u],g,0,g.length,this[M],(_,E)=>this[F](_,E))}[F](g,_){g?this[p](g):(this[M]!==null&&(this[M]+=_),this[S].length?this[h]():(this[te]=!1,this[a]&&!this[c]?(this[c]=!0,this[o](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[h](){if(this[S].length===0)this[a]&&this[F](null,0);else if(this[S].length===1)this[Q](this[S].pop());else{let g=this[S];this[S]=[],n(this[u],g,this[M],(_,E)=>this[F](_,E))}}[o](){if(this[s]&&typeof this[u]=="number"){let g=this[u];this[u]=null,i.close(g,_=>_?this.emit("error",_):this.emit("close"))}}},q=class extends Z{[P](){let g;if(this[j]&&this[l]==="r+")try{g=i.openSync(this[T],this[l],this[m])}catch(_){if(_.code==="ENOENT")return this[l]="w",this[P]();throw _}else g=i.openSync(this[T],this[l],this[m]);this[w](null,g)}[o](){if(this[s]&&typeof this[u]=="number"){let g=this[u];this[u]=null,i.closeSync(g),this.emit("close")}}[Q](g){let _=!0;try{this[F](null,i.writeSync(this[u],g,0,g.length,this[M])),_=!1}finally{if(_)try{this[o]()}catch{}}}};t.ReadStream=B,t.ReadStreamSync=G,t.WriteStream=Z,t.WriteStreamSync=q}),zm=le((t,e)=>{"use strict";ee();var r=$m(),i=co(),n=fe("events"),s=sC(),o=1024*1024,a=Hm(),u=Um(),c=eC(),{nextTick:l}=fe("process"),h=Buffer.from([31,139]),f=Symbol("state"),d=Symbol("writeEntry"),m=Symbol("readEntry"),y=Symbol("nextEntry"),p=Symbol("processEntry"),w=Symbol("extendedHeader"),C=Symbol("globalExtendedHeader"),F=Symbol("meta"),P=Symbol("emitMeta"),T=Symbol("buffer"),M=Symbol("queue"),S=Symbol("ended"),x=Symbol("emittedEnd"),H=Symbol("emit"),W=Symbol("unzip"),N=Symbol("consumeChunk"),V=Symbol("consumeChunkSub"),Q=Symbol("consumeBody"),te=Symbol("consumeMeta"),j=Symbol("consumeHeader"),L=Symbol("consuming"),B=Symbol("bufferConcat"),G=Symbol("maybeEnd"),Z=Symbol("writing"),q=Symbol("aborted"),g=Symbol("onDone"),_=Symbol("sawValidEntry"),E=Symbol("sawNullBlock"),R=Symbol("sawEOF"),D=Symbol("closeStream"),U=$=>!0;e.exports=r(class extends n{constructor($){$=$||{},super($),this.file=$.file||"",this[_]=null,this.on(g,ie=>{(this[f]==="begin"||this[_]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),$.ondone?this.on(g,$.ondone):this.on(g,ie=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!$.strict,this.maxMetaEntrySize=$.maxMetaEntrySize||o,this.filter=typeof $.filter=="function"?$.filter:U,this.writable=!0,this.readable=!1,this[M]=new s,this[T]=null,this[m]=null,this[d]=null,this[f]="begin",this[F]="",this[w]=null,this[C]=null,this[S]=!1,this[W]=null,this[q]=!1,this[E]=!1,this[R]=!1,this.on("end",()=>this[D]()),typeof $.onwarn=="function"&&this.on("warn",$.onwarn),typeof $.onentry=="function"&&this.on("entry",$.onentry)}[j]($,ie){this[_]===null&&(this[_]=!1);let Y;try{Y=new i($,ie,this[w],this[C])}catch(ue){return this.warn("TAR_ENTRY_INVALID",ue)}if(Y.nullBlock)this[E]?(this[R]=!0,this[f]==="begin"&&(this[f]="header"),this[H]("eof")):(this[E]=!0,this[H]("nullBlock"));else if(this[E]=!1,!Y.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:Y});else if(!Y.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:Y});else{let ue=Y.type;if(/^(Symbolic)?Link$/.test(ue)&&!Y.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:Y});else if(!/^(Symbolic)?Link$/.test(ue)&&Y.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:Y});else{let J=this[d]=new a(Y,this[w],this[C]);if(!this[_])if(J.remain){let v=()=>{J.invalid||(this[_]=!0)};J.on("end",v)}else this[_]=!0;J.meta?J.size>this.maxMetaEntrySize?(J.ignore=!0,this[H]("ignoredEntry",J),this[f]="ignore",J.resume()):J.size>0&&(this[F]="",J.on("data",v=>this[F]+=v),this[f]="meta"):(this[w]=null,J.ignore=J.ignore||!this.filter(J.path,J),J.ignore?(this[H]("ignoredEntry",J),this[f]=J.remain?"ignore":"header",J.resume()):(J.remain?this[f]="body":(this[f]="header",J.end()),this[m]?this[M].push(J):(this[M].push(J),this[y]())))}}}[D](){l(()=>this.emit("close"))}[p]($){let ie=!0;return $?Array.isArray($)?this.emit.apply(this,$):(this[m]=$,this.emit("entry",$),$.emittedEnd||($.on("end",Y=>this[y]()),ie=!1)):(this[m]=null,ie=!1),ie}[y](){do;while(this[p](this[M].shift()));if(!this[M].length){let $=this[m];!$||$.flowing||$.size===$.remain?this[Z]||this.emit("drain"):$.once("drain",ie=>this.emit("drain"))}}[Q]($,ie){let Y=this[d],ue=Y.blockRemain,J=ue>=$.length&&ie===0?$:$.slice(ie,ie+ue);return Y.write(J),Y.blockRemain||(this[f]="header",this[d]=null,Y.end()),J.length}[te]($,ie){let Y=this[d],ue=this[Q]($,ie);return this[d]||this[P](Y),ue}[H]($,ie,Y){!this[M].length&&!this[m]?this.emit($,ie,Y):this[M].push([$,ie,Y])}[P]($){switch(this[H]("meta",this[F]),$.type){case"ExtendedHeader":case"OldExtendedHeader":this[w]=u.parse(this[F],this[w],!1);break;case"GlobalExtendedHeader":this[C]=u.parse(this[F],this[C],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[w]=this[w]||Object.create(null),this[w].path=this[F].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[w]=this[w]||Object.create(null),this[w].linkpath=this[F].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+$.type)}}abort($){this[q]=!0,this.emit("abort",$),this.warn("TAR_ABORT",$,{recoverable:!1})}write($){if(this[q])return;if(this[W]===null&&$){if(this[T]&&($=Buffer.concat([this[T],$]),this[T]=null),$.length<h.length)return this[T]=$,!0;for(let Y=0;this[W]===null&&Y<h.length;Y++)$[Y]!==h[Y]&&(this[W]=!1);if(this[W]===null){let Y=this[S];this[S]=!1,this[W]=new c.Unzip,this[W].on("data",J=>this[N](J)),this[W].on("error",J=>this.abort(J)),this[W].on("end",J=>{this[S]=!0,this[N]()}),this[Z]=!0;let ue=this[W][Y?"end":"write"]($);return this[Z]=!1,ue}}this[Z]=!0,this[W]?this[W].write($):this[N]($),this[Z]=!1;let ie=this[M].length?!1:this[m]?this[m].flowing:!0;return!ie&&!this[M].length&&this[m].once("drain",Y=>this.emit("drain")),ie}[B]($){$&&!this[q]&&(this[T]=this[T]?Buffer.concat([this[T],$]):$)}[G](){if(this[S]&&!this[x]&&!this[q]&&!this[L]){this[x]=!0;let $=this[d];if($&&$.blockRemain){let ie=this[T]?this[T].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${$.blockRemain} more bytes, only ${ie} available)`,{entry:$}),this[T]&&$.write(this[T]),$.end()}this[H](g)}}[N]($){if(this[L])this[B]($);else if(!$&&!this[T])this[G]();else{if(this[L]=!0,this[T]){this[B]($);let ie=this[T];this[T]=null,this[V](ie)}else this[V]($);for(;this[T]&&this[T].length>=512&&!this[q]&&!this[R];){let ie=this[T];this[T]=null,this[V](ie)}this[L]=!1}(!this[T]||this[S])&&this[G]()}[V]($){let ie=0,Y=$.length;for(;ie+512<=Y&&!this[q]&&!this[R];)switch(this[f]){case"begin":case"header":this[j]($,ie),ie+=512;break;case"ignore":case"body":ie+=this[Q]($,ie);break;case"meta":ie+=this[te]($,ie);break;default:throw new Error("invalid state: "+this[f])}ie<Y&&(this[T]?this[T]=Buffer.concat([$.slice(ie),this[T]]):this[T]=$.slice(ie))}end($){this[q]||(this[W]?this[W].end($):(this[S]=!0,this.write($)))}})}),Wm=le((t,e)=>{"use strict";ee();var r=ao(),i=zm(),n=fe("fs"),s=ho(),o=fe("path"),a=lo();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,w=(C,F)=>{let P=F||o.parse(C).root||".",T=C===P?!1:y.has(C)?y.get(C):w(o.dirname(C),P);return y.set(C,T),T};d.filter=p?(C,F)=>p(C,F)&&w(a(C)):C=>w(a(C))},l=d=>{let m=f(d),y=d.file,p=!0,w;try{let C=n.statSync(y),F=d.maxReadSize||16*1024*1024;if(C.size<F)m.end(n.readFileSync(y));else{let P=0,T=Buffer.allocUnsafe(F);for(w=n.openSync(y,"r");P<C.size;){let M=n.readSync(w,T,0,F,P);P+=M,m.write(T.slice(0,M))}m.end()}p=!1}finally{if(p&&w)try{n.closeSync(w)}catch{}}},h=(d,m)=>{let y=new i(d),p=d.maxReadSize||16*1024*1024,w=d.file,C=new Promise((F,P)=>{y.on("error",P),y.on("end",F),n.stat(w,(T,M)=>{if(T)P(T);else{let S=new s.ReadStream(w,{readSize:p,size:M.size});S.on("error",P),S.pipe(y)}})});return m?C.then(m,m):C},f=d=>new i(d)}),lq=le((t,e)=>{"use strict";ee();var r=ao(),i=Gm(),n=ho(),s=Wm(),o=fe("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),w=new n.WriteStream(d.file,{mode:d.mode||438});p.pipe(w);let C=new Promise((F,P)=>{w.on("error",P),w.on("close",F),p.on("error",P)});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}}),oC=le((t,e)=>{"use strict";ee();var r=ao(),i=Gm(),n=fe("fs"),s=ho(),o=Wm(),a=fe("path"),u=co();e.exports=(m,y,p)=>{let w=r(m);if(!w.file)throw new TypeError("file is required");if(w.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),w.sync?c(w,y):h(w,y,p)};var c=(m,y)=>{let p=new i.Sync(m),w=!0,C,F;try{try{C=n.openSync(m.file,"r+")}catch(M){if(M.code==="ENOENT")C=n.openSync(m.file,"w+");else throw M}let P=n.fstatSync(C),T=Buffer.alloc(512);e:for(F=0;F<P.size;F+=512){for(let x=0,H=0;x<512;x+=H){if(H=n.readSync(C,T,x,T.length-x,F+x),F===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 S=512*Math.ceil(M.size/512);if(F+S+512>P.size)break;F+=S,m.mtimeCache&&m.mtimeCache.set(M.path,M.mtime)}w=!1,l(m,p,F,C,y)}finally{if(w)try{n.closeSync(C)}catch{}}},l=(m,y,p,w,C)=>{let F=new s.WriteStreamSync(m.file,{fd:w,start:p});y.pipe(F),f(y,C)},h=(m,y,p)=>{y=Array.from(y);let w=new i(m),C=(P,T,M)=>{let S=(V,Q)=>{V?n.close(P,te=>M(V)):M(null,Q)},x=0;if(T===0)return S(null,0);let H=0,W=Buffer.alloc(512),N=(V,Q)=>{if(V)return S(V);if(H+=Q,H<512&&Q)return n.read(P,W,H,W.length-H,x+H,N);if(x===0&&W[0]===31&&W[1]===139)return S(new Error("cannot append to compressed archives"));if(H<512)return S(null,x);let te=new u(W);if(!te.cksumValid)return S(null,x);let j=512*Math.ceil(te.size/512);if(x+j+512>T||(x+=j+512,x>=T))return S(null,x);m.mtimeCache&&m.mtimeCache.set(te.path,te.mtime),H=0,n.read(P,W,0,512,x,N)};n.read(P,W,0,512,x,N)},F=new Promise((P,T)=>{w.on("error",T);let M="r+",S=(x,H)=>{if(x&&x.code==="ENOENT"&&M==="r+")return M="w+",n.open(m.file,M,S);if(x)return T(x);n.fstat(H,(W,N)=>{if(W)return n.close(H,()=>T(W));C(H,N.size,(V,Q)=>{if(V)return T(V);let te=new s.WriteStream(m.file,{fd:H,start:Q});w.pipe(te),te.on("error",T),te.on("close",P),d(w,y)})})};n.open(m.file,M,S)});return p?F.then(p,p):F},f=(m,y)=>{y.forEach(p=>{p.charAt(0)==="@"?o({file:a.resolve(m.cwd,p.slice(1)),sync:!0,noResume:!0,onentry:w=>m.add(w)}):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:w=>m.add(w)}).then(w=>d(m,y));m.add(p)}m.end()}}),hq=le((t,e)=>{"use strict";ee();var r=ao(),i=oC();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)}}),fq=le((t,e)=>{ee();var{promisify:r}=fe("util"),i=fe("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}),dq=le((t,e)=>{ee();var r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:n}=fe("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}),pq=le((t,e)=>{ee();var{dirname:r}=fe("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}}),aC=le((t,e)=>{ee();var{dirname:r}=fe("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}}),mq=le((t,e)=>{ee();var{dirname:r}=fe("path"),{findMade:i,findMadeSync:n}=pq(),{mkdirpManual:s,mkdirpManualSync:o}=aC(),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}}),yq=le((t,e)=>{ee();var r=fe("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}}),gq=le((t,e)=>{ee();var r=fq(),i=dq(),{mkdirpNative:n,mkdirpNativeSync:s}=mq(),{mkdirpManual:o,mkdirpManualSync:a}=aC(),{useNative:u,useNativeSync:c}=yq(),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}),_q=le((t,e)=>{"use strict";ee();var r=fe("fs"),i=fe("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=(F,P,T)=>{try{return r[s](F,P,T)}catch(M){if(M.code!=="ENOENT")throw M}},u=(F,P,T)=>{try{return r.chownSync(F,P,T)}catch(M){if(M.code!=="ENOENT")throw M}},c=o?(F,P,T,M)=>S=>{!S||S.code!=="EISDIR"?M(S):r.chown(F,P,T,M)}:(F,P,T,M)=>M,l=o?(F,P,T)=>{try{return a(F,P,T)}catch(M){if(M.code!=="EISDIR")throw M;u(F,P,T)}}:(F,P,T)=>a(F,P,T),h=process.version,f=(F,P,T)=>r.readdir(F,P,T),d=(F,P)=>r.readdirSync(F,P);/^v4\./.test(h)&&(f=(F,P,T)=>r.readdir(F,T));var m=(F,P,T,M)=>{r[n](F,P,T,c(F,P,T,S=>{M(S&&S.code!=="ENOENT"?S:null)}))},y=(F,P,T,M,S)=>{if(typeof P=="string")return r.lstat(i.resolve(F,P),(x,H)=>{if(x)return S(x.code!=="ENOENT"?x:null);H.name=P,y(F,H,T,M,S)});if(P.isDirectory())p(i.resolve(F,P.name),T,M,x=>{if(x)return S(x);let H=i.resolve(F,P.name);m(H,T,M,S)});else{let x=i.resolve(F,P.name);m(x,T,M,S)}},p=(F,P,T,M)=>{f(F,{withFileTypes:!0},(S,x)=>{if(S){if(S.code==="ENOENT")return M();if(S.code!=="ENOTDIR"&&S.code!=="ENOTSUP")return M(S)}if(S||!x.length)return m(F,P,T,M);let H=x.length,W=null,N=V=>{if(!W){if(V)return M(W=V);if(--H===0)return m(F,P,T,M)}};x.forEach(V=>y(F,V,P,T,N))})},w=(F,P,T,M)=>{if(typeof P=="string")try{let S=r.lstatSync(i.resolve(F,P));S.name=P,P=S}catch(S){if(S.code==="ENOENT")return;throw S}P.isDirectory()&&C(i.resolve(F,P.name),T,M),l(i.resolve(F,P.name),T,M)},C=(F,P,T)=>{let M;try{M=d(F,{withFileTypes:!0})}catch(S){if(S.code==="ENOENT")return;if(S.code==="ENOTDIR"||S.code==="ENOTSUP")return l(F,P,T);throw S}return M&&M.length&&M.forEach(S=>w(F,S,P,T)),l(F,P,T)};e.exports=p,p.sync=C}),bq=le((t,e)=>{"use strict";ee();var r=gq(),i=fe("fs"),n=fe("path"),s=_q(),o=uo(),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,w)=>y.set(o(p),w),h=(y,p)=>{i.stat(y,(w,C)=>{(w||!C.isDirectory())&&(w=new u(y,w&&w.code||"ENOTDIR")),p(w)})};e.exports=(y,p,w)=>{y=o(y);let C=p.umask,F=p.mode|448,P=(F&C)!==0,T=p.uid,M=p.gid,S=typeof T=="number"&&typeof M=="number"&&(T!==p.processUid||M!==p.processGid),x=p.preserve,H=p.unlink,W=p.cache,N=o(p.cwd),V=(te,j)=>{te?w(te):(l(W,y,!0),j&&S?s(j,T,M,L=>V(L)):P?i.chmod(y,F,w):w())};if(W&&c(W,y)===!0)return V();if(y===N)return h(y,V);if(x)return r(y,{mode:F}).then(te=>V(null,te),V);let Q=o(n.relative(N,y)).split("/");f(N,Q,F,W,H,N,null,V)};var f=(y,p,w,C,F,P,T,M)=>{if(!p.length)return M(null,T);let S=p.shift(),x=o(n.resolve(y+"/"+S));if(c(C,x))return f(x,p,w,C,F,P,T,M);i.mkdir(x,w,d(x,p,w,C,F,P,T,M))},d=(y,p,w,C,F,P,T,M)=>S=>{S?i.lstat(y,(x,H)=>{if(x)x.path=x.path&&o(x.path),M(x);else if(H.isDirectory())f(y,p,w,C,F,P,T,M);else if(F)i.unlink(y,W=>{if(W)return M(W);i.mkdir(y,w,d(y,p,w,C,F,P,T,M))});else{if(H.isSymbolicLink())return M(new a(y,y+"/"+p.join("/")));M(S)}}):(T=T||y,f(y,p,w,C,F,P,T,M))},m=y=>{let p=!1,w="ENOTDIR";try{p=i.statSync(y).isDirectory()}catch(C){w=C.code}finally{if(!p)throw new u(y,w)}};e.exports.sync=(y,p)=>{y=o(y);let w=p.umask,C=p.mode|448,F=(C&w)!==0,P=p.uid,T=p.gid,M=typeof P=="number"&&typeof T=="number"&&(P!==p.processUid||T!==p.processGid),S=p.preserve,x=p.unlink,H=p.cache,W=o(p.cwd),N=te=>{l(H,y,!0),te&&M&&s.sync(te,P,T),F&&i.chmodSync(y,C)};if(H&&c(H,y)===!0)return N();if(y===W)return m(W),N();if(S)return N(r.sync(y,C));let V=o(n.relative(W,y)).split("/"),Q=null;for(let te=V.shift(),j=W;te&&(j+="/"+te);te=V.shift())if(j=o(n.resolve(j)),!c(H,j))try{i.mkdirSync(j,C),Q=Q||j,l(H,j,!0)}catch{let L=i.lstatSync(j);if(L.isDirectory()){l(H,j,!0);continue}else if(x){i.unlinkSync(j),i.mkdirSync(j,C),Q=Q||j,l(H,j,!0);continue}else if(L.isSymbolicLink())return new a(j,j+"/"+V.join("/"))}return N(Q)}}),uC=le((t,e)=>{ee();var r=Object.create(null),{hasOwnProperty:i}=Object.prototype;e.exports=n=>(i.call(r,n)||(r[n]=n.normalize("NFKD")),r[n])}),Eq=le((t,e)=>{ee();var r=fe("assert"),i=uC(),n=lo(),{join:s}=fe("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((w,C)=>(w.length&&(C=s(w[w.length-1],C)),w.push(C||"/"),w),[]),h=new Set,f=p=>{let w=c.get(p);if(!w)throw new Error("function does not have any path reservations");return{paths:w.paths.map(C=>u.get(C)),dirs:[...w.dirs].map(C=>u.get(C))}},d=p=>{let{paths:w,dirs:C}=f(p);return w.every(F=>F[0]===p)&&C.every(F=>F[0]instanceof Set&&F[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:w,dirs:C}=c.get(p),F=new Set;return w.forEach(P=>{let T=u.get(P);r.equal(T[0],p),T.length===1?u.delete(P):(T.shift(),typeof T[0]=="function"?F.add(T[0]):T[0].forEach(M=>F.add(M)))}),C.forEach(P=>{let T=u.get(P);r(T[0]instanceof Set),T[0].size===1&&T.length===1?u.delete(P):T[0].size===1?(T.shift(),F.add(T[0])):T[0].delete(p)}),h.delete(p),F.forEach(P=>m(P)),!0};return{check:d,reserve:(p,w)=>{p=a?["win32 parallelization disabled"]:p.map(F=>i(n(s(F))).toLowerCase());let C=new Set(p.map(F=>l(F)).reduce((F,P)=>F.concat(P)));return c.set(w,{dirs:C,paths:p}),p.forEach(F=>{let P=u.get(F);P?P.push(w):u.set(F,[w])}),C.forEach(F=>{let P=u.get(F);P?P[P.length-1]instanceof Set?P[P.length-1].add(w):P.push(new Set([w])):u.set(F,[new Set([w])])}),m(w)}}}}),wq=le((t,e)=>{ee();var r=process.env.__FAKE_PLATFORM__||process.platform,i=r==="win32",n=global.__FAKE_TESTING_FS__||fe("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"}),cC=le((t,e)=>{"use strict";ee();var r=fe("assert"),i=zm(),n=fe("fs"),s=ho(),o=fe("path"),a=bq(),u=rC(),c=Eq(),l=iC(),h=uo(),f=lo(),d=uC(),m=Symbol("onEntry"),y=Symbol("checkFs"),p=Symbol("checkFs2"),w=Symbol("pruneCache"),C=Symbol("isReusable"),F=Symbol("makeFs"),P=Symbol("file"),T=Symbol("directory"),M=Symbol("link"),S=Symbol("symlink"),x=Symbol("hardlink"),H=Symbol("unsupported"),W=Symbol("checkPath"),N=Symbol("mkdir"),V=Symbol("onError"),Q=Symbol("pending"),te=Symbol("pend"),j=Symbol("unpend"),L=Symbol("ended"),B=Symbol("maybeClose"),G=Symbol("skip"),Z=Symbol("doChown"),q=Symbol("uid"),g=Symbol("gid"),_=Symbol("checkedCwd"),E=fe("crypto"),R=wq(),D=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,U=D==="win32",$=(b,z)=>{if(!U)return n.unlink(b,z);let re=b+".DELETE."+E.randomBytes(16).toString("hex");n.rename(b,re,ae=>{if(ae)return z(ae);n.unlink(re,z)})},ie=b=>{if(!U)return n.unlinkSync(b);let z=b+".DELETE."+E.randomBytes(16).toString("hex");n.renameSync(b,z),n.unlinkSync(z)},Y=(b,z,re)=>b===b>>>0?b:z===z>>>0?z:re,ue=b=>d(f(h(b))).toLowerCase(),J=(b,z)=>{z=ue(z);for(let re of b.keys()){let ae=ue(re);(ae===z||ae.indexOf(z+"/")===0)&&b.delete(re)}},v=b=>{for(let z of b.keys())b.delete(z)},I=class extends i{constructor(b){if(b||(b={}),b.ondone=z=>{this[L]=!0,this[B]()},super(b),this[_]=!1,this.reservations=c(),this.transform=typeof b.transform=="function"?b.transform:null,this.writable=!0,this.readable=!1,this[Q]=0,this[L]=!1,this.dirCache=b.dirCache||new Map,typeof b.uid=="number"||typeof b.gid=="number"){if(typeof b.uid!="number"||typeof b.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(b.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=b.uid,this.gid=b.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;b.preserveOwner===void 0&&typeof b.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!b.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=b.forceChown===!0,this.win32=!!b.win32||U,this.newer=!!b.newer,this.keep=!!b.keep,this.noMtime=!!b.noMtime,this.preservePaths=!!b.preservePaths,this.unlink=!!b.unlink,this.cwd=h(o.resolve(b.cwd||process.cwd())),this.strip=+b.strip||0,this.processUmask=b.noChmod?0:process.umask(),this.umask=typeof b.umask=="number"?b.umask:this.processUmask,this.dmode=b.dmode||511&~this.umask,this.fmode=b.fmode||438&~this.umask,this.on("entry",z=>this[m](z))}warn(b,z,re={}){return(b==="TAR_BAD_ARCHIVE"||b==="TAR_ABORT")&&(re.recoverable=!1),super.warn(b,z,re)}[B](){this[L]&&this[Q]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[W](b){if(this.strip){let z=h(b.path).split("/");if(z.length<this.strip)return!1;if(b.path=z.slice(this.strip).join("/"),b.type==="Link"){let re=h(b.linkpath).split("/");if(re.length>=this.strip)b.linkpath=re.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let z=h(b.path),re=z.split("/");if(re.includes("..")||U&&/^[a-z]:\.\.$/i.test(re[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:b,path:z}),!1;let[ae,he]=l(z);ae&&(b.path=he,this.warn("TAR_ENTRY_INFO",`stripping ${ae} from absolute path`,{entry:b,path:z}))}if(o.isAbsolute(b.path)?b.absolute=h(o.resolve(b.path)):b.absolute=h(o.resolve(this.cwd,b.path)),!this.preservePaths&&b.absolute.indexOf(this.cwd+"/")!==0&&b.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:b,path:h(b.path),resolvedPath:b.absolute,cwd:this.cwd}),!1;if(b.absolute===this.cwd&&b.type!=="Directory"&&b.type!=="GNUDumpDir")return!1;if(this.win32){let{root:z}=o.win32.parse(b.absolute);b.absolute=z+u.encode(b.absolute.slice(z.length));let{root:re}=o.win32.parse(b.path);b.path=re+u.encode(b.path.slice(re.length))}return!0}[m](b){if(!this[W](b))return b.resume();switch(r.equal(typeof b.absolute,"string"),b.type){case"Directory":case"GNUDumpDir":b.mode&&(b.mode=b.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](b);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[H](b)}}[V](b,z){b.name==="CwdError"?this.emit("error",b):(this.warn("TAR_ENTRY_ERROR",b,{entry:z}),this[j](),z.resume())}[N](b,z,re){a(h(b),{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:z,noChmod:this.noChmod},re)}[Z](b){return this.forceChown||this.preserveOwner&&(typeof b.uid=="number"&&b.uid!==this.processUid||typeof b.gid=="number"&&b.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[q](b){return Y(this.uid,b.uid,this.processUid)}[g](b){return Y(this.gid,b.gid,this.processGid)}[P](b,z){let re=b.mode&4095||this.fmode,ae=new s.WriteStream(b.absolute,{flags:R(b.size),mode:re,autoClose:!1});ae.on("error",pe=>{ae.fd&&n.close(ae.fd,()=>{}),ae.write=()=>!0,this[V](pe,b),z()});let he=1,me=pe=>{if(pe){ae.fd&&n.close(ae.fd,()=>{}),this[V](pe,b),z();return}--he===0&&n.close(ae.fd,Fe=>{Fe?this[V](Fe,b):this[j](),z()})};ae.on("finish",pe=>{let Fe=b.absolute,Tt=ae.fd;if(b.mtime&&!this.noMtime){he++;let kt=b.atime||new Date,rs=b.mtime;n.futimes(Tt,kt,rs,is=>is?n.utimes(Fe,kt,rs,kc=>me(kc&&is)):me())}if(this[Z](b)){he++;let kt=this[q](b),rs=this[g](b);n.fchown(Tt,kt,rs,is=>is?n.chown(Fe,kt,rs,kc=>me(kc&&is)):me())}me()});let ye=this.transform&&this.transform(b)||b;ye!==b&&(ye.on("error",pe=>{this[V](pe,b),z()}),b.pipe(ye)),ye.pipe(ae)}[T](b,z){let re=b.mode&4095||this.dmode;this[N](b.absolute,re,ae=>{if(ae){this[V](ae,b),z();return}let he=1,me=ye=>{--he===0&&(z(),this[j](),b.resume())};b.mtime&&!this.noMtime&&(he++,n.utimes(b.absolute,b.atime||new Date,b.mtime,me)),this[Z](b)&&(he++,n.chown(b.absolute,this[q](b),this[g](b),me)),me()})}[H](b){b.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${b.type}`,{entry:b}),b.resume()}[S](b,z){this[M](b,b.linkpath,"symlink",z)}[x](b,z){let re=h(o.resolve(this.cwd,b.linkpath));this[M](b,re,"link",z)}[te](){this[Q]++}[j](){this[Q]--,this[B]()}[G](b){this[j](),b.resume()}[C](b,z){return b.type==="File"&&!this.unlink&&z.isFile()&&z.nlink<=1&&!U}[y](b){this[te]();let z=[b.path];b.linkpath&&z.push(b.linkpath),this.reservations.reserve(z,re=>this[p](b,re))}[w](b){b.type==="SymbolicLink"?v(this.dirCache):b.type!=="Directory"&&J(this.dirCache,b.absolute)}[p](b,z){this[w](b);let re=ye=>{this[w](b),z(ye)},ae=()=>{this[N](this.cwd,this.dmode,ye=>{if(ye){this[V](ye,b),re();return}this[_]=!0,he()})},he=()=>{if(b.absolute!==this.cwd){let ye=h(o.dirname(b.absolute));if(ye!==this.cwd)return this[N](ye,this.dmode,pe=>{if(pe){this[V](pe,b),re();return}me()})}me()},me=()=>{n.lstat(b.absolute,(ye,pe)=>{if(pe&&(this.keep||this.newer&&pe.mtime>b.mtime)){this[G](b),re();return}if(ye||this[C](b,pe))return this[F](null,b,re);if(pe.isDirectory()){if(b.type==="Directory"){let Fe=!this.noChmod&&b.mode&&(pe.mode&4095)!==b.mode,Tt=kt=>this[F](kt,b,re);return Fe?n.chmod(b.absolute,b.mode,Tt):Tt()}if(b.absolute!==this.cwd)return n.rmdir(b.absolute,Fe=>this[F](Fe,b,re))}if(b.absolute===this.cwd)return this[F](null,b,re);$(b.absolute,Fe=>this[F](Fe,b,re))})};this[_]?he():ae()}[F](b,z,re){if(b){this[V](b,z),re();return}switch(z.type){case"File":case"OldFile":case"ContiguousFile":return this[P](z,re);case"Link":return this[x](z,re);case"SymbolicLink":return this[S](z,re);case"Directory":case"GNUDumpDir":return this[T](z,re)}}[M](b,z,re,ae){n[re](z,b.absolute,he=>{he?this[V](he,b):(this[j](),b.resume()),ae()})}},A=b=>{try{return[null,b()]}catch(z){return[z,null]}},X=class extends I{[F](b,z){return super[F](b,z,()=>{})}[y](b){if(this[w](b),!this[_]){let he=this[N](this.cwd,this.dmode);if(he)return this[V](he,b);this[_]=!0}if(b.absolute!==this.cwd){let he=h(o.dirname(b.absolute));if(he!==this.cwd){let me=this[N](he,this.dmode);if(me)return this[V](me,b)}}let[z,re]=A(()=>n.lstatSync(b.absolute));if(re&&(this.keep||this.newer&&re.mtime>b.mtime))return this[G](b);if(z||this[C](b,re))return this[F](null,b);if(re.isDirectory()){if(b.type==="Directory"){let me=!this.noChmod&&b.mode&&(re.mode&4095)!==b.mode,[ye]=me?A(()=>{n.chmodSync(b.absolute,b.mode)}):[];return this[F](ye,b)}let[he]=A(()=>n.rmdirSync(b.absolute));this[F](he,b)}let[ae]=b.absolute===this.cwd?[]:A(()=>ie(b.absolute));this[F](ae,b)}[P](b,z){let re=b.mode&4095||this.fmode,ae=ye=>{let pe;try{n.closeSync(he)}catch(Fe){pe=Fe}(ye||pe)&&this[V](ye||pe,b),z()},he;try{he=n.openSync(b.absolute,R(b.size),re)}catch(ye){return ae(ye)}let me=this.transform&&this.transform(b)||b;me!==b&&(me.on("error",ye=>this[V](ye,b)),b.pipe(me)),me.on("data",ye=>{try{n.writeSync(he,ye,0,ye.length)}catch(pe){ae(pe)}}),me.on("end",ye=>{let pe=null;if(b.mtime&&!this.noMtime){let Fe=b.atime||new Date,Tt=b.mtime;try{n.futimesSync(he,Fe,Tt)}catch(kt){try{n.utimesSync(b.absolute,Fe,Tt)}catch{pe=kt}}}if(this[Z](b)){let Fe=this[q](b),Tt=this[g](b);try{n.fchownSync(he,Fe,Tt)}catch(kt){try{n.chownSync(b.absolute,Fe,Tt)}catch{pe=pe||kt}}}ae(pe)})}[T](b,z){let re=b.mode&4095||this.dmode,ae=this[N](b.absolute,re);if(ae){this[V](ae,b),z();return}if(b.mtime&&!this.noMtime)try{n.utimesSync(b.absolute,b.atime||new Date,b.mtime)}catch{}if(this[Z](b))try{n.chownSync(b.absolute,this[q](b),this[g](b))}catch{}z(),b.resume()}[N](b,z){try{return a.sync(h(b),{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:z})}catch(re){return re}}[M](b,z,re,ae){try{n[re+"Sync"](z,b.absolute),ae(),b.resume()}catch(he){return this[V](he,b)}}};I.Sync=X,e.exports=I}),vq=le((t,e)=>{"use strict";ee();var r=ao(),i=cC(),n=fe("fs"),s=ho(),o=fe("path"),a=lo();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,w=(C,F)=>{let P=F||o.parse(C).root||".",T=C===P?!1:y.has(C)?y.get(C):w(o.dirname(C),P);return y.set(C,T),T};d.filter=p?(C,F)=>p(C,F)&&w(a(C)):C=>w(a(C))},c=d=>{let m=new i.Sync(d),y=d.file,p=n.statSync(y),w=d.maxReadSize||16*1024*1024;new s.ReadStreamSync(y,{readSize:w,size:p.size}).pipe(m)},l=(d,m)=>{let y=new i(d),p=d.maxReadSize||16*1024*1024,w=d.file,C=new Promise((F,P)=>{y.on("error",P),y.on("close",F),n.stat(w,(T,M)=>{if(T)P(T);else{let S=new s.ReadStream(w,{readSize:p,size:M.size});S.on("error",P),S.pipe(y)}})});return m?C.then(m,m):C},h=d=>new i.Sync(d),f=d=>new i(d)}),Sq=le(t=>{"use strict";ee(),t.c=t.create=lq(),t.r=t.replace=oC(),t.t=t.list=Wm(),t.u=t.update=hq(),t.x=t.extract=vq(),t.Pack=Gm(),t.Unpack=cC(),t.Parse=zm(),t.ReadEntry=Hm(),t.WriteEntry=nC(),t.Header=co(),t.Pax=Um(),t.types=tC()}),Dq=le((t,e)=>{ee();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}}),xq=le(t=>{ee();var e=Dq();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}}}),Aq=le((t,e)=>{ee(),e.exports=xq()}),Cq=le((t,e)=>{ee();var r=Aq();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}),Rq={};Kj(Rq,{bold:()=>Pq,dimmed:()=>Bq,error:()=>jq,grey:()=>Iq,info:()=>Fq,item:()=>Nq,log:()=>Ni,turboBlue:()=>Xn,turboGradient:()=>kq,turboLoader:()=>Oq,turboRed:()=>pC,underline:()=>Lq,warn:()=>Mq,yellow:()=>mC});ee();var fC="#0099F7",dC="#F11712",Tq="#FFFF00",kq=(0,hC.default)(fC,dC),Xn=ni.default.hex(fC),pC=ni.default.hex(dC),mC=ni.default.hex(Tq),Oq=t=>(0,lC.default)({text:t,spinner:{frames:[" ",Xn("> "),Xn(">> "),Xn(">>>")]}}),Fq=(...t)=>{Ni(Xn.bold(">>>"),...t)},Pq=(...t)=>{Ni(ni.default.bold(...t))},Lq=(...t)=>{Ni(ni.default.underline(...t))},Bq=(...t)=>{Ni(ni.default.dim(...t))},Iq=(...t)=>{Ni(ni.default.grey(...t))},Nq=(...t)=>{Ni(Xn.bold(" \u2022"),...t)},Ni=(...t)=>{console.log(...t)},Mq=(...t)=>{console.error(mC.bold(">>>"),...t)},jq=(...t)=>{console.error(pC.bold(">>>"),...t)};ee();async function yc(t,e=[],r){let i={cwd:yC.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,gC.default)(t,e,i);return n.trim()}catch{return}}async function _C(){let[t,e,r,i]=await Promise.all([yc("yarnpkg",["--version"]),yc("npm",["--version"]),yc("pnpm",["--version"]),yc("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}ee();ee();ee();var uG=bc(Qj());ee();ee();function qq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}ee();ee();function Nm(t){return Nm=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},Nm(t)}ee();function Hq(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uq(t,e){if(e&&(Nm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hq(t)}ee();function _c(t){return _c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_c(t)}ee();ee();function no(t,e){return no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},no(t,e)}function $q(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&&no(t,e)}ee();ee();function Gq(t){return Function.toString.call(t).indexOf("[native code]")!==-1}ee();ee();function zq(){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 gc(t,e,r){return zq()?gc=Reflect.construct.bind():gc=function(i,n,s){var o=[null];o.push.apply(o,n);var a=Function.bind.apply(i,o),u=new a;return s&&no(u,s.prototype),u},gc.apply(null,arguments)}function Mm(t){var e=typeof Map=="function"?new Map:void 0;return Mm=function(r){if(r===null||!Gq(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 gc(r,arguments,_c(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),no(i,r)},Mm(t)}var cG=bc(sq()),fG=function(t){$q(e,t);function e(r){var i;return qq(this,e),i=Uq(this,_c(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(Mm(Error));ee();ee();ee();ee();ee();ee();var SG=bc(Sq()),DG=(0,EC.promisify)(bC.Stream.pipeline);ee();ee();var RG=bc(Cq());ee();ee();ee();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)}};ee();ee();ee();ee();var Wq=/^(?!_)(?<manager>.+)@(?<version>.+)$/;function at({workspaceRoot:t}){let e=Cr.default.join(t,"package.json");try{return(0,mt.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 Ec({workspaceRoot:t}){let{packageManager:e}=at({workspaceRoot:t});if(e)try{let r=Wq.exec(e);if(r){let[i,n]=r;return n}}catch{}}function fo({workspaceRoot:t}){let e=at({workspaceRoot:t}),r=Cr.default.basename(t),{name:i=r,description:n}=e;return{name:i,description:n}}function K1({workspaceRoot:t}){let e=Cr.default.join(t,"pnpm-workspace.yaml");if((0,mt.existsSync)(e))try{let r=sl.load((0,mt.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 wc({root:t,lockFile:e,workspaceConfig:r}){let i=s=>Cr.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 Vm({workspaces:t}){var e;return t?Array.isArray(t)?t:"packages"in t?(e=t.packages)!=null?e:[]:[]:[]}function vc({workspaceRoot:t,workspaceGlobs:e}){return e?e.flatMap(r=>{let i=[`${r}/package.json`];return(0,AC.sync)(i,{onlyFiles:!0,absolute:!0,cwd:t,ignore:["**/node_modules/**"]})}).map(r=>{let i=Cr.default.dirname(r),{name:n,description:s}=fo({workspaceRoot:i});return{name:n,description:s,paths:{root:i,packageJson:r,nodeModules:Cr.default.join(i,"node_modules")}}}):[]}function Vq({directory:t}){let e=Cr.default.resolve(process.cwd(),t);return{exists:(0,mt.existsSync)(e),absolute:e}}function si({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 Yq({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 Ar({project:t,options:e}){e!=null&&e.dry||(0,mt.rmSync)(t.paths.lockfile,{force:!0})}async function CC({project:t,options:e}){if(!(e!=null&&e.dry)&&(0,mt.existsSync)(t.paths.lockfile))try{let{stdout:r}=await(0,xC.default)("bun",["bun.lockb"],{stdin:"ignore",cwd:t.paths.root});await(0,mt.writeFile)(Cr.default.join(t.paths.root,"yarn.lock"),r)}catch{}finally{(0,mt.rmSync)(t.paths.lockfile,{force:!0})}}function Kq({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 ri({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=at({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}=Kq({dependencyList:f,project:t,to:r});s[h]=m,o[h]=d}});let u=h=>{let f=o[h].length;if(f>0)return`${DC.default.green(f.toString())} ${h}`},c=a.map(u).filter(Boolean),l=`./${vC.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,SC.writeJSONSync)(e.paths.packageJson,s,{spaces:2})}var ii={name:"pnpm",lock:"pnpm-lock.yaml"};async function RC(t){let e=Bi.default.join(t.workspaceRoot,ii.lock),r=Bi.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=Ec({workspaceRoot:t.workspaceRoot});return(0,et.existsSync)(e)||(0,et.existsSync)(r)||i===ii.name}async function Zq(t){if(!await RC(t))throw new ke("Not a pnpm project",{type:"package_manager-unexpected"});let{name:e,description:r}=fo(t);return{name:e,description:r,packageManager:ii.name,paths:wc({root:t.workspaceRoot,lockFile:ii.lock,workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:K1(t),workspaces:vc({workspaceGlobs:K1(t),...t})}}}async function Jq(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(si({action:"create",packageManager:ii.name,project:e}));let o=at({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,et.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),(0,et.writeFileSync)(Bi.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.13.2",
3
+ "version": "1.13.3-canary.0",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turbo.build/repo",
6
6
  "license": "MPL-2.0",
@@ -37,11 +37,11 @@
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",
40
41
  "@turbo/telemetry": "0.0.0",
41
42
  "@turbo/tsconfig": "0.0.0",
42
- "@turbo/test-utils": "0.0.0",
43
- "@turbo/utils": "0.0.0",
44
- "@turbo/workspaces": "1.13.2"
43
+ "@turbo/workspaces": "1.13.3-canary.0",
44
+ "@turbo/utils": "0.0.0"
45
45
  },
46
46
  "files": [
47
47
  "dist"