@turbo/codemod 2.1.4-canary.9 → 2.2.1

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
@@ -37,7 +37,7 @@ ${i.message}`:y,k=[x,e,t].filter(Boolean).join(`
37
37
  `+t.slice(n,s),n=s+1),o=a;return l+=`
38
38
  `,t.length-n>e&&o>n?l+=t.slice(n,o)+`
39
39
  `+t.slice(o+1):l+=t.slice(n),l.slice(1)}function h0(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=dn(t,n),i=Pe[r],!i&&bn(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||r0(r);return e}function f0(t,e,r){var i="",n=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(qt(t,e,a,!1,!1)||typeof a=="undefined"&&qt(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}function wf(t,e,r,i){var n="",s=t.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],t.replacer&&(l=t.replacer.call(r,String(o),l)),(qt(t,e+1,l,!0,!0,!1,!0)||typeof l=="undefined"&&qt(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Ma(t,e)),t.dump&&gn===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}function p0(t,e,r){var i="",n=t.tag,s=Object.keys(r),o,a,l,c,u;for(o=0,a=s.length;o<a;o+=1)u="",i!==""&&(u+=", "),t.condenseFlow&&(u+='"'),l=s[o],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),qt(t,e,l,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),qt(t,e,c,!1,!1)&&(u+=t.dump,i+=u));t.tag=n,t.dump="{"+i+"}"}function d0(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),a,l,c,u,f,h;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new He("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)h="",(!i||n!=="")&&(h+=Ma(t,e)),c=o[a],u=r[c],t.replacer&&(u=t.replacer.call(r,c,u)),qt(t,e+1,c,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&gn===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,f&&(h+=Ma(t,e)),qt(t,e+1,u,!0,f)&&(t.dump&&gn===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,n+=h));t.tag=s,t.dump=n||"{}"}function Sf(t,e,r){var i,n,s,o,a,l;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,Jf.call(a.represent)==="[object Function]")i=a.represent(e,l);else if(Qf.call(a.represent,l))i=a.represent[l](e,l);else throw new He("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=i}return!0}return!1}function qt(t,e,r,i,n,s,o){t.tag=null,t.dump=r,Sf(t,r,!1)||Sf(t,r,!0);var a=Jf.call(t.dump),l=i,c;i&&(i=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",f,h;if(u&&(f=t.duplicates.indexOf(r),h=f!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(n=!1),h&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(u&&h&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),a==="[object Object]")i&&Object.keys(t.dump).length!==0?(d0(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(p0(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?wf(t,e-1,t.dump,n):wf(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(f0(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&c0(t,t.dump,e,s,l);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new He("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}function m0(t,e){var r=[],i=[],n,s;for(Ba(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}function Ba(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)Ba(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)Ba(t[i[n]],e,r)}function g0(t,e){e=e||{};var r=new n0(e);r.noRefs||m0(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),qt(r,0,i,!0,!0)?r.dump+`
40
- `:""}var y0=g0,b0={dump:y0};function Ga(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var _0=Le,w0=Rf,S0=Tf,E0=If,v0=Nf,R0=$a,x0=Xf.load,A0=Xf.loadAll,O0=b0.dump,T0=He,k0={binary:jf,float:Pf,map:Of,null:kf,pairs:qf,set:Hf,timestamp:Ff,bool:Cf,int:Lf,merge:Bf,omap:$f,seq:Af,str:xf},C0=Ga("safeLoad","load"),L0=Ga("safeLoadAll","loadAll"),P0=Ga("safeDump","dump"),I0={Type:_0,Schema:w0,FAILSAFE_SCHEMA:S0,JSON_SCHEMA:E0,CORE_SCHEMA:v0,DEFAULT_SCHEMA:R0,load:x0,loadAll:A0,dump:O0,YAMLException:T0,types:k0,safeLoad:C0,safeLoadAll:L0,safeDump:P0},za=I0;var VO=ie(qs()),KO=ie(require("json5"));var ne={};oE(ne,{bold:()=>jO,dimmed:()=>qO,error:()=>ig,grey:()=>HO,info:()=>BO,item:()=>UO,log:()=>mr,turboBlue:()=>Ei,turboGradient:()=>FO,turboLoader:()=>tg,turboRed:()=>Qm,underline:()=>$O,warn:()=>rg,yellow:()=>eg});var We=require("picocolors"),Km=ie(require("ora")),Zm=ie(require("gradient-string")),Xm="#0099F7",Jm="#F11712",MO="#FFFF00",Oc=t=>{let e=GO(t);return r=>`\x1B[38;5;${e}m${r}${(0,We.reset)("")}`},FO=(0,Zm.default)(Xm,Jm),Ei=Oc(Xm),Qm=Oc(Jm),eg=Oc(MO),tg=t=>(0,Km.default)({text:t,spinner:{frames:[" ",Ei("> "),Ei(">> "),Ei(">>>")]}}),BO=(...t)=>{mr(Ei((0,We.bold)(">>>")),t.join(" "))},jO=(...t)=>{mr((0,We.bold)(t.join(" ")))},$O=(...t)=>{mr((0,We.underline)(t.join(" ")))},qO=(...t)=>{mr((0,We.dim)(t.join(" ")))},HO=(...t)=>{mr((0,We.gray)(t.join(" ")))},UO=(...t)=>{mr(Ei((0,We.bold)(" \u2022")),t.join(" "))},mr=(...t)=>{console.log(...t)},rg=(...t)=>{console.error(eg((0,We.bold)(">>>")),t.join(" "))},ig=(...t)=>{console.error(Qm((0,We.bold)(">>>")),t.join(" "))};function GO(t){let e=parseInt(t.slice(1),16),r=Math.floor(e/(256*256))%256,i=Math.floor(e/256)%256,n=e%256;return 16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)}var $y=ie(require("os")),qy=ie(Li());async function gr(t,e=[],r){let i={cwd:$y.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,qy.default)(t,e,i);return n.trim()}catch{return}}async function Yc(){let[t,e,r,i]=await Promise.all([gr("yarnpkg",["--version"]),gr("npm",["--version"]),gr("pnpm",["--version"]),gr("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}async function Vc(){let[t,e,r,i]=await Promise.all([gr("yarnpkg",["global","bin"]),gr("npm",["config","get","prefix"]),gr("pnpm",["bin","--global"]),gr("bun",["pm","--g","bin"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}var Uk=ie(require("fs-extra"));var Gk=ie(require("path")),zk=ie(require("fs-extra")),Wk=require("picocolors");var $w=require("stream"),qw=require("util"),TL=require("path"),kL=require("os"),Hw=require("fs"),CL=ie(jw());var vF=(0,qw.promisify)($w.Stream.pipeline);var Uw=require("fs-extra");var $L=ie(require("path")),qL=ie(Zw()),Xw=require("picocolors"),Nh=require("fs-extra");var eE=require("commander");var aa={name:"@turbo/codemod",version:"2.1.4-canary.9",description:"Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",homepage:"https://turbo.build/repo",license:"MIT",repository:{type:"git",url:"https://github.com/vercel/turborepo",directory:"packages/turbo-codemod"},bugs:{url:"https://github.com/vercel/turborepo/issues"},bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","add-transformer":"plop","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{axios:"0.27.2",commander:"^9.5.0",diff:"^5.1.0","find-up":"4.1.0","fs-extra":"^10.0.0","gradient-string":"^2.0.0",inquirer:"^8.2.4","inquirer-file-tree-selection-prompt":"^1.0.19",json5:"^2.2.3","is-git-clean":"^1.1.0",ora:"4.1.1",picocolors:"1.0.1",semver:"^7.3.7","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/gen":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/diff":"^5.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^8.2.0","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/semver":"^7.3.9","@types/uuid":"^9.0.0",deepmerge:"^4.2.2",jest:"^27.4.3",plop:"^3.1.1",semver:"^7.3.5","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"5.3.3"},files:["dist"],publishConfig:{access:"public"}};var ln=ie(require("os")),KS=require("child_process"),Oe=require("picocolors"),ZS=require("inquirer");var Xe=require("picocolors"),fS=ie(require("ora"),1),pS=ie(require("gradient-string"),1);var qP=ie(Li(),1),nB=require("fs-extra");var cB=ie(qs(),1),hB=require("fs-extra"),pB=require("fs-extra"),mB=require("picocolors"),bS=require("stream"),_S=require("util"),_B=require("fs-extra"),vB=require("picocolors"),AB=require("fs-extra"),ii=ie(require("path"),1),Ue=require("fs-extra"),wS=ie(Li(),1),SS=ie(require("path"),1),ES=require("fs-extra"),vS=require("picocolors"),sr=ie(require("path"),1),RS=ie(Li(),1),st=require("fs-extra"),xS=ie(qs(),1);var Kn=ie(require("path"),1),Dt=require("fs-extra"),nn=ie(require("path"),1),Mt=require("fs-extra"),Zn=ie(require("path"),1),Ft=require("fs-extra"),ns=require("picocolors"),EI=ie(require("gradient-string"),1),vI=ie(Li(),1),RI=ie(require("ora"),1),xI=require("semver"),AI=require("picocolors"),UL=Object.create,Fh=Object.defineProperty,GL=Object.getOwnPropertyDescriptor,zL=Object.getOwnPropertyNames,WL=Object.getPrototypeOf,YL=Object.prototype.hasOwnProperty,te=(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')}),VL=(t,e)=>()=>(t&&(e=t(t=0)),e),ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),KL=(t,e)=>{for(var r in e)Fh(t,r,{get:e[r],enumerable:!0})},ZL=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zL(e))!YL.call(t,n)&&n!==r&&Fh(t,n,{get:()=>e[n],enumerable:!(i=GL(e,n))||i.enumerable});return t},ua=(t,e,r)=>(r=t!=null?UL(WL(t)):{},ZL(e||!t||!t.__esModule?Fh(r,"default",{value:t,enumerable:!0}):r,t)),W=VL(()=>{}),XL=ee((t,e)=>{W();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}),JL=ee((t,e)=>{W();var r=XL().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,l=Object.defineProperty||function(D,d,m){D[d]=m.value},c=typeof Symbol=="function"?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function p(D,d,m){return Object.defineProperty(D,d,{value:m,enumerable:!0,configurable:!0,writable:!0}),D[d]}try{p({},"")}catch{p=function(D,d,m){return D[d]=m}}function g(D,d,m,_){var R=d&&d.prototype instanceof O?d:O,E=Object.create(R.prototype),M=new j(_||[]);return l(E,"_invoke",{value:K(D,m,M)}),E}function y(D,d,m){try{return{type:"normal",arg:D.call(d,m)}}catch(_){return{type:"throw",arg:_}}}s.wrap=g;var b="suspendedStart",x="suspendedYield",k="executing",C="completed",T={};function O(){}function I(){}function w(){}var v={};p(v,u,function(){return this});var F=Object.getPrototypeOf,q=F&&F(F(z([])));q&&q!==o&&a.call(q,u)&&(v=q);var P=w.prototype=O.prototype=Object.create(v);function U(D){["next","throw","return"].forEach(function(d){p(D,d,function(m){return this._invoke(d,m)})})}function V(D,d){function m(R,E,M,B){var Z=y(D[R],D,E);if(Z.type!=="throw"){var H=Z.arg,J=H.value;return J&&r(J)=="object"&&a.call(J,"__await")?d.resolve(J.__await).then(function(G){m("next",G,M,B)},function(G){m("throw",G,M,B)}):d.resolve(J).then(function(G){H.value=G,M(H)},function(G){return m("throw",G,M,B)})}B(Z.arg)}var _;l(this,"_invoke",{value:function(R,E){function M(){return new d(function(B,Z){m(R,E,B,Z)})}return _=_?_.then(M,M):M()}})}function K(D,d,m){var _=b;return function(R,E){if(_===k)throw new Error("Generator is already running");if(_===C){if(R==="throw")throw E;return{value:n,done:!0}}for(m.method=R,m.arg=E;;){var M=m.delegate;if(M){var B=N(M,m);if(B){if(B===T)continue;return B}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(_===b)throw _=C,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);_=k;var Z=y(D,d,m);if(Z.type==="normal"){if(_=m.done?C:x,Z.arg===T)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(_=C,m.method="throw",m.arg=Z.arg)}}}function N(D,d){var m=d.method,_=D.iterator[m];if(_===n)return d.delegate=null,m==="throw"&&D.iterator.return&&(d.method="return",d.arg=n,N(D,d),d.method==="throw")||m!=="return"&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+m+"' method")),T;var R=y(_,D.iterator,d.arg);if(R.type==="throw")return d.method="throw",d.arg=R.arg,d.delegate=null,T;var E=R.arg;return E?E.done?(d[D.resultName]=E.value,d.next=D.nextLoc,d.method!=="return"&&(d.method="next",d.arg=n),d.delegate=null,T):E:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,T)}function A(D){var d={tryLoc:D[0]};1 in D&&(d.catchLoc=D[1]),2 in D&&(d.finallyLoc=D[2],d.afterLoc=D[3]),this.tryEntries.push(d)}function L(D){var d=D.completion||{};d.type="normal",delete d.arg,D.completion=d}function j(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(A,this),this.reset(!0)}function z(D){if(D||D===""){var d=D[u];if(d)return d.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var m=-1,_=function R(){for(;++m<D.length;)if(a.call(D,m))return R.value=D[m],R.done=!1,R;return R.value=n,R.done=!0,R};return _.next=_}}throw new TypeError(r(D)+" is not iterable")}return I.prototype=w,l(P,"constructor",{value:w,configurable:!0}),l(w,"constructor",{value:I,configurable:!0}),I.displayName=p(w,h,"GeneratorFunction"),s.isGeneratorFunction=function(D){var d=typeof D=="function"&&D.constructor;return!!d&&(d===I||(d.displayName||d.name)==="GeneratorFunction")},s.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,w):(D.__proto__=w,p(D,h,"GeneratorFunction")),D.prototype=Object.create(P),D},s.awrap=function(D){return{__await:D}},U(V.prototype),p(V.prototype,f,function(){return this}),s.AsyncIterator=V,s.async=function(D,d,m,_,R){R===void 0&&(R=Promise);var E=new V(g(D,d,m,_),R);return s.isGeneratorFunction(d)?E:E.next().then(function(M){return M.done?M.value:E.next()})},U(P),p(P,h,"Generator"),p(P,u,function(){return this}),p(P,"toString",function(){return"[object Generator]"}),s.keys=function(D){var d=Object(D),m=[];for(var _ in d)m.push(_);return m.reverse(),function R(){for(;m.length;){var E=m.pop();if(E in d)return R.value=E,R.done=!1,R}return R.done=!0,R}},s.values=z,j.prototype={constructor:j,reset:function(D){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(L),!D)for(var d in this)d.charAt(0)==="t"&&a.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=n)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var d=this;function m(Z,H){return E.type="throw",E.arg=D,d.next=Z,H&&(d.method="next",d.arg=n),!!H}for(var _=this.tryEntries.length-1;_>=0;--_){var R=this.tryEntries[_],E=R.completion;if(R.tryLoc==="root")return m("end");if(R.tryLoc<=this.prev){var M=a.call(R,"catchLoc"),B=a.call(R,"finallyLoc");if(M&&B){if(this.prev<R.catchLoc)return m(R.catchLoc,!0);if(this.prev<R.finallyLoc)return m(R.finallyLoc)}else if(M){if(this.prev<R.catchLoc)return m(R.catchLoc,!0)}else{if(!B)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return m(R.finallyLoc)}}}},abrupt:function(D,d){for(var m=this.tryEntries.length-1;m>=0;--m){var _=this.tryEntries[m];if(_.tryLoc<=this.prev&&a.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var R=_;break}}R&&(D==="break"||D==="continue")&&R.tryLoc<=d&&d<=R.finallyLoc&&(R=null);var E=R?R.completion:{};return E.type=D,E.arg=d,R?(this.method="next",this.next=R.finallyLoc,T):this.complete(E)},complete:function(D,d){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&d&&(this.next=d),T},finish:function(D){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.finallyLoc===D)return this.complete(m.completion,m.afterLoc),L(m),T}},catch:function(D){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.tryLoc===D){var _=m.completion;if(_.type==="throw"){var R=_.arg;L(m)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(D,d,m){return this.delegate={iterator:z(D),resultName:d,nextLoc:m},this.method==="next"&&(this.arg=n),T}},s}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),QL=ee((t,e)=>{W();var r=JL()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),eP=ee((t,e)=>{"use strict";W();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),tP=ee((t,e)=>{"use strict";W();var r=eP(),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()()},l=(f,h,...p)=>{o++;let g=r(f,...p);h(g),g.then(a,a)},c=(f,h,...p)=>{o<n?l(f,h,...p):s.push(l.bind(null,f,h,...p))},u=(f,...h)=>new Promise(p=>c(f,p,...h));return Object.defineProperties(u,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),u};e.exports=i,e.exports.default=i}),rP=ee((t,e)=>{"use strict";W();var r=tP(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,l)=>l(await a),s=async a=>{let l=await Promise.all(a);if(l[1]===!0)throw new i(l[0]);return!1},o=async(a,l,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let u=r(c.concurrency),f=[...a].map(p=>[p,u(n,p,l)]),h=r(c.preserveOrder?1:1/0);try{await Promise.all(f.map(p=>h(s,p)))}catch(p){if(p instanceof i)return p.value;throw p}};e.exports=o,e.exports.default=o}),iP=ee((t,e)=>{"use strict";W();var r=te("path"),i=te("fs"),{promisify:n}=te("util"),s=rP(),o=n(i.stat),a=n(i.lstat),l={directory:"isDirectory",file:"isFile"};function c({type:f}){if(!(f in l))throw new Error(`Invalid type specified: ${f}`)}var u=(f,h)=>f===void 0||h[l[f]]();e.exports=async(f,h)=>{h={cwd:process.cwd(),type:"file",allowSymlinks:!0,...h},c(h);let p=h.allowSymlinks?o:a;return s(f,async g=>{try{let y=await p(r.resolve(h.cwd,g));return u(h.type,y)}catch{return!1}},h)},e.exports.sync=(f,h)=>{h={cwd:process.cwd(),allowSymlinks:!0,type:"file",...h},c(h);let p=h.allowSymlinks?i.statSync:i.lstatSync;for(let g of f)try{let y=p(r.resolve(h.cwd,g));if(u(h.type,y))return g}catch{}}}),nP=ee((t,e)=>{"use strict";W();var r=te("fs"),{promisify:i}=te("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}}}),sP=ee((t,e)=>{"use strict";W();var r=te("path"),i=iP(),n=nP(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let l=r.resolve(a.cwd||""),{root:c}=r.parse(l),u=[].concat(o),f=async h=>{if(typeof o!="function")return i(u,h);let p=await o(h.cwd);return typeof p=="string"?i([p],h):p};for(;;){let h=await f({...a,cwd:l});if(h===s)return;if(h)return r.resolve(l,h);if(l===c)return;l=r.dirname(l)}},e.exports.sync=(o,a={})=>{let l=r.resolve(a.cwd||""),{root:c}=r.parse(l),u=[].concat(o),f=h=>{if(typeof o!="function")return i.sync(u,h);let p=o(h.cwd);return typeof p=="string"?i.sync([p],h):p};for(;;){let h=f({...a,cwd:l});if(h===s)return;if(h)return r.resolve(l,h);if(l===c)return;l=r.dirname(l)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),Xn=ee((t,e)=>{"use strict";W();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)):{}}),Bh=ee((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=te("events"),n=te("stream"),s=te("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),c=Symbol("emittingEnd"),u=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),b=Symbol("decoder"),x=Symbol("flowing"),k=Symbol("paused"),C=Symbol("resume"),T=Symbol("buffer"),O=Symbol("pipes"),I=Symbol("bufferLength"),w=Symbol("bufferPush"),v=Symbol("bufferShift"),F=Symbol("objectMode"),q=Symbol("destroyed"),P=Symbol("emitData"),U=Symbol("emitEnd"),V=Symbol("emitEnd2"),K=Symbol("async"),N=R=>Promise.resolve().then(R),A=global._MP_NO_ITERATOR_SYMBOLS_!=="1",L=A&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),j=A&&Symbol.iterator||Symbol("iterator not implemented"),z=R=>R==="end"||R==="finish"||R==="prefinish",D=R=>R instanceof ArrayBuffer||typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,d=R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),m=class{constructor(R,E,M){this.src=R,this.dest=E,this.opts=M,this.ondrain=()=>R[C](),E.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},_=class extends m{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,E,M){super(R,E,M),this.proxyErrors=B=>E.emit("error",B),R.on("error",this.proxyErrors)}};e.exports=class Qw extends n{constructor(E){super(),this[x]=!1,this[k]=!1,this[O]=[],this[T]=[],this[F]=E&&E.objectMode||!1,this[F]?this[y]=null:this[y]=E&&E.encoding||null,this[y]==="buffer"&&(this[y]=null),this[K]=E&&!!E.async||!1,this[b]=this[y]?new s(this[y]):null,this[o]=!1,this[l]=!1,this[c]=!1,this[f]=!1,this[u]=null,this.writable=!0,this.readable=!0,this[I]=0,this[q]=!1,E&&E.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),E&&E.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[O]})}get bufferLength(){return this[I]}get encoding(){return this[y]}set encoding(E){if(this[F])throw new Error("cannot set encoding in objectMode");if(this[y]&&E!==this[y]&&(this[b]&&this[b].lastNeed||this[I]))throw new Error("cannot change encoding");this[y]!==E&&(this[b]=E?new s(E):null,this[T].length&&(this[T]=this[T].map(M=>this[b].write(M)))),this[y]=E}setEncoding(E){this.encoding=E}get objectMode(){return this[F]}set objectMode(E){this[F]=this[F]||!!E}get async(){return this[K]}set async(E){this[K]=this[K]||!!E}write(E,M,B){if(this[o])throw new Error("write after end");if(this[q])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof M=="function"&&(B=M,M="utf8"),M||(M="utf8");let Z=this[K]?N:H=>H();return!this[F]&&!Buffer.isBuffer(E)&&(d(E)?E=Buffer.from(E.buffer,E.byteOffset,E.byteLength):D(E)?E=Buffer.from(E):typeof E!="string"&&(this.objectMode=!0)),this[F]?(this.flowing&&this[I]!==0&&this[p](!0),this.flowing?this.emit("data",E):this[w](E),this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing):E.length?(typeof E=="string"&&!(M===this[y]&&!this[b].lastNeed)&&(E=Buffer.from(E,M)),Buffer.isBuffer(E)&&this[y]&&(E=this[b].write(E)),this.flowing&&this[I]!==0&&this[p](!0),this.flowing?this.emit("data",E):this[w](E),this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing):(this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing)}read(E){if(this[q])return null;if(this[I]===0||E===0||E>this[I])return this[a](),null;this[F]&&(E=null),this[T].length>1&&!this[F]&&(this.encoding?this[T]=[this[T].join("")]:this[T]=[Buffer.concat(this[T],this[I])]);let M=this[h](E||null,this[T][0]);return this[a](),M}[h](E,M){return E===M.length||E===null?this[v]():(this[T][0]=M.slice(E),M=M.slice(0,E),this[I]-=E),this.emit("data",M),!this[T].length&&!this[o]&&this.emit("drain"),M}end(E,M,B){return typeof E=="function"&&(B=E,E=null),typeof M=="function"&&(B=M,M="utf8"),E&&this.write(E,M),B&&this.once("end",B),this[o]=!0,this.writable=!1,(this.flowing||!this[k])&&this[a](),this}[C](){this[q]||(this[k]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[C]()}pause(){this[x]=!1,this[k]=!0}get destroyed(){return this[q]}get flowing(){return this[x]}get paused(){return this[k]}[w](E){this[F]?this[I]+=1:this[I]+=E.length,this[T].push(E)}[v](){return this[T].length&&(this[F]?this[I]-=1:this[I]-=this[T][0].length),this[T].shift()}[p](E){do;while(this[g](this[v]()));!E&&!this[T].length&&!this[o]&&this.emit("drain")}[g](E){return E?(this.emit("data",E),this.flowing):!1}pipe(E,M){if(this[q])return;let B=this[l];return M=M||{},E===r.stdout||E===r.stderr?M.end=!1:M.end=M.end!==!1,M.proxyErrors=!!M.proxyErrors,B?M.end&&E.end():(this[O].push(M.proxyErrors?new _(this,E,M):new m(this,E,M)),this[K]?N(()=>this[C]()):this[C]()),E}unpipe(E){let M=this[O].find(B=>B.dest===E);M&&(this[O].splice(this[O].indexOf(M),1),M.unpipe())}addListener(E,M){return this.on(E,M)}on(E,M){let B=super.on(E,M);return E==="data"&&!this[O].length&&!this.flowing?this[C]():E==="readable"&&this[I]!==0?super.emit("readable"):z(E)&&this[l]?(super.emit(E),this.removeAllListeners(E)):E==="error"&&this[u]&&(this[K]?N(()=>M.call(this,this[u])):M.call(this,this[u])),B}get emittedEnd(){return this[l]}[a](){!this[c]&&!this[l]&&!this[q]&&this[T].length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[c]=!1)}emit(E,M,...B){if(E!=="error"&&E!=="close"&&E!==q&&this[q])return;if(E==="data")return M?this[K]?N(()=>this[P](M)):this[P](M):!1;if(E==="end")return this[U]();if(E==="close"){if(this[f]=!0,!this[l]&&!this[q])return;let H=super.emit("close");return this.removeAllListeners("close"),H}else if(E==="error"){this[u]=M;let H=super.emit("error",M);return this[a](),H}else if(E==="resume"){let H=super.emit("resume");return this[a](),H}else if(E==="finish"||E==="prefinish"){let H=super.emit(E);return this.removeAllListeners(E),H}let Z=super.emit(E,M,...B);return this[a](),Z}[P](E){for(let B of this[O])B.dest.write(E)===!1&&this.pause();let M=super.emit("data",E);return this[a](),M}[U](){this[l]||(this[l]=!0,this.readable=!1,this[K]?N(()=>this[V]()):this[V]())}[V](){if(this[b]){let M=this[b].end();if(M){for(let B of this[O])B.dest.write(M);super.emit("data",M)}}for(let M of this[O])M.end();let E=super.emit("end");return this.removeAllListeners("end"),E}collect(){let E=[];this[F]||(E.dataLength=0);let M=this.promise();return this.on("data",B=>{E.push(B),this[F]||(E.dataLength+=B.length)}),M.then(()=>E)}concat(){return this[F]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(E=>this[F]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?E.join(""):Buffer.concat(E,E.dataLength))}promise(){return new Promise((E,M)=>{this.on(q,()=>M(new Error("stream destroyed"))),this.on("error",B=>M(B)),this.on("end",()=>E())})}[L](){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 M=null,B=null,Z=re=>{this.removeListener("data",H),this.removeListener("end",J),B(re)},H=re=>{this.removeListener("error",Z),this.removeListener("end",J),this.pause(),M({value:re,done:!!this[o]})},J=()=>{this.removeListener("error",Z),this.removeListener("data",H),M({done:!0})},G=()=>Z(new Error("stream destroyed"));return new Promise((re,ue)=>{B=ue,M=re,this.once(q,G),this.once("error",Z),this.once("end",J),this.once("data",H)})}}}[j](){return{next:()=>{let E=this.read();return{value:E,done:E===null}}}}destroy(E){return this[q]?(E?this.emit("error",E):this.emit(q),this):(this[q]=!0,this[T].length=0,this[I]=0,typeof this.close=="function"&&!this[f]&&this.close(),E?this.emit("error",E):this.emit(q),this)}static isStream(E){return!!E&&(E instanceof Qw||E instanceof n||E instanceof i&&(typeof E.pipe=="function"||typeof E.write=="function"&&typeof E.end=="function"))}}}),oP=ee((t,e)=>{W();var r=te("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))}),eS=ee((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=te("events"),n=te("stream"),s=te("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),c=Symbol("emittingEnd"),u=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),b=Symbol("decoder"),x=Symbol("flowing"),k=Symbol("paused"),C=Symbol("resume"),T=Symbol("bufferLength"),O=Symbol("bufferPush"),I=Symbol("bufferShift"),w=Symbol("objectMode"),v=Symbol("destroyed"),F=Symbol("emitData"),q=Symbol("emitEnd"),P=Symbol("emitEnd2"),U=Symbol("async"),V=m=>Promise.resolve().then(m),K=global._MP_NO_ITERATOR_SYMBOLS_!=="1",N=K&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),A=K&&Symbol.iterator||Symbol("iterator not implemented"),L=m=>m==="end"||m==="finish"||m==="prefinish",j=m=>m instanceof ArrayBuffer||typeof m=="object"&&m.constructor&&m.constructor.name==="ArrayBuffer"&&m.byteLength>=0,z=m=>!Buffer.isBuffer(m)&&ArrayBuffer.isView(m),D=class{constructor(m,_,R){this.src=m,this.dest=_,this.opts=R,this.ondrain=()=>m[C](),_.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},d=class extends D{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(m,_,R){super(m,_,R),this.proxyErrors=E=>_.emit("error",E),m.on("error",this.proxyErrors)}};e.exports=class tS extends n{constructor(_){super(),this[x]=!1,this[k]=!1,this.pipes=[],this.buffer=[],this[w]=_&&_.objectMode||!1,this[w]?this[y]=null:this[y]=_&&_.encoding||null,this[y]==="buffer"&&(this[y]=null),this[U]=_&&!!_.async||!1,this[b]=this[y]?new s(this[y]):null,this[o]=!1,this[l]=!1,this[c]=!1,this[f]=!1,this[u]=null,this.writable=!0,this.readable=!0,this[T]=0,this[v]=!1}get bufferLength(){return this[T]}get encoding(){return this[y]}set encoding(_){if(this[w])throw new Error("cannot set encoding in objectMode");if(this[y]&&_!==this[y]&&(this[b]&&this[b].lastNeed||this[T]))throw new Error("cannot change encoding");this[y]!==_&&(this[b]=_?new s(_):null,this.buffer.length&&(this.buffer=this.buffer.map(R=>this[b].write(R)))),this[y]=_}setEncoding(_){this.encoding=_}get objectMode(){return this[w]}set objectMode(_){this[w]=this[w]||!!_}get async(){return this[U]}set async(_){this[U]=this[U]||!!_}write(_,R,E){if(this[o])throw new Error("write after end");if(this[v])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof R=="function"&&(E=R,R="utf8"),R||(R="utf8");let M=this[U]?V:B=>B();return!this[w]&&!Buffer.isBuffer(_)&&(z(_)?_=Buffer.from(_.buffer,_.byteOffset,_.byteLength):j(_)?_=Buffer.from(_):typeof _!="string"&&(this.objectMode=!0)),this[w]?(this.flowing&&this[T]!==0&&this[p](!0),this.flowing?this.emit("data",_):this[O](_),this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing):_.length?(typeof _=="string"&&!(R===this[y]&&!this[b].lastNeed)&&(_=Buffer.from(_,R)),Buffer.isBuffer(_)&&this[y]&&(_=this[b].write(_)),this.flowing&&this[T]!==0&&this[p](!0),this.flowing?this.emit("data",_):this[O](_),this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing):(this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing)}read(_){if(this[v])return null;if(this[T]===0||_===0||_>this[T])return this[a](),null;this[w]&&(_=null),this.buffer.length>1&&!this[w]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[T])]);let R=this[h](_||null,this.buffer[0]);return this[a](),R}[h](_,R){return _===R.length||_===null?this[I]():(this.buffer[0]=R.slice(_),R=R.slice(0,_),this[T]-=_),this.emit("data",R),!this.buffer.length&&!this[o]&&this.emit("drain"),R}end(_,R,E){return typeof _=="function"&&(E=_,_=null),typeof R=="function"&&(E=R,R="utf8"),_&&this.write(_,R),E&&this.once("end",E),this[o]=!0,this.writable=!1,(this.flowing||!this[k])&&this[a](),this}[C](){this[v]||(this[k]=!1,this[x]=!0,this.emit("resume"),this.buffer.length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[C]()}pause(){this[x]=!1,this[k]=!0}get destroyed(){return this[v]}get flowing(){return this[x]}get paused(){return this[k]}[O](_){this[w]?this[T]+=1:this[T]+=_.length,this.buffer.push(_)}[I](){return this.buffer.length&&(this[w]?this[T]-=1:this[T]-=this.buffer[0].length),this.buffer.shift()}[p](_){do;while(this[g](this[I]()));!_&&!this.buffer.length&&!this[o]&&this.emit("drain")}[g](_){return _?(this.emit("data",_),this.flowing):!1}pipe(_,R){if(this[v])return;let E=this[l];return R=R||{},_===r.stdout||_===r.stderr?R.end=!1:R.end=R.end!==!1,R.proxyErrors=!!R.proxyErrors,E?R.end&&_.end():(this.pipes.push(R.proxyErrors?new d(this,_,R):new D(this,_,R)),this[U]?V(()=>this[C]()):this[C]()),_}unpipe(_){let R=this.pipes.find(E=>E.dest===_);R&&(this.pipes.splice(this.pipes.indexOf(R),1),R.unpipe())}addListener(_,R){return this.on(_,R)}on(_,R){let E=super.on(_,R);return _==="data"&&!this.pipes.length&&!this.flowing?this[C]():_==="readable"&&this[T]!==0?super.emit("readable"):L(_)&&this[l]?(super.emit(_),this.removeAllListeners(_)):_==="error"&&this[u]&&(this[U]?V(()=>R.call(this,this[u])):R.call(this,this[u])),E}get emittedEnd(){return this[l]}[a](){!this[c]&&!this[l]&&!this[v]&&this.buffer.length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[c]=!1)}emit(_,R,...E){if(_!=="error"&&_!=="close"&&_!==v&&this[v])return;if(_==="data")return R?this[U]?V(()=>this[F](R)):this[F](R):!1;if(_==="end")return this[q]();if(_==="close"){if(this[f]=!0,!this[l]&&!this[v])return;let B=super.emit("close");return this.removeAllListeners("close"),B}else if(_==="error"){this[u]=R;let B=super.emit("error",R);return this[a](),B}else if(_==="resume"){let B=super.emit("resume");return this[a](),B}else if(_==="finish"||_==="prefinish"){let B=super.emit(_);return this.removeAllListeners(_),B}let M=super.emit(_,R,...E);return this[a](),M}[F](_){for(let E of this.pipes)E.dest.write(_)===!1&&this.pause();let R=super.emit("data",_);return this[a](),R}[q](){this[l]||(this[l]=!0,this.readable=!1,this[U]?V(()=>this[P]()):this[P]())}[P](){if(this[b]){let R=this[b].end();if(R){for(let E of this.pipes)E.dest.write(R);super.emit("data",R)}}for(let R of this.pipes)R.end();let _=super.emit("end");return this.removeAllListeners("end"),_}collect(){let _=[];this[w]||(_.dataLength=0);let R=this.promise();return this.on("data",E=>{_.push(E),this[w]||(_.dataLength+=E.length)}),R.then(()=>_)}concat(){return this[w]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(_=>this[w]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?_.join(""):Buffer.concat(_,_.dataLength))}promise(){return new Promise((_,R)=>{this.on(v,()=>R(new Error("stream destroyed"))),this.on("error",E=>R(E)),this.on("end",()=>_())})}[N](){return{next:()=>{let _=this.read();if(_!==null)return Promise.resolve({done:!1,value:_});if(this[o])return Promise.resolve({done:!0});let R=null,E=null,M=J=>{this.removeListener("data",B),this.removeListener("end",Z),E(J)},B=J=>{this.removeListener("error",M),this.removeListener("end",Z),this.pause(),R({value:J,done:!!this[o]})},Z=()=>{this.removeListener("error",M),this.removeListener("data",B),R({done:!0})},H=()=>M(new Error("stream destroyed"));return new Promise((J,G)=>{E=G,R=J,this.once(v,H),this.once("error",M),this.once("end",Z),this.once("data",B)})}}}[A](){return{next:()=>{let _=this.read();return{value:_,done:_===null}}}}destroy(_){return this[v]?(_?this.emit("error",_):this.emit(v),this):(this[v]=!0,this.buffer.length=0,this[T]=0,typeof this.close=="function"&&!this[f]&&this.close(),_?this.emit("error",_):this.emit(v),this)}static isStream(_){return!!_&&(_ instanceof tS||_ instanceof n||_ instanceof i&&(typeof _.pipe=="function"||typeof _.write=="function"&&typeof _.end=="function"))}}}),rS=ee(t=>{"use strict";W();var e=te("assert"),r=te("buffer").Buffer,i=te("zlib"),n=t.constants=oP(),s=eS(),o=r.concat,a=Symbol("_superWrite"),l=class extends Error{constructor(L){super("zlib: "+L.message),this.code=L.code,this.errno=L.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+L.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},c=Symbol("opts"),u=Symbol("flushFlag"),f=Symbol("finishFlushFlag"),h=Symbol("fullFlushFlag"),p=Symbol("handle"),g=Symbol("onError"),y=Symbol("sawError"),b=Symbol("level"),x=Symbol("strategy"),k=Symbol("ended"),C=Symbol("_defaultFullFlush"),T=class extends s{constructor(L,j){if(!L||typeof L!="object")throw new TypeError("invalid options for ZlibBase constructor");super(L),this[y]=!1,this[k]=!1,this[c]=L,this[u]=L.flush,this[f]=L.finishFlush;try{this[p]=new i[j](L)}catch(z){throw new l(z)}this[g]=z=>{this[y]||(this[y]=!0,this.close(),this.emit("error",z))},this[p].on("error",z=>this[g](new l(z))),this.once("end",()=>this.close)}close(){this[p]&&(this[p].close(),this[p]=null,this.emit("close"))}reset(){if(!this[y])return e(this[p],"zlib binding closed"),this[p].reset()}flush(L){this.ended||(typeof L!="number"&&(L=this[h]),this.write(Object.assign(r.alloc(0),{[u]:L})))}end(L,j,z){return L&&this.write(L,j),this.flush(this[f]),this[k]=!0,super.end(null,null,z)}get ended(){return this[k]}write(L,j,z){if(typeof j=="function"&&(z=j,j="utf8"),typeof L=="string"&&(L=r.from(L,j)),this[y])return;e(this[p],"zlib binding closed");let D=this[p]._handle,d=D.close;D.close=()=>{};let m=this[p].close;this[p].close=()=>{},r.concat=E=>E;let _;try{let E=typeof L[u]=="number"?L[u]:this[u];_=this[p]._processChunk(L,E),r.concat=o}catch(E){r.concat=o,this[g](new l(E))}finally{this[p]&&(this[p]._handle=D,D.close=d,this[p].close=m,this[p].removeAllListeners("error"))}this[p]&&this[p].on("error",E=>this[g](new l(E)));let R;if(_)if(Array.isArray(_)&&_.length>0){R=this[a](r.from(_[0]));for(let E=1;E<_.length;E++)R=this[a](_[E])}else R=this[a](r.from(_));return z&&z(),R}[a](L){return super.write(L)}},O=class extends T{constructor(L,j){L=L||{},L.flush=L.flush||n.Z_NO_FLUSH,L.finishFlush=L.finishFlush||n.Z_FINISH,super(L,j),this[h]=n.Z_FULL_FLUSH,this[b]=L.level,this[x]=L.strategy}params(L,j){if(!this[y]){if(!this[p])throw new Error("cannot switch params when binding is closed");if(!this[p].params)throw new Error("not supported in this implementation");if(this[b]!==L||this[x]!==j){this.flush(n.Z_SYNC_FLUSH),e(this[p],"zlib binding closed");let z=this[p].flush;this[p].flush=(D,d)=>{this.flush(D),d()};try{this[p].params(L,j)}finally{this[p].flush=z}this[p]&&(this[b]=L,this[x]=j)}}}},I=class extends O{constructor(L){super(L,"Deflate")}},w=class extends O{constructor(L){super(L,"Inflate")}},v=Symbol("_portable"),F=class extends O{constructor(L){super(L,"Gzip"),this[v]=L&&!!L.portable}[a](L){return this[v]?(this[v]=!1,L[9]=255,super[a](L)):super[a](L)}},q=class extends O{constructor(L){super(L,"Gunzip")}},P=class extends O{constructor(L){super(L,"DeflateRaw")}},U=class extends O{constructor(L){super(L,"InflateRaw")}},V=class extends O{constructor(L){super(L,"Unzip")}},K=class extends T{constructor(L,j){L=L||{},L.flush=L.flush||n.BROTLI_OPERATION_PROCESS,L.finishFlush=L.finishFlush||n.BROTLI_OPERATION_FINISH,super(L,j),this[h]=n.BROTLI_OPERATION_FLUSH}},N=class extends K{constructor(L){super(L,"BrotliCompress")}},A=class extends K{constructor(L){super(L,"BrotliDecompress")}};t.Deflate=I,t.Inflate=w,t.Gzip=F,t.Gunzip=q,t.DeflateRaw=P,t.InflateRaw=U,t.Unzip=V,typeof i.BrotliCompress=="function"?(t.BrotliCompress=N,t.BrotliDecompress=A):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),Jn=ee((t,e)=>{W();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),jh=ee((t,e)=>{"use strict";W();var r=Bh(),i=Jn(),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,l=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,l-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])}}}),iS=ee(t=>{"use strict";W(),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]]))}),aP=ee((t,e)=>{"use strict";W();var r=(u,f)=>{if(Number.isSafeInteger(u))u<0?n(u,f):i(u,f);else throw Error("cannot encode number outside of javascript safe integer range");return f},i=(u,f)=>{f[0]=128;for(var h=f.length;h>1;h--)f[h-1]=u&255,u=Math.floor(u/256)},n=(u,f)=>{f[0]=255;var h=!1;u=u*-1;for(var p=f.length;p>1;p--){var g=u&255;u=Math.floor(u/256),h?f[p-1]=l(g):g===0?f[p-1]=0:(h=!0,f[p-1]=c(g))}},s=u=>{let f=u[0],h=f===128?a(u.slice(1,u.length)):f===255?o(u):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},o=u=>{for(var f=u.length,h=0,p=!1,g=f-1;g>-1;g--){var y=u[g],b;p?b=l(y):y===0?b=y:(p=!0,b=c(y)),b!==0&&(h-=b*Math.pow(256,f-g-1))}return h},a=u=>{for(var f=u.length,h=0,p=f-1;p>-1;p--){var g=u[p];g!==0&&(h+=g*Math.pow(256,f-p-1))}return h},l=u=>(255^u)&255,c=u=>(255^u)+1&255;e.exports={encode:r,parse:s}}),Qn=ee((t,e)=>{"use strict";W();var r=iS(),i=te("path").posix,n=aP(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(w,v,F,q){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(w)?this.decode(w,v||0,F,q):w&&this.set(w)}decode(w,v,F,q){if(v||(v=0),!w||!(w.length>=v+512))throw new Error("need 512 bytes for header");if(this.path=c(w,v,100),this.mode=h(w,v+100,8),this.uid=h(w,v+108,8),this.gid=h(w,v+116,8),this.size=h(w,v+124,12),this.mtime=u(w,v+136,12),this.cksum=h(w,v+148,12),this[s](F),this[s](q,!0),this[o]=c(w,v+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(w,v+157,100),w.slice(v+257,v+265).toString()==="ustar\x0000")if(this.uname=c(w,v+265,32),this.gname=c(w,v+297,32),this.devmaj=h(w,v+329,8),this.devmin=h(w,v+337,8),w[v+475]!==0){let U=c(w,v+345,155);this.path=U+"/"+this.path}else{let U=c(w,v+345,130);U&&(this.path=U+"/"+this.path),this.atime=u(w,v+476,12),this.ctime=u(w,v+488,12)}let P=8*32;for(let U=v;U<v+148;U++)P+=w[U];for(let U=v+156;U<v+512;U++)P+=w[U];this.cksumValid=P===this.cksum,this.cksum===null&&P===8*32&&(this.nullBlock=!0)}[s](w,v){for(let F in w)w[F]!==null&&w[F]!==void 0&&!(v&&F==="path")&&(this[F]=w[F])}encode(w,v){if(w||(w=this.block=Buffer.alloc(512),v=0),v||(v=0),!(w.length>=v+512))throw new Error("need 512 bytes for header");let F=this.ctime||this.atime?130:155,q=l(this.path||"",F),P=q[0],U=q[1];this.needPax=q[2],this.needPax=I(w,v,100,P)||this.needPax,this.needPax=b(w,v+100,8,this.mode)||this.needPax,this.needPax=b(w,v+108,8,this.uid)||this.needPax,this.needPax=b(w,v+116,8,this.gid)||this.needPax,this.needPax=b(w,v+124,12,this.size)||this.needPax,this.needPax=T(w,v+136,12,this.mtime)||this.needPax,w[v+156]=this[o].charCodeAt(0),this.needPax=I(w,v+157,100,this.linkpath)||this.needPax,w.write("ustar\x0000",v+257,8),this.needPax=I(w,v+265,32,this.uname)||this.needPax,this.needPax=I(w,v+297,32,this.gname)||this.needPax,this.needPax=b(w,v+329,8,this.devmaj)||this.needPax,this.needPax=b(w,v+337,8,this.devmin)||this.needPax,this.needPax=I(w,v+345,F,U)||this.needPax,w[v+475]!==0?this.needPax=I(w,v+345,155,U)||this.needPax:(this.needPax=I(w,v+345,130,U)||this.needPax,this.needPax=T(w,v+476,12,this.atime)||this.needPax,this.needPax=T(w,v+488,12,this.ctime)||this.needPax);let V=8*32;for(let K=v;K<v+148;K++)V+=w[K];for(let K=v+156;K<v+512;K++)V+=w[K];return this.cksum=V,b(w,v+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(w){for(let v in w)w[v]!==null&&w[v]!==void 0&&(this[v]=w[v])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(w){r.code.has(w)?this[o]=r.code.get(w):this[o]=w}},l=(w,v)=>{let F=w,q="",P,U=i.parse(w).root||".";if(Buffer.byteLength(F)<100)P=[F,q,!1];else{q=i.dirname(F),F=i.basename(F);do Buffer.byteLength(F)<=100&&Buffer.byteLength(q)<=v?P=[F,q,!1]:Buffer.byteLength(F)>100&&Buffer.byteLength(q)<=v?P=[F.slice(0,100-1),q,!0]:(F=i.join(i.basename(q),F),q=i.dirname(q));while(q!==U&&!P);P||(P=[w.slice(0,100-1),"",!0])}return P},c=(w,v,F)=>w.slice(v,v+F).toString("utf8").replace(/\0.*/,""),u=(w,v,F)=>f(h(w,v,F)),f=w=>w===null?null:new Date(w*1e3),h=(w,v,F)=>w[v]&128?n.parse(w.slice(v,v+F)):g(w,v,F),p=w=>isNaN(w)?null:w,g=(w,v,F)=>p(parseInt(w.slice(v,v+F).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},b=(w,v,F,q)=>q===null?!1:q>y[F]||q<0?(n.encode(q,w.slice(v,v+F)),!0):(x(w,v,F,q),!1),x=(w,v,F,q)=>w.write(k(q,F),v,F,"ascii"),k=(w,v)=>C(Math.floor(w).toString(8),v),C=(w,v)=>(w.length===v-1?w:new Array(v-w.length-1).join("0")+w+" ")+"\0",T=(w,v,F,q)=>q===null?!1:b(w,v,F,q.getTime()/1e3),O=new Array(156).join("\0"),I=(w,v,F,q)=>q===null?!1:(w.write(q+O,v,F,"utf8"),q.length!==Buffer.byteLength(q)||q.length>F);e.exports=a}),$h=ee((t,e)=>{"use strict";W();var r=Qn(),i=te("path"),n=class{constructor(l,c){this.atime=l.atime||null,this.charset=l.charset||null,this.comment=l.comment||null,this.ctime=l.ctime||null,this.gid=l.gid||null,this.gname=l.gname||null,this.linkpath=l.linkpath||null,this.mtime=l.mtime||null,this.path=l.path||null,this.size=l.size||null,this.uid=l.uid||null,this.uname=l.uname||null,this.dev=l.dev||null,this.ino=l.ino||null,this.nlink=l.nlink||null,this.global=c||!1}encode(){let l=this.encodeBody();if(l==="")return null;let c=Buffer.byteLength(l),u=512*Math.ceil(1+c/512),f=Buffer.allocUnsafe(u);for(let h=0;h<512;h++)f[h]=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(f),f.write(l,512,c,"utf8");for(let h=c+512;h<f.length;h++)f[h]=0;return f}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(l){if(this[l]===null||this[l]===void 0)return"";let c=this[l]instanceof Date?this[l].getTime()/1e3:this[l],u=" "+(l==="dev"||l==="ino"||l==="nlink"?"SCHILY.":"")+l+"="+c+`
40
+ `:""}var y0=g0,b0={dump:y0};function Ga(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var _0=Le,w0=Rf,S0=Tf,E0=If,v0=Nf,R0=$a,x0=Xf.load,A0=Xf.loadAll,O0=b0.dump,T0=He,k0={binary:jf,float:Pf,map:Of,null:kf,pairs:qf,set:Hf,timestamp:Ff,bool:Cf,int:Lf,merge:Bf,omap:$f,seq:Af,str:xf},C0=Ga("safeLoad","load"),L0=Ga("safeLoadAll","loadAll"),P0=Ga("safeDump","dump"),I0={Type:_0,Schema:w0,FAILSAFE_SCHEMA:S0,JSON_SCHEMA:E0,CORE_SCHEMA:v0,DEFAULT_SCHEMA:R0,load:x0,loadAll:A0,dump:O0,YAMLException:T0,types:k0,safeLoad:C0,safeLoadAll:L0,safeDump:P0},za=I0;var VO=ie(qs()),KO=ie(require("json5"));var ne={};oE(ne,{bold:()=>jO,dimmed:()=>qO,error:()=>ig,grey:()=>HO,info:()=>BO,item:()=>UO,log:()=>mr,turboBlue:()=>Ei,turboGradient:()=>FO,turboLoader:()=>tg,turboRed:()=>Qm,underline:()=>$O,warn:()=>rg,yellow:()=>eg});var We=require("picocolors"),Km=ie(require("ora")),Zm=ie(require("gradient-string")),Xm="#0099F7",Jm="#F11712",MO="#FFFF00",Oc=t=>{let e=GO(t);return r=>`\x1B[38;5;${e}m${r}${(0,We.reset)("")}`},FO=(0,Zm.default)(Xm,Jm),Ei=Oc(Xm),Qm=Oc(Jm),eg=Oc(MO),tg=t=>(0,Km.default)({text:t,spinner:{frames:[" ",Ei("> "),Ei(">> "),Ei(">>>")]}}),BO=(...t)=>{mr(Ei((0,We.bold)(">>>")),t.join(" "))},jO=(...t)=>{mr((0,We.bold)(t.join(" ")))},$O=(...t)=>{mr((0,We.underline)(t.join(" ")))},qO=(...t)=>{mr((0,We.dim)(t.join(" ")))},HO=(...t)=>{mr((0,We.gray)(t.join(" ")))},UO=(...t)=>{mr(Ei((0,We.bold)(" \u2022")),t.join(" "))},mr=(...t)=>{console.log(...t)},rg=(...t)=>{console.error(eg((0,We.bold)(">>>")),t.join(" "))},ig=(...t)=>{console.error(Qm((0,We.bold)(">>>")),t.join(" "))};function GO(t){let e=parseInt(t.slice(1),16),r=Math.floor(e/(256*256))%256,i=Math.floor(e/256)%256,n=e%256;return 16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)}var $y=ie(require("os")),qy=ie(Li());async function gr(t,e=[],r){let i={cwd:$y.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,qy.default)(t,e,i);return n.trim()}catch{return}}async function Yc(){let[t,e,r,i]=await Promise.all([gr("yarnpkg",["--version"]),gr("npm",["--version"]),gr("pnpm",["--version"]),gr("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}async function Vc(){let[t,e,r,i]=await Promise.all([gr("yarnpkg",["global","bin"]),gr("npm",["config","get","prefix"]),gr("pnpm",["bin","--global"]),gr("bun",["pm","--g","bin"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}var Uk=ie(require("fs-extra"));var Gk=ie(require("path")),zk=ie(require("fs-extra")),Wk=require("picocolors");var $w=require("stream"),qw=require("util"),TL=require("path"),kL=require("os"),Hw=require("fs"),CL=ie(jw());var vF=(0,qw.promisify)($w.Stream.pipeline);var Uw=require("fs-extra");var $L=ie(require("path")),qL=ie(Zw()),Xw=require("picocolors"),Nh=require("fs-extra");var eE=require("commander");var aa={name:"@turbo/codemod",version:"2.2.1",description:"Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",homepage:"https://turbo.build/repo",license:"MIT",repository:{type:"git",url:"https://github.com/vercel/turborepo",directory:"packages/turbo-codemod"},bugs:{url:"https://github.com/vercel/turborepo/issues"},bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","add-transformer":"plop","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{axios:"0.27.2",commander:"^9.5.0",diff:"^5.1.0","find-up":"4.1.0","fs-extra":"^10.0.0","gradient-string":"^2.0.0",inquirer:"^8.2.4","inquirer-file-tree-selection-prompt":"^1.0.19",json5:"^2.2.3","is-git-clean":"^1.1.0",ora:"4.1.1",picocolors:"1.0.1",semver:"^7.3.7","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/gen":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/diff":"^5.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^8.2.0","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/semver":"^7.3.9","@types/uuid":"^9.0.0",deepmerge:"^4.2.2",jest:"^27.4.3",plop:"^3.1.1",semver:"^7.3.5","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"5.3.3"},files:["dist"],publishConfig:{access:"public"}};var ln=ie(require("os")),KS=require("child_process"),Oe=require("picocolors"),ZS=require("inquirer");var Xe=require("picocolors"),fS=ie(require("ora"),1),pS=ie(require("gradient-string"),1);var qP=ie(Li(),1),nB=require("fs-extra");var cB=ie(qs(),1),hB=require("fs-extra"),pB=require("fs-extra"),mB=require("picocolors"),bS=require("stream"),_S=require("util"),_B=require("fs-extra"),vB=require("picocolors"),AB=require("fs-extra"),ii=ie(require("path"),1),Ue=require("fs-extra"),wS=ie(Li(),1),SS=ie(require("path"),1),ES=require("fs-extra"),vS=require("picocolors"),sr=ie(require("path"),1),RS=ie(Li(),1),st=require("fs-extra"),xS=ie(qs(),1);var Kn=ie(require("path"),1),Dt=require("fs-extra"),nn=ie(require("path"),1),Mt=require("fs-extra"),Zn=ie(require("path"),1),Ft=require("fs-extra"),ns=require("picocolors"),EI=ie(require("gradient-string"),1),vI=ie(Li(),1),RI=ie(require("ora"),1),xI=require("semver"),AI=require("picocolors"),UL=Object.create,Fh=Object.defineProperty,GL=Object.getOwnPropertyDescriptor,zL=Object.getOwnPropertyNames,WL=Object.getPrototypeOf,YL=Object.prototype.hasOwnProperty,te=(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')}),VL=(t,e)=>()=>(t&&(e=t(t=0)),e),ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),KL=(t,e)=>{for(var r in e)Fh(t,r,{get:e[r],enumerable:!0})},ZL=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zL(e))!YL.call(t,n)&&n!==r&&Fh(t,n,{get:()=>e[n],enumerable:!(i=GL(e,n))||i.enumerable});return t},ua=(t,e,r)=>(r=t!=null?UL(WL(t)):{},ZL(e||!t||!t.__esModule?Fh(r,"default",{value:t,enumerable:!0}):r,t)),W=VL(()=>{}),XL=ee((t,e)=>{W();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}),JL=ee((t,e)=>{W();var r=XL().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,l=Object.defineProperty||function(D,d,m){D[d]=m.value},c=typeof Symbol=="function"?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function p(D,d,m){return Object.defineProperty(D,d,{value:m,enumerable:!0,configurable:!0,writable:!0}),D[d]}try{p({},"")}catch{p=function(D,d,m){return D[d]=m}}function g(D,d,m,_){var R=d&&d.prototype instanceof O?d:O,E=Object.create(R.prototype),M=new j(_||[]);return l(E,"_invoke",{value:K(D,m,M)}),E}function y(D,d,m){try{return{type:"normal",arg:D.call(d,m)}}catch(_){return{type:"throw",arg:_}}}s.wrap=g;var b="suspendedStart",x="suspendedYield",k="executing",C="completed",T={};function O(){}function I(){}function w(){}var v={};p(v,u,function(){return this});var F=Object.getPrototypeOf,q=F&&F(F(z([])));q&&q!==o&&a.call(q,u)&&(v=q);var P=w.prototype=O.prototype=Object.create(v);function U(D){["next","throw","return"].forEach(function(d){p(D,d,function(m){return this._invoke(d,m)})})}function V(D,d){function m(R,E,M,B){var Z=y(D[R],D,E);if(Z.type!=="throw"){var H=Z.arg,J=H.value;return J&&r(J)=="object"&&a.call(J,"__await")?d.resolve(J.__await).then(function(G){m("next",G,M,B)},function(G){m("throw",G,M,B)}):d.resolve(J).then(function(G){H.value=G,M(H)},function(G){return m("throw",G,M,B)})}B(Z.arg)}var _;l(this,"_invoke",{value:function(R,E){function M(){return new d(function(B,Z){m(R,E,B,Z)})}return _=_?_.then(M,M):M()}})}function K(D,d,m){var _=b;return function(R,E){if(_===k)throw new Error("Generator is already running");if(_===C){if(R==="throw")throw E;return{value:n,done:!0}}for(m.method=R,m.arg=E;;){var M=m.delegate;if(M){var B=N(M,m);if(B){if(B===T)continue;return B}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(_===b)throw _=C,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);_=k;var Z=y(D,d,m);if(Z.type==="normal"){if(_=m.done?C:x,Z.arg===T)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(_=C,m.method="throw",m.arg=Z.arg)}}}function N(D,d){var m=d.method,_=D.iterator[m];if(_===n)return d.delegate=null,m==="throw"&&D.iterator.return&&(d.method="return",d.arg=n,N(D,d),d.method==="throw")||m!=="return"&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+m+"' method")),T;var R=y(_,D.iterator,d.arg);if(R.type==="throw")return d.method="throw",d.arg=R.arg,d.delegate=null,T;var E=R.arg;return E?E.done?(d[D.resultName]=E.value,d.next=D.nextLoc,d.method!=="return"&&(d.method="next",d.arg=n),d.delegate=null,T):E:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,T)}function A(D){var d={tryLoc:D[0]};1 in D&&(d.catchLoc=D[1]),2 in D&&(d.finallyLoc=D[2],d.afterLoc=D[3]),this.tryEntries.push(d)}function L(D){var d=D.completion||{};d.type="normal",delete d.arg,D.completion=d}function j(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(A,this),this.reset(!0)}function z(D){if(D||D===""){var d=D[u];if(d)return d.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var m=-1,_=function R(){for(;++m<D.length;)if(a.call(D,m))return R.value=D[m],R.done=!1,R;return R.value=n,R.done=!0,R};return _.next=_}}throw new TypeError(r(D)+" is not iterable")}return I.prototype=w,l(P,"constructor",{value:w,configurable:!0}),l(w,"constructor",{value:I,configurable:!0}),I.displayName=p(w,h,"GeneratorFunction"),s.isGeneratorFunction=function(D){var d=typeof D=="function"&&D.constructor;return!!d&&(d===I||(d.displayName||d.name)==="GeneratorFunction")},s.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,w):(D.__proto__=w,p(D,h,"GeneratorFunction")),D.prototype=Object.create(P),D},s.awrap=function(D){return{__await:D}},U(V.prototype),p(V.prototype,f,function(){return this}),s.AsyncIterator=V,s.async=function(D,d,m,_,R){R===void 0&&(R=Promise);var E=new V(g(D,d,m,_),R);return s.isGeneratorFunction(d)?E:E.next().then(function(M){return M.done?M.value:E.next()})},U(P),p(P,h,"Generator"),p(P,u,function(){return this}),p(P,"toString",function(){return"[object Generator]"}),s.keys=function(D){var d=Object(D),m=[];for(var _ in d)m.push(_);return m.reverse(),function R(){for(;m.length;){var E=m.pop();if(E in d)return R.value=E,R.done=!1,R}return R.done=!0,R}},s.values=z,j.prototype={constructor:j,reset:function(D){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(L),!D)for(var d in this)d.charAt(0)==="t"&&a.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=n)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var d=this;function m(Z,H){return E.type="throw",E.arg=D,d.next=Z,H&&(d.method="next",d.arg=n),!!H}for(var _=this.tryEntries.length-1;_>=0;--_){var R=this.tryEntries[_],E=R.completion;if(R.tryLoc==="root")return m("end");if(R.tryLoc<=this.prev){var M=a.call(R,"catchLoc"),B=a.call(R,"finallyLoc");if(M&&B){if(this.prev<R.catchLoc)return m(R.catchLoc,!0);if(this.prev<R.finallyLoc)return m(R.finallyLoc)}else if(M){if(this.prev<R.catchLoc)return m(R.catchLoc,!0)}else{if(!B)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return m(R.finallyLoc)}}}},abrupt:function(D,d){for(var m=this.tryEntries.length-1;m>=0;--m){var _=this.tryEntries[m];if(_.tryLoc<=this.prev&&a.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var R=_;break}}R&&(D==="break"||D==="continue")&&R.tryLoc<=d&&d<=R.finallyLoc&&(R=null);var E=R?R.completion:{};return E.type=D,E.arg=d,R?(this.method="next",this.next=R.finallyLoc,T):this.complete(E)},complete:function(D,d){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&d&&(this.next=d),T},finish:function(D){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.finallyLoc===D)return this.complete(m.completion,m.afterLoc),L(m),T}},catch:function(D){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.tryLoc===D){var _=m.completion;if(_.type==="throw"){var R=_.arg;L(m)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(D,d,m){return this.delegate={iterator:z(D),resultName:d,nextLoc:m},this.method==="next"&&(this.arg=n),T}},s}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),QL=ee((t,e)=>{W();var r=JL()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),eP=ee((t,e)=>{"use strict";W();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),tP=ee((t,e)=>{"use strict";W();var r=eP(),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()()},l=(f,h,...p)=>{o++;let g=r(f,...p);h(g),g.then(a,a)},c=(f,h,...p)=>{o<n?l(f,h,...p):s.push(l.bind(null,f,h,...p))},u=(f,...h)=>new Promise(p=>c(f,p,...h));return Object.defineProperties(u,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),u};e.exports=i,e.exports.default=i}),rP=ee((t,e)=>{"use strict";W();var r=tP(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,l)=>l(await a),s=async a=>{let l=await Promise.all(a);if(l[1]===!0)throw new i(l[0]);return!1},o=async(a,l,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let u=r(c.concurrency),f=[...a].map(p=>[p,u(n,p,l)]),h=r(c.preserveOrder?1:1/0);try{await Promise.all(f.map(p=>h(s,p)))}catch(p){if(p instanceof i)return p.value;throw p}};e.exports=o,e.exports.default=o}),iP=ee((t,e)=>{"use strict";W();var r=te("path"),i=te("fs"),{promisify:n}=te("util"),s=rP(),o=n(i.stat),a=n(i.lstat),l={directory:"isDirectory",file:"isFile"};function c({type:f}){if(!(f in l))throw new Error(`Invalid type specified: ${f}`)}var u=(f,h)=>f===void 0||h[l[f]]();e.exports=async(f,h)=>{h={cwd:process.cwd(),type:"file",allowSymlinks:!0,...h},c(h);let p=h.allowSymlinks?o:a;return s(f,async g=>{try{let y=await p(r.resolve(h.cwd,g));return u(h.type,y)}catch{return!1}},h)},e.exports.sync=(f,h)=>{h={cwd:process.cwd(),allowSymlinks:!0,type:"file",...h},c(h);let p=h.allowSymlinks?i.statSync:i.lstatSync;for(let g of f)try{let y=p(r.resolve(h.cwd,g));if(u(h.type,y))return g}catch{}}}),nP=ee((t,e)=>{"use strict";W();var r=te("fs"),{promisify:i}=te("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}}}),sP=ee((t,e)=>{"use strict";W();var r=te("path"),i=iP(),n=nP(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let l=r.resolve(a.cwd||""),{root:c}=r.parse(l),u=[].concat(o),f=async h=>{if(typeof o!="function")return i(u,h);let p=await o(h.cwd);return typeof p=="string"?i([p],h):p};for(;;){let h=await f({...a,cwd:l});if(h===s)return;if(h)return r.resolve(l,h);if(l===c)return;l=r.dirname(l)}},e.exports.sync=(o,a={})=>{let l=r.resolve(a.cwd||""),{root:c}=r.parse(l),u=[].concat(o),f=h=>{if(typeof o!="function")return i.sync(u,h);let p=o(h.cwd);return typeof p=="string"?i.sync([p],h):p};for(;;){let h=f({...a,cwd:l});if(h===s)return;if(h)return r.resolve(l,h);if(l===c)return;l=r.dirname(l)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),Xn=ee((t,e)=>{"use strict";W();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)):{}}),Bh=ee((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=te("events"),n=te("stream"),s=te("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),c=Symbol("emittingEnd"),u=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),b=Symbol("decoder"),x=Symbol("flowing"),k=Symbol("paused"),C=Symbol("resume"),T=Symbol("buffer"),O=Symbol("pipes"),I=Symbol("bufferLength"),w=Symbol("bufferPush"),v=Symbol("bufferShift"),F=Symbol("objectMode"),q=Symbol("destroyed"),P=Symbol("emitData"),U=Symbol("emitEnd"),V=Symbol("emitEnd2"),K=Symbol("async"),N=R=>Promise.resolve().then(R),A=global._MP_NO_ITERATOR_SYMBOLS_!=="1",L=A&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),j=A&&Symbol.iterator||Symbol("iterator not implemented"),z=R=>R==="end"||R==="finish"||R==="prefinish",D=R=>R instanceof ArrayBuffer||typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,d=R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),m=class{constructor(R,E,M){this.src=R,this.dest=E,this.opts=M,this.ondrain=()=>R[C](),E.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},_=class extends m{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,E,M){super(R,E,M),this.proxyErrors=B=>E.emit("error",B),R.on("error",this.proxyErrors)}};e.exports=class Qw extends n{constructor(E){super(),this[x]=!1,this[k]=!1,this[O]=[],this[T]=[],this[F]=E&&E.objectMode||!1,this[F]?this[y]=null:this[y]=E&&E.encoding||null,this[y]==="buffer"&&(this[y]=null),this[K]=E&&!!E.async||!1,this[b]=this[y]?new s(this[y]):null,this[o]=!1,this[l]=!1,this[c]=!1,this[f]=!1,this[u]=null,this.writable=!0,this.readable=!0,this[I]=0,this[q]=!1,E&&E.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),E&&E.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[O]})}get bufferLength(){return this[I]}get encoding(){return this[y]}set encoding(E){if(this[F])throw new Error("cannot set encoding in objectMode");if(this[y]&&E!==this[y]&&(this[b]&&this[b].lastNeed||this[I]))throw new Error("cannot change encoding");this[y]!==E&&(this[b]=E?new s(E):null,this[T].length&&(this[T]=this[T].map(M=>this[b].write(M)))),this[y]=E}setEncoding(E){this.encoding=E}get objectMode(){return this[F]}set objectMode(E){this[F]=this[F]||!!E}get async(){return this[K]}set async(E){this[K]=this[K]||!!E}write(E,M,B){if(this[o])throw new Error("write after end");if(this[q])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof M=="function"&&(B=M,M="utf8"),M||(M="utf8");let Z=this[K]?N:H=>H();return!this[F]&&!Buffer.isBuffer(E)&&(d(E)?E=Buffer.from(E.buffer,E.byteOffset,E.byteLength):D(E)?E=Buffer.from(E):typeof E!="string"&&(this.objectMode=!0)),this[F]?(this.flowing&&this[I]!==0&&this[p](!0),this.flowing?this.emit("data",E):this[w](E),this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing):E.length?(typeof E=="string"&&!(M===this[y]&&!this[b].lastNeed)&&(E=Buffer.from(E,M)),Buffer.isBuffer(E)&&this[y]&&(E=this[b].write(E)),this.flowing&&this[I]!==0&&this[p](!0),this.flowing?this.emit("data",E):this[w](E),this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing):(this[I]!==0&&this.emit("readable"),B&&Z(B),this.flowing)}read(E){if(this[q])return null;if(this[I]===0||E===0||E>this[I])return this[a](),null;this[F]&&(E=null),this[T].length>1&&!this[F]&&(this.encoding?this[T]=[this[T].join("")]:this[T]=[Buffer.concat(this[T],this[I])]);let M=this[h](E||null,this[T][0]);return this[a](),M}[h](E,M){return E===M.length||E===null?this[v]():(this[T][0]=M.slice(E),M=M.slice(0,E),this[I]-=E),this.emit("data",M),!this[T].length&&!this[o]&&this.emit("drain"),M}end(E,M,B){return typeof E=="function"&&(B=E,E=null),typeof M=="function"&&(B=M,M="utf8"),E&&this.write(E,M),B&&this.once("end",B),this[o]=!0,this.writable=!1,(this.flowing||!this[k])&&this[a](),this}[C](){this[q]||(this[k]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[C]()}pause(){this[x]=!1,this[k]=!0}get destroyed(){return this[q]}get flowing(){return this[x]}get paused(){return this[k]}[w](E){this[F]?this[I]+=1:this[I]+=E.length,this[T].push(E)}[v](){return this[T].length&&(this[F]?this[I]-=1:this[I]-=this[T][0].length),this[T].shift()}[p](E){do;while(this[g](this[v]()));!E&&!this[T].length&&!this[o]&&this.emit("drain")}[g](E){return E?(this.emit("data",E),this.flowing):!1}pipe(E,M){if(this[q])return;let B=this[l];return M=M||{},E===r.stdout||E===r.stderr?M.end=!1:M.end=M.end!==!1,M.proxyErrors=!!M.proxyErrors,B?M.end&&E.end():(this[O].push(M.proxyErrors?new _(this,E,M):new m(this,E,M)),this[K]?N(()=>this[C]()):this[C]()),E}unpipe(E){let M=this[O].find(B=>B.dest===E);M&&(this[O].splice(this[O].indexOf(M),1),M.unpipe())}addListener(E,M){return this.on(E,M)}on(E,M){let B=super.on(E,M);return E==="data"&&!this[O].length&&!this.flowing?this[C]():E==="readable"&&this[I]!==0?super.emit("readable"):z(E)&&this[l]?(super.emit(E),this.removeAllListeners(E)):E==="error"&&this[u]&&(this[K]?N(()=>M.call(this,this[u])):M.call(this,this[u])),B}get emittedEnd(){return this[l]}[a](){!this[c]&&!this[l]&&!this[q]&&this[T].length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[c]=!1)}emit(E,M,...B){if(E!=="error"&&E!=="close"&&E!==q&&this[q])return;if(E==="data")return M?this[K]?N(()=>this[P](M)):this[P](M):!1;if(E==="end")return this[U]();if(E==="close"){if(this[f]=!0,!this[l]&&!this[q])return;let H=super.emit("close");return this.removeAllListeners("close"),H}else if(E==="error"){this[u]=M;let H=super.emit("error",M);return this[a](),H}else if(E==="resume"){let H=super.emit("resume");return this[a](),H}else if(E==="finish"||E==="prefinish"){let H=super.emit(E);return this.removeAllListeners(E),H}let Z=super.emit(E,M,...B);return this[a](),Z}[P](E){for(let B of this[O])B.dest.write(E)===!1&&this.pause();let M=super.emit("data",E);return this[a](),M}[U](){this[l]||(this[l]=!0,this.readable=!1,this[K]?N(()=>this[V]()):this[V]())}[V](){if(this[b]){let M=this[b].end();if(M){for(let B of this[O])B.dest.write(M);super.emit("data",M)}}for(let M of this[O])M.end();let E=super.emit("end");return this.removeAllListeners("end"),E}collect(){let E=[];this[F]||(E.dataLength=0);let M=this.promise();return this.on("data",B=>{E.push(B),this[F]||(E.dataLength+=B.length)}),M.then(()=>E)}concat(){return this[F]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(E=>this[F]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?E.join(""):Buffer.concat(E,E.dataLength))}promise(){return new Promise((E,M)=>{this.on(q,()=>M(new Error("stream destroyed"))),this.on("error",B=>M(B)),this.on("end",()=>E())})}[L](){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 M=null,B=null,Z=re=>{this.removeListener("data",H),this.removeListener("end",J),B(re)},H=re=>{this.removeListener("error",Z),this.removeListener("end",J),this.pause(),M({value:re,done:!!this[o]})},J=()=>{this.removeListener("error",Z),this.removeListener("data",H),M({done:!0})},G=()=>Z(new Error("stream destroyed"));return new Promise((re,ue)=>{B=ue,M=re,this.once(q,G),this.once("error",Z),this.once("end",J),this.once("data",H)})}}}[j](){return{next:()=>{let E=this.read();return{value:E,done:E===null}}}}destroy(E){return this[q]?(E?this.emit("error",E):this.emit(q),this):(this[q]=!0,this[T].length=0,this[I]=0,typeof this.close=="function"&&!this[f]&&this.close(),E?this.emit("error",E):this.emit(q),this)}static isStream(E){return!!E&&(E instanceof Qw||E instanceof n||E instanceof i&&(typeof E.pipe=="function"||typeof E.write=="function"&&typeof E.end=="function"))}}}),oP=ee((t,e)=>{W();var r=te("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))}),eS=ee((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=te("events"),n=te("stream"),s=te("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),c=Symbol("emittingEnd"),u=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),b=Symbol("decoder"),x=Symbol("flowing"),k=Symbol("paused"),C=Symbol("resume"),T=Symbol("bufferLength"),O=Symbol("bufferPush"),I=Symbol("bufferShift"),w=Symbol("objectMode"),v=Symbol("destroyed"),F=Symbol("emitData"),q=Symbol("emitEnd"),P=Symbol("emitEnd2"),U=Symbol("async"),V=m=>Promise.resolve().then(m),K=global._MP_NO_ITERATOR_SYMBOLS_!=="1",N=K&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),A=K&&Symbol.iterator||Symbol("iterator not implemented"),L=m=>m==="end"||m==="finish"||m==="prefinish",j=m=>m instanceof ArrayBuffer||typeof m=="object"&&m.constructor&&m.constructor.name==="ArrayBuffer"&&m.byteLength>=0,z=m=>!Buffer.isBuffer(m)&&ArrayBuffer.isView(m),D=class{constructor(m,_,R){this.src=m,this.dest=_,this.opts=R,this.ondrain=()=>m[C](),_.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},d=class extends D{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(m,_,R){super(m,_,R),this.proxyErrors=E=>_.emit("error",E),m.on("error",this.proxyErrors)}};e.exports=class tS extends n{constructor(_){super(),this[x]=!1,this[k]=!1,this.pipes=[],this.buffer=[],this[w]=_&&_.objectMode||!1,this[w]?this[y]=null:this[y]=_&&_.encoding||null,this[y]==="buffer"&&(this[y]=null),this[U]=_&&!!_.async||!1,this[b]=this[y]?new s(this[y]):null,this[o]=!1,this[l]=!1,this[c]=!1,this[f]=!1,this[u]=null,this.writable=!0,this.readable=!0,this[T]=0,this[v]=!1}get bufferLength(){return this[T]}get encoding(){return this[y]}set encoding(_){if(this[w])throw new Error("cannot set encoding in objectMode");if(this[y]&&_!==this[y]&&(this[b]&&this[b].lastNeed||this[T]))throw new Error("cannot change encoding");this[y]!==_&&(this[b]=_?new s(_):null,this.buffer.length&&(this.buffer=this.buffer.map(R=>this[b].write(R)))),this[y]=_}setEncoding(_){this.encoding=_}get objectMode(){return this[w]}set objectMode(_){this[w]=this[w]||!!_}get async(){return this[U]}set async(_){this[U]=this[U]||!!_}write(_,R,E){if(this[o])throw new Error("write after end");if(this[v])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof R=="function"&&(E=R,R="utf8"),R||(R="utf8");let M=this[U]?V:B=>B();return!this[w]&&!Buffer.isBuffer(_)&&(z(_)?_=Buffer.from(_.buffer,_.byteOffset,_.byteLength):j(_)?_=Buffer.from(_):typeof _!="string"&&(this.objectMode=!0)),this[w]?(this.flowing&&this[T]!==0&&this[p](!0),this.flowing?this.emit("data",_):this[O](_),this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing):_.length?(typeof _=="string"&&!(R===this[y]&&!this[b].lastNeed)&&(_=Buffer.from(_,R)),Buffer.isBuffer(_)&&this[y]&&(_=this[b].write(_)),this.flowing&&this[T]!==0&&this[p](!0),this.flowing?this.emit("data",_):this[O](_),this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing):(this[T]!==0&&this.emit("readable"),E&&M(E),this.flowing)}read(_){if(this[v])return null;if(this[T]===0||_===0||_>this[T])return this[a](),null;this[w]&&(_=null),this.buffer.length>1&&!this[w]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[T])]);let R=this[h](_||null,this.buffer[0]);return this[a](),R}[h](_,R){return _===R.length||_===null?this[I]():(this.buffer[0]=R.slice(_),R=R.slice(0,_),this[T]-=_),this.emit("data",R),!this.buffer.length&&!this[o]&&this.emit("drain"),R}end(_,R,E){return typeof _=="function"&&(E=_,_=null),typeof R=="function"&&(E=R,R="utf8"),_&&this.write(_,R),E&&this.once("end",E),this[o]=!0,this.writable=!1,(this.flowing||!this[k])&&this[a](),this}[C](){this[v]||(this[k]=!1,this[x]=!0,this.emit("resume"),this.buffer.length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[C]()}pause(){this[x]=!1,this[k]=!0}get destroyed(){return this[v]}get flowing(){return this[x]}get paused(){return this[k]}[O](_){this[w]?this[T]+=1:this[T]+=_.length,this.buffer.push(_)}[I](){return this.buffer.length&&(this[w]?this[T]-=1:this[T]-=this.buffer[0].length),this.buffer.shift()}[p](_){do;while(this[g](this[I]()));!_&&!this.buffer.length&&!this[o]&&this.emit("drain")}[g](_){return _?(this.emit("data",_),this.flowing):!1}pipe(_,R){if(this[v])return;let E=this[l];return R=R||{},_===r.stdout||_===r.stderr?R.end=!1:R.end=R.end!==!1,R.proxyErrors=!!R.proxyErrors,E?R.end&&_.end():(this.pipes.push(R.proxyErrors?new d(this,_,R):new D(this,_,R)),this[U]?V(()=>this[C]()):this[C]()),_}unpipe(_){let R=this.pipes.find(E=>E.dest===_);R&&(this.pipes.splice(this.pipes.indexOf(R),1),R.unpipe())}addListener(_,R){return this.on(_,R)}on(_,R){let E=super.on(_,R);return _==="data"&&!this.pipes.length&&!this.flowing?this[C]():_==="readable"&&this[T]!==0?super.emit("readable"):L(_)&&this[l]?(super.emit(_),this.removeAllListeners(_)):_==="error"&&this[u]&&(this[U]?V(()=>R.call(this,this[u])):R.call(this,this[u])),E}get emittedEnd(){return this[l]}[a](){!this[c]&&!this[l]&&!this[v]&&this.buffer.length===0&&this[o]&&(this[c]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[c]=!1)}emit(_,R,...E){if(_!=="error"&&_!=="close"&&_!==v&&this[v])return;if(_==="data")return R?this[U]?V(()=>this[F](R)):this[F](R):!1;if(_==="end")return this[q]();if(_==="close"){if(this[f]=!0,!this[l]&&!this[v])return;let B=super.emit("close");return this.removeAllListeners("close"),B}else if(_==="error"){this[u]=R;let B=super.emit("error",R);return this[a](),B}else if(_==="resume"){let B=super.emit("resume");return this[a](),B}else if(_==="finish"||_==="prefinish"){let B=super.emit(_);return this.removeAllListeners(_),B}let M=super.emit(_,R,...E);return this[a](),M}[F](_){for(let E of this.pipes)E.dest.write(_)===!1&&this.pause();let R=super.emit("data",_);return this[a](),R}[q](){this[l]||(this[l]=!0,this.readable=!1,this[U]?V(()=>this[P]()):this[P]())}[P](){if(this[b]){let R=this[b].end();if(R){for(let E of this.pipes)E.dest.write(R);super.emit("data",R)}}for(let R of this.pipes)R.end();let _=super.emit("end");return this.removeAllListeners("end"),_}collect(){let _=[];this[w]||(_.dataLength=0);let R=this.promise();return this.on("data",E=>{_.push(E),this[w]||(_.dataLength+=E.length)}),R.then(()=>_)}concat(){return this[w]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(_=>this[w]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?_.join(""):Buffer.concat(_,_.dataLength))}promise(){return new Promise((_,R)=>{this.on(v,()=>R(new Error("stream destroyed"))),this.on("error",E=>R(E)),this.on("end",()=>_())})}[N](){return{next:()=>{let _=this.read();if(_!==null)return Promise.resolve({done:!1,value:_});if(this[o])return Promise.resolve({done:!0});let R=null,E=null,M=J=>{this.removeListener("data",B),this.removeListener("end",Z),E(J)},B=J=>{this.removeListener("error",M),this.removeListener("end",Z),this.pause(),R({value:J,done:!!this[o]})},Z=()=>{this.removeListener("error",M),this.removeListener("data",B),R({done:!0})},H=()=>M(new Error("stream destroyed"));return new Promise((J,G)=>{E=G,R=J,this.once(v,H),this.once("error",M),this.once("end",Z),this.once("data",B)})}}}[A](){return{next:()=>{let _=this.read();return{value:_,done:_===null}}}}destroy(_){return this[v]?(_?this.emit("error",_):this.emit(v),this):(this[v]=!0,this.buffer.length=0,this[T]=0,typeof this.close=="function"&&!this[f]&&this.close(),_?this.emit("error",_):this.emit(v),this)}static isStream(_){return!!_&&(_ instanceof tS||_ instanceof n||_ instanceof i&&(typeof _.pipe=="function"||typeof _.write=="function"&&typeof _.end=="function"))}}}),rS=ee(t=>{"use strict";W();var e=te("assert"),r=te("buffer").Buffer,i=te("zlib"),n=t.constants=oP(),s=eS(),o=r.concat,a=Symbol("_superWrite"),l=class extends Error{constructor(L){super("zlib: "+L.message),this.code=L.code,this.errno=L.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+L.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},c=Symbol("opts"),u=Symbol("flushFlag"),f=Symbol("finishFlushFlag"),h=Symbol("fullFlushFlag"),p=Symbol("handle"),g=Symbol("onError"),y=Symbol("sawError"),b=Symbol("level"),x=Symbol("strategy"),k=Symbol("ended"),C=Symbol("_defaultFullFlush"),T=class extends s{constructor(L,j){if(!L||typeof L!="object")throw new TypeError("invalid options for ZlibBase constructor");super(L),this[y]=!1,this[k]=!1,this[c]=L,this[u]=L.flush,this[f]=L.finishFlush;try{this[p]=new i[j](L)}catch(z){throw new l(z)}this[g]=z=>{this[y]||(this[y]=!0,this.close(),this.emit("error",z))},this[p].on("error",z=>this[g](new l(z))),this.once("end",()=>this.close)}close(){this[p]&&(this[p].close(),this[p]=null,this.emit("close"))}reset(){if(!this[y])return e(this[p],"zlib binding closed"),this[p].reset()}flush(L){this.ended||(typeof L!="number"&&(L=this[h]),this.write(Object.assign(r.alloc(0),{[u]:L})))}end(L,j,z){return L&&this.write(L,j),this.flush(this[f]),this[k]=!0,super.end(null,null,z)}get ended(){return this[k]}write(L,j,z){if(typeof j=="function"&&(z=j,j="utf8"),typeof L=="string"&&(L=r.from(L,j)),this[y])return;e(this[p],"zlib binding closed");let D=this[p]._handle,d=D.close;D.close=()=>{};let m=this[p].close;this[p].close=()=>{},r.concat=E=>E;let _;try{let E=typeof L[u]=="number"?L[u]:this[u];_=this[p]._processChunk(L,E),r.concat=o}catch(E){r.concat=o,this[g](new l(E))}finally{this[p]&&(this[p]._handle=D,D.close=d,this[p].close=m,this[p].removeAllListeners("error"))}this[p]&&this[p].on("error",E=>this[g](new l(E)));let R;if(_)if(Array.isArray(_)&&_.length>0){R=this[a](r.from(_[0]));for(let E=1;E<_.length;E++)R=this[a](_[E])}else R=this[a](r.from(_));return z&&z(),R}[a](L){return super.write(L)}},O=class extends T{constructor(L,j){L=L||{},L.flush=L.flush||n.Z_NO_FLUSH,L.finishFlush=L.finishFlush||n.Z_FINISH,super(L,j),this[h]=n.Z_FULL_FLUSH,this[b]=L.level,this[x]=L.strategy}params(L,j){if(!this[y]){if(!this[p])throw new Error("cannot switch params when binding is closed");if(!this[p].params)throw new Error("not supported in this implementation");if(this[b]!==L||this[x]!==j){this.flush(n.Z_SYNC_FLUSH),e(this[p],"zlib binding closed");let z=this[p].flush;this[p].flush=(D,d)=>{this.flush(D),d()};try{this[p].params(L,j)}finally{this[p].flush=z}this[p]&&(this[b]=L,this[x]=j)}}}},I=class extends O{constructor(L){super(L,"Deflate")}},w=class extends O{constructor(L){super(L,"Inflate")}},v=Symbol("_portable"),F=class extends O{constructor(L){super(L,"Gzip"),this[v]=L&&!!L.portable}[a](L){return this[v]?(this[v]=!1,L[9]=255,super[a](L)):super[a](L)}},q=class extends O{constructor(L){super(L,"Gunzip")}},P=class extends O{constructor(L){super(L,"DeflateRaw")}},U=class extends O{constructor(L){super(L,"InflateRaw")}},V=class extends O{constructor(L){super(L,"Unzip")}},K=class extends T{constructor(L,j){L=L||{},L.flush=L.flush||n.BROTLI_OPERATION_PROCESS,L.finishFlush=L.finishFlush||n.BROTLI_OPERATION_FINISH,super(L,j),this[h]=n.BROTLI_OPERATION_FLUSH}},N=class extends K{constructor(L){super(L,"BrotliCompress")}},A=class extends K{constructor(L){super(L,"BrotliDecompress")}};t.Deflate=I,t.Inflate=w,t.Gzip=F,t.Gunzip=q,t.DeflateRaw=P,t.InflateRaw=U,t.Unzip=V,typeof i.BrotliCompress=="function"?(t.BrotliCompress=N,t.BrotliDecompress=A):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),Jn=ee((t,e)=>{W();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),jh=ee((t,e)=>{"use strict";W();var r=Bh(),i=Jn(),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,l=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,l-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])}}}),iS=ee(t=>{"use strict";W(),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]]))}),aP=ee((t,e)=>{"use strict";W();var r=(u,f)=>{if(Number.isSafeInteger(u))u<0?n(u,f):i(u,f);else throw Error("cannot encode number outside of javascript safe integer range");return f},i=(u,f)=>{f[0]=128;for(var h=f.length;h>1;h--)f[h-1]=u&255,u=Math.floor(u/256)},n=(u,f)=>{f[0]=255;var h=!1;u=u*-1;for(var p=f.length;p>1;p--){var g=u&255;u=Math.floor(u/256),h?f[p-1]=l(g):g===0?f[p-1]=0:(h=!0,f[p-1]=c(g))}},s=u=>{let f=u[0],h=f===128?a(u.slice(1,u.length)):f===255?o(u):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},o=u=>{for(var f=u.length,h=0,p=!1,g=f-1;g>-1;g--){var y=u[g],b;p?b=l(y):y===0?b=y:(p=!0,b=c(y)),b!==0&&(h-=b*Math.pow(256,f-g-1))}return h},a=u=>{for(var f=u.length,h=0,p=f-1;p>-1;p--){var g=u[p];g!==0&&(h+=g*Math.pow(256,f-p-1))}return h},l=u=>(255^u)&255,c=u=>(255^u)+1&255;e.exports={encode:r,parse:s}}),Qn=ee((t,e)=>{"use strict";W();var r=iS(),i=te("path").posix,n=aP(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(w,v,F,q){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(w)?this.decode(w,v||0,F,q):w&&this.set(w)}decode(w,v,F,q){if(v||(v=0),!w||!(w.length>=v+512))throw new Error("need 512 bytes for header");if(this.path=c(w,v,100),this.mode=h(w,v+100,8),this.uid=h(w,v+108,8),this.gid=h(w,v+116,8),this.size=h(w,v+124,12),this.mtime=u(w,v+136,12),this.cksum=h(w,v+148,12),this[s](F),this[s](q,!0),this[o]=c(w,v+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(w,v+157,100),w.slice(v+257,v+265).toString()==="ustar\x0000")if(this.uname=c(w,v+265,32),this.gname=c(w,v+297,32),this.devmaj=h(w,v+329,8),this.devmin=h(w,v+337,8),w[v+475]!==0){let U=c(w,v+345,155);this.path=U+"/"+this.path}else{let U=c(w,v+345,130);U&&(this.path=U+"/"+this.path),this.atime=u(w,v+476,12),this.ctime=u(w,v+488,12)}let P=8*32;for(let U=v;U<v+148;U++)P+=w[U];for(let U=v+156;U<v+512;U++)P+=w[U];this.cksumValid=P===this.cksum,this.cksum===null&&P===8*32&&(this.nullBlock=!0)}[s](w,v){for(let F in w)w[F]!==null&&w[F]!==void 0&&!(v&&F==="path")&&(this[F]=w[F])}encode(w,v){if(w||(w=this.block=Buffer.alloc(512),v=0),v||(v=0),!(w.length>=v+512))throw new Error("need 512 bytes for header");let F=this.ctime||this.atime?130:155,q=l(this.path||"",F),P=q[0],U=q[1];this.needPax=q[2],this.needPax=I(w,v,100,P)||this.needPax,this.needPax=b(w,v+100,8,this.mode)||this.needPax,this.needPax=b(w,v+108,8,this.uid)||this.needPax,this.needPax=b(w,v+116,8,this.gid)||this.needPax,this.needPax=b(w,v+124,12,this.size)||this.needPax,this.needPax=T(w,v+136,12,this.mtime)||this.needPax,w[v+156]=this[o].charCodeAt(0),this.needPax=I(w,v+157,100,this.linkpath)||this.needPax,w.write("ustar\x0000",v+257,8),this.needPax=I(w,v+265,32,this.uname)||this.needPax,this.needPax=I(w,v+297,32,this.gname)||this.needPax,this.needPax=b(w,v+329,8,this.devmaj)||this.needPax,this.needPax=b(w,v+337,8,this.devmin)||this.needPax,this.needPax=I(w,v+345,F,U)||this.needPax,w[v+475]!==0?this.needPax=I(w,v+345,155,U)||this.needPax:(this.needPax=I(w,v+345,130,U)||this.needPax,this.needPax=T(w,v+476,12,this.atime)||this.needPax,this.needPax=T(w,v+488,12,this.ctime)||this.needPax);let V=8*32;for(let K=v;K<v+148;K++)V+=w[K];for(let K=v+156;K<v+512;K++)V+=w[K];return this.cksum=V,b(w,v+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(w){for(let v in w)w[v]!==null&&w[v]!==void 0&&(this[v]=w[v])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(w){r.code.has(w)?this[o]=r.code.get(w):this[o]=w}},l=(w,v)=>{let F=w,q="",P,U=i.parse(w).root||".";if(Buffer.byteLength(F)<100)P=[F,q,!1];else{q=i.dirname(F),F=i.basename(F);do Buffer.byteLength(F)<=100&&Buffer.byteLength(q)<=v?P=[F,q,!1]:Buffer.byteLength(F)>100&&Buffer.byteLength(q)<=v?P=[F.slice(0,100-1),q,!0]:(F=i.join(i.basename(q),F),q=i.dirname(q));while(q!==U&&!P);P||(P=[w.slice(0,100-1),"",!0])}return P},c=(w,v,F)=>w.slice(v,v+F).toString("utf8").replace(/\0.*/,""),u=(w,v,F)=>f(h(w,v,F)),f=w=>w===null?null:new Date(w*1e3),h=(w,v,F)=>w[v]&128?n.parse(w.slice(v,v+F)):g(w,v,F),p=w=>isNaN(w)?null:w,g=(w,v,F)=>p(parseInt(w.slice(v,v+F).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},b=(w,v,F,q)=>q===null?!1:q>y[F]||q<0?(n.encode(q,w.slice(v,v+F)),!0):(x(w,v,F,q),!1),x=(w,v,F,q)=>w.write(k(q,F),v,F,"ascii"),k=(w,v)=>C(Math.floor(w).toString(8),v),C=(w,v)=>(w.length===v-1?w:new Array(v-w.length-1).join("0")+w+" ")+"\0",T=(w,v,F,q)=>q===null?!1:b(w,v,F,q.getTime()/1e3),O=new Array(156).join("\0"),I=(w,v,F,q)=>q===null?!1:(w.write(q+O,v,F,"utf8"),q.length!==Buffer.byteLength(q)||q.length>F);e.exports=a}),$h=ee((t,e)=>{"use strict";W();var r=Qn(),i=te("path"),n=class{constructor(l,c){this.atime=l.atime||null,this.charset=l.charset||null,this.comment=l.comment||null,this.ctime=l.ctime||null,this.gid=l.gid||null,this.gname=l.gname||null,this.linkpath=l.linkpath||null,this.mtime=l.mtime||null,this.path=l.path||null,this.size=l.size||null,this.uid=l.uid||null,this.uname=l.uname||null,this.dev=l.dev||null,this.ino=l.ino||null,this.nlink=l.nlink||null,this.global=c||!1}encode(){let l=this.encodeBody();if(l==="")return null;let c=Buffer.byteLength(l),u=512*Math.ceil(1+c/512),f=Buffer.allocUnsafe(u);for(let h=0;h<512;h++)f[h]=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(f),f.write(l,512,c,"utf8");for(let h=c+512;h<f.length;h++)f[h]=0;return f}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(l){if(this[l]===null||this[l]===void 0)return"";let c=this[l]instanceof Date?this[l].getTime()/1e3:this[l],u=" "+(l==="dev"||l==="ino"||l==="nlink"?"SCHILY.":"")+l+"="+c+`
41
41
  `,f=Buffer.byteLength(u),h=Math.floor(Math.log(f)/Math.log(10))+1;return f+h>=Math.pow(10,h)&&(h+=1),h+f+u}};n.parse=(l,c,u)=>new n(s(o(l),c),u);var s=(l,c)=>c?Object.keys(l).reduce((u,f)=>(u[f]=l[f],u),c):l,o=l=>l.replace(/\n$/,"").split(`
42
42
  `).reduce(a,Object.create(null)),a=(l,c)=>{let u=parseInt(c,10);if(u!==Buffer.byteLength(c)+1)return l;c=c.slice((u+" ").length);let f=c.split("="),h=f.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!h)return l;let p=f.join("=");return l[h]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(h)?new Date(p*1e3):/^[0-9]+$/.test(p)?+p:p,l};e.exports=n}),es=ee((t,e)=>{W(),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)}}),qh=ee((t,e)=>{"use strict";W(),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))}}}),nS=ee((t,e)=>{"use strict";W();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,l)=>a.split(l).join(n.get(l)),o),decode:o=>i.reduce((a,l)=>a.split(l).join(s.get(l)),o)}}),sS=ee((t,e)=>{W();var{isAbsolute:r,parse:i}=te("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]}}),lP=ee((t,e)=>{"use strict";W(),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)}),oS=ee((t,e)=>{"use strict";W();var r=Bh(),i=$h(),n=Qn(),s=te("fs"),o=te("path"),a=Jn(),l=es(),c=(m,_)=>_?(m=a(m).replace(/^\.(\/|$)/,""),l(_)+"/"+m):a(m),u=16*1024*1024,f=Symbol("process"),h=Symbol("file"),p=Symbol("directory"),g=Symbol("symlink"),y=Symbol("hardlink"),b=Symbol("header"),x=Symbol("read"),k=Symbol("lstat"),C=Symbol("onlstat"),T=Symbol("onread"),O=Symbol("onreadlink"),I=Symbol("openfile"),w=Symbol("onopenfile"),v=Symbol("close"),F=Symbol("mode"),q=Symbol("awaitDrain"),P=Symbol("ondrain"),U=Symbol("prefix"),V=Symbol("hadError"),K=qh(),N=nS(),A=sS(),L=lP(),j=K(class extends r{constructor(m,_){if(_=_||{},super(_),typeof m!="string")throw new TypeError("path is required");this.path=a(m),this.portable=!!_.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=_.maxReadSize||u,this.linkCache=_.linkCache||new Map,this.statCache=_.statCache||new Map,this.preservePaths=!!_.preservePaths,this.cwd=a(_.cwd||process.cwd()),this.strict=!!_.strict,this.noPax=!!_.noPax,this.noMtime=!!_.noMtime,this.mtime=_.mtime||null,this.prefix=_.prefix?a(_.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 _.onwarn=="function"&&this.on("warn",_.onwarn);let R=!1;if(!this.preservePaths){let[E,M]=A(this.path);E&&(this.path=M,R=E)}this.win32=!!_.win32||process.platform==="win32",this.win32&&(this.path=N.decode(this.path.replace(/\\/g,"/")),m=m.replace(/\\/g,"/")),this.absolute=a(_.absolute||o.resolve(this.cwd,m)),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[C](this.statCache.get(this.absolute)):this[k]()}emit(m,..._){return m==="error"&&(this[V]=!0),super.emit(m,..._)}[k](){s.lstat(this.absolute,(m,_)=>{if(m)return this.emit("error",m);this[C](_)})}[C](m){this.statCache.set(this.absolute,m),this.stat=m,m.isFile()||(m.size=0),this.type=d(m),this.emit("stat",m),this[f]()}[f](){switch(this.type){case"File":return this[h]();case"Directory":return this[p]();case"SymbolicLink":return this[g]();default:return this.end()}}[F](m){return L(m,this.type==="Directory",this.portable)}[U](m){return c(m,this.prefix)}[b](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new n({path:this[U](this.path),linkpath:this.type==="Link"?this[U](this.linkpath):this.linkpath,mode:this[F](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[U](this.path),linkpath:this.type==="Link"?this[U](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)}[p](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[b](),this.end()}[g](){s.readlink(this.absolute,(m,_)=>{if(m)return this.emit("error",m);this[O](_)})}[O](m){this.linkpath=a(m),this[b](),this.end()}[y](m){this.type="Link",this.linkpath=a(o.relative(this.cwd,m)),this.stat.size=0,this[b](),this.end()}[h](){if(this.stat.nlink>1){let m=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(m)){let _=this.linkCache.get(m);if(_.indexOf(this.cwd)===0)return this[y](_)}this.linkCache.set(m,this.absolute)}if(this[b](),this.stat.size===0)return this.end();this[I]()}[I](){s.open(this.absolute,"r",(m,_)=>{if(m)return this.emit("error",m);this[w](_)})}[w](m){if(this.fd=m,this[V])return this[v]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let _=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(_),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[x]()}[x](){let{fd:m,buf:_,offset:R,length:E,pos:M}=this;s.read(m,_,R,E,M,(B,Z)=>{if(B)return this[v](()=>this.emit("error",B));this[T](Z)})}[v](m){s.close(this.fd,m)}[T](m){if(m<=0&&this.remain>0){let R=new Error("encountered unexpected EOF");return R.path=this.absolute,R.syscall="read",R.code="EOF",this[v](()=>this.emit("error",R))}if(m>this.remain){let R=new Error("did not encounter expected EOF");return R.path=this.absolute,R.syscall="read",R.code="EOF",this[v](()=>this.emit("error",R))}if(m===this.remain)for(let R=m;R<this.length&&m<this.blockRemain;R++)this.buf[R+this.offset]=0,m++,this.remain++;let _=this.offset===0&&m===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+m);this.write(_)?this[P]():this[q](()=>this[P]())}[q](m){this.once("drain",m)}write(m){if(this.blockRemain<m.length){let _=new Error("writing more data than expected");return _.path=this.absolute,this.emit("error",_)}return this.remain-=m.length,this.blockRemain-=m.length,this.pos+=m.length,this.offset+=m.length,super.write(m)}[P](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[v](m=>m?this.emit("error",m):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[x]()}}),z=class extends j{[k](){this[C](s.lstatSync(this.absolute))}[g](){this[O](s.readlinkSync(this.absolute))}[I](){this[w](s.openSync(this.absolute,"r"))}[x](){let m=!0;try{let{fd:_,buf:R,offset:E,length:M,pos:B}=this,Z=s.readSync(_,R,E,M,B);this[T](Z),m=!1}finally{if(m)try{this[v](()=>{})}catch{}}}[q](m){m()}[v](m){s.closeSync(this.fd),m()}},D=K(class extends r{constructor(m,_){_=_||{},super(_),this.preservePaths=!!_.preservePaths,this.portable=!!_.portable,this.strict=!!_.strict,this.noPax=!!_.noPax,this.noMtime=!!_.noMtime,this.readEntry=m,this.type=m.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=_.prefix||null,this.path=a(m.path),this.mode=this[F](m.mode),this.uid=this.portable?null:m.uid,this.gid=this.portable?null:m.gid,this.uname=this.portable?null:m.uname,this.gname=this.portable?null:m.gname,this.size=m.size,this.mtime=this.noMtime?null:_.mtime||m.mtime,this.atime=this.portable?null:m.atime,this.ctime=this.portable?null:m.ctime,this.linkpath=a(m.linkpath),typeof _.onwarn=="function"&&this.on("warn",_.onwarn);let R=!1;if(!this.preservePaths){let[E,M]=A(this.path);E&&(this.path=M,R=E)}this.remain=m.size,this.blockRemain=m.startBlockSize,this.header=new n({path:this[U](this.path),linkpath:this.type==="Link"?this[U](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[U](this.path),linkpath:this.type==="Link"?this[U](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),m.pipe(this)}[U](m){return c(m,this.prefix)}[F](m){return L(m,this.type==="Directory",this.portable)}write(m){let _=m.length;if(_>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=_,super.write(m)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});j.Sync=z,j.Tar=D;var d=m=>m.isFile()?"File":m.isDirectory()?"Directory":m.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=j}),cP=ee((t,e)=>{"use strict";W(),e.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}}),aS=ee((t,e)=>{"use strict";W(),e.exports=r,r.Node=o,r.create=r;function r(a){var l=this;if(l instanceof r||(l=new r),l.tail=null,l.head=null,l.length=0,a&&typeof a.forEach=="function")a.forEach(function(f){l.push(f)});else if(arguments.length>0)for(var c=0,u=arguments.length;c<u;c++)l.push(arguments[c]);return l}r.prototype.removeNode=function(a){if(a.list!==this)throw new Error("removing node which does not belong to this list");var l=a.next,c=a.prev;return l&&(l.prev=c),c&&(c.next=l),a===this.head&&(this.head=l),a===this.tail&&(this.tail=c),a.list.length--,a.next=null,a.prev=null,a.list=null,l},r.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var l=this.head;a.list=this,a.next=l,l&&(l.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 l=this.tail;a.list=this,a.prev=l,l&&(l.next=a),this.tail=a,this.head||(this.head=a),this.length++}},r.prototype.push=function(){for(var a=0,l=arguments.length;a<l;a++)n(this,arguments[a]);return this.length},r.prototype.unshift=function(){for(var a=0,l=arguments.length;a<l;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,l){l=l||this;for(var c=this.head,u=0;c!==null;u++)a.call(l,c.value,u,this),c=c.next},r.prototype.forEachReverse=function(a,l){l=l||this;for(var c=this.tail,u=this.length-1;c!==null;u--)a.call(l,c.value,u,this),c=c.prev},r.prototype.get=function(a){for(var l=0,c=this.head;c!==null&&l<a;l++)c=c.next;if(l===a&&c!==null)return c.value},r.prototype.getReverse=function(a){for(var l=0,c=this.tail;c!==null&&l<a;l++)c=c.prev;if(l===a&&c!==null)return c.value},r.prototype.map=function(a,l){l=l||this;for(var c=new r,u=this.head;u!==null;)c.push(a.call(l,u.value,this)),u=u.next;return c},r.prototype.mapReverse=function(a,l){l=l||this;for(var c=new r,u=this.tail;u!==null;)c.push(a.call(l,u.value,this)),u=u.prev;return c},r.prototype.reduce=function(a,l){var c,u=this.head;if(arguments.length>1)c=l;else if(this.head)u=this.head.next,c=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=0;u!==null;f++)c=a(c,u.value,f),u=u.next;return c},r.prototype.reduceReverse=function(a,l){var c,u=this.tail;if(arguments.length>1)c=l;else if(this.tail)u=this.tail.prev,c=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=this.length-1;u!==null;f--)c=a(c,u.value,f),u=u.prev;return c},r.prototype.toArray=function(){for(var a=new Array(this.length),l=0,c=this.head;c!==null;l++)a[l]=c.value,c=c.next;return a},r.prototype.toArrayReverse=function(){for(var a=new Array(this.length),l=0,c=this.tail;c!==null;l++)a[l]=c.value,c=c.prev;return a},r.prototype.slice=function(a,l){l=l||this.length,l<0&&(l+=this.length),a=a||0,a<0&&(a+=this.length);var c=new r;if(l<a||l<0)return c;a<0&&(a=0),l>this.length&&(l=this.length);for(var u=0,f=this.head;f!==null&&u<a;u++)f=f.next;for(;f!==null&&u<l;u++,f=f.next)c.push(f.value);return c},r.prototype.sliceReverse=function(a,l){l=l||this.length,l<0&&(l+=this.length),a=a||0,a<0&&(a+=this.length);var c=new r;if(l<a||l<0)return c;a<0&&(a=0),l>this.length&&(l=this.length);for(var u=this.length,f=this.tail;f!==null&&u>l;u--)f=f.prev;for(;f!==null&&u>a;u--,f=f.prev)c.push(f.value);return c},r.prototype.splice=function(a,l,...c){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var u=0,f=this.head;f!==null&&u<a;u++)f=f.next;for(var h=[],u=0;f&&u<l;u++)h.push(f.value),f=this.removeNode(f);f===null&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev);for(var u=0;u<c.length;u++)f=i(this,f,c[u]);return h},r.prototype.reverse=function(){for(var a=this.head,l=this.tail,c=a;c!==null;c=c.prev){var u=c.prev;c.prev=c.next,c.next=u}return this.head=l,this.tail=a,this};function i(a,l,c){var u=l===a.head?new o(c,null,l,a):new o(c,l,l.next,a);return u.next===null&&(a.tail=u),u.prev===null&&(a.head=u),a.length++,u}function n(a,l){a.tail=new o(l,a.tail,null,a),a.head||(a.head=a.tail),a.length++}function s(a,l){a.head=new o(l,null,a.head,a),a.tail||(a.tail=a.head),a.length++}function o(a,l,c,u){if(!(this instanceof o))return new o(a,l,c,u);this.list=u,this.value=a,l?(l.next=this,this.prev=l):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}try{cP()(r)}catch{}}),Hh=ee((t,e)=>{"use strict";W();var r=class{constructor(d,m){this.path=d||"./",this.absolute=m,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},i=Bh(),n=rS(),s=jh(),o=oS(),a=o.Sync,l=o.Tar,c=aS(),u=Buffer.alloc(1024),f=Symbol("onStat"),h=Symbol("ended"),p=Symbol("queue"),g=Symbol("current"),y=Symbol("process"),b=Symbol("processing"),x=Symbol("processJob"),k=Symbol("jobs"),C=Symbol("jobDone"),T=Symbol("addFSEntry"),O=Symbol("addTarEntry"),I=Symbol("stat"),w=Symbol("readdir"),v=Symbol("onreaddir"),F=Symbol("pipe"),q=Symbol("entry"),P=Symbol("entryOpt"),U=Symbol("writeEntryClass"),V=Symbol("write"),K=Symbol("ondrain"),N=te("fs"),A=te("path"),L=qh(),j=Jn(),z=L(class extends i{constructor(d){super(d),d=d||Object.create(null),this.opt=d,this.file=d.file||"",this.cwd=d.cwd||process.cwd(),this.maxReadSize=d.maxReadSize,this.preservePaths=!!d.preservePaths,this.strict=!!d.strict,this.noPax=!!d.noPax,this.prefix=j(d.prefix||""),this.linkCache=d.linkCache||new Map,this.statCache=d.statCache||new Map,this.readdirCache=d.readdirCache||new Map,this[U]=o,typeof d.onwarn=="function"&&this.on("warn",d.onwarn),this.portable=!!d.portable,this.zip=null,d.gzip?(typeof d.gzip!="object"&&(d.gzip={}),this.portable&&(d.gzip.portable=!0),this.zip=new n.Gzip(d.gzip),this.zip.on("data",m=>super.write(m)),this.zip.on("end",m=>super.end()),this.zip.on("drain",m=>this[K]()),this.on("resume",m=>this.zip.resume())):this.on("drain",this[K]),this.noDirRecurse=!!d.noDirRecurse,this.follow=!!d.follow,this.noMtime=!!d.noMtime,this.mtime=d.mtime||null,this.filter=typeof d.filter=="function"?d.filter:m=>!0,this[p]=new c,this[k]=0,this.jobs=+d.jobs||4,this[b]=!1,this[h]=!1}[V](d){return super.write(d)}add(d){return this.write(d),this}end(d){return d&&this.write(d),this[h]=!0,this[y](),this}write(d){if(this[h])throw new Error("write after end");return d instanceof s?this[O](d):this[T](d),this.flowing}[O](d){let m=j(A.resolve(this.cwd,d.path));if(!this.filter(d.path,d))d.resume();else{let _=new r(d.path,m,!1);_.entry=new l(d,this[P](_)),_.entry.on("end",R=>this[C](_)),this[k]+=1,this[p].push(_)}this[y]()}[T](d){let m=j(A.resolve(this.cwd,d));this[p].push(new r(d,m)),this[y]()}[I](d){d.pending=!0,this[k]+=1;let m=this.follow?"stat":"lstat";N[m](d.absolute,(_,R)=>{d.pending=!1,this[k]-=1,_?this.emit("error",_):this[f](d,R)})}[f](d,m){this.statCache.set(d.absolute,m),d.stat=m,this.filter(d.path,m)||(d.ignore=!0),this[y]()}[w](d){d.pending=!0,this[k]+=1,N.readdir(d.absolute,(m,_)=>{if(d.pending=!1,this[k]-=1,m)return this.emit("error",m);this[v](d,_)})}[v](d,m){this.readdirCache.set(d.absolute,m),d.readdir=m,this[y]()}[y](){if(!this[b]){this[b]=!0;for(let d=this[p].head;d!==null&&this[k]<this.jobs;d=d.next)if(this[x](d.value),d.value.ignore){let m=d.next;this[p].removeNode(d),d.next=m}this[b]=!1,this[h]&&!this[p].length&&this[k]===0&&(this.zip?this.zip.end(u):(super.write(u),super.end()))}}get[g](){return this[p]&&this[p].head&&this[p].head.value}[C](d){this[p].shift(),this[k]-=1,this[y]()}[x](d){if(!d.pending){if(d.entry){d===this[g]&&!d.piped&&this[F](d);return}if(d.stat||(this.statCache.has(d.absolute)?this[f](d,this.statCache.get(d.absolute)):this[I](d)),!!d.stat&&!d.ignore&&!(!this.noDirRecurse&&d.stat.isDirectory()&&!d.readdir&&(this.readdirCache.has(d.absolute)?this[v](d,this.readdirCache.get(d.absolute)):this[w](d),!d.readdir))){if(d.entry=this[q](d),!d.entry){d.ignore=!0;return}d===this[g]&&!d.piped&&this[F](d)}}}[P](d){return{onwarn:(m,_,R)=>this.warn(m,_,R),noPax:this.noPax,cwd:this.cwd,absolute:d.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}}[q](d){this[k]+=1;try{return new this[U](d.path,this[P](d)).on("end",()=>this[C](d)).on("error",m=>this.emit("error",m))}catch(m){this.emit("error",m)}}[K](){this[g]&&this[g].entry&&this[g].entry.resume()}[F](d){d.piped=!0,d.readdir&&d.readdir.forEach(R=>{let E=d.path,M=E==="./"?"":E.replace(/\/*$/,"/");this[T](M+R)});let m=d.entry,_=this.zip;_?m.on("data",R=>{_.write(R)||m.pause()}):m.on("data",R=>{super.write(R)||m.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),D=class extends z{constructor(d){super(d),this[U]=a}pause(){}resume(){}[I](d){let m=this.follow?"statSync":"lstatSync";this[f](d,N[m](d.absolute))}[w](d,m){this[v](d,N.readdirSync(d.absolute))}[F](d){let m=d.entry,_=this.zip;d.readdir&&d.readdir.forEach(R=>{let E=d.path,M=E==="./"?"":E.replace(/\/*$/,"/");this[T](M+R)}),_?m.on("data",R=>{_.write(R)}):m.on("data",R=>{super[V](R)})}};z.Sync=D,e.exports=z}),ts=ee(t=>{"use strict";W();var e=eS(),r=te("events").EventEmitter,i=te("fs"),n=i.writev;if(!n){let d=process.binding("fs"),m=d.FSReqWrap||d.FSReqCallback;n=(_,R,E,M)=>{let B=(H,J)=>M(H,J,R),Z=new m;Z.oncomplete=B,d.writeBuffers(_,R,E,Z)}}var s=Symbol("_autoClose"),o=Symbol("_close"),a=Symbol("_ended"),l=Symbol("_fd"),c=Symbol("_finished"),u=Symbol("_flags"),f=Symbol("_flush"),h=Symbol("_handleChunk"),p=Symbol("_makeBuf"),g=Symbol("_mode"),y=Symbol("_needDrain"),b=Symbol("_onerror"),x=Symbol("_onopen"),k=Symbol("_onread"),C=Symbol("_onwrite"),T=Symbol("_open"),O=Symbol("_path"),I=Symbol("_pos"),w=Symbol("_queue"),v=Symbol("_read"),F=Symbol("_readSize"),q=Symbol("_reading"),P=Symbol("_remain"),U=Symbol("_size"),V=Symbol("_write"),K=Symbol("_writing"),N=Symbol("_defaultFlag"),A=Symbol("_errored"),L=class extends e{constructor(d,m){if(m=m||{},super(m),this.readable=!0,this.writable=!1,typeof d!="string")throw new TypeError("path must be a string");this[A]=!1,this[l]=typeof m.fd=="number"?m.fd:null,this[O]=d,this[F]=m.readSize||16*1024*1024,this[q]=!1,this[U]=typeof m.size=="number"?m.size:1/0,this[P]=this[U],this[s]=typeof m.autoClose=="boolean"?m.autoClose:!0,typeof this[l]=="number"?this[v]():this[T]()}get fd(){return this[l]}get path(){return this[O]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[T](){i.open(this[O],"r",(d,m)=>this[x](d,m))}[x](d,m){d?this[b](d):(this[l]=m,this.emit("open",m),this[v]())}[p](){return Buffer.allocUnsafe(Math.min(this[F],this[P]))}[v](){if(!this[q]){this[q]=!0;let d=this[p]();if(d.length===0)return process.nextTick(()=>this[k](null,0,d));i.read(this[l],d,0,d.length,null,(m,_,R)=>this[k](m,_,R))}}[k](d,m,_){this[q]=!1,d?this[b](d):this[h](m,_)&&this[v]()}[o](){if(this[s]&&typeof this[l]=="number"){let d=this[l];this[l]=null,i.close(d,m=>m?this.emit("error",m):this.emit("close"))}}[b](d){this[q]=!0,this[o](),this.emit("error",d)}[h](d,m){let _=!1;return this[P]-=d,d>0&&(_=super.write(d<m.length?m.slice(0,d):m)),(d===0||this[P]<=0)&&(_=!1,this[o](),super.end()),_}emit(d,m){switch(d){case"prefinish":case"finish":break;case"drain":typeof this[l]=="number"&&this[v]();break;case"error":return this[A]?void 0:(this[A]=!0,super.emit(d,m));default:return super.emit(d,m)}}},j=class extends L{[T](){let d=!0;try{this[x](null,i.openSync(this[O],"r")),d=!1}finally{d&&this[o]()}}[v](){let d=!0;try{if(!this[q]){this[q]=!0;do{let m=this[p](),_=m.length===0?0:i.readSync(this[l],m,0,m.length,null);if(!this[h](_,m))break}while(!0);this[q]=!1}d=!1}finally{d&&this[o]()}}[o](){if(this[s]&&typeof this[l]=="number"){let d=this[l];this[l]=null,i.closeSync(d),this.emit("close")}}},z=class extends r{constructor(d,m){m=m||{},super(m),this.readable=!1,this.writable=!0,this[A]=!1,this[K]=!1,this[a]=!1,this[y]=!1,this[w]=[],this[O]=d,this[l]=typeof m.fd=="number"?m.fd:null,this[g]=m.mode===void 0?438:m.mode,this[I]=typeof m.start=="number"?m.start:null,this[s]=typeof m.autoClose=="boolean"?m.autoClose:!0;let _=this[I]!==null?"r+":"w";this[N]=m.flags===void 0,this[u]=this[N]?_:m.flags,this[l]===null&&this[T]()}emit(d,m){if(d==="error"){if(this[A])return;this[A]=!0}return super.emit(d,m)}get fd(){return this[l]}get path(){return this[O]}[b](d){this[o](),this[K]=!0,this.emit("error",d)}[T](){i.open(this[O],this[u],this[g],(d,m)=>this[x](d,m))}[x](d,m){this[N]&&this[u]==="r+"&&d&&d.code==="ENOENT"?(this[u]="w",this[T]()):d?this[b](d):(this[l]=m,this.emit("open",m),this[f]())}end(d,m){return d&&this.write(d,m),this[a]=!0,!this[K]&&!this[w].length&&typeof this[l]=="number"&&this[C](null,0),this}write(d,m){return typeof d=="string"&&(d=Buffer.from(d,m)),this[a]?(this.emit("error",new Error("write() after end()")),!1):this[l]===null||this[K]||this[w].length?(this[w].push(d),this[y]=!0,!1):(this[K]=!0,this[V](d),!0)}[V](d){i.write(this[l],d,0,d.length,this[I],(m,_)=>this[C](m,_))}[C](d,m){d?this[b](d):(this[I]!==null&&(this[I]+=m),this[w].length?this[f]():(this[K]=!1,this[a]&&!this[c]?(this[c]=!0,this[o](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[f](){if(this[w].length===0)this[a]&&this[C](null,0);else if(this[w].length===1)this[V](this[w].pop());else{let d=this[w];this[w]=[],n(this[l],d,this[I],(m,_)=>this[C](m,_))}}[o](){if(this[s]&&typeof this[l]=="number"){let d=this[l];this[l]=null,i.close(d,m=>m?this.emit("error",m):this.emit("close"))}}},D=class extends z{[T](){let d;if(this[N]&&this[u]==="r+")try{d=i.openSync(this[O],this[u],this[g])}catch(m){if(m.code==="ENOENT")return this[u]="w",this[T]();throw m}else d=i.openSync(this[O],this[u],this[g]);this[x](null,d)}[o](){if(this[s]&&typeof this[l]=="number"){let d=this[l];this[l]=null,i.closeSync(d),this.emit("close")}}[V](d){let m=!0;try{this[C](null,i.writeSync(this[l],d,0,d.length,this[I])),m=!1}finally{if(m)try{this[o]()}catch{}}}};t.ReadStream=L,t.ReadStreamSync=j,t.WriteStream=z,t.WriteStreamSync=D}),Uh=ee((t,e)=>{"use strict";W();var r=qh(),i=Qn(),n=te("events"),s=aS(),o=1024*1024,a=jh(),l=$h(),c=rS(),{nextTick:u}=te("process"),f=Buffer.from([31,139]),h=Symbol("state"),p=Symbol("writeEntry"),g=Symbol("readEntry"),y=Symbol("nextEntry"),b=Symbol("processEntry"),x=Symbol("extendedHeader"),k=Symbol("globalExtendedHeader"),C=Symbol("meta"),T=Symbol("emitMeta"),O=Symbol("buffer"),I=Symbol("queue"),w=Symbol("ended"),v=Symbol("emittedEnd"),F=Symbol("emit"),q=Symbol("unzip"),P=Symbol("consumeChunk"),U=Symbol("consumeChunkSub"),V=Symbol("consumeBody"),K=Symbol("consumeMeta"),N=Symbol("consumeHeader"),A=Symbol("consuming"),L=Symbol("bufferConcat"),j=Symbol("maybeEnd"),z=Symbol("writing"),D=Symbol("aborted"),d=Symbol("onDone"),m=Symbol("sawValidEntry"),_=Symbol("sawNullBlock"),R=Symbol("sawEOF"),E=Symbol("closeStream"),M=B=>!0;e.exports=r(class extends n{constructor(B){B=B||{},super(B),this.file=B.file||"",this[m]=null,this.on(d,Z=>{(this[h]==="begin"||this[m]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),B.ondone?this.on(d,B.ondone):this.on(d,Z=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!B.strict,this.maxMetaEntrySize=B.maxMetaEntrySize||o,this.filter=typeof B.filter=="function"?B.filter:M,this.writable=!0,this.readable=!1,this[I]=new s,this[O]=null,this[g]=null,this[p]=null,this[h]="begin",this[C]="",this[x]=null,this[k]=null,this[w]=!1,this[q]=null,this[D]=!1,this[_]=!1,this[R]=!1,this.on("end",()=>this[E]()),typeof B.onwarn=="function"&&this.on("warn",B.onwarn),typeof B.onentry=="function"&&this.on("entry",B.onentry)}[N](B,Z){this[m]===null&&(this[m]=!1);let H;try{H=new i(B,Z,this[x],this[k])}catch(J){return this.warn("TAR_ENTRY_INVALID",J)}if(H.nullBlock)this[_]?(this[R]=!0,this[h]==="begin"&&(this[h]="header"),this[F]("eof")):(this[_]=!0,this[F]("nullBlock"));else if(this[_]=!1,!H.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:H});else if(!H.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:H});else{let J=H.type;if(/^(Symbolic)?Link$/.test(J)&&!H.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:H});else if(!/^(Symbolic)?Link$/.test(J)&&H.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:H});else{let G=this[p]=new a(H,this[x],this[k]);if(!this[m])if(G.remain){let re=()=>{G.invalid||(this[m]=!0)};G.on("end",re)}else this[m]=!0;G.meta?G.size>this.maxMetaEntrySize?(G.ignore=!0,this[F]("ignoredEntry",G),this[h]="ignore",G.resume()):G.size>0&&(this[C]="",G.on("data",re=>this[C]+=re),this[h]="meta"):(this[x]=null,G.ignore=G.ignore||!this.filter(G.path,G),G.ignore?(this[F]("ignoredEntry",G),this[h]=G.remain?"ignore":"header",G.resume()):(G.remain?this[h]="body":(this[h]="header",G.end()),this[g]?this[I].push(G):(this[I].push(G),this[y]())))}}}[E](){u(()=>this.emit("close"))}[b](B){let Z=!0;return B?Array.isArray(B)?this.emit.apply(this,B):(this[g]=B,this.emit("entry",B),B.emittedEnd||(B.on("end",H=>this[y]()),Z=!1)):(this[g]=null,Z=!1),Z}[y](){do;while(this[b](this[I].shift()));if(!this[I].length){let B=this[g];!B||B.flowing||B.size===B.remain?this[z]||this.emit("drain"):B.once("drain",Z=>this.emit("drain"))}}[V](B,Z){let H=this[p],J=H.blockRemain,G=J>=B.length&&Z===0?B:B.slice(Z,Z+J);return H.write(G),H.blockRemain||(this[h]="header",this[p]=null,H.end()),G.length}[K](B,Z){let H=this[p],J=this[V](B,Z);return this[p]||this[T](H),J}[F](B,Z,H){!this[I].length&&!this[g]?this.emit(B,Z,H):this[I].push([B,Z,H])}[T](B){switch(this[F]("meta",this[C]),B.type){case"ExtendedHeader":case"OldExtendedHeader":this[x]=l.parse(this[C],this[x],!1);break;case"GlobalExtendedHeader":this[k]=l.parse(this[C],this[k],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[x]=this[x]||Object.create(null),this[x].path=this[C].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[x]=this[x]||Object.create(null),this[x].linkpath=this[C].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+B.type)}}abort(B){this[D]=!0,this.emit("abort",B),this.warn("TAR_ABORT",B,{recoverable:!1})}write(B){if(this[D])return;if(this[q]===null&&B){if(this[O]&&(B=Buffer.concat([this[O],B]),this[O]=null),B.length<f.length)return this[O]=B,!0;for(let H=0;this[q]===null&&H<f.length;H++)B[H]!==f[H]&&(this[q]=!1);if(this[q]===null){let H=this[w];this[w]=!1,this[q]=new c.Unzip,this[q].on("data",G=>this[P](G)),this[q].on("error",G=>this.abort(G)),this[q].on("end",G=>{this[w]=!0,this[P]()}),this[z]=!0;let J=this[q][H?"end":"write"](B);return this[z]=!1,J}}this[z]=!0,this[q]?this[q].write(B):this[P](B),this[z]=!1;let Z=this[I].length?!1:this[g]?this[g].flowing:!0;return!Z&&!this[I].length&&this[g].once("drain",H=>this.emit("drain")),Z}[L](B){B&&!this[D]&&(this[O]=this[O]?Buffer.concat([this[O],B]):B)}[j](){if(this[w]&&!this[v]&&!this[D]&&!this[A]){this[v]=!0;let B=this[p];if(B&&B.blockRemain){let Z=this[O]?this[O].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${B.blockRemain} more bytes, only ${Z} available)`,{entry:B}),this[O]&&B.write(this[O]),B.end()}this[F](d)}}[P](B){if(this[A])this[L](B);else if(!B&&!this[O])this[j]();else{if(this[A]=!0,this[O]){this[L](B);let Z=this[O];this[O]=null,this[U](Z)}else this[U](B);for(;this[O]&&this[O].length>=512&&!this[D]&&!this[R];){let Z=this[O];this[O]=null,this[U](Z)}this[A]=!1}(!this[O]||this[w])&&this[j]()}[U](B){let Z=0,H=B.length;for(;Z+512<=H&&!this[D]&&!this[R];)switch(this[h]){case"begin":case"header":this[N](B,Z),Z+=512;break;case"ignore":case"body":Z+=this[V](B,Z);break;case"meta":Z+=this[K](B,Z);break;default:throw new Error("invalid state: "+this[h])}Z<H&&(this[O]?this[O]=Buffer.concat([B.slice(Z),this[O]]):this[O]=B.slice(Z))}end(B){this[D]||(this[q]?this[q].end(B):(this[w]=!0,this.write(B)))}})}),Gh=ee((t,e)=>{"use strict";W();var r=Xn(),i=Uh(),n=te("fs"),s=ts(),o=te("path"),a=es();e.exports=(p,g,y)=>{typeof p=="function"?(y=p,g=null,p={}):Array.isArray(p)&&(g=p,p={}),typeof g=="function"&&(y=g,g=null),g?g=Array.from(g):g=[];let b=r(p);if(b.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!b.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return g.length&&c(b,g),b.noResume||l(b),b.file&&b.sync?u(b):b.file?f(b,y):h(b)};var l=p=>{let g=p.onentry;p.onentry=g?y=>{g(y),y.resume()}:y=>y.resume()},c=(p,g)=>{let y=new Map(g.map(k=>[a(k),!0])),b=p.filter,x=(k,C)=>{let T=C||o.parse(k).root||".",O=k===T?!1:y.has(k)?y.get(k):x(o.dirname(k),T);return y.set(k,O),O};p.filter=b?(k,C)=>b(k,C)&&x(a(k)):k=>x(a(k))},u=p=>{let g=h(p),y=p.file,b=!0,x;try{let k=n.statSync(y),C=p.maxReadSize||16*1024*1024;if(k.size<C)g.end(n.readFileSync(y));else{let T=0,O=Buffer.allocUnsafe(C);for(x=n.openSync(y,"r");T<k.size;){let I=n.readSync(x,O,0,C,T);T+=I,g.write(O.slice(0,I))}g.end()}b=!1}finally{if(b&&x)try{n.closeSync(x)}catch{}}},f=(p,g)=>{let y=new i(p),b=p.maxReadSize||16*1024*1024,x=p.file,k=new Promise((C,T)=>{y.on("error",T),y.on("end",C),n.stat(x,(O,I)=>{if(O)T(O);else{let w=new s.ReadStream(x,{readSize:b,size:I.size});w.on("error",T),w.pipe(y)}})});return g?k.then(g,g):k},h=p=>new i(p)}),uP=ee((t,e)=>{"use strict";W();var r=Xn(),i=Hh(),n=ts(),s=Gh(),o=te("path");e.exports=(p,g,y)=>{if(typeof g=="function"&&(y=g),Array.isArray(p)&&(g=p,p={}),!g||!Array.isArray(g)||!g.length)throw new TypeError("no files or directories specified");g=Array.from(g);let b=r(p);if(b.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!b.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return b.file&&b.sync?a(b,g):b.file?l(b,g,y):b.sync?f(b,g):h(b,g)};var a=(p,g)=>{let y=new i.Sync(p),b=new n.WriteStreamSync(p.file,{mode:p.mode||438});y.pipe(b),c(y,g)},l=(p,g,y)=>{let b=new i(p),x=new n.WriteStream(p.file,{mode:p.mode||438});b.pipe(x);let k=new Promise((C,T)=>{x.on("error",T),x.on("close",C),b.on("error",T)});return u(b,g),y?k.then(y,y):k},c=(p,g)=>{g.forEach(y=>{y.charAt(0)==="@"?s({file:o.resolve(p.cwd,y.slice(1)),sync:!0,noResume:!0,onentry:b=>p.add(b)}):p.add(y)}),p.end()},u=(p,g)=>{for(;g.length;){let y=g.shift();if(y.charAt(0)==="@")return s({file:o.resolve(p.cwd,y.slice(1)),noResume:!0,onentry:b=>p.add(b)}).then(b=>u(p,g));p.add(y)}p.end()},f=(p,g)=>{let y=new i.Sync(p);return c(y,g),y},h=(p,g)=>{let y=new i(p);return u(y,g),y}}),lS=ee((t,e)=>{"use strict";W();var r=Xn(),i=Hh(),n=te("fs"),s=ts(),o=Gh(),a=te("path"),l=Qn();e.exports=(g,y,b)=>{let x=r(g);if(!x.file)throw new TypeError("file is required");if(x.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),x.sync?c(x,y):f(x,y,b)};var c=(g,y)=>{let b=new i.Sync(g),x=!0,k,C;try{try{k=n.openSync(g.file,"r+")}catch(I){if(I.code==="ENOENT")k=n.openSync(g.file,"w+");else throw I}let T=n.fstatSync(k),O=Buffer.alloc(512);e:for(C=0;C<T.size;C+=512){for(let v=0,F=0;v<512;v+=F){if(F=n.readSync(k,O,v,O.length-v,C+v),C===0&&O[0]===31&&O[1]===139)throw new Error("cannot append to compressed archives");if(!F)break e}let I=new l(O);if(!I.cksumValid)break;let w=512*Math.ceil(I.size/512);if(C+w+512>T.size)break;C+=w,g.mtimeCache&&g.mtimeCache.set(I.path,I.mtime)}x=!1,u(g,b,C,k,y)}finally{if(x)try{n.closeSync(k)}catch{}}},u=(g,y,b,x,k)=>{let C=new s.WriteStreamSync(g.file,{fd:x,start:b});y.pipe(C),h(y,k)},f=(g,y,b)=>{y=Array.from(y);let x=new i(g),k=(T,O,I)=>{let w=(U,V)=>{U?n.close(T,K=>I(U)):I(null,V)},v=0;if(O===0)return w(null,0);let F=0,q=Buffer.alloc(512),P=(U,V)=>{if(U)return w(U);if(F+=V,F<512&&V)return n.read(T,q,F,q.length-F,v+F,P);if(v===0&&q[0]===31&&q[1]===139)return w(new Error("cannot append to compressed archives"));if(F<512)return w(null,v);let K=new l(q);if(!K.cksumValid)return w(null,v);let N=512*Math.ceil(K.size/512);if(v+N+512>O||(v+=N+512,v>=O))return w(null,v);g.mtimeCache&&g.mtimeCache.set(K.path,K.mtime),F=0,n.read(T,q,0,512,v,P)};n.read(T,q,0,512,v,P)},C=new Promise((T,O)=>{x.on("error",O);let I="r+",w=(v,F)=>{if(v&&v.code==="ENOENT"&&I==="r+")return I="w+",n.open(g.file,I,w);if(v)return O(v);n.fstat(F,(q,P)=>{if(q)return n.close(F,()=>O(q));k(F,P.size,(U,V)=>{if(U)return O(U);let K=new s.WriteStream(g.file,{fd:F,start:V});x.pipe(K),K.on("error",O),K.on("close",T),p(x,y)})})};n.open(g.file,I,w)});return b?C.then(b,b):C},h=(g,y)=>{y.forEach(b=>{b.charAt(0)==="@"?o({file:a.resolve(g.cwd,b.slice(1)),sync:!0,noResume:!0,onentry:x=>g.add(x)}):g.add(b)}),g.end()},p=(g,y)=>{for(;y.length;){let b=y.shift();if(b.charAt(0)==="@")return o({file:a.resolve(g.cwd,b.slice(1)),noResume:!0,onentry:x=>g.add(x)}).then(x=>p(g,y));g.add(b)}g.end()}}),hP=ee((t,e)=>{"use strict";W();var r=Xn(),i=lS();e.exports=(s,o,a)=>{let l=r(s);if(!l.file)throw new TypeError("file is required");if(l.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(l),i(l,o,a)};var n=s=>{let o=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=o?(a,l)=>o(a,l)&&!(s.mtimeCache.get(a)>l.mtime):(a,l)=>!(s.mtimeCache.get(a)>l.mtime)}}),fP=ee((t,e)=>{W();var{promisify:r}=te("util"),i=te("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}),pP=ee((t,e)=>{W();var r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:n}=te("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:l}=n(o);if(a.test(o.substr(l.length)))throw Object.assign(new Error("Illegal characters in path."),{path:o,code:"EINVAL"})}return o};e.exports=s}),dP=ee((t,e)=>{W();var{dirname:r}=te("path"),i=(s,o,a=void 0)=>a===o?Promise.resolve():s.statAsync(o).then(l=>l.isDirectory()?a:void 0,l=>l.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(l){return l.code==="ENOENT"?n(s,r(o),o):void 0}};e.exports={findMade:i,findMadeSync:n}}),cS=ee((t,e)=>{W();var{dirname:r}=te("path"),i=(s,o,a)=>{o.recursive=!1;let l=r(s);return l===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(l,o).then(u=>i(s,o,u));if(c.code!=="EEXIST"&&c.code!=="EROFS")throw c;return o.statAsync(s).then(u=>{if(u.isDirectory())return a;throw c},()=>{throw c})})},n=(s,o,a)=>{let l=r(s);if(o.recursive=!1,l===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(l,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}}),mP=ee((t,e)=>{W();var{dirname:r}=te("path"),{findMade:i,findMadeSync:n}=dP(),{mkdirpManual:s,mkdirpManualSync:o}=cS(),a=(c,u)=>(u.recursive=!0,r(c)===c?u.mkdirAsync(c,u):i(u,c).then(f=>u.mkdirAsync(c,u).then(()=>f).catch(h=>{if(h.code==="ENOENT")return s(c,u);throw h}))),l=(c,u)=>{if(u.recursive=!0,r(c)===c)return u.mkdirSync(c,u);let f=n(u,c);try{return u.mkdirSync(c,u),f}catch(h){if(h.code==="ENOENT")return o(c,u);throw h}};e.exports={mkdirpNative:a,mkdirpNativeSync:l}}),gP=ee((t,e)=>{W();var r=te("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?l=>l.mkdir===r.mkdir:()=>!1,a=s?l=>l.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:o,useNativeSync:a}}),yP=ee((t,e)=>{W();var r=fP(),i=pP(),{mkdirpNative:n,mkdirpNativeSync:s}=mP(),{mkdirpManual:o,mkdirpManualSync:a}=cS(),{useNative:l,useNativeSync:c}=gP(),u=(h,p)=>(h=i(h),p=r(p),l(p)?n(h,p):o(h,p)),f=(h,p)=>(h=i(h),p=r(p),c(p)?s(h,p):a(h,p));u.sync=f,u.native=(h,p)=>n(i(h),r(p)),u.manual=(h,p)=>o(i(h),r(p)),u.nativeSync=(h,p)=>s(i(h),r(p)),u.manualSync=(h,p)=>a(i(h),r(p)),e.exports=u}),bP=ee((t,e)=>{"use strict";W();var r=te("fs"),i=te("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=(C,T,O)=>{try{return r[s](C,T,O)}catch(I){if(I.code!=="ENOENT")throw I}},l=(C,T,O)=>{try{return r.chownSync(C,T,O)}catch(I){if(I.code!=="ENOENT")throw I}},c=o?(C,T,O,I)=>w=>{!w||w.code!=="EISDIR"?I(w):r.chown(C,T,O,I)}:(C,T,O,I)=>I,u=o?(C,T,O)=>{try{return a(C,T,O)}catch(I){if(I.code!=="EISDIR")throw I;l(C,T,O)}}:(C,T,O)=>a(C,T,O),f=process.version,h=(C,T,O)=>r.readdir(C,T,O),p=(C,T)=>r.readdirSync(C,T);/^v4\./.test(f)&&(h=(C,T,O)=>r.readdir(C,O));var g=(C,T,O,I)=>{r[n](C,T,O,c(C,T,O,w=>{I(w&&w.code!=="ENOENT"?w:null)}))},y=(C,T,O,I,w)=>{if(typeof T=="string")return r.lstat(i.resolve(C,T),(v,F)=>{if(v)return w(v.code!=="ENOENT"?v:null);F.name=T,y(C,F,O,I,w)});if(T.isDirectory())b(i.resolve(C,T.name),O,I,v=>{if(v)return w(v);let F=i.resolve(C,T.name);g(F,O,I,w)});else{let v=i.resolve(C,T.name);g(v,O,I,w)}},b=(C,T,O,I)=>{h(C,{withFileTypes:!0},(w,v)=>{if(w){if(w.code==="ENOENT")return I();if(w.code!=="ENOTDIR"&&w.code!=="ENOTSUP")return I(w)}if(w||!v.length)return g(C,T,O,I);let F=v.length,q=null,P=U=>{if(!q){if(U)return I(q=U);if(--F===0)return g(C,T,O,I)}};v.forEach(U=>y(C,U,T,O,P))})},x=(C,T,O,I)=>{if(typeof T=="string")try{let w=r.lstatSync(i.resolve(C,T));w.name=T,T=w}catch(w){if(w.code==="ENOENT")return;throw w}T.isDirectory()&&k(i.resolve(C,T.name),O,I),u(i.resolve(C,T.name),O,I)},k=(C,T,O)=>{let I;try{I=p(C,{withFileTypes:!0})}catch(w){if(w.code==="ENOENT")return;if(w.code==="ENOTDIR"||w.code==="ENOTSUP")return u(C,T,O);throw w}return I&&I.length&&I.forEach(w=>x(C,w,T,O)),u(C,T,O)};e.exports=b,b.sync=k}),_P=ee((t,e)=>{"use strict";W();var r=yP(),i=te("fs"),n=te("path"),s=bP(),o=Jn(),a=class extends Error{constructor(y,b){super("Cannot extract through symbolic link"),this.path=b,this.symlink=y}get name(){return"SylinkError"}},l=class extends Error{constructor(y,b){super(b+": Cannot cd into '"+y+"'"),this.path=y,this.code=b}get name(){return"CwdError"}},c=(y,b)=>y.get(o(b)),u=(y,b,x)=>y.set(o(b),x),f=(y,b)=>{i.stat(y,(x,k)=>{(x||!k.isDirectory())&&(x=new l(y,x&&x.code||"ENOTDIR")),b(x)})};e.exports=(y,b,x)=>{y=o(y);let k=b.umask,C=b.mode|448,T=(C&k)!==0,O=b.uid,I=b.gid,w=typeof O=="number"&&typeof I=="number"&&(O!==b.processUid||I!==b.processGid),v=b.preserve,F=b.unlink,q=b.cache,P=o(b.cwd),U=(K,N)=>{K?x(K):(u(q,y,!0),N&&w?s(N,O,I,A=>U(A)):T?i.chmod(y,C,x):x())};if(q&&c(q,y)===!0)return U();if(y===P)return f(y,U);if(v)return r(y,{mode:C}).then(K=>U(null,K),U);let V=o(n.relative(P,y)).split("/");h(P,V,C,q,F,P,null,U)};var h=(y,b,x,k,C,T,O,I)=>{if(!b.length)return I(null,O);let w=b.shift(),v=o(n.resolve(y+"/"+w));if(c(k,v))return h(v,b,x,k,C,T,O,I);i.mkdir(v,x,p(v,b,x,k,C,T,O,I))},p=(y,b,x,k,C,T,O,I)=>w=>{w?i.lstat(y,(v,F)=>{if(v)v.path=v.path&&o(v.path),I(v);else if(F.isDirectory())h(y,b,x,k,C,T,O,I);else if(C)i.unlink(y,q=>{if(q)return I(q);i.mkdir(y,x,p(y,b,x,k,C,T,O,I))});else{if(F.isSymbolicLink())return I(new a(y,y+"/"+b.join("/")));I(w)}}):(O=O||y,h(y,b,x,k,C,T,O,I))},g=y=>{let b=!1,x="ENOTDIR";try{b=i.statSync(y).isDirectory()}catch(k){x=k.code}finally{if(!b)throw new l(y,x)}};e.exports.sync=(y,b)=>{y=o(y);let x=b.umask,k=b.mode|448,C=(k&x)!==0,T=b.uid,O=b.gid,I=typeof T=="number"&&typeof O=="number"&&(T!==b.processUid||O!==b.processGid),w=b.preserve,v=b.unlink,F=b.cache,q=o(b.cwd),P=K=>{u(F,y,!0),K&&I&&s.sync(K,T,O),C&&i.chmodSync(y,k)};if(F&&c(F,y)===!0)return P();if(y===q)return g(q),P();if(w)return P(r.sync(y,k));let U=o(n.relative(q,y)).split("/"),V=null;for(let K=U.shift(),N=q;K&&(N+="/"+K);K=U.shift())if(N=o(n.resolve(N)),!c(F,N))try{i.mkdirSync(N,k),V=V||N,u(F,N,!0)}catch{let A=i.lstatSync(N);if(A.isDirectory()){u(F,N,!0);continue}else if(v){i.unlinkSync(N),i.mkdirSync(N,k),V=V||N,u(F,N,!0);continue}else if(A.isSymbolicLink())return new a(N,N+"/"+U.join("/"))}return P(V)}}),uS=ee((t,e)=>{W();var r=Object.create(null),{hasOwnProperty:i}=Object.prototype;e.exports=n=>(i.call(r,n)||(r[n]=n.normalize("NFKD")),r[n])}),wP=ee((t,e)=>{W();var r=te("assert"),i=uS(),n=es(),{join:s}=te("path"),o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,a=o==="win32";e.exports=()=>{let l=new Map,c=new Map,u=b=>b.split("/").slice(0,-1).reduce((x,k)=>(x.length&&(k=s(x[x.length-1],k)),x.push(k||"/"),x),[]),f=new Set,h=b=>{let x=c.get(b);if(!x)throw new Error("function does not have any path reservations");return{paths:x.paths.map(k=>l.get(k)),dirs:[...x.dirs].map(k=>l.get(k))}},p=b=>{let{paths:x,dirs:k}=h(b);return x.every(C=>C[0]===b)&&k.every(C=>C[0]instanceof Set&&C[0].has(b))},g=b=>f.has(b)||!p(b)?!1:(f.add(b),b(()=>y(b)),!0),y=b=>{if(!f.has(b))return!1;let{paths:x,dirs:k}=c.get(b),C=new Set;return x.forEach(T=>{let O=l.get(T);r.equal(O[0],b),O.length===1?l.delete(T):(O.shift(),typeof O[0]=="function"?C.add(O[0]):O[0].forEach(I=>C.add(I)))}),k.forEach(T=>{let O=l.get(T);r(O[0]instanceof Set),O[0].size===1&&O.length===1?l.delete(T):O[0].size===1?(O.shift(),C.add(O[0])):O[0].delete(b)}),f.delete(b),C.forEach(T=>g(T)),!0};return{check:p,reserve:(b,x)=>{b=a?["win32 parallelization disabled"]:b.map(C=>i(n(s(C))).toLowerCase());let k=new Set(b.map(C=>u(C)).reduce((C,T)=>C.concat(T)));return c.set(x,{dirs:k,paths:b}),b.forEach(C=>{let T=l.get(C);T?T.push(x):l.set(C,[x])}),k.forEach(C=>{let T=l.get(C);T?T[T.length-1]instanceof Set?T[T.length-1].add(x):T.push(new Set([x])):l.set(C,[new Set([x])])}),g(x)}}}}),SP=ee((t,e)=>{W();var r=process.env.__FAKE_PLATFORM__||process.platform,i=r==="win32",n=global.__FAKE_TESTING_FS__||te("fs"),{O_CREAT:s,O_TRUNC:o,O_WRONLY:a,UV_FS_O_FILEMAP:l=0}=n.constants,c=i&&!!l,u=512*1024,f=l|o|s|a;e.exports=c?h=>h<u?f:"w":()=>"w"}),hS=ee((t,e)=>{"use strict";W();var r=te("assert"),i=Uh(),n=te("fs"),s=ts(),o=te("path"),a=_P(),l=nS(),c=wP(),u=sS(),f=Jn(),h=es(),p=uS(),g=Symbol("onEntry"),y=Symbol("checkFs"),b=Symbol("checkFs2"),x=Symbol("pruneCache"),k=Symbol("isReusable"),C=Symbol("makeFs"),T=Symbol("file"),O=Symbol("directory"),I=Symbol("link"),w=Symbol("symlink"),v=Symbol("hardlink"),F=Symbol("unsupported"),q=Symbol("checkPath"),P=Symbol("mkdir"),U=Symbol("onError"),V=Symbol("pending"),K=Symbol("pend"),N=Symbol("unpend"),A=Symbol("ended"),L=Symbol("maybeClose"),j=Symbol("skip"),z=Symbol("doChown"),D=Symbol("uid"),d=Symbol("gid"),m=Symbol("checkedCwd"),_=te("crypto"),R=SP(),E=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,M=E==="win32",B=(S,Y)=>{if(!M)return n.unlink(S,Y);let X=S+".DELETE."+_.randomBytes(16).toString("hex");n.rename(S,X,oe=>{if(oe)return Y(oe);n.unlink(X,Y)})},Z=S=>{if(!M)return n.unlinkSync(S);let Y=S+".DELETE."+_.randomBytes(16).toString("hex");n.renameSync(S,Y),n.unlinkSync(Y)},H=(S,Y,X)=>S===S>>>0?S:Y===Y>>>0?Y:X,J=S=>p(h(f(S))).toLowerCase(),G=(S,Y)=>{Y=J(Y);for(let X of S.keys()){let oe=J(X);(oe===Y||oe.indexOf(Y+"/")===0)&&S.delete(X)}},re=S=>{for(let Y of S.keys())S.delete(Y)},ue=class extends i{constructor(S){if(S||(S={}),S.ondone=Y=>{this[A]=!0,this[L]()},super(S),this[m]=!1,this.reservations=c(),this.transform=typeof S.transform=="function"?S.transform:null,this.writable=!0,this.readable=!1,this[V]=0,this[A]=!1,this.dirCache=S.dirCache||new Map,typeof S.uid=="number"||typeof S.gid=="number"){if(typeof S.uid!="number"||typeof S.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(S.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=S.uid,this.gid=S.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;S.preserveOwner===void 0&&typeof S.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!S.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=S.forceChown===!0,this.win32=!!S.win32||M,this.newer=!!S.newer,this.keep=!!S.keep,this.noMtime=!!S.noMtime,this.preservePaths=!!S.preservePaths,this.unlink=!!S.unlink,this.cwd=f(o.resolve(S.cwd||process.cwd())),this.strip=+S.strip||0,this.processUmask=S.noChmod?0:process.umask(),this.umask=typeof S.umask=="number"?S.umask:this.processUmask,this.dmode=S.dmode||511&~this.umask,this.fmode=S.fmode||438&~this.umask,this.on("entry",Y=>this[g](Y))}warn(S,Y,X={}){return(S==="TAR_BAD_ARCHIVE"||S==="TAR_ABORT")&&(X.recoverable=!1),super.warn(S,Y,X)}[L](){this[A]&&this[V]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[q](S){if(this.strip){let Y=f(S.path).split("/");if(Y.length<this.strip)return!1;if(S.path=Y.slice(this.strip).join("/"),S.type==="Link"){let X=f(S.linkpath).split("/");if(X.length>=this.strip)S.linkpath=X.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let Y=f(S.path),X=Y.split("/");if(X.includes("..")||M&&/^[a-z]:\.\.$/i.test(X[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:S,path:Y}),!1;let[oe,ce]=u(Y);oe&&(S.path=ce,this.warn("TAR_ENTRY_INFO",`stripping ${oe} from absolute path`,{entry:S,path:Y}))}if(o.isAbsolute(S.path)?S.absolute=f(o.resolve(S.path)):S.absolute=f(o.resolve(this.cwd,S.path)),!this.preservePaths&&S.absolute.indexOf(this.cwd+"/")!==0&&S.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:S,path:f(S.path),resolvedPath:S.absolute,cwd:this.cwd}),!1;if(S.absolute===this.cwd&&S.type!=="Directory"&&S.type!=="GNUDumpDir")return!1;if(this.win32){let{root:Y}=o.win32.parse(S.absolute);S.absolute=Y+l.encode(S.absolute.slice(Y.length));let{root:X}=o.win32.parse(S.path);S.path=X+l.encode(S.path.slice(X.length))}return!0}[g](S){if(!this[q](S))return S.resume();switch(r.equal(typeof S.absolute,"string"),S.type){case"Directory":case"GNUDumpDir":S.mode&&(S.mode=S.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](S);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[F](S)}}[U](S,Y){S.name==="CwdError"?this.emit("error",S):(this.warn("TAR_ENTRY_ERROR",S,{entry:Y}),this[N](),Y.resume())}[P](S,Y,X){a(f(S),{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:Y,noChmod:this.noChmod},X)}[z](S){return this.forceChown||this.preserveOwner&&(typeof S.uid=="number"&&S.uid!==this.processUid||typeof S.gid=="number"&&S.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[D](S){return H(this.uid,S.uid,this.processUid)}[d](S){return H(this.gid,S.gid,this.processGid)}[T](S,Y){let X=S.mode&4095||this.fmode,oe=new s.WriteStream(S.absolute,{flags:R(S.size),mode:X,autoClose:!1});oe.on("error",pe=>{oe.fd&&n.close(oe.fd,()=>{}),oe.write=()=>!0,this[U](pe,S),Y()});let ce=1,be=pe=>{if(pe){oe.fd&&n.close(oe.fd,()=>{}),this[U](pe,S),Y();return}--ce===0&&n.close(oe.fd,Re=>{Re?this[U](Re,S):this[N](),Y()})};oe.on("finish",pe=>{let Re=S.absolute,dt=oe.fd;if(S.mtime&&!this.noMtime){ce++;let mt=S.atime||new Date,un=S.mtime;n.futimes(dt,mt,un,hn=>hn?n.utimes(Re,mt,un,Ea=>be(Ea&&hn)):be())}if(this[z](S)){ce++;let mt=this[D](S),un=this[d](S);n.fchown(dt,mt,un,hn=>hn?n.chown(Re,mt,un,Ea=>be(Ea&&hn)):be())}be()});let he=this.transform&&this.transform(S)||S;he!==S&&(he.on("error",pe=>{this[U](pe,S),Y()}),S.pipe(he)),he.pipe(oe)}[O](S,Y){let X=S.mode&4095||this.dmode;this[P](S.absolute,X,oe=>{if(oe){this[U](oe,S),Y();return}let ce=1,be=he=>{--ce===0&&(Y(),this[N](),S.resume())};S.mtime&&!this.noMtime&&(ce++,n.utimes(S.absolute,S.atime||new Date,S.mtime,be)),this[z](S)&&(ce++,n.chown(S.absolute,this[D](S),this[d](S),be)),be()})}[F](S){S.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${S.type}`,{entry:S}),S.resume()}[w](S,Y){this[I](S,S.linkpath,"symlink",Y)}[v](S,Y){let X=f(o.resolve(this.cwd,S.linkpath));this[I](S,X,"link",Y)}[K](){this[V]++}[N](){this[V]--,this[L]()}[j](S){this[N](),S.resume()}[k](S,Y){return S.type==="File"&&!this.unlink&&Y.isFile()&&Y.nlink<=1&&!M}[y](S){this[K]();let Y=[S.path];S.linkpath&&Y.push(S.linkpath),this.reservations.reserve(Y,X=>this[b](S,X))}[x](S){S.type==="SymbolicLink"?re(this.dirCache):S.type!=="Directory"&&G(this.dirCache,S.absolute)}[b](S,Y){this[x](S);let X=he=>{this[x](S),Y(he)},oe=()=>{this[P](this.cwd,this.dmode,he=>{if(he){this[U](he,S),X();return}this[m]=!0,ce()})},ce=()=>{if(S.absolute!==this.cwd){let he=f(o.dirname(S.absolute));if(he!==this.cwd)return this[P](he,this.dmode,pe=>{if(pe){this[U](pe,S),X();return}be()})}be()},be=()=>{n.lstat(S.absolute,(he,pe)=>{if(pe&&(this.keep||this.newer&&pe.mtime>S.mtime)){this[j](S),X();return}if(he||this[k](S,pe))return this[C](null,S,X);if(pe.isDirectory()){if(S.type==="Directory"){let Re=!this.noChmod&&S.mode&&(pe.mode&4095)!==S.mode,dt=mt=>this[C](mt,S,X);return Re?n.chmod(S.absolute,S.mode,dt):dt()}if(S.absolute!==this.cwd)return n.rmdir(S.absolute,Re=>this[C](Re,S,X))}if(S.absolute===this.cwd)return this[C](null,S,X);B(S.absolute,Re=>this[C](Re,S,X))})};this[m]?ce():oe()}[C](S,Y,X){if(S){this[U](S,Y),X();return}switch(Y.type){case"File":case"OldFile":case"ContiguousFile":return this[T](Y,X);case"Link":return this[v](Y,X);case"SymbolicLink":return this[w](Y,X);case"Directory":case"GNUDumpDir":return this[O](Y,X)}}[I](S,Y,X,oe){n[X](Y,S.absolute,ce=>{ce?this[U](ce,S):(this[N](),S.resume()),oe()})}},Ee=S=>{try{return[null,S()]}catch(Y){return[Y,null]}},_e=class extends ue{[C](S,Y){return super[C](S,Y,()=>{})}[y](S){if(this[x](S),!this[m]){let ce=this[P](this.cwd,this.dmode);if(ce)return this[U](ce,S);this[m]=!0}if(S.absolute!==this.cwd){let ce=f(o.dirname(S.absolute));if(ce!==this.cwd){let be=this[P](ce,this.dmode);if(be)return this[U](be,S)}}let[Y,X]=Ee(()=>n.lstatSync(S.absolute));if(X&&(this.keep||this.newer&&X.mtime>S.mtime))return this[j](S);if(Y||this[k](S,X))return this[C](null,S);if(X.isDirectory()){if(S.type==="Directory"){let be=!this.noChmod&&S.mode&&(X.mode&4095)!==S.mode,[he]=be?Ee(()=>{n.chmodSync(S.absolute,S.mode)}):[];return this[C](he,S)}let[ce]=Ee(()=>n.rmdirSync(S.absolute));this[C](ce,S)}let[oe]=S.absolute===this.cwd?[]:Ee(()=>Z(S.absolute));this[C](oe,S)}[T](S,Y){let X=S.mode&4095||this.fmode,oe=he=>{let pe;try{n.closeSync(ce)}catch(Re){pe=Re}(he||pe)&&this[U](he||pe,S),Y()},ce;try{ce=n.openSync(S.absolute,R(S.size),X)}catch(he){return oe(he)}let be=this.transform&&this.transform(S)||S;be!==S&&(be.on("error",he=>this[U](he,S)),S.pipe(be)),be.on("data",he=>{try{n.writeSync(ce,he,0,he.length)}catch(pe){oe(pe)}}),be.on("end",he=>{let pe=null;if(S.mtime&&!this.noMtime){let Re=S.atime||new Date,dt=S.mtime;try{n.futimesSync(ce,Re,dt)}catch(mt){try{n.utimesSync(S.absolute,Re,dt)}catch{pe=mt}}}if(this[z](S)){let Re=this[D](S),dt=this[d](S);try{n.fchownSync(ce,Re,dt)}catch(mt){try{n.chownSync(S.absolute,Re,dt)}catch{pe=pe||mt}}}oe(pe)})}[O](S,Y){let X=S.mode&4095||this.dmode,oe=this[P](S.absolute,X);if(oe){this[U](oe,S),Y();return}if(S.mtime&&!this.noMtime)try{n.utimesSync(S.absolute,S.atime||new Date,S.mtime)}catch{}if(this[z](S))try{n.chownSync(S.absolute,this[D](S),this[d](S))}catch{}Y(),S.resume()}[P](S,Y){try{return a.sync(f(S),{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:Y})}catch(X){return X}}[I](S,Y,X,oe){try{n[X+"Sync"](Y,S.absolute),oe(),S.resume()}catch(ce){return this[U](ce,S)}}};ue.Sync=_e,e.exports=ue}),EP=ee((t,e)=>{"use strict";W();var r=Xn(),i=hS(),n=te("fs"),s=ts(),o=te("path"),a=es();e.exports=(p,g,y)=>{typeof p=="function"?(y=p,g=null,p={}):Array.isArray(p)&&(g=p,p={}),typeof g=="function"&&(y=g,g=null),g?g=Array.from(g):g=[];let b=r(p);if(b.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!b.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return g.length&&l(b,g),b.file&&b.sync?c(b):b.file?u(b,y):b.sync?f(b):h(b)};var l=(p,g)=>{let y=new Map(g.map(k=>[a(k),!0])),b=p.filter,x=(k,C)=>{let T=C||o.parse(k).root||".",O=k===T?!1:y.has(k)?y.get(k):x(o.dirname(k),T);return y.set(k,O),O};p.filter=b?(k,C)=>b(k,C)&&x(a(k)):k=>x(a(k))},c=p=>{let g=new i.Sync(p),y=p.file,b=n.statSync(y),x=p.maxReadSize||16*1024*1024;new s.ReadStreamSync(y,{readSize:x,size:b.size}).pipe(g)},u=(p,g)=>{let y=new i(p),b=p.maxReadSize||16*1024*1024,x=p.file,k=new Promise((C,T)=>{y.on("error",T),y.on("close",C),n.stat(x,(O,I)=>{if(O)T(O);else{let w=new s.ReadStream(x,{readSize:b,size:I.size});w.on("error",T),w.pipe(y)}})});return g?k.then(g,g):k},f=p=>new i.Sync(p),h=p=>new i(p)}),vP=ee(t=>{"use strict";W(),t.c=t.create=uP(),t.r=t.replace=lS(),t.t=t.list=Gh(),t.u=t.update=hP(),t.x=t.extract=EP(),t.Pack=Hh(),t.Unpack=hS(),t.Parse=Uh(),t.ReadEntry=jh(),t.WriteEntry=oS(),t.Header=Qn(),t.Pax=$h(),t.types=iS()}),RP=ee((t,e)=>{W();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],l=a.message,c=(i[l]||0)+1;i[l]=c,c>=s&&(n=a,s=c)}return n}}),xP=ee(t=>{W();var e=RP();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,l){return a-l}),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],l=r[a];r[a]=function(c){var u=t.operation(i),f=Array.prototype.slice.call(arguments,1),h=f.pop();f.push(function(p){u.retry(p)||(p&&(arguments[0]=u.mainError()),h.apply(this,arguments))}),u.attempt(function(){c.apply(r,f)})}.bind(r,l),r[a].options=i}}}),AP=ee((t,e)=>{W(),e.exports=xP()}),OP=ee((t,e)=>{W();var r=AP();function i(n,s){function o(a,l){var c=s||{},u;"randomize"in c||(c.randomize=!0),u=r.operation(c);function f(g){l(g||new Error("Aborted"))}function h(g,y){if(g.bail){f(g);return}u.retry(g)?c.onRetry&&c.onRetry(g,y):l(u.mainError())}function p(g){var y;try{y=n(f,g)}catch(b){h(b,g);return}Promise.resolve(y).then(a).catch(function(b){h(b,g)})}u.attempt(p)}return new Promise(o)}e.exports=i}),TP={};KL(TP,{bold:()=>IP,dimmed:()=>DP,error:()=>jP,grey:()=>MP,info:()=>PP,item:()=>FP,log:()=>si,turboBlue:()=>tn,turboGradient:()=>CP,turboLoader:()=>LP,turboRed:()=>gS,underline:()=>NP,warn:()=>BP,yellow:()=>yS});W();var dS="#0099F7",mS="#F11712",kP="#FFFF00",zh=t=>{let e=$P(t);return r=>`\x1B[38;5;${e}m${r}${(0,Xe.reset)("")}`},CP=(0,pS.default)(dS,mS),tn=zh(dS),gS=zh(mS),yS=zh(kP),LP=t=>(0,fS.default)({text:t,spinner:{frames:[" ",tn("> "),tn(">> "),tn(">>>")]}}),PP=(...t)=>{si(tn((0,Xe.bold)(">>>")),t.join(" "))},IP=(...t)=>{si((0,Xe.bold)(t.join(" ")))},NP=(...t)=>{si((0,Xe.underline)(t.join(" ")))},DP=(...t)=>{si((0,Xe.dim)(t.join(" ")))},MP=(...t)=>{si((0,Xe.gray)(t.join(" ")))},FP=(...t)=>{si(tn((0,Xe.bold)(" \u2022")),t.join(" "))},si=(...t)=>{console.log(...t)},BP=(...t)=>{console.error(yS((0,Xe.bold)(">>>")),t.join(" "))},jP=(...t)=>{console.error(gS((0,Xe.bold)(">>>")),t.join(" "))};function $P(t){let e=parseInt(t.slice(1),16),r=Math.floor(e/(256*256))%256,i=Math.floor(e/256)%256,n=e%256;return 16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)}W();W();W();W();var rB=ua(QL());W();W();function HP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}W();W();function Dh(t){return Dh=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},Dh(t)}W();function UP(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function GP(t,e){if(e&&(Dh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UP(t)}W();function ca(t){return ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ca(t)}W();W();function Vn(t,e){return Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vn(t,e)}function zP(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&&Vn(t,e)}W();W();function WP(t){return Function.toString.call(t).indexOf("[native code]")!==-1}W();W();function YP(){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 la(t,e,r){return YP()?la=Reflect.construct.bind():la=function(i,n,s){var o=[null];o.push.apply(o,n);var a=Function.bind.apply(i,o),l=new a;return s&&Vn(l,s.prototype),l},la.apply(null,arguments)}function Mh(t){var e=typeof Map=="function"?new Map:void 0;return Mh=function(r){if(r===null||!WP(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 la(r,arguments,ca(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Vn(i,r)},Mh(t)}var iB=ua(sP()),oB=function(t){zP(e,t);function e(r){var i;return HP(this,e),i=GP(this,ca(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(Mh(Error));W();W();W();W();W();W();var yB=ua(vP()),bB=(0,_S.promisify)(bS.Stream.pipeline);W();W();var EB=ua(OP());W();W();W();var $e=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,$e)}};W();W();W();W();var VP=/^(?!_)(?<manager>.+)@(?<version>.+)$/;function Je({workspaceRoot:t}){let e=sr.default.join(t,"package.json");try{return(0,st.readJsonSync)(e,"utf8")}catch(r){if(r&&typeof r=="object"&&"code"in r){if(r.code==="ENOENT")throw new $e(`no "package.json" found at ${t}`,{type:"package_json-missing"});if(r.code==="EJSONPARSE")throw new $e(`failed to parse "package.json" at ${t}`,{type:"package_json-parse_error"})}throw new Error(`unexpected error reading "package.json" at ${t}`)}}function ha({workspaceRoot:t}){let{packageManager:e}=Je({workspaceRoot:t});if(e)try{let r=VP.exec(e);if(r){let[i,n]=r;return n}}catch{}}function rs({workspaceRoot:t}){let e=Je({workspaceRoot:t}),r=sr.default.basename(t),{name:i=r,description:n}=e;return{name:i,description:n}}function Jw({workspaceRoot:t}){let e=sr.default.join(t,"pnpm-workspace.yaml");if((0,st.existsSync)(e))try{let r=za.load((0,st.readFileSync)(e,"utf8"));if(r instanceof Object&&"packages"in r&&Array.isArray(r.packages))return r.packages}catch{throw new $e(`failed to parse ${e}`,{type:"pnpm-workspace_parse_error"})}return[]}function fa({root:t,lockFile:e,workspaceConfig:r}){let i=s=>sr.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 Wh({workspaces:t}){var e;return t?Array.isArray(t)?t:"packages"in t?(e=t.packages)!=null?e:[]:[]:[]}function pa({workspaceRoot:t,workspaceGlobs:e}){if(!e)return[];let r=e.filter(i=>i.startsWith("!")).map(i=>i.slice(1));return e.filter(i=>!i.startsWith("!")).flatMap(i=>{let n=[`${i}/package.json`];return(0,xS.sync)(n,{onlyFiles:!0,absolute:!0,cwd:t,ignore:["**/node_modules/**",...r]})}).map(i=>{let n=sr.default.dirname(i),{name:s,description:o}=rs({workspaceRoot:n});return{name:s,description:o,paths:{root:n,packageJson:i,nodeModules:sr.default.join(n,"node_modules")}}})}function KP({directory:t}){let e=sr.default.resolve(process.cwd(),t);return{exists:(0,st.existsSync)(e),absolute:e}}function Pr({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 ZP({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 nr({project:t,options:e}){e!=null&&e.dry||(0,st.rmSync)(t.paths.lockfile,{force:!0})}async function AS({project:t,options:e}){if(!(e!=null&&e.dry)&&(0,st.existsSync)(t.paths.lockfile))try{let{stdout:r}=await(0,RS.default)("bun",["bun.lockb"],{stdin:"ignore",cwd:t.paths.root});await(0,st.writeFile)(sr.default.join(t.paths.root,"yarn.lock"),r)}catch{}finally{(0,st.rmSync)(t.paths.lockfile,{force:!0})}}function XP({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 Cr({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=Je({workspaceRoot:e.paths.root}),o={dependencies:[],devDependencies:[],peerDependencies:[],optionalDependencies:[]},a=["dependencies","devDependencies","peerDependencies","optionalDependencies"];a.forEach(f=>{let h=s[f];if(h){let{updated:p,dependencyList:g}=XP({dependencyList:h,project:t,to:r});s[f]=g,o[f]=p}});let l=f=>{let h=o[f].length;if(h>0)return`${(0,vS.green)(h.toString())} ${f}`},c=a.map(l).filter(Boolean),u=`./${SS.default.relative(t.paths.root,e.paths.packageJson)}`;if(c.length>=1){let f="updating";c.forEach((h,p)=>{c.length===1?f+=` ${h} in ${u}`:p===c.length-1?f+=`and ${h} in ${u}`:f+=` ${h}, `}),i.workspaceStep(f)}else i.workspaceStep(`no workspace dependencies found in ${u}`);n!=null&&n.dry||(0,ES.writeJSONSync)(e.paths.packageJson,s,{spaces:2})}var Lr={name:"pnpm",lock:"pnpm-lock.yaml"};async function OS(t){let e=ii.default.join(t.workspaceRoot,Lr.lock),r=ii.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=ha({workspaceRoot:t.workspaceRoot});return(0,Ue.existsSync)(e)||(0,Ue.existsSync)(r)||i===Lr.name}async function JP(t){if(!await OS(t))throw new $e("Not a pnpm project",{type:"package_manager-unexpected"});let{name:e,description:r}=rs(t);return{name:e,description:r,packageManager:Lr.name,paths:fa({root:t.workspaceRoot,lockFile:Lr.lock,workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:Jw(t),workspaces:pa({workspaceGlobs:Jw(t),...t})}}}async function QP(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(Pr({action:"create",packageManager:Lr.name,project:e}));let o=Je({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,Ue.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),(0,Ue.writeFileSync)(ii.default.join(e.paths.root,"pnpm-workspace.yaml"),`packages:
43
43
  ${e.workspaceData.globs.map(a=>` - "${a}"`).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turbo/codemod",
3
- "version": "2.1.4-canary.9",
3
+ "version": "2.2.1",
4
4
  "description": "Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",
5
5
  "homepage": "https://turbo.build/repo",
6
6
  "license": "MIT",
@@ -45,13 +45,13 @@
45
45
  "ts-jest": "^27.1.1",
46
46
  "tsup": "^6.7.0",
47
47
  "typescript": "5.3.3",
48
- "@turbo/gen": "2.1.4-canary.9",
49
- "@turbo/types": "2.1.4-canary.9",
50
48
  "@turbo/eslint-config": "0.0.0",
51
49
  "@turbo/test-utils": "0.0.0",
52
50
  "@turbo/tsconfig": "0.0.0",
51
+ "@turbo/gen": "2.2.1",
52
+ "@turbo/types": "2.2.1",
53
53
  "@turbo/utils": "0.0.0",
54
- "@turbo/workspaces": "2.1.4-canary.9"
54
+ "@turbo/workspaces": "2.2.1"
55
55
  },
56
56
  "files": [
57
57
  "dist"