@seed-design/codemod 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/index.cjs CHANGED
@@ -1,66 +1,66 @@
1
1
  #!/usr/bin/env node
2
- var dx=Object.create;var Do=Object.defineProperty;var px=Object.getOwnPropertyDescriptor;var mx=Object.getOwnPropertyNames;var hx=Object.getPrototypeOf,gx=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yx=(e,t)=>{for(var r in t)Do(e,r,{get:t[r],enumerable:!0})},bx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mx(t))!gx.call(e,s)&&s!==r&&Do(e,s,{get:()=>t[s],enumerable:!(n=px(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?dx(hx(e)):{},bx(t||!e||!e.__esModule?Do(r,"default",{value:e,enumerable:!0}):r,e));var Nu=x((dL,Lu)=>{Lu.exports=Du;Du.sync=SS;var Iu=require("fs");function xS(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function $u(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:xS(t,r)}function Du(e,t,r){Iu.stat(e,function(n,s){r(n,n?!1:$u(s,e,t))})}function SS(e,t){return $u(Iu.statSync(e),e,t)}});var Bu=x((pL,ju)=>{ju.exports=Mu;Mu.sync=vS;var Pu=require("fs");function Mu(e,t,r){Pu.stat(e,function(n,s){r(n,n?!1:Fu(s,t))})}function vS(e,t){return Fu(Pu.statSync(e),t)}function Fu(e,t){return e.isFile()&&_S(e,t)}function _S(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var Gu=x((hL,Uu)=>{var mL=require("fs"),Mn;process.platform==="win32"||global.TESTING_WINDOWS?Mn=Nu():Mn=Bu();Uu.exports=Zo;Zo.sync=ES;function Zo(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){Zo(e,t||{},function(o,i){o?s(o):n(i)})})}Mn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function ES(e,t){try{return Mn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Yu=x((gL,Zu)=>{var Jt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",qu=require("path"),TS=Jt?";":":",Vu=Gu(),zu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Wu=(e,t)=>{let r=t.colon||TS,n=e.match(/\//)||Jt&&e.match(/\\/)?[""]:[...Jt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Jt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Jt?s.split(r):[""];return Jt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Hu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Wu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(zu(e));let p=n[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,b=qu.join(d,e),T=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((p,d)=>{if(f===s.length)return p(a(l+1));let b=s[f];Vu(u+b,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+b);else return p(u+b);return p(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},OS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Wu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=qu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let p=l+n[f];try{if(Vu.sync(p,{pathExt:s}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw zu(e)};Zu.exports=Hu;Hu.sync=OS});var Ku=x((yL,Yo)=>{"use strict";var Xu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Yo.exports=Xu;Yo.exports.default=Xu});var tl=x((bL,el)=>{"use strict";var Ju=require("path"),RS=Yu(),kS=Ku();function Qu(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=RS.sync(e.command,{path:r[kS({env:r})],pathExt:t?Ju.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=Ju.resolve(s?e.options.cwd:"",i)),i}function CS(e){return Qu(e)||Qu(e,!0)}el.exports=CS});var rl=x((wL,Ko)=>{"use strict";var Xo=/([()\][%!^"`<>&|;, *?])/g;function AS(e){return e=e.replace(Xo,"^$1"),e}function IS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Xo,"^$1"),t&&(e=e.replace(Xo,"^$1")),e}Ko.exports.command=AS;Ko.exports.argument=IS});var sl=x((xL,nl)=>{"use strict";nl.exports=/^#!(.*)/});var il=x((SL,ol)=>{"use strict";var $S=sl();ol.exports=(e="")=>{let t=e.match($S);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var cl=x((vL,al)=>{"use strict";var Jo=require("fs"),DS=il();function LS(e){let r=Buffer.alloc(150),n;try{n=Jo.openSync(e,"r"),Jo.readSync(n,r,0,150,0),Jo.closeSync(n)}catch{}return DS(r.toString())}al.exports=LS});var dl=x((_L,fl)=>{"use strict";var NS=require("path"),ul=tl(),ll=rl(),PS=cl(),MS=process.platform==="win32",FS=/\.(?:com|exe)$/i,jS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function BS(e){e.file=ul(e);let t=e.file&&PS(e.file);return t?(e.args.unshift(e.file),e.command=t,ul(e)):e.file}function US(e){if(!MS)return e;let t=BS(e),r=!FS.test(t);if(e.options.forceShell||r){let n=jS.test(t);e.command=NS.normalize(e.command),e.command=ll.command(e.command),e.args=e.args.map(o=>ll.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function GS(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:US(n)}fl.exports=GS});var hl=x((EL,ml)=>{"use strict";var Qo=process.platform==="win32";function ei(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function qS(e,t){if(!Qo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=pl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function pl(e,t){return Qo&&e===1&&!t.file?ei(t.original,"spawn"):null}function VS(e,t){return Qo&&e===1&&!t.file?ei(t.original,"spawnSync"):null}ml.exports={hookChildProcess:qS,verifyENOENT:pl,verifyENOENTSync:VS,notFoundError:ei}});var bl=x((TL,Qt)=>{"use strict";var gl=require("child_process"),ti=dl(),ri=hl();function yl(e,t,r){let n=ti(e,t,r),s=gl.spawn(n.command,n.args,n.options);return ri.hookChildProcess(s,n),s}function zS(e,t,r){let n=ti(e,t,r),s=gl.spawnSync(n.command,n.args,n.options);return s.error=s.error||ri.verifyENOENTSync(s.status,n),s}Qt.exports=yl;Qt.exports.spawn=yl;Qt.exports.sync=zS;Qt.exports._parse=ti;Qt.exports._enoent=ri});var Xr=x((dG,Bm)=>{"use strict";var F0="2.0.0",j0=Number.MAX_SAFE_INTEGER||9007199254740991,B0=16,U0=250,G0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Bm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:B0,MAX_SAFE_BUILD_LENGTH:U0,MAX_SAFE_INTEGER:j0,RELEASE_TYPES:G0,SEMVER_SPEC_VERSION:F0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Kr=x((pG,Um)=>{"use strict";var q0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Um.exports=q0});var pr=x((We,Gm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:_a,MAX_SAFE_BUILD_LENGTH:V0,MAX_LENGTH:z0}=Xr(),W0=Kr();We=Gm.exports={};var H0=We.re=[],Z0=We.safeRe=[],S=We.src=[],Y0=We.safeSrc=[],v=We.t={},X0=0,Ea="[a-zA-Z0-9-]",K0=[["\\s",1],["\\d",z0],[Ea,V0]],J0=e=>{for(let[t,r]of K0)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=J0(t),s=X0++;W0(e,s,t),v[e]=s,S[s]=t,Y0[s]=n,H0[s]=new RegExp(t,r?"g":void 0),Z0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ea}*`);A("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Ea}+`);A("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);A("FULL",`^${S[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);A("LOOSE",`^${S[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);A("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${_a}})(?:\\.(\\d{1,${_a}}))?(?:\\.(\\d{1,${_a}}))?`);A("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",S[v.COERCE],!0);A("COERCERTLFULL",S[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);We.tildeTrimReplace="$1~";A("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);We.caretTrimReplace="$1^";A("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);We.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ms=x((mG,qm)=>{"use strict";var Q0=Object.freeze({loose:!0}),eO=Object.freeze({}),tO=e=>e?typeof e!="object"?Q0:e:eO;qm.exports=tO});var Ta=x((hG,Wm)=>{"use strict";var Vm=/^[0-9]+$/,zm=(e,t)=>{let r=Vm.test(e),n=Vm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},rO=(e,t)=>zm(t,e);Wm.exports={compareIdentifiers:zm,rcompareIdentifiers:rO}});var te=x((gG,Zm)=>{"use strict";var Fs=Kr(),{MAX_LENGTH:Hm,MAX_SAFE_INTEGER:js}=Xr(),{safeRe:Bs,t:Us}=pr(),nO=Ms(),{compareIdentifiers:mr}=Ta(),Oa=class e{constructor(t,r){if(r=nO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Hm)throw new TypeError(`version is longer than ${Hm} characters`);Fs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Bs[Us.LOOSE]:Bs[Us.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>js||this.major<0)throw new TypeError("Invalid major version");if(this.minor>js||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>js||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<js)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Fs("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mr(this.major,t.major)||mr(this.minor,t.minor)||mr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Fs("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Fs("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return mr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Bs[Us.PRERELEASELOOSE]:Bs[Us.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),mr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Zm.exports=Oa});var Rt=x((yG,Xm)=>{"use strict";var Ym=te(),sO=(e,t,r=!1)=>{if(e instanceof Ym)return e;try{return new Ym(e,t)}catch(n){if(!r)return null;throw n}};Xm.exports=sO});var Jm=x((bG,Km)=>{"use strict";var oO=Rt(),iO=(e,t)=>{let r=oO(e,t);return r?r.version:null};Km.exports=iO});var eh=x((wG,Qm)=>{"use strict";var aO=Rt(),cO=(e,t)=>{let r=aO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Qm.exports=cO});var nh=x((xG,rh)=>{"use strict";var th=te(),uO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new th(e instanceof th?e.version:e,r).inc(t,n,s).version}catch{return null}};rh.exports=uO});var ih=x((SG,oh)=>{"use strict";var sh=Rt(),lO=(e,t)=>{let r=sh(e,null,!0),n=sh(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};oh.exports=lO});var ch=x((vG,ah)=>{"use strict";var fO=te(),dO=(e,t)=>new fO(e,t).major;ah.exports=dO});var lh=x((_G,uh)=>{"use strict";var pO=te(),mO=(e,t)=>new pO(e,t).minor;uh.exports=mO});var dh=x((EG,fh)=>{"use strict";var hO=te(),gO=(e,t)=>new hO(e,t).patch;fh.exports=gO});var mh=x((TG,ph)=>{"use strict";var yO=Rt(),bO=(e,t)=>{let r=yO(e,t);return r&&r.prerelease.length?r.prerelease:null};ph.exports=bO});var _e=x((OG,gh)=>{"use strict";var hh=te(),wO=(e,t,r)=>new hh(e,r).compare(new hh(t,r));gh.exports=wO});var bh=x((RG,yh)=>{"use strict";var xO=_e(),SO=(e,t,r)=>xO(t,e,r);yh.exports=SO});var xh=x((kG,wh)=>{"use strict";var vO=_e(),_O=(e,t)=>vO(e,t,!0);wh.exports=_O});var Gs=x((CG,vh)=>{"use strict";var Sh=te(),EO=(e,t,r)=>{let n=new Sh(e,r),s=new Sh(t,r);return n.compare(s)||n.compareBuild(s)};vh.exports=EO});var Eh=x((AG,_h)=>{"use strict";var TO=Gs(),OO=(e,t)=>e.sort((r,n)=>TO(r,n,t));_h.exports=OO});var Oh=x((IG,Th)=>{"use strict";var RO=Gs(),kO=(e,t)=>e.sort((r,n)=>RO(n,r,t));Th.exports=kO});var Jr=x(($G,Rh)=>{"use strict";var CO=_e(),AO=(e,t,r)=>CO(e,t,r)>0;Rh.exports=AO});var qs=x((DG,kh)=>{"use strict";var IO=_e(),$O=(e,t,r)=>IO(e,t,r)<0;kh.exports=$O});var Ra=x((LG,Ch)=>{"use strict";var DO=_e(),LO=(e,t,r)=>DO(e,t,r)===0;Ch.exports=LO});var ka=x((NG,Ah)=>{"use strict";var NO=_e(),PO=(e,t,r)=>NO(e,t,r)!==0;Ah.exports=PO});var Vs=x((PG,Ih)=>{"use strict";var MO=_e(),FO=(e,t,r)=>MO(e,t,r)>=0;Ih.exports=FO});var zs=x((MG,$h)=>{"use strict";var jO=_e(),BO=(e,t,r)=>jO(e,t,r)<=0;$h.exports=BO});var Ca=x((FG,Dh)=>{"use strict";var UO=Ra(),GO=ka(),qO=Jr(),VO=Vs(),zO=qs(),WO=zs(),HO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return UO(e,r,n);case"!=":return GO(e,r,n);case">":return qO(e,r,n);case">=":return VO(e,r,n);case"<":return zO(e,r,n);case"<=":return WO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Dh.exports=HO});var Nh=x((jG,Lh)=>{"use strict";var ZO=te(),YO=Rt(),{safeRe:Ws,t:Hs}=pr(),XO=(e,t)=>{if(e instanceof ZO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Ws[Hs.COERCEFULL]:Ws[Hs.COERCE]);else{let c=t.includePrerelease?Ws[Hs.COERCERTLFULL]:Ws[Hs.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return YO(`${n}.${s}.${o}${i}${a}`,t)};Lh.exports=XO});var Mh=x((BG,Ph)=>{"use strict";var Aa=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};Ph.exports=Aa});var Ee=x((UG,Uh)=>{"use strict";var KO=/\s+/g,Ia=class e{constructor(t,r){if(r=QO(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof $a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(KO," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!jh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&iR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&sR)|(this.options.loose&&oR))+":"+t,s=Fh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,gR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],tR),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],rR),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],nR),G("caret trim",t);let a=t.split(" ").map(f=>aR(f,this.options)).join(" ").split(/\s+/).map(f=>hR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[oe.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new $a(f,this.options));for(let f of u){if(jh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Fh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Bh(n,r)&&t.set.some(s=>Bh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new eR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(yR(this.set[r],t,this.options))return!0;return!1}};Uh.exports=Ia;var JO=Mh(),Fh=new JO,QO=Ms(),$a=Qr(),G=Kr(),eR=te(),{safeRe:ue,t:oe,comparatorTrimReplace:tR,tildeTrimReplace:rR,caretTrimReplace:nR}=pr(),{FLAG_INCLUDE_PRERELEASE:sR,FLAG_LOOSE:oR}=Xr(),jh=e=>e.value==="<0.0.0-0",iR=e=>e.value==="",Bh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},aR=(e,t)=>(G("comp",e,t),e=lR(e,t),G("caret",e),e=cR(e,t),G("tildes",e),e=dR(e,t),G("xrange",e),e=mR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",cR=(e,t)=>e.trim().split(/\s+/).map(r=>uR(r,t)).join(" "),uR=(e,t)=>{let r=t.loose?ue[oe.TILDELOOSE]:ue[oe.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ie(s)?c="":ie(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ie(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},lR=(e,t)=>e.trim().split(/\s+/).map(r=>fR(r,t)).join(" "),fR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[oe.CARETLOOSE]:ue[oe.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return ie(o)?u="":ie(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ie(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},dR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>pR(r,t)).join(" ")),pR=(e,t)=>{e=e.trim();let r=t.loose?ue[oe.XRANGELOOSE]:ue[oe.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ie(o),l=u||ie(i),f=l||ie(a),p=f;return s==="="&&p&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&p?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},mR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),hR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),gR=e=>(t,r,n,s,o,i,a,c,u,l,f,p)=>(ie(n)?r="":ie(s)?r=`>=${n}.0.0${e?"-0":""}`:ie(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ie(u)?c="":ie(l)?c=`<${+u+1}.0.0-0`:ie(f)?c=`<${u}.${+l+1}.0-0`:p?c=`<=${u}.${l}.${f}-${p}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),yR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==$a.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Qr=x((GG,Hh)=>{"use strict";var en=Symbol("SemVer ANY"),Na=class e{static get ANY(){return en}constructor(t,r){if(r=Gh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),La("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===en?this.value="":this.value=this.operator+this.semver.version,La("comp",this)}parse(t){let r=this.options.loose?qh[Vh.COMPARATORLOOSE]:qh[Vh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new zh(n[2],this.options.loose):this.semver=en}toString(){return this.value}test(t){if(La("Comparator.test",t,this.options.loose),this.semver===en||t===en)return!0;if(typeof t=="string")try{t=new zh(t,this.options)}catch{return!1}return Da(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Wh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Wh(this.value,r).test(t.semver):(r=Gh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Da(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Da(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Hh.exports=Na;var Gh=Ms(),{safeRe:qh,t:Vh}=pr(),Da=Ca(),La=Kr(),zh=te(),Wh=Ee()});var tn=x((qG,Zh)=>{"use strict";var bR=Ee(),wR=(e,t,r)=>{try{t=new bR(t,r)}catch{return!1}return t.test(e)};Zh.exports=wR});var Xh=x((VG,Yh)=>{"use strict";var xR=Ee(),SR=(e,t)=>new xR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Yh.exports=SR});var Jh=x((zG,Kh)=>{"use strict";var vR=te(),_R=Ee(),ER=(e,t,r)=>{let n=null,s=null,o=null;try{o=new _R(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new vR(n,r))}),n};Kh.exports=ER});var eg=x((WG,Qh)=>{"use strict";var TR=te(),OR=Ee(),RR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new OR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new TR(n,r))}),n};Qh.exports=RR});var ng=x((HG,rg)=>{"use strict";var Pa=te(),kR=Ee(),tg=Jr(),CR=(e,t)=>{e=new kR(e,t);let r=new Pa("0.0.0");if(e.test(r)||(r=new Pa("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new Pa(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||tg(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||tg(r,o))&&(r=o)}return r&&e.test(r)?r:null};rg.exports=CR});var og=x((ZG,sg)=>{"use strict";var AR=Ee(),IR=(e,t)=>{try{return new AR(e,t).range||"*"}catch{return null}};sg.exports=IR});var Zs=x((YG,ug)=>{"use strict";var $R=te(),cg=Qr(),{ANY:DR}=cg,LR=Ee(),NR=tn(),ig=Jr(),ag=qs(),PR=zs(),MR=Vs(),FR=(e,t,r,n)=>{e=new $R(e,n),t=new LR(t,n);let s,o,i,a,c;switch(r){case">":s=ig,o=PR,i=ag,a=">",c=">=";break;case"<":s=ag,o=MR,i=ig,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(NR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,p=null;if(l.forEach(d=>{d.semver===DR&&(d=new cg(">=0.0.0")),f=f||d,p=p||d,s(d.semver,f.semver,n)?f=d:i(d.semver,p.semver,n)&&(p=d)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&i(e,p.semver))return!1}return!0};ug.exports=FR});var fg=x((XG,lg)=>{"use strict";var jR=Zs(),BR=(e,t,r)=>jR(e,t,">",r);lg.exports=BR});var pg=x((KG,dg)=>{"use strict";var UR=Zs(),GR=(e,t,r)=>UR(e,t,"<",r);dg.exports=GR});var gg=x((JG,hg)=>{"use strict";var mg=Ee(),qR=(e,t,r)=>(e=new mg(e,r),t=new mg(t,r),e.intersects(t,r));hg.exports=qR});var bg=x((QG,yg)=>{"use strict";var VR=tn(),zR=_e();yg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>zR(l,f,r));for(let l of i)VR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var Eg=x((e9,_g)=>{"use strict";var wg=Ee(),Fa=Qr(),{ANY:Ma}=Fa,rn=tn(),ja=_e(),WR=(e,t,r={})=>{if(e===t)return!0;e=new wg(e,r),t=new wg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=ZR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},HR=[new Fa(">=0.0.0-0")],xg=[new Fa(">=0.0.0")],ZR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ma){if(t.length===1&&t[0].semver===Ma)return!0;r.includePrerelease?e=HR:e=xg}if(t.length===1&&t[0].semver===Ma){if(r.includePrerelease)return!0;t=xg}let n=new Set,s,o;for(let d of e)d.operator===">"||d.operator===">="?s=Sg(s,d,r):d.operator==="<"||d.operator==="<="?o=vg(o,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(s&&o){if(i=ja(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let d of n){if(s&&!rn(d,String(s),r)||o&&!rn(d,String(o),r))return null;for(let b of t)if(!rn(d,String(b),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of t){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(a=Sg(s,d,r),a===d&&a!==s)return!1}else if(s.operator===">="&&!rn(s.semver,String(d),r))return!1}if(o){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(c=vg(o,d,r),c===d&&c!==o)return!1}else if(o.operator==="<="&&!rn(o.semver,String(d),r))return!1}if(!d.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||p||f)},Sg=(e,t,r)=>{if(!e)return t;let n=ja(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},vg=(e,t,r)=>{if(!e)return t;let n=ja(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};_g.exports=WR});var kg=x((t9,Rg)=>{"use strict";var Ba=pr(),Tg=Xr(),YR=te(),Og=Ta(),XR=Rt(),KR=Jm(),JR=eh(),QR=nh(),ek=ih(),tk=ch(),rk=lh(),nk=dh(),sk=mh(),ok=_e(),ik=bh(),ak=xh(),ck=Gs(),uk=Eh(),lk=Oh(),fk=Jr(),dk=qs(),pk=Ra(),mk=ka(),hk=Vs(),gk=zs(),yk=Ca(),bk=Nh(),wk=Qr(),xk=Ee(),Sk=tn(),vk=Xh(),_k=Jh(),Ek=eg(),Tk=ng(),Ok=og(),Rk=Zs(),kk=fg(),Ck=pg(),Ak=gg(),Ik=bg(),$k=Eg();Rg.exports={parse:XR,valid:KR,clean:JR,inc:QR,diff:ek,major:tk,minor:rk,patch:nk,prerelease:sk,compare:ok,rcompare:ik,compareLoose:ak,compareBuild:ck,sort:uk,rsort:lk,gt:fk,lt:dk,eq:pk,neq:mk,gte:hk,lte:gk,cmp:yk,coerce:bk,Comparator:wk,Range:xk,satisfies:Sk,toComparators:vk,maxSatisfying:_k,minSatisfying:Ek,minVersion:Tk,validRange:Ok,outside:Rk,gtr:kk,ltr:Ck,intersects:Ak,simplifyRange:Ik,subset:$k,SemVer:YR,re:Ba.re,src:Ba.src,tokens:Ba.t,SEMVER_SPEC_VERSION:Tg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tg.RELEASE_TYPES,compareIdentifiers:Og.compareIdentifiers,rcompareIdentifiers:Og.rcompareIdentifiers}});var Gg=x((L9,Ug)=>{var _r=1e3,Er=_r*60,Tr=Er*60,Vt=Tr*24,qC=Vt*7,VC=Vt*365.25;Ug.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return zC(e);if(r==="number"&&isFinite(e))return t.long?HC(e):WC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function zC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*VC;case"weeks":case"week":case"w":return r*qC;case"days":case"day":case"d":return r*Vt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Er;case"seconds":case"second":case"secs":case"sec":case"s":return r*_r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function WC(e){var t=Math.abs(e);return t>=Vt?Math.round(e/Vt)+"d":t>=Tr?Math.round(e/Tr)+"h":t>=Er?Math.round(e/Er)+"m":t>=_r?Math.round(e/_r)+"s":e+"ms"}function HC(e){var t=Math.abs(e);return t>=Vt?eo(e,t,Vt,"day"):t>=Tr?eo(e,t,Tr,"hour"):t>=Er?eo(e,t,Er,"minute"):t>=_r?eo(e,t,_r,"second"):e+" ms"}function eo(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Va=x((N9,qg)=>{function ZC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Gg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let p=0;p<l.length;p++)f=(f<<5)-f+l.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,p=null,d,b;function T(...P){if(!T.enabled)return;let M=T,j=Number(new Date),Y=j-(f||j);M.diff=Y,M.prev=f,M.curr=j,f=j,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=P[X];ce=Ie.call(M,xe),P.splice(X,1),X--}return ce}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,b=r.enabled(l)),b),set:P=>{p=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let p=r(this.namespace+(typeof f>"u"?":":f)+l);return p.log=this.log,p}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(l,f){let p=0,d=0,b=-1,T=0;for(;p<l.length;)if(d<f.length&&(f[d]===l[p]||f[d]==="*"))f[d]==="*"?(b=d,T=p,d++):(p++,d++);else if(b!==-1)d=b+1,T++,p=T;else return!1;for(;d<f.length&&f[d]==="*";)d++;return d===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}qg.exports=ZC});var Vg=x((ge,to)=>{ge.formatArgs=XC;ge.save=KC;ge.load=JC;ge.useColors=YC;ge.storage=QC();ge.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ge.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function YC(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function XC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+to.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}ge.log=console.debug||console.log||(()=>{});function KC(e){try{e?ge.storage.setItem("debug",e):ge.storage.removeItem("debug")}catch{}}function JC(){let e;try{e=ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function QC(){try{return localStorage}catch{}}to.exports=Va()(ge);var{formatters:eA}=to.exports;eA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Wg=x((P9,zg)=>{"use strict";zg.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var Yg=x((M9,Zg)=>{"use strict";var tA=require("os"),Hg=require("tty"),ke=Wg(),{env:J}=process,ro;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ro=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ro=1);function rA(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function nA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function sA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=rA();n!==void 0&&(ro=n);let s=r?ro:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=tA.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function za(e,t={}){let r=sA(e,{streamIsTTY:e&&e.isTTY,...t});return nA(r)}Zg.exports={supportsColor:za,stdout:za({isTTY:Hg.isatty(1)}),stderr:za({isTTY:Hg.isatty(2)})}});var Kg=x((Q,so)=>{var oA=require("tty"),no=require("util");Q.init=dA;Q.log=uA;Q.formatArgs=aA;Q.save=lA;Q.load=fA;Q.useColors=iA;Q.destroy=no.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=Yg();e&&(e.stderr||e).level>=2&&(Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function iA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:oA.isatty(process.stderr.fd)}function aA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
2
+ var cx=Object.create;var Ao=Object.defineProperty;var ux=Object.getOwnPropertyDescriptor;var lx=Object.getOwnPropertyNames;var fx=Object.getPrototypeOf,dx=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),px=(e,t)=>{for(var r in t)Ao(e,r,{get:t[r],enumerable:!0})},mx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of lx(t))!dx.call(e,s)&&s!==r&&Ao(e,s,{get:()=>t[s],enumerable:!(n=ux(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?cx(fx(e)):{},mx(t||!e||!e.__esModule?Ao(r,"default",{value:e,enumerable:!0}):r,e));var Iu=w((iL,Au)=>{Au.exports=Cu;Cu.sync=yS;var Ru=require("fs");function gS(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function ku(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gS(t,r)}function Cu(e,t,r){Ru.stat(e,function(n,s){r(n,n?!1:ku(s,e,t))})}function yS(e,t){return ku(Ru.statSync(e),e,t)}});var Pu=w((aL,Nu)=>{Nu.exports=Du;Du.sync=bS;var $u=require("fs");function Du(e,t,r){$u.stat(e,function(n,s){r(n,n?!1:Lu(s,t))})}function bS(e,t){return Lu($u.statSync(e),t)}function Lu(e,t){return e.isFile()&&wS(e,t)}function wS(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var Fu=w((uL,Mu)=>{var cL=require("fs"),Dn;process.platform==="win32"||global.TESTING_WINDOWS?Dn=Iu():Dn=Pu();Mu.exports=zo;zo.sync=xS;function zo(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){zo(e,t||{},function(o,i){o?s(o):n(i)})})}Dn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function xS(e,t){try{return Dn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var zu=w((lL,Vu)=>{var Kt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ju=require("path"),SS=Kt?";":":",Bu=Fu(),Uu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Gu=(e,t)=>{let r=t.colon||SS,n=e.match(/\//)||Kt&&e.match(/\\/)?[""]:[...Kt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Kt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Kt?s.split(r):[""];return Kt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},qu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Gu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Uu(e));let p=n[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,x=ju.join(d,e),T=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+x:x;l(c(T,u,0))}),c=(u,l,f)=>new Promise((p,d)=>{if(f===s.length)return p(a(l+1));let x=s[f];Bu(u+x,{pathExt:o},(T,P)=>{if(!T&&P)if(t.all)i.push(u+x);else return p(u+x);return p(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},vS=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Gu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=ju.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let p=l+n[f];try{if(Bu.sync(p,{pathExt:s}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Uu(e)};Vu.exports=qu;qu.sync=vS});var Hu=w((fL,Wo)=>{"use strict";var Wu=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Wo.exports=Wu;Wo.exports.default=Wu});var Ku=w((dL,Xu)=>{"use strict";var Zu=require("path"),_S=zu(),ES=Hu();function Yu(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=_S.sync(e.command,{path:r[ES({env:r})],pathExt:t?Zu.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=Zu.resolve(s?e.options.cwd:"",i)),i}function TS(e){return Yu(e)||Yu(e,!0)}Xu.exports=TS});var Ju=w((pL,Zo)=>{"use strict";var Ho=/([()\][%!^"`<>&|;, *?])/g;function OS(e){return e=e.replace(Ho,"^$1"),e}function RS(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Ho,"^$1"),t&&(e=e.replace(Ho,"^$1")),e}Zo.exports.command=OS;Zo.exports.argument=RS});var el=w((mL,Qu)=>{"use strict";Qu.exports=/^#!(.*)/});var rl=w((hL,tl)=>{"use strict";var kS=el();tl.exports=(e="")=>{let t=e.match(kS);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var sl=w((gL,nl)=>{"use strict";var Yo=require("fs"),CS=rl();function AS(e){let r=Buffer.alloc(150),n;try{n=Yo.openSync(e,"r"),Yo.readSync(n,r,0,150,0),Yo.closeSync(n)}catch{}return CS(r.toString())}nl.exports=AS});var cl=w((yL,al)=>{"use strict";var IS=require("path"),ol=Ku(),il=Ju(),$S=sl(),DS=process.platform==="win32",LS=/\.(?:com|exe)$/i,NS=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function PS(e){e.file=ol(e);let t=e.file&&$S(e.file);return t?(e.args.unshift(e.file),e.command=t,ol(e)):e.file}function MS(e){if(!DS)return e;let t=PS(e),r=!LS.test(t);if(e.options.forceShell||r){let n=NS.test(t);e.command=IS.normalize(e.command),e.command=il.command(e.command),e.args=e.args.map(o=>il.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function FS(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:MS(n)}al.exports=FS});var fl=w((bL,ll)=>{"use strict";var Xo=process.platform==="win32";function Ko(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function jS(e,t){if(!Xo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=ul(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function ul(e,t){return Xo&&e===1&&!t.file?Ko(t.original,"spawn"):null}function BS(e,t){return Xo&&e===1&&!t.file?Ko(t.original,"spawnSync"):null}ll.exports={hookChildProcess:jS,verifyENOENT:ul,verifyENOENTSync:BS,notFoundError:Ko}});var ml=w((wL,Jt)=>{"use strict";var dl=require("child_process"),Jo=cl(),Qo=fl();function pl(e,t,r){let n=Jo(e,t,r),s=dl.spawn(n.command,n.args,n.options);return Qo.hookChildProcess(s,n),s}function US(e,t,r){let n=Jo(e,t,r),s=dl.spawnSync(n.command,n.args,n.options);return s.error=s.error||Qo.verifyENOENTSync(s.status,n),s}Jt.exports=pl;Jt.exports.spawn=pl;Jt.exports.sync=US;Jt.exports._parse=Jo;Jt.exports._enoent=Qo});var Yr=w((uG,Pm)=>{"use strict";var L0="2.0.0",N0=Number.MAX_SAFE_INTEGER||9007199254740991,P0=16,M0=250,F0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Pm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:P0,MAX_SAFE_BUILD_LENGTH:M0,MAX_SAFE_INTEGER:N0,RELEASE_TYPES:F0,SEMVER_SPEC_VERSION:L0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Xr=w((lG,Mm)=>{"use strict";var j0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Mm.exports=j0});var dr=w((ze,Fm)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:xa,MAX_SAFE_BUILD_LENGTH:B0,MAX_LENGTH:U0}=Yr(),G0=Xr();ze=Fm.exports={};var q0=ze.re=[],V0=ze.safeRe=[],S=ze.src=[],z0=ze.safeSrc=[],v=ze.t={},W0=0,Sa="[a-zA-Z0-9-]",H0=[["\\s",1],["\\d",U0],[Sa,B0]],Z0=e=>{for(let[t,r]of H0)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=Z0(t),s=W0++;G0(e,s,t),v[e]=s,S[s]=t,z0[s]=n,q0[s]=new RegExp(t,r?"g":void 0),V0[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sa}*`);A("MAINVERSION",`(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})\\.(${S[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})\\.(${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${S[v.NONNUMERICIDENTIFIER]}|${S[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${S[v.PRERELEASEIDENTIFIER]}(?:\\.${S[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${S[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Sa}+`);A("BUILD",`(?:\\+(${S[v.BUILDIDENTIFIER]}(?:\\.${S[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${S[v.MAINVERSION]}${S[v.PRERELEASE]}?${S[v.BUILD]}?`);A("FULL",`^${S[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${S[v.MAINVERSIONLOOSE]}${S[v.PRERELEASELOOSE]}?${S[v.BUILD]}?`);A("LOOSE",`^${S[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${S[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${S[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:\\.(${S[v.XRANGEIDENTIFIER]})(?:${S[v.PRERELEASE]})?${S[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[v.XRANGEIDENTIFIERLOOSE]})(?:${S[v.PRERELEASELOOSE]})?${S[v.BUILD]}?)?)?`);A("XRANGE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${S[v.GTLT]}\\s*${S[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${xa}})(?:\\.(\\d{1,${xa}}))?(?:\\.(\\d{1,${xa}}))?`);A("COERCE",`${S[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",S[v.COERCEPLAIN]+`(?:${S[v.PRERELEASE]})?(?:${S[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",S[v.COERCE],!0);A("COERCERTLFULL",S[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${S[v.LONETILDE]}\\s+`,!0);ze.tildeTrimReplace="$1~";A("TILDE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${S[v.LONETILDE]}${S[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${S[v.LONECARET]}\\s+`,!0);ze.caretTrimReplace="$1^";A("CARET",`^${S[v.LONECARET]}${S[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${S[v.LONECARET]}${S[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${S[v.GTLT]}\\s*(${S[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${S[v.GTLT]}\\s*(${S[v.LOOSEPLAIN]}|${S[v.XRANGEPLAIN]})`,!0);ze.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${S[v.XRANGEPLAIN]})\\s+-\\s+(${S[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${S[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ls=w((fG,jm)=>{"use strict";var Y0=Object.freeze({loose:!0}),X0=Object.freeze({}),K0=e=>e?typeof e!="object"?Y0:e:X0;jm.exports=K0});var va=w((dG,Gm)=>{"use strict";var Bm=/^[0-9]+$/,Um=(e,t)=>{let r=Bm.test(e),n=Bm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},J0=(e,t)=>Um(t,e);Gm.exports={compareIdentifiers:Um,rcompareIdentifiers:J0}});var te=w((pG,Vm)=>{"use strict";var Ns=Xr(),{MAX_LENGTH:qm,MAX_SAFE_INTEGER:Ps}=Yr(),{safeRe:Ms,t:Fs}=dr(),Q0=Ls(),{compareIdentifiers:pr}=va(),_a=class e{constructor(t,r){if(r=Q0(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>qm)throw new TypeError(`version is longer than ${qm} characters`);Ns("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Ms[Fs.LOOSE]:Ms[Fs.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ps||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ps||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ps||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<Ps)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Ns("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),pr(this.major,t.major)||pr(this.minor,t.minor)||pr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=t.prerelease[r];if(Ns("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return pr(n,s)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],s=t.build[r];if(Ns("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return pr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?Ms[Fs.PRERELEASELOOSE]:Ms[Fs.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),pr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Vm.exports=_a});var Ot=w((mG,Wm)=>{"use strict";var zm=te(),eO=(e,t,r=!1)=>{if(e instanceof zm)return e;try{return new zm(e,t)}catch(n){if(!r)return null;throw n}};Wm.exports=eO});var Zm=w((hG,Hm)=>{"use strict";var tO=Ot(),rO=(e,t)=>{let r=tO(e,t);return r?r.version:null};Hm.exports=rO});var Xm=w((gG,Ym)=>{"use strict";var nO=Ot(),sO=(e,t)=>{let r=nO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};Ym.exports=sO});var Qm=w((yG,Jm)=>{"use strict";var Km=te(),oO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new Km(e instanceof Km?e.version:e,r).inc(t,n,s).version}catch{return null}};Jm.exports=oO});var rh=w((bG,th)=>{"use strict";var eh=Ot(),iO=(e,t)=>{let r=eh(e,null,!0),n=eh(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};th.exports=iO});var sh=w((wG,nh)=>{"use strict";var aO=te(),cO=(e,t)=>new aO(e,t).major;nh.exports=cO});var ih=w((xG,oh)=>{"use strict";var uO=te(),lO=(e,t)=>new uO(e,t).minor;oh.exports=lO});var ch=w((SG,ah)=>{"use strict";var fO=te(),dO=(e,t)=>new fO(e,t).patch;ah.exports=dO});var lh=w((vG,uh)=>{"use strict";var pO=Ot(),mO=(e,t)=>{let r=pO(e,t);return r&&r.prerelease.length?r.prerelease:null};uh.exports=mO});var _e=w((_G,dh)=>{"use strict";var fh=te(),hO=(e,t,r)=>new fh(e,r).compare(new fh(t,r));dh.exports=hO});var mh=w((EG,ph)=>{"use strict";var gO=_e(),yO=(e,t,r)=>gO(t,e,r);ph.exports=yO});var gh=w((TG,hh)=>{"use strict";var bO=_e(),wO=(e,t)=>bO(e,t,!0);hh.exports=wO});var js=w((OG,bh)=>{"use strict";var yh=te(),xO=(e,t,r)=>{let n=new yh(e,r),s=new yh(t,r);return n.compare(s)||n.compareBuild(s)};bh.exports=xO});var xh=w((RG,wh)=>{"use strict";var SO=js(),vO=(e,t)=>e.sort((r,n)=>SO(r,n,t));wh.exports=vO});var vh=w((kG,Sh)=>{"use strict";var _O=js(),EO=(e,t)=>e.sort((r,n)=>_O(n,r,t));Sh.exports=EO});var Kr=w((CG,_h)=>{"use strict";var TO=_e(),OO=(e,t,r)=>TO(e,t,r)>0;_h.exports=OO});var Bs=w((AG,Eh)=>{"use strict";var RO=_e(),kO=(e,t,r)=>RO(e,t,r)<0;Eh.exports=kO});var Ea=w((IG,Th)=>{"use strict";var CO=_e(),AO=(e,t,r)=>CO(e,t,r)===0;Th.exports=AO});var Ta=w(($G,Oh)=>{"use strict";var IO=_e(),$O=(e,t,r)=>IO(e,t,r)!==0;Oh.exports=$O});var Us=w((DG,Rh)=>{"use strict";var DO=_e(),LO=(e,t,r)=>DO(e,t,r)>=0;Rh.exports=LO});var Gs=w((LG,kh)=>{"use strict";var NO=_e(),PO=(e,t,r)=>NO(e,t,r)<=0;kh.exports=PO});var Oa=w((NG,Ch)=>{"use strict";var MO=Ea(),FO=Ta(),jO=Kr(),BO=Us(),UO=Bs(),GO=Gs(),qO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return MO(e,r,n);case"!=":return FO(e,r,n);case">":return jO(e,r,n);case">=":return BO(e,r,n);case"<":return UO(e,r,n);case"<=":return GO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Ch.exports=qO});var Ih=w((PG,Ah)=>{"use strict";var VO=te(),zO=Ot(),{safeRe:qs,t:Vs}=dr(),WO=(e,t)=>{if(e instanceof VO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?qs[Vs.COERCEFULL]:qs[Vs.COERCE]);else{let c=t.includePrerelease?qs[Vs.COERCERTLFULL]:qs[Vs.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return zO(`${n}.${s}.${o}${i}${a}`,t)};Ah.exports=WO});var Dh=w((MG,$h)=>{"use strict";var Ra=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};$h.exports=Ra});var Ee=w((FG,Mh)=>{"use strict";var HO=/\s+/g,ka=class e{constructor(t,r){if(r=YO(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Ca)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(HO," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Nh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&rR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&eR)|(this.options.loose&&tR))+":"+t,s=Lh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[oe.HYPHENRANGELOOSE]:ue[oe.HYPHENRANGE];t=t.replace(i,dR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[oe.COMPARATORTRIM],KO),G("comparator trim",t),t=t.replace(ue[oe.TILDETRIM],JO),G("tilde trim",t),t=t.replace(ue[oe.CARETTRIM],QO),G("caret trim",t);let a=t.split(" ").map(f=>nR(f,this.options)).join(" ").split(/\s+/).map(f=>fR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[oe.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Ca(f,this.options));for(let f of u){if(Nh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Lh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Ph(n,r)&&t.set.some(s=>Ph(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new XO(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(pR(this.set[r],t,this.options))return!0;return!1}};Mh.exports=ka;var ZO=Dh(),Lh=new ZO,YO=Ls(),Ca=Jr(),G=Xr(),XO=te(),{safeRe:ue,t:oe,comparatorTrimReplace:KO,tildeTrimReplace:JO,caretTrimReplace:QO}=dr(),{FLAG_INCLUDE_PRERELEASE:eR,FLAG_LOOSE:tR}=Yr(),Nh=e=>e.value==="<0.0.0-0",rR=e=>e.value==="",Ph=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},nR=(e,t)=>(G("comp",e,t),e=iR(e,t),G("caret",e),e=sR(e,t),G("tildes",e),e=cR(e,t),G("xrange",e),e=lR(e,t),G("stars",e),e),ie=e=>!e||e.toLowerCase()==="x"||e==="*",sR=(e,t)=>e.trim().split(/\s+/).map(r=>oR(r,t)).join(" "),oR=(e,t)=>{let r=t.loose?ue[oe.TILDELOOSE]:ue[oe.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return ie(s)?c="":ie(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ie(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},iR=(e,t)=>e.trim().split(/\s+/).map(r=>aR(r,t)).join(" "),aR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[oe.CARETLOOSE]:ue[oe.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(s,o,i,a,c)=>{G("caret",e,s,o,i,a,c);let u;return ie(o)?u="":ie(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:ie(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},cR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>uR(r,t)).join(" ")),uR=(e,t)=>{e=e.trim();let r=t.loose?ue[oe.XRANGELOOSE]:ue[oe.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=ie(o),l=u||ie(i),f=l||ie(a),p=f;return s==="="&&p&&(s=""),c=t.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&p?(l&&(i=0),a=0,s===">"?(s=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):s==="<="&&(s="<",l?o=+o+1:i=+i+1),s==="<"&&(c="-0"),n=`${s+o}.${i}.${a}${c}`):l?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),G("xRange return",n),n})},lR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[oe.STAR],"")),fR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),dR=e=>(t,r,n,s,o,i,a,c,u,l,f,p)=>(ie(n)?r="":ie(s)?r=`>=${n}.0.0${e?"-0":""}`:ie(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,ie(u)?c="":ie(l)?c=`<${+u+1}.0.0-0`:ie(f)?c=`<${u}.${+l+1}.0-0`:p?c=`<=${u}.${l}.${f}-${p}`:e?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),pR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==Ca.ANY&&e[n].semver.prerelease.length>0){let s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}});var Jr=w((jG,qh)=>{"use strict";var Qr=Symbol("SemVer ANY"),$a=class e{static get ANY(){return Qr}constructor(t,r){if(r=Fh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Ia("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Qr?this.value="":this.value=this.operator+this.semver.version,Ia("comp",this)}parse(t){let r=this.options.loose?jh[Bh.COMPARATORLOOSE]:jh[Bh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Uh(n[2],this.options.loose):this.semver=Qr}toString(){return this.value}test(t){if(Ia("Comparator.test",t,this.options.loose),this.semver===Qr||t===Qr)return!0;if(typeof t=="string")try{t=new Uh(t,this.options)}catch{return!1}return Aa(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Gh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Gh(this.value,r).test(t.semver):(r=Fh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Aa(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Aa(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};qh.exports=$a;var Fh=Ls(),{safeRe:jh,t:Bh}=dr(),Aa=Oa(),Ia=Xr(),Uh=te(),Gh=Ee()});var en=w((BG,Vh)=>{"use strict";var mR=Ee(),hR=(e,t,r)=>{try{t=new mR(t,r)}catch{return!1}return t.test(e)};Vh.exports=hR});var Wh=w((UG,zh)=>{"use strict";var gR=Ee(),yR=(e,t)=>new gR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));zh.exports=yR});var Zh=w((GG,Hh)=>{"use strict";var bR=te(),wR=Ee(),xR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new wR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new bR(n,r))}),n};Hh.exports=xR});var Xh=w((qG,Yh)=>{"use strict";var SR=te(),vR=Ee(),_R=(e,t,r)=>{let n=null,s=null,o=null;try{o=new vR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new SR(n,r))}),n};Yh.exports=_R});var Qh=w((VG,Jh)=>{"use strict";var Da=te(),ER=Ee(),Kh=Kr(),TR=(e,t)=>{e=new ER(e,t);let r=new Da("0.0.0");if(e.test(r)||(r=new Da("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){let s=e.set[n],o=null;s.forEach(i=>{let a=new Da(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||Kh(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||Kh(r,o))&&(r=o)}return r&&e.test(r)?r:null};Jh.exports=TR});var tg=w((zG,eg)=>{"use strict";var OR=Ee(),RR=(e,t)=>{try{return new OR(e,t).range||"*"}catch{return null}};eg.exports=RR});var zs=w((WG,og)=>{"use strict";var kR=te(),sg=Jr(),{ANY:CR}=sg,AR=Ee(),IR=en(),rg=Kr(),ng=Bs(),$R=Gs(),DR=Us(),LR=(e,t,r,n)=>{e=new kR(e,n),t=new AR(t,n);let s,o,i,a,c;switch(r){case">":s=rg,o=$R,i=ng,a=">",c=">=";break;case"<":s=ng,o=DR,i=rg,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(IR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,p=null;if(l.forEach(d=>{d.semver===CR&&(d=new sg(">=0.0.0")),f=f||d,p=p||d,s(d.semver,f.semver,n)?f=d:i(d.semver,p.semver,n)&&(p=d)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&i(e,p.semver))return!1}return!0};og.exports=LR});var ag=w((HG,ig)=>{"use strict";var NR=zs(),PR=(e,t,r)=>NR(e,t,">",r);ig.exports=PR});var ug=w((ZG,cg)=>{"use strict";var MR=zs(),FR=(e,t,r)=>MR(e,t,"<",r);cg.exports=FR});var dg=w((YG,fg)=>{"use strict";var lg=Ee(),jR=(e,t,r)=>(e=new lg(e,r),t=new lg(t,r),e.intersects(t,r));fg.exports=jR});var mg=w((XG,pg)=>{"use strict";var BR=en(),UR=_e();pg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>UR(l,f,r));for(let l of i)BR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var xg=w((KG,wg)=>{"use strict";var hg=Ee(),Na=Jr(),{ANY:La}=Na,tn=en(),Pa=_e(),GR=(e,t,r={})=>{if(e===t)return!0;e=new hg(e,r),t=new hg(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=VR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},qR=[new Na(">=0.0.0-0")],gg=[new Na(">=0.0.0")],VR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===La){if(t.length===1&&t[0].semver===La)return!0;r.includePrerelease?e=qR:e=gg}if(t.length===1&&t[0].semver===La){if(r.includePrerelease)return!0;t=gg}let n=new Set,s,o;for(let d of e)d.operator===">"||d.operator===">="?s=yg(s,d,r):d.operator==="<"||d.operator==="<="?o=bg(o,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Pa(s.semver,o.semver,r),i>0)return null;if(i===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let d of n){if(s&&!tn(d,String(s),r)||o&&!tn(d,String(o),r))return null;for(let x of t)if(!tn(d,String(x),r))return!1;return!0}let a,c,u,l,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of t){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(a=yg(s,d,r),a===d&&a!==s)return!1}else if(s.operator===">="&&!tn(s.semver,String(d),r))return!1}if(o){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(c=bg(o,d,r),c===d&&c!==o)return!1}else if(o.operator==="<="&&!tn(o.semver,String(d),r))return!1}if(!d.operator&&(o||s)&&i!==0)return!1}return!(s&&u&&!o&&i!==0||o&&l&&!s&&i!==0||p||f)},yg=(e,t,r)=>{if(!e)return t;let n=Pa(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},bg=(e,t,r)=>{if(!e)return t;let n=Pa(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};wg.exports=GR});var Eg=w((JG,_g)=>{"use strict";var Ma=dr(),Sg=Yr(),zR=te(),vg=va(),WR=Ot(),HR=Zm(),ZR=Xm(),YR=Qm(),XR=rh(),KR=sh(),JR=ih(),QR=ch(),ek=lh(),tk=_e(),rk=mh(),nk=gh(),sk=js(),ok=xh(),ik=vh(),ak=Kr(),ck=Bs(),uk=Ea(),lk=Ta(),fk=Us(),dk=Gs(),pk=Oa(),mk=Ih(),hk=Jr(),gk=Ee(),yk=en(),bk=Wh(),wk=Zh(),xk=Xh(),Sk=Qh(),vk=tg(),_k=zs(),Ek=ag(),Tk=ug(),Ok=dg(),Rk=mg(),kk=xg();_g.exports={parse:WR,valid:HR,clean:ZR,inc:YR,diff:XR,major:KR,minor:JR,patch:QR,prerelease:ek,compare:tk,rcompare:rk,compareLoose:nk,compareBuild:sk,sort:ok,rsort:ik,gt:ak,lt:ck,eq:uk,neq:lk,gte:fk,lte:dk,cmp:pk,coerce:mk,Comparator:hk,Range:gk,satisfies:yk,toComparators:bk,maxSatisfying:wk,minSatisfying:xk,minVersion:Sk,validRange:vk,outside:_k,gtr:Ek,ltr:Tk,intersects:Ok,simplifyRange:Rk,subset:kk,SemVer:zR,re:Ma.re,src:Ma.src,tokens:Ma.t,SEMVER_SPEC_VERSION:Sg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Sg.RELEASE_TYPES,compareIdentifiers:vg.compareIdentifiers,rcompareIdentifiers:vg.rcompareIdentifiers}});var Fg=w((R9,Mg)=>{var vr=1e3,_r=vr*60,Er=_r*60,qt=Er*24,jC=qt*7,BC=qt*365.25;Mg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return UC(e);if(r==="number"&&isFinite(e))return t.long?qC(e):GC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function UC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*BC;case"weeks":case"week":case"w":return r*jC;case"days":case"day":case"d":return r*qt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Er;case"minutes":case"minute":case"mins":case"min":case"m":return r*_r;case"seconds":case"second":case"secs":case"sec":case"s":return r*vr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function GC(e){var t=Math.abs(e);return t>=qt?Math.round(e/qt)+"d":t>=Er?Math.round(e/Er)+"h":t>=_r?Math.round(e/_r)+"m":t>=vr?Math.round(e/vr)+"s":e+"ms"}function qC(e){var t=Math.abs(e);return t>=qt?Ks(e,t,qt,"day"):t>=Er?Ks(e,t,Er,"hour"):t>=_r?Ks(e,t,_r,"minute"):t>=vr?Ks(e,t,vr,"second"):e+" ms"}function Ks(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var Ua=w((k9,jg)=>{function VC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Fg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let p=0;p<l.length;p++)f=(f<<5)-f+l.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,p=null,d,x;function T(...P){if(!T.enabled)return;let M=T,j=Number(new Date),Y=j-(f||j);M.diff=Y,M.prev=f,M.curr=j,f=j,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(ce,Ce)=>{if(ce==="%%")return"%";X++;let Ae=r.formatters[Ce];if(typeof Ae=="function"){let xe=P[X];ce=Ae.call(M,xe),P.splice(X,1),X--}return ce}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return T.namespace=l,T.useColors=r.useColors(),T.color=r.selectColor(l),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==r.namespaces&&(d=r.namespaces,x=r.enabled(l)),x),set:P=>{p=P}}),typeof r.init=="function"&&r.init(T),T}function n(l,f){let p=r(this.namespace+(typeof f>"u"?":":f)+l);return p.log=this.log,p}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of f)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(l,f){let p=0,d=0,x=-1,T=0;for(;p<l.length;)if(d<f.length&&(f[d]===l[p]||f[d]==="*"))f[d]==="*"?(x=d,T=p,d++):(p++,d++);else if(x!==-1)d=x+1,T++,p=T;else return!1;for(;d<f.length&&f[d]==="*";)d++;return d===f.length}function i(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function a(l){for(let f of r.skips)if(o(l,f))return!1;for(let f of r.names)if(o(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}jg.exports=VC});var Bg=w((de,Js)=>{de.formatArgs=WC;de.save=HC;de.load=ZC;de.useColors=zC;de.storage=YC();de.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();de.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zC(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function WC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Js.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),e.splice(n,0,t)}de.log=console.debug||console.log||(()=>{});function HC(e){try{e?de.storage.setItem("debug",e):de.storage.removeItem("debug")}catch{}}function ZC(){let e;try{e=de.storage.getItem("debug")||de.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function YC(){try{return localStorage}catch{}}Js.exports=Ua()(de);var{formatters:XC}=Js.exports;XC.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Gg=w((C9,Ug)=>{"use strict";Ug.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}});var zg=w((A9,Vg)=>{"use strict";var KC=require("os"),qg=require("tty"),ke=Gg(),{env:J}=process,Qs;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?Qs=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(Qs=1);function JC(){if("FORCE_COLOR"in J)return J.FORCE_COLOR==="true"?1:J.FORCE_COLOR==="false"?0:J.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(J.FORCE_COLOR,10),3)}function QC(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function eA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=JC();n!==void 0&&(Qs=n);let s=r?Qs:n;if(s===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if(e&&!t&&s===void 0)return 0;let o=s||0;if(J.TERM==="dumb")return o;if(process.platform==="win32"){let i=KC.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in J)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(i=>i in J)||J.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in J)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(J.TEAMCITY_VERSION)?1:0;if(J.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in J){let i=Number.parseInt((J.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(J.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(J.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(J.TERM)||"COLORTERM"in J?1:o}function Ga(e,t={}){let r=eA(e,{streamIsTTY:e&&e.isTTY,...t});return QC(r)}Vg.exports={supportsColor:Ga,stdout:Ga({isTTY:qg.isatty(1)}),stderr:Ga({isTTY:qg.isatty(2)})}});var Hg=w((Q,to)=>{var tA=require("tty"),eo=require("util");Q.init=cA;Q.log=oA;Q.formatArgs=nA;Q.save=iA;Q.load=aA;Q.useColors=rA;Q.destroy=eo.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Q.colors=[6,2,3,4,5,1];try{let e=zg();e&&(e.stderr||e).level>=2&&(Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Q.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function rA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:tA.isatty(process.stderr.fd)}function nA(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
3
3
  `).join(`
4
- `+o),e.push(s+"m+"+so.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=cA()+t+" "+e[0]}function cA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function uA(...e){return process.stderr.write(no.formatWithOptions(Q.inspectOpts,...e)+`
5
- `)}function lA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function fA(){return process.env.DEBUG}function dA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}so.exports=Va()(Q);var{formatters:Xg}=so.exports;Xg.o=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts).split(`
6
- `).map(t=>t.trim()).join(" ")};Xg.O=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts)}});var Ha=x((F9,Wa)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Wa.exports=Vg():Wa.exports=Kg()});var Jg=x(ye=>{"use strict";var pA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var mA=require("fs"),hA=pA(Ha()),Or=hA.default("@kwsites/file-exists");function gA(e,t,r){Or("checking %s",e);try{let n=mA.statSync(e);return n.isFile()&&t?(Or("[OK] path represents a file"),!0):n.isDirectory()&&r?(Or("[OK] path represents a directory"),!0):(Or("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Or("[FAIL] path is not accessible: %o",n),!1;throw Or("[FATAL] %o",n),n}}function yA(e,t=ye.READABLE){return gA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=yA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var Qg=x(oo=>{"use strict";function bA(e){for(var t in e)oo.hasOwnProperty(t)||(oo[t]=e[t])}Object.defineProperty(oo,"__esModule",{value:!0});bA(Jg())});var Ya=x(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.createDeferred=zt.deferred=void 0;function Za(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}zt.deferred=Za;zt.createDeferred=Za;zt.default=Za});var jw=x((x3,jc)=>{var ko=process||{},Mw=ko.argv||[],Ro=ko.env||{},C$=!(Ro.NO_COLOR||Mw.includes("--no-color"))&&(!!Ro.FORCE_COLOR||Mw.includes("--color")||ko.platform==="win32"||(ko.stdout||{}).isTTY&&Ro.TERM!=="dumb"||!!Ro.CI),A$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+I$(s,t,r,o)+t:e+s+t},I$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},Fw=(e=C$)=>{let t=e?A$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};jc.exports=Fw();jc.exports.createColors=Fw});var Gw=x((v3,$$)=>{$$.exports={name:"@seed-design/codemod",version:"0.0.29",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.28",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^24.0.0","csv-parse":"^5.6.0",dotenv:"^16.5.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.27","@karrotmarket/react-multicolor-icon":"^0.0.18"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var zc=require("events");function Lo(e){return e==null?[]:Array.isArray(e)?e:[e]}function wx(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function xx(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let p=t.alias!==void 0,d=t.unknown!==void 0,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Lo(t.string),t.boolean=Lo(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Lo(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=d?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),d&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],d&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);wx(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Wc=e=>e.replace(/[<[].+/,"").trim(),Sx=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},vx=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},qc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Vc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,_x=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),Ex=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},Tx=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},Ox=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Hc=e=>e.split(".").map((t,r)=>r===0?_x(t):t).join("."),Ir=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},No=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Wc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Hc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},Rx=process.argv,kx=`${process.platform}-${process.arch} node-${process.version}`,Sn=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Wc(t),this.args=Sx(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new No(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof vn}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=qc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Vc(l.rawName,u.length)} ${l.description}`).join(`
4
+ `+o),e.push(s+"m+"+to.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=sA()+t+" "+e[0]}function sA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function oA(...e){return process.stderr.write(eo.formatWithOptions(Q.inspectOpts,...e)+`
5
+ `)}function iA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function aA(){return process.env.DEBUG}function cA(e){e.inspectOpts={};let t=Object.keys(Q.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Q.inspectOpts[t[r]]}to.exports=Ua()(Q);var{formatters:Wg}=to.exports;Wg.o=function(e){return this.inspectOpts.colors=this.useColors,eo.inspect(e,this.inspectOpts).split(`
6
+ `).map(t=>t.trim()).join(" ")};Wg.O=function(e){return this.inspectOpts.colors=this.useColors,eo.inspect(e,this.inspectOpts)}});var Va=w((I9,qa)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?qa.exports=Bg():qa.exports=Hg()});var Zg=w(ye=>{"use strict";var uA=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});var lA=require("fs"),fA=uA(Va()),Tr=fA.default("@kwsites/file-exists");function dA(e,t,r){Tr("checking %s",e);try{let n=lA.statSync(e);return n.isFile()&&t?(Tr("[OK] path represents a file"),!0):n.isDirectory()&&r?(Tr("[OK] path represents a directory"),!0):(Tr("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Tr("[FAIL] path is not accessible: %o",n),!1;throw Tr("[FATAL] %o",n),n}}function pA(e,t=ye.READABLE){return dA(e,(t&ye.FILE)>0,(t&ye.FOLDER)>0)}ye.exists=pA;ye.FILE=1;ye.FOLDER=2;ye.READABLE=ye.FILE+ye.FOLDER});var Yg=w(ro=>{"use strict";function mA(e){for(var t in e)ro.hasOwnProperty(t)||(ro[t]=e[t])}Object.defineProperty(ro,"__esModule",{value:!0});mA(Zg())});var Wa=w(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.createDeferred=Vt.deferred=void 0;function za(){let e,t,r="pending";return{promise:new Promise((s,o)=>{e=s,t=o}),done(s){r==="pending"&&(r="resolved",e(s))},fail(s){r==="pending"&&(r="rejected",t(s))},get fulfilled(){return r!=="pending"},get status(){return r}}}Vt.deferred=za;Vt.createDeferred=za;Vt.default=za});var Nw=w((f3,Nc)=>{var To=process||{},Dw=To.argv||[],Eo=To.env||{},_$=!(Eo.NO_COLOR||Dw.includes("--no-color"))&&(!!Eo.FORCE_COLOR||Dw.includes("--color")||To.platform==="win32"||(To.stdout||{}).isTTY&&Eo.TERM!=="dumb"||!!Eo.CI),E$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+T$(s,t,r,o)+t:e+s+t},T$=(e,t,r,n)=>{let s="",o=0;do s+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return s+e.substring(o)},Lw=(e=_$)=>{let t=e?E$:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Nc.exports=Lw();Nc.exports.createColors=Lw});var Fw=w((p3,O$)=>{O$.exports={name:"@seed-design/codemod",version:"0.0.30",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.30",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.35.0",execa:"^9.5.2",glob:"^11.0.2",jscodeshift:"^17.3.0",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.7.1","simple-git":"^3.27.0",winston:"^3.17.0",zod:"^3.24.3"},devDependencies:{"@types/jscodeshift":"^17.3.0","@types/node":"^24.0.0","csv-parse":"^6.0.0",dotenv:"^17.0.0",esbuild:"^0.25.3",typescript:"^5.8.3"},optionalDependencies:{"@karrotmarket/react-monochrome-icon":"^0.0.33","@karrotmarket/react-multicolor-icon":"^0.0.27"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Uc=require("events");function Io(e){return e==null?[]:Array.isArray(e)?e:[e]}function hx(e,t,r,n){var s,o=e[t],i=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((s=+r,s*0===0?s:r)),!!r):(s=+r,s*0===0?s:r);e[t]=o==null?i:Array.isArray(o)?o.concat(i):[o,i]}function gx(e,t){e=e||[],t=t||{};var r,n,s,o,i,a={_:[]},c=0,u=0,l=0,f=e.length;let p=t.alias!==void 0,d=t.unknown!==void 0,x=t.default!==void 0;if(t.alias=t.alias||{},t.string=Io(t.string),t.boolean=Io(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Io(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(x){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=d?Object.keys(t.alias):[];for(c=0;c<f;c++){if(s=e[c],s==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<s.length&&s.charCodeAt(u)===45;u++);if(u===0)a._.push(s);else if(s.substring(u,u+3)==="no-"){if(o=s.substring(u+3),d&&!~T.indexOf(o))return t.unknown(s);a[o]=!1}else{for(l=u+1;l<s.length&&s.charCodeAt(l)!==61;l++);for(o=s.substring(u,l),i=s.substring(++l)||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[o]:o,l=0;l<n.length;l++){if(o=n[l],d&&!~T.indexOf(o))return t.unknown("-".repeat(u)+o);hx(a,o,l+1<n.length||i,t)}}}if(x)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Gc=e=>e.replace(/[<[].+/,"").trim(),yx=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],s=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},o;for(;o=t.exec(e);)n.push(s(o));let i;for(;i=r.exec(e);)n.push(s(i));return n},bx=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},jc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Bc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,wx=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),xx=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},Sx=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},vx=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},qc=e=>e.split(".").map((t,r)=>r===0?wx(t):t).join("."),Ar=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},$o=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Gc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),qc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},_x=process.argv,Ex=`${process.platform}-${process.arch} node-${process.version}`,yn=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Gc(t),this.args=yx(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new $o(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof bn}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=jc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Bc(l.rawName,u.length)} ${l.description}`).join(`
7
7
  `)}),i.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${t}${l.name===""?"":` ${l.name}`} --help`).join(`
8
- `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=qc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Vc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
8
+ `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=jc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Bc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
9
9
  `)})}this.examples.length>0&&i.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(t):u).join(`
10
10
  `)}),o&&(i=o(i)||i),console.log(i.map(u=>u.title?`${u.title}:
11
11
  ${u.body}`:u.body).join(`
12
12
 
13
- `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${kx}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Ir(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Ir(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Ir(`option \`${s.rawName}\` value is missing`)}}}},vn=class extends Sn{constructor(t){super("@@global@@","",{},t)}},xn=Object.assign,Po=class extends zc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new vn(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new Sn(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=Rx,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Ox(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=xn(xn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=vx(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=xx(t,s);a=Object.keys(a).reduce((p,d)=>xn(xn({},p),{[Hc(d)]:a[d]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let p of n){if(!l&&p.config.default!==void 0)for(let d of p.names)u[d]=p.config.default;Array.isArray(p.config.type)&&f[p.name]===void 0&&(f[p.name]=Object.create(null),f[p.name].shouldTransform=!0,f[p.name].transformFunction=p.config.type[0])}for(let p of Object.keys(a))if(p!=="_"){let d=p.split(".");Ex(u,d,a[p]),Tx(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Zc=(e="")=>new Po(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Yc=require("node:url"),Yt=(e,t)=>{let r=Fo(Cx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Cx=e=>Mo(e)?e.toString():e,Mo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Fo=e=>e instanceof URL?(0,Yc.fileURLToPath)(e):e;var _n=(e,t=[],r={})=>{let n=Yt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var su=require("node:child_process");var Xc=require("node:string_decoder"),{toString:Kc}=Object.prototype,Jc=e=>Kc.call(e)==="[object ArrayBuffer]",K=e=>Kc.call(e)==="[object Uint8Array]",Je=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ax=new TextEncoder,Qc=e=>Ax.encode(e),Ix=new TextDecoder,En=e=>Ix.decode(e),eu=(e,t)=>$x(e,t).join(""),$x=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Xc.StringDecoder(t),n=e.map(o=>typeof o=="string"?Qc(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},$r=e=>e.length===1&&K(e[0])?e[0]:jo(Dx(e)),Dx=e=>e.map(t=>typeof t=="string"?Qc(t):t),jo=e=>{let t=new Uint8Array(Lx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},Lx=e=>{let t=0;for(let r of e)t+=r.length;return t};var ou=e=>Array.isArray(e)&&Array.isArray(e.raw),iu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=Nx({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},Nx=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=Px(s,e.raw[n]),c=ru(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>nu(f)):[nu(u)];return ru(c,l,a)},Px=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=tu.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(tu.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
- `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=Mx[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},tu=new Set([" "," ","\r",`
15
- `]),Mx={x:3,u:5},ru=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],nu=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return Fx(e);throw e instanceof su.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},Fx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return En(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var xp=require("node:child_process");var cu=require("node:util");var Tn=q(require("node:process"),1),De=e=>On.includes(e),On=[Tn.default.stdin,Tn.default.stdout,Tn.default.stderr],Se=["stdin","stdout","stderr"],Rn=e=>Se[e]??`stdio[${e}]`;var uu=e=>{let t={...e};for(let r of Go)t[r]=Bo(e,r);return t},Bo=(e,t)=>{let r=Array.from({length:jx(e)+1}),n=Bx(e[t],r,t);return zx(n,t)},jx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,Bx=(e,t,r)=>W(e)?Ux(e,t,r):t.fill(e),Ux=(e,t,r)=>{for(let n of Object.keys(e).sort(Gx))for(let s of qx(n,r,t))t[s]=e[n];return t},Gx=(e,t)=>au(e)<au(t)?1:-1,au=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,qx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Uo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
13
+ `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${Ex}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Ar(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Ar(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Ar(`option \`${s.rawName}\` value is missing`)}}}},bn=class extends yn{constructor(t){super("@@global@@","",{},t)}},gn=Object.assign,Do=class extends Uc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new bn(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new yn(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=_x,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?vx(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=gn(gn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=bx(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=gx(t,s);a=Object.keys(a).reduce((p,d)=>gn(gn({},p),{[qc(d)]:a[d]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let p of n){if(!l&&p.config.default!==void 0)for(let d of p.names)u[d]=p.config.default;Array.isArray(p.config.type)&&f[p.name]===void 0&&(f[p.name]=Object.create(null),f[p.name].shouldTransform=!0,f[p.name].transformFunction=p.config.type[0])}for(let p of Object.keys(a))if(p!=="_"){let d=p.split(".");xx(u,d,a[p]),Sx(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Vc=(e="")=>new Do(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var zc=require("node:url"),Zt=(e,t)=>{let r=No(Tx(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Tx=e=>Lo(e)?e.toString():e,Lo=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,No=e=>e instanceof URL?(0,zc.fileURLToPath)(e):e;var wn=(e,t=[],r={})=>{let n=Zt(e,"First argument"),[s,o]=W(t)?[[],t]:[t,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),a=i.find(c=>c.includes("\0"));if(a!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!W(o))throw new TypeError(`Last argument must be an options object: ${o}`);return[n,i,o]};var eu=require("node:child_process");var Wc=require("node:string_decoder"),{toString:Hc}=Object.prototype,Zc=e=>Hc.call(e)==="[object ArrayBuffer]",K=e=>Hc.call(e)==="[object Uint8Array]",Ke=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ox=new TextEncoder,Yc=e=>Ox.encode(e),Rx=new TextDecoder,xn=e=>Rx.decode(e),Xc=(e,t)=>kx(e,t).join(""),kx=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Wc.StringDecoder(t),n=e.map(o=>typeof o=="string"?Yc(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},Ir=e=>e.length===1&&K(e[0])?e[0]:Po(Cx(e)),Cx=e=>e.map(t=>typeof t=="string"?Yc(t):t),Po=e=>{let t=new Uint8Array(Ax(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},Ax=e=>{let t=0;for(let r of e)t+=r.length;return t};var tu=e=>Array.isArray(e)&&Array.isArray(e.raw),ru=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=Ix({templates:e,expressions:t,tokens:r,index:o,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...s]=r;return[n,s,{}]},Ix=({templates:e,expressions:t,tokens:r,index:n,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:o,leadingWhitespaces:i,trailingWhitespaces:a}=$x(s,e.raw[n]),c=Jc(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>Qc(f)):[Qc(u)];return Jc(c,l,a)},$x=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=Kc.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(Kc.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
+ `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=Dx[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},Kc=new Set([" "," ","\r",`
15
+ `]),Dx={x:3,u:5},Jc=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Qc=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return Lx(e);throw e instanceof eu.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},Lx=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return xn(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var gp=require("node:child_process");var su=require("node:util");var Sn=q(require("node:process"),1),$e=e=>vn.includes(e),vn=[Sn.default.stdin,Sn.default.stdout,Sn.default.stderr],Se=["stdin","stdout","stderr"],_n=e=>Se[e]??`stdio[${e}]`;var ou=e=>{let t={...e};for(let r of jo)t[r]=Mo(e,r);return t},Mo=(e,t)=>{let r=Array.from({length:Nx(e)+1}),n=Px(e[t],r,t);return Ux(n,t)},Nx=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Se.length):Se.length,Px=(e,t,r)=>W(e)?Mx(e,t,r):t.fill(e),Mx=(e,t,r)=>{for(let n of Object.keys(e).sort(Fx))for(let s of jx(n,r,t))t[s]=e[n];return t},Fx=(e,t)=>nu(e)<nu(t)?1:-1,nu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,jx=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Fo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
16
16
  It must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.
17
- Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Uo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Vx.exec(e);if(t!==null)return Number(t[1])},Vx=/^fd(\d+)$/,zx=(e,t)=>e.map(r=>r===void 0?Hx[t]:r),Wx=(0,cu.debuglog)("execa").enabled?"full":"none",Hx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Wx,stripFinalNewline:!0},Go=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Qe=(e,t)=>t==="ipc"?e.at(-1):e[t];var Xt=({verbose:e},t)=>qo(e,t)!=="none",Kt=({verbose:e},t)=>!["none","short"].includes(qo(e,t)),lu=({verbose:e},t)=>{let r=qo(e,t);return kn(r)?r:void 0},qo=(e,t)=>t===void 0?Zx(e):Qe(e,t),Zx=e=>e.find(t=>kn(t))??Cn.findLast(t=>e.includes(t)),kn=e=>typeof e=="function",Cn=["none","short","full"];var ku=require("node:util");var fu=require("node:process"),du=require("node:util"),pu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>eS(mu(o))).join(" ");return{command:n,escapedCommand:s}},Dr=e=>(0,du.stripVTControlCharacters)(e).split(`
18
- `).map(t=>mu(t)).join(`
19
- `),mu=e=>e.replaceAll(Kx,t=>Yx(t)),Yx=e=>{let t=Jx[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=Qx?`\\u${n.padStart(4,"0")}`:`\\U${n}`},Xx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Kx=Xx(),Jx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Qx=65535,eS=e=>tS.test(e)?e:fu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,tS=/^[\w./-]+$/;var Vo=q(require("node:process"),1);function zo(){let{env:e}=Vo.default,{TERM:t,TERM_PROGRAM:r}=e;return Vo.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var hu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},gu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},rS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},nS={...hu,...gu},sS={...hu,...rS},oS=zo(),iS=oS?nS:sS,An=iS,oD=Object.entries(gu);var xu=q(require("node:tty"),1),yu,bu,In,wu,aS=((wu=(In=(bu=(yu=xu.default)==null?void 0:yu.WriteStream)==null?void 0:bu.prototype)==null?void 0:In.hasColors)==null?void 0:wu.call(In))??!1,D=(e,t)=>{if(!aS)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},aD=D(0,0),Su=D(1,22),cD=D(2,22),uD=D(3,23),lD=D(4,24),fD=D(53,55),dD=D(7,27),pD=D(8,28),mD=D(9,29),hD=D(30,39),gD=D(31,39),yD=D(32,39),bD=D(33,39),wD=D(34,39),xD=D(35,39),SD=D(36,39),vD=D(37,39),$n=D(90,39),_D=D(40,49),ED=D(41,49),TD=D(42,49),OD=D(43,49),RD=D(44,49),kD=D(45,49),CD=D(46,49),AD=D(47,49),ID=D(100,49),vu=D(91,39),$D=D(92,39),_u=D(93,39),DD=D(94,39),LD=D(95,39),ND=D(96,39),PD=D(97,39),MD=D(101,49),FD=D(102,49),jD=D(103,49),BD=D(104,49),UD=D(105,49),GD=D(106,49),qD=D(107,49);var Ou=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=cS(r),c=uS[e]({failed:o,reject:i,piped:n}),u=lS[e]({reject:i});return`${$n(`[${a}]`)} ${$n(`[${s}]`)} ${u(c)} ${u(t)}`},cS=e=>`${Dn(e.getHours(),2)}:${Dn(e.getMinutes(),2)}:${Dn(e.getSeconds(),2)}.${Dn(e.getMilliseconds(),3)}`,Dn=(e,t)=>String(e).padStart(t,"0"),Eu=({failed:e,reject:t})=>e?t?An.cross:An.warning:An.tick,uS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Eu,duration:Eu},Tu=e=>e,lS={command:()=>Su,output:()=>Tu,ipc:()=>Tu,error:({reject:e})=>e?vu:_u,duration:()=>$n};var Ru=(e,t,r)=>{let n=lu(t,r);return e.map(({verboseLine:s,verboseObject:o})=>fS(s,o,n)).filter(s=>s!==void 0).map(s=>dS(s)).join("")},fS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},dS=e=>e.endsWith(`
17
+ Please set the "stdio" option to ensure that file descriptor exists.`);return n==="all"?[1,2]:[n]},Fo=e=>{if(e==="all")return e;if(Se.includes(e))return Se.indexOf(e);let t=Bx.exec(e);if(t!==null)return Number(t[1])},Bx=/^fd(\d+)$/,Ux=(e,t)=>e.map(r=>r===void 0?qx[t]:r),Gx=(0,su.debuglog)("execa").enabled?"full":"none",qx={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Gx,stripFinalNewline:!0},jo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Je=(e,t)=>t==="ipc"?e.at(-1):e[t];var Yt=({verbose:e},t)=>Bo(e,t)!=="none",Xt=({verbose:e},t)=>!["none","short"].includes(Bo(e,t)),iu=({verbose:e},t)=>{let r=Bo(e,t);return En(r)?r:void 0},Bo=(e,t)=>t===void 0?Vx(e):Je(e,t),Vx=e=>e.find(t=>En(t))??Tn.findLast(t=>e.includes(t)),En=e=>typeof e=="function",Tn=["none","short","full"];var Eu=require("node:util");var au=require("node:process"),cu=require("node:util"),uu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>Xx(lu(o))).join(" ");return{command:n,escapedCommand:s}},$r=e=>(0,cu.stripVTControlCharacters)(e).split(`
18
+ `).map(t=>lu(t)).join(`
19
+ `),lu=e=>e.replaceAll(Hx,t=>zx(t)),zx=e=>{let t=Zx[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=Yx?`\\u${n.padStart(4,"0")}`:`\\U${n}`},Wx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Hx=Wx(),Zx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Yx=65535,Xx=e=>Kx.test(e)?e:au.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Kx=/^[\w./-]+$/;var Uo=q(require("node:process"),1);function Go(){let{env:e}=Uo.default,{TERM:t,TERM_PROGRAM:r}=e;return Uo.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var fu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},du={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Jx={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Qx={...fu,...du},eS={...fu,...Jx},tS=Go(),rS=tS?Qx:eS,On=rS,Q$=Object.entries(du);var gu=q(require("node:tty"),1),pu,mu,Rn,hu,nS=((hu=(Rn=(mu=(pu=gu.default)==null?void 0:pu.WriteStream)==null?void 0:mu.prototype)==null?void 0:Rn.hasColors)==null?void 0:hu.call(Rn))??!1,D=(e,t)=>{if(!nS)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},tD=D(0,0),yu=D(1,22),rD=D(2,22),nD=D(3,23),sD=D(4,24),oD=D(53,55),iD=D(7,27),aD=D(8,28),cD=D(9,29),uD=D(30,39),lD=D(31,39),fD=D(32,39),dD=D(33,39),pD=D(34,39),mD=D(35,39),hD=D(36,39),gD=D(37,39),kn=D(90,39),yD=D(40,49),bD=D(41,49),wD=D(42,49),xD=D(43,49),SD=D(44,49),vD=D(45,49),_D=D(46,49),ED=D(47,49),TD=D(100,49),bu=D(91,39),OD=D(92,39),wu=D(93,39),RD=D(94,39),kD=D(95,39),CD=D(96,39),AD=D(97,39),ID=D(101,49),$D=D(102,49),DD=D(103,49),LD=D(104,49),ND=D(105,49),PD=D(106,49),MD=D(107,49);var vu=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=sS(r),c=oS[e]({failed:o,reject:i,piped:n}),u=iS[e]({reject:i});return`${kn(`[${a}]`)} ${kn(`[${s}]`)} ${u(c)} ${u(t)}`},sS=e=>`${Cn(e.getHours(),2)}:${Cn(e.getMinutes(),2)}:${Cn(e.getSeconds(),2)}.${Cn(e.getMilliseconds(),3)}`,Cn=(e,t)=>String(e).padStart(t,"0"),xu=({failed:e,reject:t})=>e?t?On.cross:On.warning:On.tick,oS={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:xu,duration:xu},Su=e=>e,iS={command:()=>yu,output:()=>Su,ipc:()=>Su,error:({reject:e})=>e?bu:wu,duration:()=>kn};var _u=(e,t,r)=>{let n=iu(t,r);return e.map(({verboseLine:s,verboseObject:o})=>aS(s,o,n)).filter(s=>s!==void 0).map(s=>cS(s)).join("")},aS=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},cS=e=>e.endsWith(`
20
20
  `)?e:`${e}
21
- `;var Be=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=pS({type:e,result:s,verboseInfo:n}),i=mS(t,o),a=Ru(i,n,r);a!==""&&console.warn(a.slice(0,-1))},pS=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),mS=(e,t)=>e.split(`
22
- `).map(r=>hS({...t,message:r})),hS=e=>({verboseLine:Ou(e),verboseObject:e}),Ln=e=>{let t=typeof e=="string"?e:(0,ku.inspect)(e);return Dr(t).replaceAll(" "," ".repeat(gS))},gS=2;var Cu=(e,t)=>{Xt(t)&&Be({type:"command",verboseMessage:e,verboseInfo:t})};var Au=(e,t,r)=>{wS(e);let n=yS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},yS=e=>Xt({verbose:e})?bS++:void 0,bS=0n,wS=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Cn.includes(t)&&!kn(t)){let r=Cn.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var Wo=require("node:process"),Nn=()=>Wo.hrtime.bigint(),Ho=e=>Number(Wo.hrtime.bigint()-e)/1e6;var Pn=(e,t,r)=>{let n=Nn(),{command:s,escapedCommand:o}=pu(e,t),i=Bo(r,"verbose"),a=Au(i,o,{...r});return Cu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var zf=q(require("node:path"),1),yi=q(require("node:process"),1),Wf=q(bl(),1);var Lr=q(require("node:process"),1),ct=q(require("node:path"),1);function Fn(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var wl=require("node:util"),si=require("node:child_process"),ni=q(require("node:path"),1),xl=require("node:url"),RL=(0,wl.promisify)(si.execFile);function jn(e){return e instanceof URL?(0,xl.fileURLToPath)(e):e}function Sl(e){return{*[Symbol.iterator](){let t=ni.default.resolve(jn(e)),r;for(;r!==t;)yield t,r=t,t=ni.default.resolve(t,"..")}}}var kL=10*1024*1024;var WS=({cwd:e=Lr.default.cwd(),path:t=Lr.default.env[Fn()],preferLocal:r=!0,execPath:n=Lr.default.execPath,addExecPath:s=!0}={})=>{let o=ct.default.resolve(jn(e)),i=[],a=t.split(ct.default.delimiter);return r&&HS(i,a,o),s&&ZS(i,a,n,o),t===""||t===ct.default.delimiter?`${i.join(ct.default.delimiter)}${t}`:[...i,t].join(ct.default.delimiter)},HS=(e,t,r)=>{for(let n of Sl(r)){let s=ct.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},ZS=(e,t,r,n)=>{let s=ct.default.resolve(n,jn(r),"..");t.includes(s)||e.push(s)},vl=({env:e=Lr.default.env,...t}={})=>{e={...e};let r=Fn({env:e});return t.path=e[r],e[r]=WS(t),e};var Fl=require("node:timers/promises");var _l=(e,t,r)=>{let n=r?Pr:Nr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},El=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Ol,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Tl=e=>Bn(e)&&Ol in e,Ol=Symbol("isExecaError"),Bn=e=>Object.prototype.toString.call(e)==="[object Error]",Nr=class extends Error{};El(Nr,Nr.name);var Pr=class extends Error{};El(Pr,Pr.name);var er=require("node:os");var $l=require("node:os");var Rl=()=>{let e=Cl-kl+1;return Array.from({length:e},YS)},YS=(e,t)=>({name:`SIGRT${t+1}`,number:kl+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),kl=34,Cl=64;var Il=require("node:os");var Al=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var oi=()=>{let e=Rl();return[...Al,...e].map(XS)},XS=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Il.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var KS=()=>{let e=oi();return Object.fromEntries(e.map(JS))},JS=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Dl=KS(),QS=()=>{let e=oi(),t=65,r=Array.from({length:t},(n,s)=>ev(s,e));return Object.assign({},...r)},ev=(e,t)=>{let r=tv(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},tv=(e,t)=>{let r=t.find(({name:n})=>$l.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},UL=QS();var Nl=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Ml(e,t)},Pl=e=>e===0?e:Ml(e,"`subprocess.kill()`'s argument"),Ml=(e,t)=>{if(Number.isInteger(e))return rv(e,t);if(typeof e=="string")return sv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
- ${ii()}`)},rv=(e,t)=>{if(Ll.has(e))return Ll.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
- ${ii()}`)},nv=()=>new Map(Object.entries(er.constants.signals).reverse().map(([e,t])=>[t,e])),Ll=nv(),sv=(e,t)=>{if(e in er.constants.signals)return e;throw e.toUpperCase()in er.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
- ${ii()}`)},ii=()=>`Available signal names: ${ov()}.
26
- Available signal numbers: ${iv()}.`,ov=()=>Object.keys(er.constants.signals).sort().map(e=>`'${e}'`).join(", "),iv=()=>[...new Set(Object.values(er.constants.signals).sort((e,t)=>e-t))].join(", "),Un=e=>Dl[e].description;var jl=e=>{if(e===!1)return e;if(e===!0)return av;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},av=1e3*5,Bl=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=cv(i,a,r);uv(u,n);let l=e(c);return lv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},cv=(e,t,r)=>{let[n=r,s]=Bn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Bn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:Pl(n),error:s}},uv=(e,t)=>{e!==void 0&&t.reject(e)},lv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&ai({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ai=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Fl.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var Ul=require("node:events"),Gn=async(e,t)=>{e.aborted||await(0,Ul.once)(e,"abort",{signal:t})};var Gl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},ql=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[fv(e,t,n,s)],fv=async(e,t,r,{signal:n})=>{throw await Gn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var _f=require("node:timers/promises");var Sf=require("node:util");var tr=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{dv(e,t,r),ci(e,t,n)},dv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ci=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ut(t)} has already exited or disconnected.`)},Vl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ut(e)} exited or disconnected.`)},zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is sending a message too, instead of listening to incoming messages.
21
+ `;var je=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=uS({type:e,result:s,verboseInfo:n}),i=lS(t,o),a=_u(i,n,r);a!==""&&console.warn(a.slice(0,-1))},uS=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:s=!1,...o}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:s,result:t,options:o}),lS=(e,t)=>e.split(`
22
+ `).map(r=>fS({...t,message:r})),fS=e=>({verboseLine:vu(e),verboseObject:e}),An=e=>{let t=typeof e=="string"?e:(0,Eu.inspect)(e);return $r(t).replaceAll(" "," ".repeat(dS))},dS=2;var Tu=(e,t)=>{Yt(t)&&je({type:"command",verboseMessage:e,verboseInfo:t})};var Ou=(e,t,r)=>{hS(e);let n=pS(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},pS=e=>Yt({verbose:e})?mS++:void 0,mS=0n,hS=e=>{for(let t of e){if(t===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Tn.includes(t)&&!En(t)){let r=Tn.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var qo=require("node:process"),In=()=>qo.hrtime.bigint(),Vo=e=>Number(qo.hrtime.bigint()-e)/1e6;var $n=(e,t,r)=>{let n=In(),{command:s,escapedCommand:o}=uu(e,t),i=Mo(r,"verbose"),a=Ou(i,o,{...r});return Tu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Uf=q(require("node:path"),1),mi=q(require("node:process"),1),Gf=q(ml(),1);var Dr=q(require("node:process"),1),at=q(require("node:path"),1);function Ln(e={}){let{env:t=process.env,platform:r=process.platform}=e;return r!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var hl=require("node:util"),ti=require("node:child_process"),ei=q(require("node:path"),1),gl=require("node:url"),SL=(0,hl.promisify)(ti.execFile);function Nn(e){return e instanceof URL?(0,gl.fileURLToPath)(e):e}function yl(e){return{*[Symbol.iterator](){let t=ei.default.resolve(Nn(e)),r;for(;r!==t;)yield t,r=t,t=ei.default.resolve(t,"..")}}}var vL=10*1024*1024;var GS=({cwd:e=Dr.default.cwd(),path:t=Dr.default.env[Ln()],preferLocal:r=!0,execPath:n=Dr.default.execPath,addExecPath:s=!0}={})=>{let o=at.default.resolve(Nn(e)),i=[],a=t.split(at.default.delimiter);return r&&qS(i,a,o),s&&VS(i,a,n,o),t===""||t===at.default.delimiter?`${i.join(at.default.delimiter)}${t}`:[...i,t].join(at.default.delimiter)},qS=(e,t,r)=>{for(let n of yl(r)){let s=at.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},VS=(e,t,r,n)=>{let s=at.default.resolve(n,Nn(r),"..");t.includes(s)||e.push(s)},bl=({env:e=Dr.default.env,...t}={})=>{e={...e};let r=Ln({env:e});return t.path=e[r],e[r]=GS(t),e};var Ll=require("node:timers/promises");var wl=(e,t,r)=>{let n=r?Nr:Lr,s=e instanceof De?{}:{cause:e};return new n(t,s)},De=class extends Error{},xl=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,vl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Sl=e=>Pn(e)&&vl in e,vl=Symbol("isExecaError"),Pn=e=>Object.prototype.toString.call(e)==="[object Error]",Lr=class extends Error{};xl(Lr,Lr.name);var Nr=class extends Error{};xl(Nr,Nr.name);var Qt=require("node:os");var kl=require("node:os");var _l=()=>{let e=Tl-El+1;return Array.from({length:e},zS)},zS=(e,t)=>({name:`SIGRT${t+1}`,number:El+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),El=34,Tl=64;var Rl=require("node:os");var Ol=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var ri=()=>{let e=_l();return[...Ol,...e].map(WS)},WS=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Rl.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var HS=()=>{let e=ri();return Object.fromEntries(e.map(ZS))},ZS=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Cl=HS(),YS=()=>{let e=ri(),t=65,r=Array.from({length:t},(n,s)=>XS(s,e));return Object.assign({},...r)},XS=(e,t)=>{let r=KS(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},KS=(e,t)=>{let r=t.find(({name:n})=>kl.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},NL=YS();var Il=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Dl(e,t)},$l=e=>e===0?e:Dl(e,"`subprocess.kill()`'s argument"),Dl=(e,t)=>{if(Number.isInteger(e))return JS(e,t);if(typeof e=="string")return ev(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
+ ${ni()}`)},JS=(e,t)=>{if(Al.has(e))return Al.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
+ ${ni()}`)},QS=()=>new Map(Object.entries(Qt.constants.signals).reverse().map(([e,t])=>[t,e])),Al=QS(),ev=(e,t)=>{if(e in Qt.constants.signals)return e;throw e.toUpperCase()in Qt.constants.signals?new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):new TypeError(`Invalid ${t} '${e}': this signal name does not exist.
25
+ ${ni()}`)},ni=()=>`Available signal names: ${tv()}.
26
+ Available signal numbers: ${rv()}.`,tv=()=>Object.keys(Qt.constants.signals).sort().map(e=>`'${e}'`).join(", "),rv=()=>[...new Set(Object.values(Qt.constants.signals).sort((e,t)=>e-t))].join(", "),Mn=e=>Cl[e].description;var Nl=e=>{if(e===!1)return e;if(e===!0)return nv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},nv=1e3*5,Pl=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=sv(i,a,r);ov(u,n);let l=e(c);return iv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},sv=(e,t,r)=>{let[n=r,s]=Pn(e)?[void 0,e]:[e,t];if(typeof n!="string"&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(s!==void 0&&!Pn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:$l(n),error:s}},ov=(e,t)=>{e!==void 0&&t.reject(e)},iv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&si({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},si=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Ll.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var Ml=require("node:events"),Fn=async(e,t)=>{e.aborted||await(0,Ml.once)(e,"abort",{signal:t})};var Fl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},jl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[av(e,t,n,s)],av=async(e,t,r,{signal:n})=>{throw await Fn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var wf=require("node:timers/promises");var yf=require("node:util");var er=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{cv(e,t,r),oi(e,t,n)},cv=(e,t,r)=>{if(!r)throw new Error(`${Le(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},oi=(e,t,r)=>{if(!r)throw new Error(`${Le(e,t)} cannot be used: the ${ct(t)} has already exited or disconnected.`)},Bl=e=>{throw new Error(`${Le("getOneMessage",e)} could not complete: the ${ct(e)} exited or disconnected.`)},Ul=e=>{throw new Error(`${Le("sendMessage",e)} failed: the ${ct(e)} is sending a message too, instead of listening to incoming messages.
27
27
  This can be fixed by both sending a message and listening to incoming messages at the same time:
28
28
 
29
29
  const [receivedMessage] = await Promise.all([
30
- ${Ne("getOneMessage",e)},
31
- ${Ne("sendMessage",e,"message, {strict: true}")},
32
- ]);`)},qn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ut(t)}.`,{cause:e}),Wl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} is not listening to incoming messages.`)},Hl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ut(e)} exited without listening to incoming messages.`)},Zl=()=>new Error(`\`cancelSignal\` aborted: the ${ut(!0)} disconnected.`),Yl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Xl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ut(r)} is disconnecting.`,{cause:e})},Kl=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(pv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},pv=({code:e,message:t})=>mv.has(e)||hv.some(r=>t.includes(r)),mv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),hv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${gv(t)}${e}(${r})`,gv=e=>e?"":"subprocess.",ut=e=>e?"parent process":"subprocess",rr=e=>{e.connected&&e.disconnect()};var Ue=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var zn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=Jl(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(Ql(o,t,n,!0));return i},nr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ge.get(e),o=Jl(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(Ql(o,t,n,!1));return i},Ge=new WeakMap,Jl=(e,t,r)=>{let n=yv(t,r);return bv(n,t,r,e),n},yv=(e,t)=>{let r=Uo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Mr(t)}" must not be "${e}".
30
+ ${Le("getOneMessage",e)},
31
+ ${Le("sendMessage",e,"message, {strict: true}")},
32
+ ]);`)},jn=(e,t)=>new Error(`${Le("sendMessage",t)} failed when sending an acknowledgment response to the ${ct(t)}.`,{cause:e}),Gl=e=>{throw new Error(`${Le("sendMessage",e)} failed: the ${ct(e)} is not listening to incoming messages.`)},ql=e=>{throw new Error(`${Le("sendMessage",e)} failed: the ${ct(e)} exited without listening to incoming messages.`)},Vl=()=>new Error(`\`cancelSignal\` aborted: the ${ct(!0)} disconnected.`),zl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Wl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Le(t,r)} cannot be used: the ${ct(r)} is disconnecting.`,{cause:e})},Hl=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(uv(e))throw new Error(`${Le(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},uv=({code:e,message:t})=>lv.has(e)||fv.some(r=>t.includes(r)),lv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),fv=["could not be cloned","circular structure","call stack size exceeded"],Le=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${dv(t)}${e}(${r})`,dv=e=>e?"":"subprocess.",ct=e=>e?"parent process":"subprocess",tr=e=>{e.connected&&e.disconnect()};var Be=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var Un=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=Zl(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(Yl(o,t,n,!0));return i},rr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=Zl(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(Yl(o,t,n,!1));return i},Ue=new WeakMap,Zl=(e,t,r)=>{let n=pv(t,r);return mv(n,t,r,e),n},pv=(e,t)=>{let r=Fo(e);if(r!==void 0)return r;let{validOptions:n,defaultValue:s}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Pr(t)}" must not be "${e}".
33
33
  It must be ${n} or "fd3", "fd4" (and so on).
34
- It is optional and defaults to "${s}".`)},bv=(e,t,r,n)=>{let s=n[ef(e)];if(s===void 0)throw new TypeError(`"${Mr(r)}" must not be ${t}. That file descriptor does not exist.
35
- Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Mr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ql=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=wv(e,r);return`The "${s}: ${Vn(o)}" option is incompatible with using "${Mr(n)}: ${Vn(t)}".
36
- Please set this option with "pipe" instead.`},wv=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=ef(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},ef=e=>e==="all"?1:e,Mr=e=>e?"to":"from",Vn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var mf=require("node:events");var tf=require("node:events"),St=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,tf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var pf=require("node:events");var sf=require("node:events"),of=require("node:timers/promises");var Wn=(e,t)=>{t&&ui(e)},ui=e=>{e.refCounted()},Hn=(e,t)=>{t&&li(e)},li=e=>{e.unrefCounted()},rf=(e,t)=>{t&&(li(e),li(e))},nf=(e,t)=>{t&&(ui(e),ui(e))};var af=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(lf(s)||df(s))return;Zn.has(e)||Zn.set(e,[]);let o=Zn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await ff(e,n,s),await of.scheduler.yield();let i=await uf({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},cf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{fi();let o=Zn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,sf.once)(n,"message:done");e.removeListener("message",s),nf(t,r),n.connected=!1,n.emit("disconnect")},Zn=new WeakMap;var lt=(e,t,r)=>{if(Yn.has(e))return Yn.get(e);let n=new pf.EventEmitter;return n.connected=!0,Yn.set(e,n),xv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Yn=new WeakMap,xv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=af.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",cf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),rf(r,n)},Xn=e=>{let t=Yn.get(e);return t===void 0?e.channel!==null:t.connected};var hf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=lt(e,t,r),i=Qn(e,o);return{id:Sv++,type:Jn,message:n,hasListeners:i}},Sv=0n,gf=(e,t)=>{if(!((t==null?void 0:t.type)!==Jn||t.hasListeners))for(let{id:r}of e)r!==void 0&&Kn[r].resolve({isDeadlock:!0,hasListeners:!1})},uf=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==Jn||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:bf,message:Qn(t,s)};try{await es({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},lf=e=>{var n;if((e==null?void 0:e.type)!==bf)return!1;let{id:t,message:r}=e;return(n=Kn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},yf=async(e,t,r)=>{if((e==null?void 0:e.type)!==Jn)return;let n=Ue();Kn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,vv(t,r,s)]);o&&zl(r),i||Wl(r)}finally{s.abort(),delete Kn[e.id]}},Kn={},vv=async(e,t,{signal:r})=>{St(e,1,r),await(0,mf.once)(e,"disconnect",{signal:r}),Hl(t)},Jn="execa:ipc:request",bf="execa:ipc:response";var wf=(e,t,r)=>{Fr.has(e)||Fr.set(e,new Set);let n=Fr.get(e),s=Ue(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},xf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},ff=async(e,t,r)=>{var n;for(;!Qn(e,t)&&((n=Fr.get(e))==null?void 0:n.size)>0;){let s=[...Fr.get(e)];gf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Fr=new WeakMap,Qn=(e,t)=>t.listenerCount("message")>_v(e),_v=e=>Ge.has(e)&&!Qe(Ge.get(e).options.buffer,"ipc")?1:0;var es=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return tr({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),Ev({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},Ev=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=hf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=wf(e,i,o);try{await pi({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw rr(e),c}finally{xf(a)}},pi=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Tv(e);try{await Promise.all([yf(n,e,r),o(n)])}catch(i){throw Xl({error:i,methodName:t,isSubprocess:r}),Kl({error:i,methodName:t,isSubprocess:r,message:s}),i}},Tv=e=>{if(di.has(e))return di.get(e);let t=(0,Sf.promisify)(e.send.bind(e));return di.set(e,t),t},di=new WeakMap;var Ef=(e,t)=>{let r="cancelSignal";return ci(r,!1,e.connected),pi({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:Of,message:t},message:t})},Tf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Ov({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),mi.signal),Ov=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!vf){if(vf=!0,!n){Yl();return}if(t===null){fi();return}lt(e,t,r),await _f.scheduler.yield()}},vf=!1,df=e=>(e==null?void 0:e.type)!==Of?!1:(mi.abort(e.message),!0),Of="execa:ipc:cancel",fi=()=>{mi.abort(Zl())},mi=new AbortController;var Rf=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},kf=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[Rv({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],Rv=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Gn(t,s);let o=kv(t);throw await Ef(e,o),ai({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},kv=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var Cf=require("node:timers/promises");var Af=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},If=(e,t,r,n)=>t===0||t===void 0?[]:[Cv(e,t,r,n)],Cv=async(e,t,r,{signal:n})=>{throw await(0,Cf.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ts=require("node:process"),hi=q(require("node:path"),1);var $f=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Df=(e,t,{node:r=!1,nodePath:n=ts.execPath,nodeOptions:s=ts.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Yt(n,'The "nodePath" option'),u=hi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(hi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Lf=require("node:v8"),Nf=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");$v[r](e)}},Av=e=>{try{(0,Lf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Iv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},$v={advanced:Av,json:Iv},Pf=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Ff=({encoding:e})=>{if(gi.has(e))return;let t=Lv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
37
- Please rename it to ${rs(t)}.`);let r=[...gi].map(n=>rs(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
38
- Please rename it to one of: ${r}.`)},Dv=new Set(["utf8","utf16le"]),he=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),gi=new Set([...Dv,...he]),Lv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in Mf)return Mf[t];if(gi.has(t))return t},Mf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},rs=e=>typeof e=="string"?`"${e}"`:String(e);var jf=require("node:fs"),Bf=q(require("node:path"),1),Uf=q(require("node:process"),1);var Gf=(e=qf())=>{let t=Yt(e,'The "cwd" option');return Bf.default.resolve(t)},qf=()=>{try{return Uf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
- ${e.message}`,e}},Vf=(e,t)=>{if(t===qf())return e;let r;try{r=(0,jf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
34
+ It is optional and defaults to "${s}".`)},mv=(e,t,r,n)=>{let s=n[Xl(e)];if(s===void 0)throw new TypeError(`"${Pr(r)}" must not be ${t}. That file descriptor does not exist.
35
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${Pr(r)}" must not be ${t}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${Pr(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Yl=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=hv(e,r);return`The "${s}: ${Bn(o)}" option is incompatible with using "${Pr(n)}: ${Bn(t)}".
36
+ Please set this option with "pipe" instead.`},hv=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=Xl(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},Xl=e=>e==="all"?1:e,Pr=e=>e?"to":"from",Bn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var lf=require("node:events");var Kl=require("node:events"),xt=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,Kl.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var uf=require("node:events");var ef=require("node:events"),tf=require("node:timers/promises");var Gn=(e,t)=>{t&&ii(e)},ii=e=>{e.refCounted()},qn=(e,t)=>{t&&ai(e)},ai=e=>{e.unrefCounted()},Jl=(e,t)=>{t&&(ai(e),ai(e))},Ql=(e,t)=>{t&&(ii(e),ii(e))};var rf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(of(s)||cf(s))return;Vn.has(e)||Vn.set(e,[]);let o=Vn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await af(e,n,s),await tf.scheduler.yield();let i=await sf({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},nf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{ci();let o=Vn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,ef.once)(n,"message:done");e.removeListener("message",s),Ql(t,r),n.connected=!1,n.emit("disconnect")},Vn=new WeakMap;var ut=(e,t,r)=>{if(zn.has(e))return zn.get(e);let n=new uf.EventEmitter;return n.connected=!0,zn.set(e,n),gv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},zn=new WeakMap,gv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=rf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",nf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),Jl(r,n)},Wn=e=>{let t=zn.get(e);return t===void 0?e.channel!==null:t.connected};var ff=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=ut(e,t,r),i=Yn(e,o);return{id:yv++,type:Zn,message:n,hasListeners:i}},yv=0n,df=(e,t)=>{if(!((t==null?void 0:t.type)!==Zn||t.hasListeners))for(let{id:r}of e)r!==void 0&&Hn[r].resolve({isDeadlock:!0,hasListeners:!1})},sf=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==Zn||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:mf,message:Yn(t,s)};try{await Xn({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},of=e=>{var n;if((e==null?void 0:e.type)!==mf)return!1;let{id:t,message:r}=e;return(n=Hn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},pf=async(e,t,r)=>{if((e==null?void 0:e.type)!==Zn)return;let n=Be();Hn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,bv(t,r,s)]);o&&Ul(r),i||Gl(r)}finally{s.abort(),delete Hn[e.id]}},Hn={},bv=async(e,t,{signal:r})=>{xt(e,1,r),await(0,lf.once)(e,"disconnect",{signal:r}),ql(t)},Zn="execa:ipc:request",mf="execa:ipc:response";var hf=(e,t,r)=>{Mr.has(e)||Mr.set(e,new Set);let n=Mr.get(e),s=Be(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},gf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},af=async(e,t,r)=>{var n;for(;!Yn(e,t)&&((n=Mr.get(e))==null?void 0:n.size)>0;){let s=[...Mr.get(e)];df(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Mr=new WeakMap,Yn=(e,t)=>t.listenerCount("message")>wv(e),wv=e=>Ue.has(e)&&!Je(Ue.get(e).options.buffer,"ipc")?1:0;var Xn=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return er({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),xv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},xv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=ff({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=hf(e,i,o);try{await li({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw tr(e),c}finally{gf(a)}},li=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Sv(e);try{await Promise.all([pf(n,e,r),o(n)])}catch(i){throw Wl({error:i,methodName:t,isSubprocess:r}),Hl({error:i,methodName:t,isSubprocess:r,message:s}),i}},Sv=e=>{if(ui.has(e))return ui.get(e);let t=(0,yf.promisify)(e.send.bind(e));return ui.set(e,t),t},ui=new WeakMap;var xf=(e,t)=>{let r="cancelSignal";return oi(r,!1,e.connected),li({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:vf,message:t},message:t})},Sf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await vv({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),fi.signal),vv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!bf){if(bf=!0,!n){zl();return}if(t===null){ci();return}ut(e,t,r),await wf.scheduler.yield()}},bf=!1,cf=e=>(e==null?void 0:e.type)!==vf?!1:(fi.abort(e.message),!0),vf="execa:ipc:cancel",ci=()=>{fi.abort(Vl())},fi=new AbortController;var _f=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},Ef=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[_v({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],_v=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Fn(t,s);let o=Ev(t);throw await xf(e,o),si({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},Ev=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var Tf=require("node:timers/promises");var Of=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Rf=(e,t,r,n)=>t===0||t===void 0?[]:[Tv(e,t,r,n)],Tv=async(e,t,r,{signal:n})=>{throw await(0,Tf.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new De};var Kn=require("node:process"),di=q(require("node:path"),1);var kf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Cf=(e,t,{node:r=!1,nodePath:n=Kn.execPath,nodeOptions:s=Kn.execArgv.filter(c=>!c.startsWith("--inspect")),cwd:o,execPath:i,...a})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=Zt(n,'The "nodePath" option'),u=di.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(di.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Af=require("node:v8"),If=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");kv[r](e)}},Ov=e=>{try{(0,Af.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Rv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},kv={advanced:Ov,json:Rv},$f=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Lf=({encoding:e})=>{if(pi.has(e))return;let t=Av(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${Jn(e)}\`.
37
+ Please rename it to ${Jn(t)}.`);let r=[...pi].map(n=>Jn(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Jn(e)}\`.
38
+ Please rename it to one of: ${r}.`)},Cv=new Set(["utf8","utf16le"]),ge=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),pi=new Set([...Cv,...ge]),Av=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in Df)return Df[t];if(pi.has(t))return t},Df={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Jn=e=>typeof e=="string"?`"${e}"`:String(e);var Nf=require("node:fs"),Pf=q(require("node:path"),1),Mf=q(require("node:process"),1);var Ff=(e=jf())=>{let t=Zt(e,'The "cwd" option');return Pf.default.resolve(t)},jf=()=>{try{return Mf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
+ ${e.message}`,e}},Bf=(e,t)=>{if(t===jf())return e;let r;try{r=(0,Nf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
40
40
  ${n.message}
41
41
  ${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.
42
- ${e}`};var ns=(e,t,r)=>{r.cwd=Gf(r.cwd);let[n,s,o]=Df(e,t,r),{command:i,args:a,options:c}=Wf.default._parse(n,s,o),u=uu(c),l=Nv(u);return Af(l),Ff(l),Nf(l),Gl(l),Rf(l),l.shell=Fo(l.shell),l.env=Pv(l),l.killSignal=Nl(l.killSignal),l.forceKillAfterDelay=jl(l.forceKillAfterDelay),l.lines=l.lines.map((f,p)=>f&&!he.has(l.encoding)&&l.buffer[p]),yi.default.platform==="win32"&&zf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},Nv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:p,ipc:d=p!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:p,ipc:d,serialization:b}),Pv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...yi.default.env,...e}:e;return r||n?vl({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var md=require("node:util");function sr(e){if(typeof e=="string")return Mv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Fv(e)}var Mv=e=>e.at(-1)===Hf?e.slice(0,e.at(-2)===Zf?-2:-1):e,Fv=e=>e.at(-1)===jv?e.subarray(0,e.at(-2)===Bv?-2:-1):e,Hf=`
43
- `,jv=Hf.codePointAt(0),Zf="\r",Bv=Zf.codePointAt(0);var id=require("node:events"),ad=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function bi(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function vt(e,{checkOpen:t=!0}={}){return Pe(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function wi(e,t){return bi(e,t)&&vt(e,t)}var Uv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),xi=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},Si=Symbol();function Yf(){return this[Si].next()}Object.defineProperty(Yf,"name",{value:"next"});function Xf(e){return this[Si].return(e)}Object.defineProperty(Xf,"name",{value:"return"});var Gv=Object.create(Uv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Yf},return:{enumerable:!0,configurable:!0,writable:!0,value:Xf}});function vi({preventCancel:e=!1}={}){let t=this.getReader(),r=new xi(t,e),n=Object.create(Gv);return n[Si]=r,n}var Kf=e=>{if(vt(e,{checkOpen:!1})&&jr.on!==void 0)return Vv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(qv.call(e)==="[object ReadableStream]")return vi.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:qv}=Object.prototype,Vv=async function*(e){let t=new AbortController,r={};zv(e,t,r);try{for await(let[n]of jr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},zv=async(e,t,r)=>{try{await jr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},jr={};var or=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Kf(e),l=t();l.length=0;try{for await(let f of u){let p=Hv(f),d=r[p](f,l);ed({convertedChunk:d,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Wv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let p=typeof f=="object"&&f!==null?f:new Error(f);throw p.bufferedData=a(l),p}},Wv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&ed({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},ed=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){Jf(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&Jf(c,t,s,o),new qe},Jf=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Hv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=Qf.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&Qf.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:Qf}=Object.prototype,qe=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var et=e=>e,Br=()=>{},ss=({contents:e})=>e,os=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},is=e=>e.length;async function as(e,t){return or(e,Kv,t)}var Zv=()=>({contents:[]}),Yv=()=>1,Xv=(e,{contents:t})=>(t.push(e),t),Kv={init:Zv,convertChunk:{string:et,buffer:et,arrayBuffer:et,dataView:et,typedArray:et,others:et},getSize:Yv,truncateChunk:Br,addChunk:Xv,getFinalChunk:Br,finalize:ss};async function cs(e,t){return or(e,i_,t)}var Jv=()=>({contents:new ArrayBuffer(0)}),Qv=e=>e_.encode(e),e_=new TextEncoder,td=e=>new Uint8Array(e),rd=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t_=(e,t)=>e.slice(0,t),r_=(e,{contents:t,length:r},n)=>{let s=od()?s_(t,n):n_(t,n);return new Uint8Array(s).set(e,r),s},n_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(sd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},s_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:sd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},sd=e=>nd**Math.ceil(Math.log(e)/Math.log(nd)),nd=2,o_=({contents:e,length:t})=>od()?e:e.slice(0,t),od=()=>"resize"in ArrayBuffer.prototype,i_={init:Jv,convertChunk:{string:Qv,buffer:td,arrayBuffer:td,dataView:rd,typedArray:rd,others:os},getSize:is,truncateChunk:t_,addChunk:r_,getFinalChunk:Br,finalize:o_};async function ls(e,t){return or(e,f_,t)}var a_=()=>({contents:"",textDecoder:new TextDecoder}),us=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),c_=(e,{contents:t})=>t+e,u_=(e,t)=>e.slice(0,t),l_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},f_={init:a_,convertChunk:{string:et,buffer:us,arrayBuffer:us,dataView:us,typedArray:us,others:os},getSize:is,truncateChunk:u_,addChunk:c_,getFinalChunk:l_,finalize:ss};Object.assign(jr,{on:id.on,finished:ad.finished});var cd=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof qe))throw e;if(o==="all")return e;let i=d_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},d_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",ud=(e,t,r)=>{if(t.length!==r)return;let n=new qe;throw n.maxBufferInfo={fdNumber:"ipc"},n},ld=(e,t)=>{let{streamName:r,threshold:n,unit:s}=p_(e,t);return`Command's ${r} was larger than ${n} ${s}`},p_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Qe(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Rn(r),threshold:s,unit:n}},fd=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>fs(r)),dd=(e,t,r)=>{if(!t)return e;let n=fs(r);return e.length>n?e.slice(0,n):e},fs=([,e])=>e;var hd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:b,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=m_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:b}),X=g_(n,M),we=X===void 0?"":`
44
- ${X}`,ce=`${Y}: ${a}${we}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>y_(xe)).join(`
45
- `)].map(xe=>Dr(sr(b_(xe)))).filter(Boolean).join(`
42
+ ${e}`};var Qn=(e,t,r)=>{r.cwd=Ff(r.cwd);let[n,s,o]=Cf(e,t,r),{command:i,args:a,options:c}=Gf.default._parse(n,s,o),u=ou(c),l=Iv(u);return Of(l),Lf(l),If(l),Fl(l),_f(l),l.shell=No(l.shell),l.env=$v(l),l.killSignal=Il(l.killSignal),l.forceKillAfterDelay=Nl(l.forceKillAfterDelay),l.lines=l.lines.map((f,p)=>f&&!ge.has(l.encoding)&&l.buffer[p]),mi.default.platform==="win32"&&Uf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},Iv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:p,ipc:d=p!==void 0||f,serialization:x="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:p,ipc:d,serialization:x}),$v=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...mi.default.env,...e}:e;return r||n?bl({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var es=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];var ld=require("node:util");function nr(e){if(typeof e=="string")return Dv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Lv(e)}var Dv=e=>e.at(-1)===qf?e.slice(0,e.at(-2)===Vf?-2:-1):e,Lv=e=>e.at(-1)===Nv?e.subarray(0,e.at(-2)===Pv?-2:-1):e,qf=`
43
+ `,Nv=qf.codePointAt(0),Vf="\r",Pv=Vf.codePointAt(0);var rd=require("node:events"),nd=require("node:stream/promises");function Ne(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function hi(e,{checkOpen:t=!0}={}){return Ne(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write=="function"&&typeof e.end=="function"&&typeof e.writable=="boolean"&&typeof e.writableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function St(e,{checkOpen:t=!0}={}){return Ne(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read=="function"&&typeof e.readable=="boolean"&&typeof e.readableObjectMode=="boolean"&&typeof e.destroy=="function"&&typeof e.destroyed=="boolean"}function gi(e,t){return hi(e,t)&&St(e,t)}var Mv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),yi=class{#t;#r;#e=!1;#n=void 0;constructor(t,r){this.#t=t,this.#r=r}next(){let t=()=>this.#o();return this.#n=this.#n?this.#n.then(t,t):t(),this.#n}return(t){let r=()=>this.#s(t);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let t;try{t=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return t.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),t}async#s(t){if(this.#e)return{done:!0,value:t};if(this.#e=!0,!this.#r){let r=this.#t.cancel(t);return this.#t.releaseLock(),await r,{done:!0,value:t}}return this.#t.releaseLock(),{done:!0,value:t}}},bi=Symbol();function zf(){return this[bi].next()}Object.defineProperty(zf,"name",{value:"next"});function Wf(e){return this[bi].return(e)}Object.defineProperty(Wf,"name",{value:"return"});var Fv=Object.create(Mv,{next:{enumerable:!0,configurable:!0,writable:!0,value:zf},return:{enumerable:!0,configurable:!0,writable:!0,value:Wf}});function wi({preventCancel:e=!1}={}){let t=this.getReader(),r=new yi(t,e),n=Object.create(Fv);return n[bi]=r,n}var Hf=e=>{if(St(e,{checkOpen:!1})&&Fr.on!==void 0)return Bv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(jv.call(e)==="[object ReadableStream]")return wi.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:jv}=Object.prototype,Bv=async function*(e){let t=new AbortController,r={};Uv(e,t,r);try{for await(let[n]of Fr.on(e,"data",{signal:t.signal}))yield n}catch(n){if(r.error!==void 0)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},Uv=async(e,t,r)=>{try{await Fr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},Fr={};var sr=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Hf(e),l=t();l.length=0;try{for await(let f of u){let p=qv(f),d=r[p](f,l);Xf({convertedChunk:d,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Gv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let p=typeof f=="object"&&f!==null?f:new Error(f);throw p.bufferedData=a(l),p}},Gv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&Xf({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},Xf=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){Zf(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&Zf(c,t,s,o),new Ge},Zf=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},qv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=Yf.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&Yf.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:Yf}=Object.prototype,Ge=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var Qe=e=>e,jr=()=>{},ts=({contents:e})=>e,rs=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},ns=e=>e.length;async function ss(e,t){return sr(e,Hv,t)}var Vv=()=>({contents:[]}),zv=()=>1,Wv=(e,{contents:t})=>(t.push(e),t),Hv={init:Vv,convertChunk:{string:Qe,buffer:Qe,arrayBuffer:Qe,dataView:Qe,typedArray:Qe,others:Qe},getSize:zv,truncateChunk:jr,addChunk:Wv,getFinalChunk:jr,finalize:ts};async function os(e,t){return sr(e,r_,t)}var Zv=()=>({contents:new ArrayBuffer(0)}),Yv=e=>Xv.encode(e),Xv=new TextEncoder,Kf=e=>new Uint8Array(e),Jf=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Kv=(e,t)=>e.slice(0,t),Jv=(e,{contents:t,length:r},n)=>{let s=td()?e_(t,n):Qv(t,n);return new Uint8Array(s).set(e,r),s},Qv=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(ed(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},e_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:ed(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},ed=e=>Qf**Math.ceil(Math.log(e)/Math.log(Qf)),Qf=2,t_=({contents:e,length:t})=>td()?e:e.slice(0,t),td=()=>"resize"in ArrayBuffer.prototype,r_={init:Zv,convertChunk:{string:Yv,buffer:Kf,arrayBuffer:Kf,dataView:Jf,typedArray:Jf,others:rs},getSize:ns,truncateChunk:Kv,addChunk:Jv,getFinalChunk:jr,finalize:t_};async function as(e,t){return sr(e,a_,t)}var n_=()=>({contents:"",textDecoder:new TextDecoder}),is=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),s_=(e,{contents:t})=>t+e,o_=(e,t)=>e.slice(0,t),i_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},a_={init:n_,convertChunk:{string:Qe,buffer:is,arrayBuffer:is,dataView:is,typedArray:is,others:rs},getSize:ns,truncateChunk:o_,addChunk:s_,getFinalChunk:i_,finalize:ts};Object.assign(Fr,{on:rd.on,finished:nd.finished});var sd=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof Ge))throw e;if(o==="all")return e;let i=c_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},c_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",od=(e,t,r)=>{if(t.length!==r)return;let n=new Ge;throw n.maxBufferInfo={fdNumber:"ipc"},n},id=(e,t)=>{let{streamName:r,threshold:n,unit:s}=u_(e,t);return`Command's ${r} was larger than ${n} ${s}`},u_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Je(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:_n(r),threshold:s,unit:n}},ad=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>cs(r)),cd=(e,t,r)=>{if(!t)return e;let n=cs(r);return e.length>n?e.slice(0,n):e},cs=([,e])=>e;var fd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:x,maxBuffer:T,timeout:P,cwd:M})=>{let j=n==null?void 0:n.code,Y=l_({originalError:n,timedOut:c,timeout:P,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:x}),X=d_(n,M),we=X===void 0?"":`
44
+ ${X}`,ce=`${Y}: ${a}${we}`,Ce=t===void 0?[e[2],e[1]]:[t],Ae=[ce,...Ce,...e.slice(3),r.map(xe=>p_(xe)).join(`
45
+ `)].map(xe=>$r(nr(m_(xe)))).filter(Boolean).join(`
46
46
 
47
- `);return{originalMessage:X,shortMessage:ce,message:Ie}},m_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:d})=>{let b=h_(f,p);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${ld(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${d} (${Un(d)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},h_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",g_=(e,t)=>{if(e instanceof Le)return;let r=Tl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Dr(Vf(r,t));return n===""?void 0:n},y_=e=>typeof e=="string"?e:(0,md.inspect)(e),b_=e=>Array.isArray(e)?e.map(t=>sr(pd(t))).filter(Boolean).join(`
48
- `):pd(e),pd=e=>typeof e=="string"?e:K(e)?En(e):"";var ds=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>gd({command:e,escapedCommand:t,cwd:o,durationMs:Ho(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),ir=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Ur({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),Ur=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:p,ipcOutput:d,options:{timeoutDuration:b,timeout:T=b,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ae}=x_(u,l),{originalMessage:Ie,shortMessage:xe,message:Ar}=hd({stdio:f,all:p,ipcOutput:d,originalError:e,signal:ce,signalDescription:Ae,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),xt=_l(e,Ar,X);return Object.assign(xt,w_({error:xt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ae,stdio:f,all:p,ipcOutput:d,cwd:j,originalMessage:Ie,shortMessage:xe})),xt},w_=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:p,all:d,ipcOutput:b,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return gd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Ho(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:b,pipedFrom:[]})},gd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),x_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Un(t);return{exitCode:r,signal:n,signalDescription:s}};var yd=e=>Number.isFinite(e)?e:0;function S_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(yd(e*1e3)%1e3),nanoseconds:Math.trunc(yd(e*1e6)%1e3)}}function v_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function _i(e){switch(typeof e){case"number":{if(Number.isFinite(e))return S_(e);break}case"bigint":return v_(e)}throw new TypeError("Expected a finite number or bigint")}var __=e=>e===0||e===0n,E_=(e,t)=>t===1||t===1n?e:`${e}s`,T_=1e-7,O_=24n*60n*60n*1000n;function Ei(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let p=Math.floor(l*10**f+T_);return(Math.round(p)/10**f).toFixed(f)},i=(l,f,p,d)=>{if(!((s.length===0||!t.colonNotation)&&__(l)&&!(t.colonNotation&&p==="m"))){if(d??=String(l),t.colonNotation){let b=d.includes(".")?d.split(".")[0].length:d.length,T=s.length>0?2:1;d="0".repeat(Math.max(0,T-b))+d}else d+=t.verbose?" "+E_(f,l):p;s.push(d)}},a=_i(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(p,"microsecond","\xB5s"),i(d,"nanosecond","ns");else{let b=f+p/1e3+d/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=b>=1?Math.round(b):Math.ceil(b),M=T?b.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%O_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,p=o(l,f),d=t.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");i(Number.parseFloat(d),"second","s",d)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var bd=(e,t)=>{e.failed&&Be({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var wd=(e,t)=>{Xt(t)&&(bd(e,t),R_(e,t))},R_=(e,t)=>{let r=`(done in ${Ei(e.durationMs)})`;Be({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ar=(e,t,{reject:r})=>{if(wd(e,t),e.failed&&r)throw e;return e};var $i=require("node:fs");var vd=(e,t)=>_t(e)?"asyncGenerator":Td(e)?"generator":ps(e)?"fileUrl":$_(e)?"filePath":N_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":P_(e)?"asyncIterable":M_(e)?"iterable":Ri(e)?_d({transform:e},t):I_(e)?k_(e,t):"native",k_=(e,t)=>wi(e.transform,{checkOpen:!1})?C_(e,t):Ri(e.transform)?_d(e,t):A_(e,t),C_=(e,t)=>(Ed(e,t,"Duplex stream"),"duplex"),_d=(e,t)=>(Ed(e,t,"web TransformStream"),"webTransform"),Ed=({final:e,binary:t,objectMode:r},n,s)=>{xd(e,`${n}.final`,s),xd(t,`${n}.binary`,s),Ti(r,`${n}.objectMode`)},xd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},A_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!Sd(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(wi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ri(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!Sd(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return Ti(r,`${s}.binary`),Ti(n,`${s}.objectMode`),_t(e)||_t(t)?"asyncGenerator":"generator"},Ti=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},Sd=e=>_t(e)||Td(e),_t=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Td=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",I_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),ps=e=>Object.prototype.toString.call(e)==="[object URL]",Od=e=>ps(e)&&e.protocol!=="file:",$_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>D_.has(t))&&Oi(e.file),D_=new Set(["file","append"]),Oi=e=>typeof e=="string",Rd=(e,t)=>e==="native"&&typeof t=="string"&&!L_.has(t),L_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),kd=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",ms=e=>Object.prototype.toString.call(e)==="[object WritableStream]",N_=e=>kd(e)||ms(e),Ri=e=>kd(e==null?void 0:e.readable)&&ms(e==null?void 0:e.writable),P_=e=>Cd(e)&&typeof e[Symbol.asyncIterator]=="function",M_=e=>Cd(e)&&typeof e[Symbol.iterator]=="function",Cd=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),hs=new Set(["fileUrl","filePath","fileNumber"]),ki=new Set(["fileUrl","filePath"]),Ad=new Set([...ki,"webStream","nodeStream"]),Id=new Set(["webTransform","duplex"]),ft={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var Ci=(e,t,r,n)=>n==="output"?F_(e,t,r):j_(e,t,r),F_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},j_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},$d=(e,t)=>{let r=e.findLast(({type:n})=>ve.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Dd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...B_(e,t,r,n)],B_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>ve.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=U_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return z_(o,r)},U_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?G_({stdioItem:e,optionName:s}):t==="webTransform"?q_({stdioItem:e,index:r,newTransforms:n,direction:o}):V_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),G_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},q_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ci(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},V_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||he.has(o),{writableObjectMode:p,readableObjectMode:d}=Ci(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:p,readableObjectMode:d}}},z_=(e,t)=>t==="input"?e.reverse():e;var gs=q(require("node:process"),1);var Ld=(e,t,r)=>{let n=e.map(s=>W_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??Y_},W_=({type:e,value:t},r)=>H_[r]??Nd[e](t),H_=["input","output","output"],cr=()=>{},Ai=()=>"input",Nd={generator:cr,asyncGenerator:cr,fileUrl:cr,filePath:cr,iterable:Ai,asyncIterable:Ai,uint8Array:Ai,webStream:e=>ms(e)?"output":"input",nodeStream(e){return vt(e,{checkOpen:!1})?bi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:cr,duplex:cr,native(e){let t=Z_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Nd.nodeStream(e)}},Z_=e=>{if([0,gs.default.stdin].includes(e))return"input";if([1,2,gs.default.stdout,gs.default.stderr].includes(e))return"output"},Y_="output";var Pd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Md=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=X_(e,n).map((a,c)=>Fd(a,c));return o?J_(i,r,s):Pd(i,t)},X_=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(K_(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Se.length);return Array.from({length:r},(n,s)=>e[s])},K_=e=>Se.some(t=>e[t]!==void 0),Fd=(e,t)=>Array.isArray(e)?e.map(r=>Fd(r,t)):e??(t>=Se.length?"ignore":"pipe"),J_=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Kt(r,s)&&Q_(n)?"ignore":n),Q_=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Bd=require("node:fs"),Ud=q(require("node:tty"),1);var Gd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?eE({stdioItem:e,fdNumber:n,direction:s}):nE({stdioItem:e,fdNumber:n}),eE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=tE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},tE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=rE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Ud.default.isatty(s))throw new TypeError(`The \`${t}: ${Vn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Je((0,Bd.readFileSync)(s)),optionName:t}}},rE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=On.indexOf(e);if(r!==-1)return r},nE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:jd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:jd(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,jd=(e,t,r)=>{let n=On[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var qd=({input:e,inputFile:t},r)=>r===0?[...sE(e),...iE(t)]:[],sE=e=>e===void 0?[]:[{type:oE(e),value:e,optionName:"input"}],oE=e=>{if(vt(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},iE=e=>e===void 0?[]:[{...aE(e),optionName:"inputFile"}],aE=e=>{if(ps(e))return{type:"fileUrl",value:e};if(Oi(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Vd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),zd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=cE(s,e);if(i.length!==0){if(o){uE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(Ad.has(e))return Wd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Id.has(e)&&fE({otherStdioItems:i,type:e,value:t,optionName:r})}},cE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),uE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{ki.has(t)&&Wd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Wd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>lE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Hd(i,n,t),s==="output"?o[0].stream:void 0},lE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,fE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Hd(s,n,t)},Hd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${ft[r]} that is the same.`)};var ys=(e,t,r,n)=>{let o=Md(t,r,n).map((a,c)=>dE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=xE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>_E(a)),i},dE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Rn(t),{stdioItems:o,isStdioArray:i}=pE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Ld(o,t,s),c=o.map(f=>Gd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Dd(c,s,a,r),l=$d(u,a);return wE(u,l),{direction:a,objectMode:l,stdioItems:u}},pE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>mE(c,n)),...qd(r,t)],i=Vd(o),a=i.length>1;return hE(i,a,n),yE(i),{stdioItems:i,isStdioArray:a}},mE=(e,t)=>({type:vd(e,t),value:e,optionName:t}),hE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(gE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},gE=new Set(["ignore","ipc"]),yE=e=>{for(let t of e)bE(t)},bE=({type:e,value:t,optionName:r})=>{if(Od(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Rd(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},wE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>hs.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},xE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(SE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Ii(s),o}},SE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>vE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},vE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=zd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Ii=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},_E=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Yd=(e,t)=>ys(TE,e,t,!0),Ve=({type:e,optionName:t})=>{Xd(t,ft[e])},EE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Xd(e,`"${t}"`),{}),Xd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Zd={generator(){},asyncGenerator:Ve,webStream:Ve,nodeStream:Ve,webTransform:Ve,duplex:Ve,asyncIterable:Ve,native:EE},TE={input:{...Zd,fileUrl:({value:e})=>({contents:[Je((0,$i.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Je((0,$i.readFileSync)(e))]}),fileNumber:Ve,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Zd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Ve,string:Ve,uint8Array:Ve}};var tt=(e,{stripFinalNewline:t},r)=>Di(t,r)&&e!==void 0&&!Array.isArray(e)?sr(e):e,Di=(e,t)=>t==="all"?e[1]||e[2]:e[t];var qr=require("node:stream");var bs=(e,t,r,n)=>e||r?void 0:Jd(t,n),Ni=(e,t,r)=>r?e.flatMap(n=>Kd(n,t)):Kd(e,t),Kd=(e,t)=>{let{transform:r,final:n}=Jd(t,{});return[...r(e),...n()]},Jd=(e,t)=>(t.previousChunks="",{transform:OE.bind(void 0,t,e),final:kE.bind(void 0,t)}),OE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
- `){let i=RE(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Li(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Li(n,r.slice(s+1))),e.previousChunks=n},RE=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),kE=function*({previousChunks:e}){e.length>0&&(yield e)},Qd=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:CE.bind(void 0,n)},CE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?AE:$E;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Li=(e,t)=>`${e}${t}`,AE={windowsNewline:`\r
47
+ `);return{originalMessage:X,shortMessage:ce,message:Ae}},l_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:d})=>{let x=f_(f,p);return t?`Command timed out after ${r} milliseconds${x}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${x}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${x}`:n?`${id(e,s)}${x}`:o!==void 0?`Command failed with ${o}${x}`:f?`Command was killed with ${d} (${Mn(d)})${x}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},f_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",d_=(e,t)=>{if(e instanceof De)return;let r=Sl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=$r(Bf(r,t));return n===""?void 0:n},p_=e=>typeof e=="string"?e:(0,ld.inspect)(e),m_=e=>Array.isArray(e)?e.map(t=>nr(ud(t))).filter(Boolean).join(`
48
+ `):ud(e),ud=e=>typeof e=="string"?e:K(e)?xn(e):"";var us=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>dd({command:e,escapedCommand:t,cwd:o,durationMs:Vo(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:s,pipedFrom:[]}),or=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:i})=>Br({error:e,command:t,escapedCommand:r,startTime:o,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:s,isSync:i}),Br=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:f,all:p,ipcOutput:d,options:{timeoutDuration:x,timeout:T=x,forceKillAfterDelay:P,killSignal:M,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:we,signal:ce,signalDescription:Ce}=g_(u,l),{originalMessage:Ae,shortMessage:xe,message:Cr}=fd({stdio:f,all:p,ipcOutput:d,originalError:e,signal:ce,signalDescription:Ce,exitCode:we,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:P,killSignal:M,maxBuffer:Y,timeout:T,cwd:j}),wt=wl(e,Cr,X);return Object.assign(wt,h_({error:wt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:we,signal:ce,signalDescription:Ce,stdio:f,all:p,ipcOutput:d,cwd:j,originalMessage:Ae,shortMessage:xe})),wt},h_=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:p,all:d,ipcOutput:x,cwd:T,originalMessage:P,shortMessage:M})=>{var j;return dd({shortMessage:M,originalMessage:P,command:t,escapedCommand:r,cwd:T,durationMs:Vo(n),failed:!0,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,code:(j=e.cause)==null?void 0:j.code,stdout:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:x,pipedFrom:[]})},dd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),g_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Mn(t);return{exitCode:r,signal:n,signalDescription:s}};var pd=e=>Number.isFinite(e)?e:0;function y_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(pd(e*1e3)%1e3),nanoseconds:Math.trunc(pd(e*1e6)%1e3)}}function b_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function xi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return y_(e);break}case"bigint":return b_(e)}throw new TypeError("Expected a finite number or bigint")}var w_=e=>e===0||e===0n,x_=(e,t)=>t===1||t===1n?e:`${e}s`,S_=1e-7,v_=24n*60n*60n*1000n;function Si(e,t){let r=typeof e=="bigint";if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};let n=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[],o=(l,f)=>{let p=Math.floor(l*10**f+S_);return(Math.round(p)/10**f).toFixed(f)},i=(l,f,p,d)=>{if(!((s.length===0||!t.colonNotation)&&w_(l)&&!(t.colonNotation&&p==="m"))){if(d??=String(l),t.colonNotation){let x=d.includes(".")?d.split(".")[0].length:d.length,T=s.length>0?2:1;d="0".repeat(Math.max(0,T-x))+d}else d+=t.verbose?" "+x_(f,l):p;s.push(d)}},a=xi(e),c=BigInt(a.days);if(t.hideYearAndDays?i(BigInt(c)*24n+BigInt(a.hours),"hour","h"):(t.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(a.hours),"hour","h")),i(Number(a.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){let l=Number(a.seconds),f=Number(a.milliseconds),p=Number(a.microseconds),d=Number(a.nanoseconds);if(i(l,"second","s"),t.formatSubMilliseconds)i(f,"millisecond","ms"),i(p,"microsecond","\xB5s"),i(d,"nanosecond","ns");else{let x=f+p/1e3+d/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,P=x>=1?Math.round(x):Math.ceil(x),M=T?x.toFixed(T):P;i(Number.parseFloat(M),"millisecond","ms",M)}}else{let l=(r?Number(e%v_):e)/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,p=o(l,f),d=t.keepDecimalsOnWholeSeconds?p:p.replace(/\.0+$/,"");i(Number.parseFloat(d),"second","s",d)}if(s.length===0)return n+"0"+(t.verbose?" milliseconds":"ms");let u=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),n+s.join(u)}var md=(e,t)=>{e.failed&&je({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var hd=(e,t)=>{Yt(t)&&(md(e,t),__(e,t))},__=(e,t)=>{let r=`(done in ${Si(e.durationMs)})`;je({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var ir=(e,t,{reject:r})=>{if(hd(e,t),e.failed&&r)throw e;return e};var Ci=require("node:fs");var bd=(e,t)=>vt(e)?"asyncGenerator":Sd(e)?"generator":ls(e)?"fileUrl":k_(e)?"filePath":I_(e)?"webStream":Ne(e,{checkOpen:!1})?"native":K(e)?"uint8Array":$_(e)?"asyncIterable":D_(e)?"iterable":Ei(e)?wd({transform:e},t):R_(e)?E_(e,t):"native",E_=(e,t)=>gi(e.transform,{checkOpen:!1})?T_(e,t):Ei(e.transform)?wd(e,t):O_(e,t),T_=(e,t)=>(xd(e,t,"Duplex stream"),"duplex"),wd=(e,t)=>(xd(e,t,"web TransformStream"),"webTransform"),xd=({final:e,binary:t,objectMode:r},n,s)=>{gd(e,`${n}.final`,s),gd(t,`${n}.binary`,s),vi(r,`${n}.objectMode`)},gd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},O_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!yd(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(gi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Ei(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!yd(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return vi(r,`${s}.binary`),vi(n,`${s}.objectMode`),vt(e)||vt(t)?"asyncGenerator":"generator"},vi=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},yd=e=>vt(e)||Sd(e),vt=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Sd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",R_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),ls=e=>Object.prototype.toString.call(e)==="[object URL]",vd=e=>ls(e)&&e.protocol!=="file:",k_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>C_.has(t))&&_i(e.file),C_=new Set(["file","append"]),_i=e=>typeof e=="string",_d=(e,t)=>e==="native"&&typeof t=="string"&&!A_.has(t),A_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Ed=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",fs=e=>Object.prototype.toString.call(e)==="[object WritableStream]",I_=e=>Ed(e)||fs(e),Ei=e=>Ed(e==null?void 0:e.readable)&&fs(e==null?void 0:e.writable),$_=e=>Td(e)&&typeof e[Symbol.asyncIterator]=="function",D_=e=>Td(e)&&typeof e[Symbol.iterator]=="function",Td=e=>typeof e=="object"&&e!==null,ve=new Set(["generator","asyncGenerator","duplex","webTransform"]),ds=new Set(["fileUrl","filePath","fileNumber"]),Ti=new Set(["fileUrl","filePath"]),Od=new Set([...Ti,"webStream","nodeStream"]),Rd=new Set(["webTransform","duplex"]),lt={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var Oi=(e,t,r,n)=>n==="output"?L_(e,t,r):N_(e,t,r),L_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},N_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},kd=(e,t)=>{let r=e.findLast(({type:n})=>ve.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Cd=(e,t,r,n)=>[...e.filter(({type:s})=>!ve.has(s)),...P_(e,t,r,n)],P_=(e,t,r,{encoding:n})=>{let s=e.filter(({type:i})=>ve.has(i)),o=Array.from({length:s.length});for(let[i,a]of Object.entries(s))o[i]=M_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return U_(o,r)},M_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?F_({stdioItem:e,optionName:s}):t==="webTransform"?j_({stdioItem:e,index:r,newTransforms:n,direction:o}):B_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),F_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},j_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Oi(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},B_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||ge.has(o),{writableObjectMode:p,readableObjectMode:d}=Oi(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:p,readableObjectMode:d}}},U_=(e,t)=>t==="input"?e.reverse():e;var ps=q(require("node:process"),1);var Ad=(e,t,r)=>{let n=e.map(s=>G_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??z_},G_=({type:e,value:t},r)=>q_[r]??Id[e](t),q_=["input","output","output"],ar=()=>{},Ri=()=>"input",Id={generator:ar,asyncGenerator:ar,fileUrl:ar,filePath:ar,iterable:Ri,asyncIterable:Ri,uint8Array:Ri,webStream:e=>fs(e)?"output":"input",nodeStream(e){return St(e,{checkOpen:!1})?hi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:ar,duplex:ar,native(e){let t=V_(e);if(t!==void 0)return t;if(Ne(e,{checkOpen:!1}))return Id.nodeStream(e)}},V_=e=>{if([0,ps.default.stdin].includes(e))return"input";if([1,2,ps.default.stdout,ps.default.stderr].includes(e))return"output"},z_="output";var $d=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var Dd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=W_(e,n).map((a,c)=>Ld(a,c));return o?Z_(i,r,s):$d(i,t)},W_=(e,t)=>{if(e===void 0)return Se.map(n=>t[n]);if(H_(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Se.length);return Array.from({length:r},(n,s)=>e[s])},H_=e=>Se.some(t=>e[t]!==void 0),Ld=(e,t)=>Array.isArray(e)?e.map(r=>Ld(r,t)):e??(t>=Se.length?"ignore":"pipe"),Z_=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Xt(r,s)&&Y_(n)?"ignore":n),Y_=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Pd=require("node:fs"),Md=q(require("node:tty"),1);var Fd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?X_({stdioItem:e,fdNumber:n,direction:s}):Q_({stdioItem:e,fdNumber:n}),X_=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=K_({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Ne(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},K_=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=J_(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(Md.default.isatty(s))throw new TypeError(`The \`${t}: ${Bn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Ke((0,Pd.readFileSync)(s)),optionName:t}}},J_=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=vn.indexOf(e);if(r!==-1)return r},Q_=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Nd(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Nd(t,t,r),optionName:r}:Ne(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Nd=(e,t,r)=>{let n=vn[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var jd=({input:e,inputFile:t},r)=>r===0?[...eE(e),...rE(t)]:[],eE=e=>e===void 0?[]:[{type:tE(e),value:e,optionName:"input"}],tE=e=>{if(St(e,{checkOpen:!1}))return"nodeStream";if(typeof e=="string")return"string";if(K(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},rE=e=>e===void 0?[]:[{...nE(e),optionName:"inputFile"}],nE=e=>{if(ls(e))return{type:"fileUrl",value:e};if(_i(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Bd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Ud=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=sE(s,e);if(i.length!==0){if(o){oE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if(Od.has(e))return Gd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Rd.has(e)&&aE({otherStdioItems:i,type:e,value:t,optionName:r})}},sE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map((s=>({...s,direction:r})))),oE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ti.has(t)&&Gd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Gd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>iE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return qd(i,n,t),s==="output"?o[0].stream:void 0},iE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,aE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);qd(s,n,t)},qd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${lt[r]} that is the same.`)};var ms=(e,t,r,n)=>{let o=Dd(t,r,n).map((a,c)=>cE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=gE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>wE(a)),i},cE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=_n(t),{stdioItems:o,isStdioArray:i}=uE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Ad(o,t,s),c=o.map(f=>Fd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Cd(c,s,a,r),l=kd(u,a);return hE(u,l),{direction:a,objectMode:l,stdioItems:u}},uE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>lE(c,n)),...jd(r,t)],i=Bd(o),a=i.length>1;return fE(i,a,n),pE(i),{stdioItems:i,isStdioArray:a}},lE=(e,t)=>({type:bd(e,t),value:e,optionName:t}),fE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(dE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},dE=new Set(["ignore","ipc"]),pE=e=>{for(let t of e)mE(t)},mE=({type:e,value:t,optionName:r})=>{if(vd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(_d(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},hE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>ds.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},gE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(yE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw ki(s),o}},yE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>bE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},bE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Ud({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},ki=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!$e(r)&&r.destroy()},wE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var zd=(e,t)=>ms(SE,e,t,!0),qe=({type:e,optionName:t})=>{Wd(t,lt[e])},xE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Wd(e,`"${t}"`),{}),Wd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Vd={generator(){},asyncGenerator:qe,webStream:qe,nodeStream:qe,webTransform:qe,duplex:qe,asyncIterable:qe,native:xE},SE={input:{...Vd,fileUrl:({value:e})=>({contents:[Ke((0,Ci.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Ke((0,Ci.readFileSync)(e))]}),fileNumber:qe,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Vd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:qe,string:qe,uint8Array:qe}};var et=(e,{stripFinalNewline:t},r)=>Ai(t,r)&&e!==void 0&&!Array.isArray(e)?nr(e):e,Ai=(e,t)=>t==="all"?e[1]||e[2]:e[t];var Gr=require("node:stream");var hs=(e,t,r,n)=>e||r?void 0:Zd(t,n),$i=(e,t,r)=>r?e.flatMap(n=>Hd(n,t)):Hd(e,t),Hd=(e,t)=>{let{transform:r,final:n}=Zd(t,{});return[...r(e),...n()]},Zd=(e,t)=>(t.previousChunks="",{transform:vE.bind(void 0,t,e),final:EE.bind(void 0,t)}),vE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
+ `){let i=_E(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Ii(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Ii(n,r.slice(s+1))),e.previousChunks=n},_E=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),EE=function*({previousChunks:e}){e.length>0&&(yield e)},Yd=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:TE.bind(void 0,n)},TE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?OE:kE;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Ii=(e,t)=>`${e}${t}`,OE={windowsNewline:`\r
51
51
  `,unixNewline:`
52
52
  `,LF:`
53
- `,concatBytes:Li},IE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},$E={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:IE};var ep=require("node:buffer");var tp=(e,t)=>e?void 0:DE.bind(void 0,t),DE=function*(e,t){if(typeof t!="string"&&!K(t)&&!ep.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},rp=(e,t)=>e?LE.bind(void 0,t):NE.bind(void 0,t),LE=function*(e,t){np(e,t),yield t},NE=function*(e,t){if(np(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},np=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
53
+ `,concatBytes:Ii},RE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},kE={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:RE};var Xd=require("node:buffer");var Kd=(e,t)=>e?void 0:CE.bind(void 0,t),CE=function*(e,t){if(typeof t!="string"&&!K(t)&&!Xd.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Jd=(e,t)=>e?AE.bind(void 0,t):IE.bind(void 0,t),AE=function*(e,t){Qd(e,t),yield t},IE=function*(e,t){if(Qd(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Qd=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
54
54
  Instead, \`yield\` should either be called with a value, or not be called at all. For example:
55
- if (condition) { yield value; }`)};var sp=require("node:buffer"),op=require("node:string_decoder");var ws=(e,t,r)=>{if(r)return;if(e)return{transform:PE.bind(void 0,new TextEncoder)};let n=new op.StringDecoder(t);return{transform:ME.bind(void 0,n),final:FE.bind(void 0,n)}},PE=function*(e,t){sp.Buffer.isBuffer(t)?yield Je(t):typeof t=="string"?yield e.encode(t):yield t},ME=function*(e,t){yield K(t)?e.write(t):t},FE=function*(e){let t=e.end();t!==""&&(yield t)};var Pi=require("node:util"),Mi=(0,Pi.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),xs=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=BE}=t[r];for await(let s of n(e))yield*xs(s,t,r+1)},ip=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*jE(r,Number(t),e)},jE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*xs(n,r,t+1)},ap=(0,Pi.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),BE=function*(e){yield e};var Fi=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},cp=(e,t)=>[...t.flatMap(r=>[...Et(r,e,0)]),...Gr(e)],Et=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=GE}=t[r];for(let s of n(e))yield*Et(s,t,r+1)},Gr=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*UE(r,Number(t),e)},UE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*Et(n,r,t+1)},GE=function*(e){yield e};var ji=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=up(e,i,o),u=_t(t),l=_t(r),f=u?Mi.bind(void 0,xs,a):Fi.bind(void 0,Et),p=u||l?Mi.bind(void 0,ip,a):Fi.bind(void 0,Gr),d=u||l?ap.bind(void 0,a):void 0;return{stream:new qr.Transform({writableObjectMode:n,writableHighWaterMark:(0,qr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,qr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){p([c],this,T)},destroy:d})}},Ss=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=up(i,r,a);e=cp(c,e)}return e},up=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:tp(n,a)},ws(r,i,n),bs(r,o,n,c),{transform:e,final:t},{transform:rp(s,a)},Qd({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var lp=(e,t)=>{for(let r of qE(e))VE(e,r,t)},qE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),VE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${ft[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>zE(a,n));r.input=$r(i)},zE=(e,t)=>{let r=Ss(e,t,"utf8",!0);return WE(r),$r(r)},WE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var _s=require("node:fs");var vs=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Kt(r,n)&&!he.has(t)&&HE(n)&&(e.some(({type:s,value:o})=>s==="native"&&ZE.has(o))||e.every(({type:s})=>ve.has(s))),HE=e=>e===1||e===2,ZE=new Set(["pipe","overlapped"]),fp=async(e,t,r,n)=>{for await(let s of e)YE(t)||pp(s,r,n)},dp=(e,t,r)=>{for(let n of e)pp(n,t,r)},YE=e=>e._readableState.pipes.length>0,pp=(e,t,r)=>{let n=Ln(e);Be({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var mp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>XE({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},XE=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let p=dd(e,o,f),d=Je(p),{stdioItems:b,objectMode:T}=t[r],P=KE([d],b,c,n),{serializedResult:M,finalResult:j=M}=JE({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});QE({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&eT(M,b,s),Y}catch(X){return n.error=X,Y}},KE=(e,t,r,n)=>{try{return Ss(e,t,r,!1)}catch(s){return n.error=s,e}},JE=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:$r(e)};let i=eu(e,r);return n[o]?{serializedResult:i,finalResult:Ni(i,!s[o],t)}:{serializedResult:i}},QE=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!vs({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Ni(e,!1,i);try{dp(a,t,n)}catch(c){r.error??=c}},eT=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>hs.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,_s.appendFileSync)(n,e):(r.add(o),(0,_s.writeFileSync)(n,e))}};var hp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,tt(t,r,"all")]:Array.isArray(t)?[tt(e,r,"all"),...t]:K(e)&&K(t)?jo([e,t]):`${e}${t}`};var Es=require("node:events");var gp=async(e,t)=>{let[r,n]=await tT(e);return t.isForcefullyTerminated??=!1,[r,n]},tT=async e=>{let[t,r]=await Promise.allSettled([(0,Es.once)(e,"spawn"),(0,Es.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?yp(e):r.value},yp=async e=>{try{return await(0,Es.once)(e,"exit")}catch{return yp(e)}},bp=async e=>{let[t,r]=await e;if(!rT(t,r)&&Bi(t,r))throw new Le;return[t,r]},rT=(e,t)=>e===void 0&&t===void 0,Bi=(e,t)=>e!==0||t!==null;var wp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=nT(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=fd(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},nT=(e,t,r)=>e!==void 0?e:Bi(t,r)?new Le:void 0;var Sp=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=sT(e,t,r),f=aT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ar(f,c,u)},sT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),a=oT(r),{file:c,commandArguments:u,options:l}=ns(e,t,a);iT(l);let f=Yd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},oT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,iT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Ts("ipcInput"),e&&Ts("ipc: true"),r&&Ts("detached: true"),n&&Ts("cancelSignal")},Ts=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},aT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=cT({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d}=wp(c,r),{output:b,error:T=u}=mp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:o}),P=b.map((j,Y)=>tt(j,r,Y)),M=tt(hp(b,r),r,"all");return lT({error:T,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},cT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{lp(o,r);let a=uT(r);return(0,xp.spawnSync)(e,t,a)}catch(a){return ir({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},uT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:fs(t)}),lT=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?ds({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Ur({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var Cm=require("node:events"),Am=require("node:child_process");var Gi=q(require("node:process"),1);var ur=require("node:events");var vp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(tr({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),fT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),fT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Wn(t,s);let o=lt(e,t,r),i=new AbortController;try{return await Promise.race([dT(o,n,i),pT(o,r,i),mT(o,r,i)])}catch(a){throw rr(e),a}finally{i.abort(),Hn(t,s)}},dT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ur.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ur.on)(e,"message",{signal:r}))if(t(n))return n},pT=async(e,t,{signal:r})=>{await(0,ur.once)(e,"disconnect",{signal:r}),Vl(t)},mT=async(e,t,{signal:r})=>{let[n]=await(0,ur.once)(e,"strict:error",{signal:r});throw qn(n,t)};var Vr=require("node:events");var Ep=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Ui({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Ui=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{tr({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),Wn(t,o);let i=lt(e,t,r),a=new AbortController,c={};return hT(e,i,a),gT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),yT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},hT=async(e,t,r)=>{try{await(0,Vr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},gT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Vr.once)(e,"strict:error",{signal:r.signal});n.error=qn(s,t),r.abort()}catch{}},yT=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,Vr.on)(r,"message",{signal:o.signal}))_p(i),yield c}catch{_p(i)}finally{o.abort(),Hn(t,a),n||rr(e),s&&await e}},_p=({error:e})=>{if(e)throw e};var Tp=(e,{ipc:t})=>{Object.assign(e,Rp(e,!1,t))},Op=()=>{let e=Gi.default,t=!0,r=Gi.default.channel!==void 0;return{...Rp(e,t,r),getCancelSignal:Tf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Rp=(e,t,r)=>({sendMessage:es.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:vp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Ep.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var kp=require("node:child_process"),dt=require("node:stream");var Cp=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Ii(n);let a=new kp.ChildProcess;bT(a,n),Object.assign(a,{readable:wT,writable:xT,duplex:ST});let c=ir({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=vT(c,i,s);return{subprocess:a,promise:u}},bT=(e,t)=>{let r=zr(),n=zr(),s=zr(),o=Array.from({length:t.length-3},zr),i=zr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},zr=()=>{let e=new dt.PassThrough;return e.end(),e},wT=()=>new dt.Readable({read(){}}),xT=()=>new dt.Writable({write(){}}),ST=()=>new dt.Duplex({read(){},write(){}}),vT=async(e,t,r)=>ar(e,t,r);var lr=require("node:fs"),Ip=require("node:buffer"),ze=require("node:stream");var $p=(e,t)=>ys(_T,e,t,!1),Wr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ft[e]}.`)},Ap={fileNumber:Wr,generator:ji,asyncGenerator:ji,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:ze.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},_T={input:{...Ap,fileUrl:({value:e})=>({stream:(0,lr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,lr.createReadStream)(e)}),webStream:({value:e})=>({stream:ze.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ze.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ze.Readable.from(e)}),string:({value:e})=>({stream:ze.Readable.from(e)}),uint8Array:({value:e})=>({stream:ze.Readable.from(Ip.Buffer.from(e))})},output:{...Ap,fileUrl:({value:e})=>({stream:(0,lr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,lr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ze.Writable.fromWeb(e)}),iterable:Wr,asyncIterable:Wr,string:Wr,uint8Array:Wr}};var Hr=require("node:events"),Rs=require("node:stream"),zi=require("node:stream/promises");function Tt(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Vi(s);let t=e.some(({readableObjectMode:s})=>s),r=ET(e,t),n=new qi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var ET=(e,t)=>{if(e.length===0)return(0,Rs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},qi=class extends Rs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Vi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=TT(this,this.#t,this.#o);let r=kT({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(Vi(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},TT=async(e,t,r)=>{Os(e,Dp);let n=new AbortController;try{await Promise.race([OT(e,n),RT(e,t,r,n)])}finally{n.abort(),Os(e,-Dp)}},OT=async(e,{signal:t})=>{try{await(0,zi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Np(e,r),r}},RT=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Hr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Vi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},kT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{Os(e,Lp);let a=new AbortController;try{await Promise.race([CT(o,t,a),AT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),IT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),Os(e,-Lp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?Wi(e):$T(e))},CT=async(e,t,{signal:r})=>{try{await e,r.aborted||Wi(t)}catch(n){r.aborted||Np(t,n)}},AT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,zi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;Pp(i)?s.add(t):Mp(e,i)}},IT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Hr.once)(e,s,{signal:o}),!e.readable)return(0,Hr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},$T=e=>{e.writable&&e.end()},Np=(e,t)=>{Pp(t)?Wi(e):Mp(e,t)},Pp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",Wi=e=>{(e.readable||e.writable)&&e.destroy()},Mp=(e,t)=>{e.destroyed||(e.once("error",DT),e.destroy(t))},DT=()=>{},Os=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dp=2,Lp=1;var Hi=require("node:stream/promises");var fr=(e,t)=>{e.pipe(t),LT(e,t),NT(e,t)},LT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Hi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Zi(t)}},Zi=e=>{e.writable&&e.end()},NT=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Hi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Yi(e)}},Yi=e=>{e.readable&&e.destroy()};var Fp=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>ve.has(c)))PT(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))FT({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:Tt(o);fr(i,s)}},PT=(e,t,r,n)=>{r==="output"?fr(e.stdio[n],t):fr(t,e.stdio[n]);let s=MT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},MT=["stdin","stdout","stderr"],FT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;jT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},jT=(e,{signal:t})=>{De(e)&&St(e,BT,t)},BT=2;var Bp=require("node:events");var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ks=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Xi=Symbol.for("signal-exit emitter"),Ki=globalThis,UT=Object.defineProperty.bind(Object),Ji=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ki[Xi])return Ki[Xi];UT(Ki,Xi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Cs=class{},GT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Qi=class extends Cs{onExit(){return()=>{}}load(){}unload(){}},ea=class extends Cs{#t=ta.platform==="win32"?"SIGINT":"SIGHUP";#r=new Ji;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Ot)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!ks(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Ot)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Ot.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return ks(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&ks(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},ta=globalThis.process,{onExit:jp,load:Aj,unload:Ij}=GT(ks(ta)?new ea(ta):new Qi);var Up=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=jp(()=>{e.kill()});(0,Bp.addAbortListener)(n,()=>{s()})};var qp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Nn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=qT(r,n,s),{sourceStream:f,sourceError:p}=zT(e,u),{options:d,fileDescriptors:b}=Ge.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},qT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=VT(e,t,...r),a=zn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},VT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Gp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Mo(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=_n(r,...n);return{destination:t(Gp)(s,o,i),pipeOptions:i}}if(Ge.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Gp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),zT=(e,t)=>{try{return{sourceStream:nr(e,t)}}catch(r){return{sourceError:r}}};var zp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=WT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw ra({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},WT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Yi(e),n;if(t!==void 0)return Zi(r),t},ra=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>ir({error:e,command:Vp,escapedCommand:Vp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Vp="source.pipe(destination)";var Wp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Hp=require("node:stream/promises");var Zp=(e,t,r)=>{let n=As.has(t)?ZT(e,t):HT(e,t);return St(e,XT,r.signal),St(t,KT,r.signal),YT(t),n},HT=(e,t)=>{let r=Tt([e]);return fr(r,t),As.set(t,r),r},ZT=(e,t)=>{let r=As.get(t);return r.add(e),r},YT=async e=>{try{await(0,Hp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}As.delete(e)},As=new WeakMap,XT=2,KT=1;var Yp=require("node:util");var Xp=(e,t)=>e===void 0?[]:[JT(e,t)],JT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Yp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw ra({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Is=(e,...t)=>{if(W(t[0]))return Is.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=qp(e,...t),s=QT({...n,destination:r});return s.pipe=Is.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},QT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=e0(e,s);zp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let p=Zp(t,o,f);return await Promise.race([Wp(l),...Xp(a,{sourceStream:t,mergedStream:p,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},e0=(e,t)=>Promise.allSettled([e,t]);var tm=require("node:timers/promises");var Jp=require("node:events"),Qp=require("node:stream");var $s=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return t0(t,i),em({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},t0=async(e,t)=>{try{await e}catch{}finally{t.abort()}},na=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;r0(t,i,e);let a=e.readableObjectMode&&!o;return em({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},r0=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},em=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,Jp.on)(e,"data",{signal:t.signal,highWaterMark:Kp,highWatermark:Kp});return n0({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},sa=(0,Qp.getDefaultHighWaterMark)(!0),Kp=sa,n0=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=s0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*Et(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Gr(a)}},s0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[ws(e,r,!t),bs(e,s,!n,{})].filter(Boolean);var rm=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=o0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([i0(e),f]);return}let p=Di(c,r),d=na({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:p,allMixed:a}),[b]=await Promise.all([a0({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},o0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!vs({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=na({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await fp(a,e,r,o)},i0=async e=>{await(0,tm.setImmediate)(),e.readableFlowing===null&&e.resume()},a0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await as(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await cs(r,{maxBuffer:o})):await ls(r,{maxBuffer:o})}catch(a){return nm(cd({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},oa=async e=>{try{return await e}catch(t){return nm(t)}},nm=({bufferedData:e})=>Jc(e)?new Uint8Array(e):e;var om=require("node:stream/promises"),Zr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=c0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,om.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||f0(a,t,r,n)}finally{i.abort()}},c0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&u0(e,r,n),n},u0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{l0(t,r),n.call(e,...s)}},l0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},f0=(e,t,r,n)=>{if(!d0(e,t,r,n))throw e},d0=(e,t,r,n=!0)=>r.propagating?sm(e)||Ds(e):(r.propagating=!0,ia(r,t)===n?sm(e):Ds(e)),ia=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ds=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",sm=e=>(e==null?void 0:e.code)==="EPIPE";var im=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>aa({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),aa=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Zr(e,t,u);if(ia(u,t)){await l;return}let[f]=await Promise.all([rm({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var am=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Tt([e,t].filter(Boolean)):void 0,cm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>aa({...p0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:m0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),p0=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},m0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var pm=require("node:events");var um=e=>Kt(e,"ipc"),lm=(e,t)=>{let r=Ln(e);Be({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var fm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=um(o),a=Qe(t,"ipc"),c=Qe(r,"ipc");for await(let u of Ui({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(ud(e,s,c),s.push(u)),i&&lm(u,o);return s},dm=async(e,t)=>(await Promise.allSettled([e]),t);var mm=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:p,verboseInfo:d,fileDescriptors:b,originalStreams:T,onInternalError:P,controller:M})=>{let j=gp(e,p),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=im({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),we=cm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),ce=[],Ae=fm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:d}),Ie=h0(T,e,Y),xe=g0(b,Y);try{return await Promise.race([Promise.all([{},bp(j),Promise.all(X),we,Ae,Pf(e,f),...Ie,...xe]),P,y0(e,M),...If(e,o,p,M),...ql({subprocess:e,cancelSignal:i,gracefulCancel:a,context:p,controller:M}),...kf({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:M})])}catch(Ar){return p.terminationReason??="other",Promise.all([{error:Ar},j,Promise.all(X.map(xt=>oa(xt))),oa(we),dm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},h0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Zr(n,s,r)),g0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Pe(o,{checkOpen:!1})&&!De(o)).map(({type:s,value:o,stream:i=o})=>Zr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),y0=async(e,{signal:t})=>{let[r]=await(0,pm.once)(e,"error",{signal:t});throw r};var hm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Yr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Ue();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},dr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var ym=require("node:stream"),bm=require("node:util");var ca=require("node:stream/promises");var ua=async e=>{if(e!==void 0)try{await la(e)}catch{}},gm=async e=>{if(e!==void 0)try{await fa(e)}catch{}},la=async e=>{await(0,ca.finished)(e,{cleanup:!0,readable:!1,writable:!0})},fa=async e=>{await(0,ca.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ls=async(e,t)=>{if(await e,t)throw t},Ns=(e,t,r)=>{r&&!Ds(r)?e.destroy(r):t&&e.destroy()};var wm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||he.has(r),{subprocessStdout:a,waitReadableDestroy:c}=da(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=pa(a,i),{read:p,onStdoutDataDone:d}=ma({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new ym.Readable({read:p,destroy:(0,bm.callbackify)(ga.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ha({subprocessStdout:a,onStdoutDataDone:d,readable:b,subprocess:e}),b},da=(e,t,r)=>{let n=nr(e,t),s=Yr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},pa=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:sa},ma=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Ue(),i=$s({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){b0(this,i,o)},onStdoutDataDone:o}},b0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ha=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await fa(e),await n,await ua(s),await t,r.readable&&r.push(null)}catch(o){await ua(s),xm(r,o)}},ga=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await dr(r,t)&&(xm(e,n),await Ls(t,n))},xm=(e,t)=>{Ns(e,e.readable,t)};var Sm=require("node:stream"),ya=require("node:util");var vm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=ba(e,r,t),i=new Sm.Writable({...wa(n,e,s),destroy:(0,ya.callbackify)(Sa.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return xa(n,i),i},ba=(e,t,r)=>{let n=zn(e,t),s=Yr(r,n,"writableFinal"),o=Yr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},wa=(e,t,r)=>({write:w0.bind(void 0,e),final:(0,ya.callbackify)(x0.bind(void 0,e,t,r))}),w0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},x0=async(e,t,r)=>{await dr(r,t)&&(e.writable&&e.end(),await t)},xa=async(e,t,r)=>{try{await la(e),t.writable&&t.end()}catch(n){await gm(r),_m(t,n)}},Sa=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await dr(r,t),await dr(n,t)&&(_m(e,s),await Ls(t,s))},_m=(e,t)=>{Ns(e,e.writable,t)};var Em=require("node:stream"),Tm=require("node:util");var Om=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||he.has(r),{subprocessStdout:c,waitReadableDestroy:u}=da(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:p}=ba(e,s,t),{readableEncoding:d,readableObjectMode:b,readableHighWaterMark:T}=pa(c,a),{read:P,onStdoutDataDone:M}=ma({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Em.Duplex({read:P,...wa(l,e,f),destroy:(0,Tm.callbackify)(S0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:d});return ha({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),xa(l,j,c),j},S0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([ga({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),Sa({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var va=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||he.has(t),i=nr(e,r),a=$s({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return v0(a,i,e)},v0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Rm=(e,{encoding:t})=>{let r=hm();e.readable=wm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=vm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Om.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=va.bind(void 0,e,t),e[Symbol.asyncIterator]=va.bind(void 0,e,t,{})};var km=(e,t)=>{for(let[r,n]of E0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},_0=(async()=>{})().constructor.prototype,E0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(_0,e)]);var Im=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=T0(e,t,r),{subprocess:p,promise:d}=R0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return p.pipe=Is.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),km(p,d),Ge.set(p,{options:l,fileDescriptors:f}),p},T0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),{file:a,commandArguments:c,options:u}=ns(e,t,r),l=O0(u),f=$p(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},O0=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},R0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,Am.spawn)(e,t,r)}catch(b){return Cp({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Cm.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Fp(c,a,u),Up(c,r,u);let f={},p=Ue();c.kill=Bl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:u}),c.all=am(c,r),Rm(c,r),Tp(c,r);let d=k0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:p,controller:u});return{subprocess:c,promise:d}},k0=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[p,d],b,T,P]=await mm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=b.map((X,we)=>tt(X,t,we)),j=tt(T,t,"all"),Y=C0({errorInfo:f,exitCode:p,signal:d,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ar(Y,n,t)},C0=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?Ur({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof qe,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ds({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Ps=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,A0(n,e[n],s)]));return{...e,...r}},A0=(e,t,r)=>I0.has(e)&&W(t)&&W(r)?{...t,...r}:r,I0=new Set(["env",...Go]);var pt=(e,t,r,n)=>{let s=(i,a,c)=>pt(i,a,r,c),o=(...i)=>$0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},$0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Ps(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=D0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?Sp(a,c,u):Im(a,c,u,s)},D0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=ou(t)?iu(t,r):[t,...r],[i,a,c]=_n(...o),u=Ps(Ps(n,s),c),{file:l=i,commandArguments:f=a,options:p=u,isSync:d=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:p,isSync:d}};var $m=({file:e,commandArguments:t})=>Lm(e,t),Dm=({file:e,commandArguments:t})=>({...Lm(e,t),isSync:!0}),Lm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=L0(e);return{file:r,commandArguments:n}},L0=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(N0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},N0=/ +/g;var Nm=(e,t,r)=>{e.sync=t(P0,r),e.s=e.sync},Pm=({options:e})=>Mm(e),P0=({options:e})=>({...Mm(e),isSync:!0}),Mm=e=>({options:{...M0(e),...e}}),M0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Fm={preferLocal:!0};var jm=pt(()=>({})),rG=pt(()=>({isSync:!0})),nG=pt($m),sG=pt(Dm),oG=pt($f),iG=pt(Pm,{},Fm,Nm),{sendMessage:aG,getOneMessage:cG,getEachMessage:uG,getCancelSignal:lG}=Op();var Vw=require("fs"),Ao=require("path"),Io=q(kg());var Fe={};yx(Fe,{BRAND:()=>sC,DIRTY:()=>kt,EMPTY_PATH:()=>Pk,INVALID:()=>O,NEVER:()=>GC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>gt,ZodArray:()=>ot,ZodBigInt:()=>At,ZodBoolean:()=>It,ZodBranded:()=>sn,ZodCatch:()=>Gt,ZodDate:()=>$t,ZodDefault:()=>Ut,ZodDiscriminatedUnion:()=>Ks,ZodEffects:()=>Re,ZodEnum:()=>jt,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>Qs,ZodIntersection:()=>Pt,ZodIssueCode:()=>m,ZodLazy:()=>Mt,ZodLiteral:()=>Ft,ZodMap:()=>xr,ZodNaN:()=>vr,ZodNativeEnum:()=>Bt,ZodNever:()=>Me,ZodNull:()=>Lt,ZodNullable:()=>Ye,ZodNumber:()=>Ct,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>w,ZodPipeline:()=>on,ZodPromise:()=>yt,ZodReadonly:()=>qt,ZodRecord:()=>Js,ZodSchema:()=>L,ZodSet:()=>Sr,ZodString:()=>ht,ZodSymbol:()=>br,ZodTransformer:()=>Re,ZodTuple:()=>Ze,ZodType:()=>L,ZodUndefined:()=>Dt,ZodUnion:()=>Nt,ZodUnknown:()=>st,ZodVoid:()=>wr,addIssueToContext:()=>y,any:()=>pC,array:()=>yC,bigint:()=>cC,boolean:()=>jg,coerce:()=>UC,custom:()=>Pg,date:()=>uC,datetimeRegex:()=>Lg,defaultErrorMap:()=>rt,discriminatedUnion:()=>SC,effect:()=>DC,enum:()=>AC,function:()=>RC,getErrorMap:()=>hr,getParsedType:()=>He,instanceof:()=>iC,intersection:()=>vC,isAborted:()=>Ys,isAsync:()=>gr,isDirty:()=>Xs,isValid:()=>mt,late:()=>oC,lazy:()=>kC,literal:()=>CC,makeIssue:()=>nn,map:()=>TC,nan:()=>aC,nativeEnum:()=>IC,never:()=>hC,null:()=>dC,nullable:()=>NC,number:()=>Fg,object:()=>bC,objectUtil:()=>Ua,oboolean:()=>BC,onumber:()=>jC,optional:()=>LC,ostring:()=>FC,pipeline:()=>MC,preprocess:()=>PC,promise:()=>$C,quotelessJson:()=>Dk,record:()=>EC,set:()=>OC,setErrorMap:()=>Nk,strictObject:()=>wC,string:()=>Mg,symbol:()=>lC,transformer:()=>DC,tuple:()=>_C,undefined:()=>fC,union:()=>xC,unknown:()=>mC,util:()=>N,void:()=>gC});var N;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var Ua;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Ua||(Ua={}));var w=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),He=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(e)?w.array:e===null?w.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?w.promise:typeof Map<"u"&&e instanceof Map?w.map:typeof Set<"u"&&e instanceof Set?w.set:typeof Date<"u"&&e instanceof Date?w.date:w.object;default:return w.unknown}};var m=N.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Dk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),le=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var Lk=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===w.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,N.assertNever(e)}return{message:r}},rt=Lk;var Cg=rt;function Nk(e){Cg=e}function hr(){return Cg}var nn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Pk=[];function y(e,t){let r=hr(),n=nn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===rt?void 0:rt].filter(s=>!!s)});e.common.issues.push(n)}var ee=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return O;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return O;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},O=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Ys=e=>e.status==="aborted",Xs=e=>e.status==="dirty",mt=e=>e.status==="valid",gr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Oe=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ag=(e,t)=>{if(mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{let{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var L=class{get description(){return this._def.description}_getType(t){return He(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:He(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Ag(n,s)}"~validate"(t){var n,s;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return mt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>mt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:He(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(gr(s)?s:Promise.resolve(s));return Ag(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Re({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Te.create(this,this._def)}nullable(){return Ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this)}promise(){return yt.create(this,this._def)}or(t){return Nt.create([this,t],this._def)}and(t){return Pt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new sn({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gt({...$(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return on.create(this,t)}readonly(){return qt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Mk=/^c[^\s-]{8,}$/i,Fk=/^[0-9a-z]+$/,jk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Bk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Uk=/^[a-z0-9_-]{21}$/i,Gk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,qk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ga,Wk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Zk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Yk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Kk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$g="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Jk=new RegExp(`^${$g}$`);function Dg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Qk(e){return new RegExp(`^${Dg(e)}$`)}function Lg(e){let t=`${$g}T${Dg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function eC(e,t){return!!((t==="v4"||!t)&&Wk.test(e)||(t==="v6"||!t)&&Zk.test(e))}function tC(e,t){if(!Gk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function rC(e,t){return!!((t==="v4"||!t)&&Hk.test(e)||(t==="v6"||!t)&&Yk.test(e))}var ht=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.string,received:o.parsedType}),O}let n=new ee,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Ga||(Ga=new RegExp(zk,"u")),Ga.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Bk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Uk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Mk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Fk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")jk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Lg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Jk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Qk(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?eC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?tC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?rC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Xk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Kk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):N.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ht.create=e=>new ht({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function nC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return o%i/10**s}var Ct=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==w.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.number,received:o.parsedType}),O}let n,s=new ee;for(let o of this._def.checks)o.kind==="int"?N.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?nC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==w.bigint)return this._getInvalidInput(t);let n,s=new ee;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.bigint,received:r.parsedType}),O}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};At.create=e=>new At({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var It=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==w.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.boolean,received:n.parsedType}),O}return re(t.data)}};It.create=e=>new It({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var $t=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==w.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:w.date,received:o.parsedType}),O}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),O}let n=new ee,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};$t.create=e=>new $t({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==w.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.symbol,received:n.parsedType}),O}return re(t.data)}};br.create=e=>new br({typeName:k.ZodSymbol,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.undefined,received:n.parsedType}),O}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodUndefined,...$(e)});var Lt=class extends L{_parse(t){if(this._getType(t)!==w.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.null,received:n.parsedType}),O}return re(t.data)}};Lt.create=e=>new Lt({typeName:k.ZodNull,...$(e)});var gt=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};gt.create=e=>new gt({typeName:k.ZodAny,...$(e)});var st=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};st.create=e=>new st({typeName:k.ZodUnknown,...$(e)});var Me=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:w.never,received:r.parsedType}),O}};Me.create=e=>new Me({typeName:k.ZodNever,...$(e)});var wr=class extends L{_parse(t){if(this._getType(t)!==w.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.void,received:n.parsedType}),O}return re(t.data)}};wr.create=e=>new wr({typeName:k.ZodVoid,...$(e)});var ot=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==w.array)return y(r,{code:m.invalid_type,expected:w.array,received:r.parsedType}),O;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Oe(r,i,r.path,a)))).then(i=>ee.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Oe(r,i,r.path,a)));return ee.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};ot.create=(e,t)=>new ot({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function yr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(yr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof ot?new ot({...e._def,type:yr(e.element)}):e instanceof Te?Te.create(yr(e.unwrap())):e instanceof Ye?Ye.create(yr(e.unwrap())):e instanceof Ze?Ze.create(e.items.map(t=>yr(t))):e}var fe=class e extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=N.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==w.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:w.object,received:u.parsedType}),O}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Oe(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Me){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Oe(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,p=await l.value;u.push({key:f,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>ee.mergeObjectSync(n,u)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i;let s=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of N.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of N.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return yr(this)}partial(t){let r={};for(let n of N.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of N.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Te;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return Ng(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:k.ZodObject,...$(t)});var Nt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new le(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),O}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new le(c));return y(r,{code:m.invalid_union,unionErrors:a}),O}}get options(){return this._def.options}};Nt.create=(e,t)=>new Nt({options:e,typeName:k.ZodUnion,...$(t)});var nt=e=>e instanceof Mt?nt(e.schema):e instanceof Re?nt(e.innerType()):e instanceof Ft?[e.value]:e instanceof jt?e.options:e instanceof Bt?N.objectValues(e.enum):e instanceof Ut?nt(e._def.innerType):e instanceof Dt?[void 0]:e instanceof Lt?[null]:e instanceof Te?[void 0,...nt(e.unwrap())]:e instanceof Ye?[null,...nt(e.unwrap())]:e instanceof sn||e instanceof qt?nt(e.unwrap()):e instanceof Gt?nt(e._def.innerType):[],Ks=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.object)return y(r,{code:m.invalid_type,expected:w.object,received:r.parsedType}),O;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),O)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=nt(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function qa(e,t){let r=He(e),n=He(t);if(e===t)return{valid:!0,data:e};if(r===w.object&&n===w.object){let s=N.objectKeys(t),o=N.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=qa(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===w.array&&n===w.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=qa(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===w.date&&n===w.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Pt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ys(o)||Ys(i))return O;let a=qa(o.value,i.value);return a.valid?((Xs(o)||Xs(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),O)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Pt.create=(e,t,r)=>new Pt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var Ze=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.array)return y(n,{code:m.invalid_type,expected:w.array,received:n.parsedType}),O;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Oe(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ee.mergeArray(r,i)):ee.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ze.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ze({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var Js=class e extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.object)return y(n,{code:m.invalid_type,expected:w.object,received:n.parsedType}),O;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Oe(n,a,n.path,a)),value:i._parse(new Oe(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ee.mergeObjectAsync(r,s):ee.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof L?new e({keyType:t,valueType:r,typeName:k.ZodRecord,...$(n)}):new e({keyType:ht.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},xr=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.map)return y(n,{code:m.invalid_type,expected:w.map,received:n.parsedType}),O;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Oe(n,a,n.path,[u,"key"])),value:o._parse(new Oe(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};xr.create=(e,t,r)=>new xr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var Sr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==w.set)return y(n,{code:m.invalid_type,expected:w.set,received:n.parsedType}),O;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return O;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Oe(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Sr.create=(e,t)=>new Sr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var Qs=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.function)return y(r,{code:m.invalid_type,expected:w.function,received:r.parsedType}),O;function n(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return nn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),rt].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof yt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(d=>{throw u.addIssue(n(c,d)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw u.addIssue(s(f,d)),u})})}else{let a=this;return re(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new le([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new le([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ze.create(t).rest(st.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Ze.create([]).rest(st.create()),returns:r||st.create(),typeName:k.ZodFunction,...$(n)})}},Mt=class extends L{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Mt.create=(e,t)=>new Mt({getter:e,typeName:k.ZodLazy,...$(t)});var Ft=class extends L{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ft.create=(e,t)=>new Ft({value:e,typeName:k.ZodLiteral,...$(t)});function Ng(e,t){return new jt({values:e,typeName:k.ZodEnum,...$(t)})}var jt=class e extends L{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),O}return re(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};jt.create=Ng;var Bt=class extends L{_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==w.string&&n.parsedType!==w.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),O}return re(t.data)}get enum(){return this._def.values}};Bt.create=(e,t)=>new Bt({values:e,typeName:k.ZodNativeEnum,...$(t)});var yt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==w.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:w.promise,received:r.parsedType}),O;let n=r.parsedType===w.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};yt.create=(e,t)=>new yt({type:e,typeName:k.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return O;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?O:c.status==="dirty"?kt(c.value):r.value==="dirty"?kt(c.value):c});{if(r.value==="aborted")return O;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?O:a.status==="dirty"?kt(a.value):r.value==="dirty"?kt(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?O:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?O:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mt(i))return O;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>mt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):O);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:k.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...$(r)});var Te=class extends L{_parse(t){return this._getType(t)===w.undefined?re(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:k.ZodOptional,...$(t)});var Ye=class extends L{_parse(t){return this._getType(t)===w.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ye.create=(e,t)=>new Ye({innerType:e,typeName:k.ZodNullable,...$(t)});var Ut=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===w.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Gt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gr(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var vr=class extends L{_parse(t){if(this._getType(t)!==w.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:w.nan,received:n.parsedType}),O}return{status:"valid",value:t.data}}};vr.create=e=>new vr({typeName:k.ZodNaN,...$(e)});var sC=Symbol("zod_brand"),sn=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},on=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?O:o.status==="dirty"?(r.dirty(),kt(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?O:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:k.ZodPipeline})}},qt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(mt(s)&&(s.value=Object.freeze(s.value)),s);return gr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};qt.create=(e,t)=>new qt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Ig(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Pg(e,t={},r){return e?gt.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Ig(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Ig(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):gt.create()}var oC={object:fe.lazycreate},k;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(k||(k={}));var iC=(e,t={message:`Input not instance of ${e.name}`})=>Pg(r=>r instanceof e,t),Mg=ht.create,Fg=Ct.create,aC=vr.create,cC=At.create,jg=It.create,uC=$t.create,lC=br.create,fC=Dt.create,dC=Lt.create,pC=gt.create,mC=st.create,hC=Me.create,gC=wr.create,yC=ot.create,bC=fe.create,wC=fe.strictCreate,xC=Nt.create,SC=Ks.create,vC=Pt.create,_C=Ze.create,EC=Js.create,TC=xr.create,OC=Sr.create,RC=Qs.create,kC=Mt.create,CC=Ft.create,AC=jt.create,IC=Bt.create,$C=yt.create,DC=Re.create,LC=Te.create,NC=Ye.create,PC=Re.createWithPreprocess,MC=on.create,FC=()=>Mg().optional(),jC=()=>Fg().optional(),BC=()=>jg().optional(),UC={string:e=>ht.create({...e,coerce:!0}),number:e=>Ct.create({...e,coerce:!0}),boolean:e=>It.create({...e,coerce:!0}),bigint:e=>At.create({...e,coerce:!0}),date:e=>$t.create({...e,coerce:!0})};var GC=O;var Bg=Fe.object({list:Fe.boolean().optional(),log:Fe.boolean().optional(),track:Fe.boolean().optional(),parser:Fe.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Fe.string().optional(),ignoreConfig:Fe.string().optional(),match:Fe.any().optional()});var wo=q(Qg(),1),ho=q(Ha(),1),Tb=require("child_process"),cw=q(Ya(),1),Rr=q(Ya(),1),Lw=require("node:events"),yo=Object.defineProperty,wA=Object.defineProperties,xA=Object.getOwnPropertyDescriptor,SA=Object.getOwnPropertyDescriptors,hc=Object.getOwnPropertyNames,ey=Object.getOwnPropertySymbols,Dy=Object.prototype.hasOwnProperty,vA=Object.prototype.propertyIsEnumerable,ty=(e,t,r)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))Dy.call(t,r)&&ty(e,r,t[r]);if(ey)for(var r of ey(t))vA.call(t,r)&&ty(e,r,t[r]);return e},un=(e,t)=>wA(e,SA(t)),g=(e,t)=>function(){return e&&(t=(0,e[hc(e)[0]])(e=0)),t},_A=(e,t)=>function(){return t||(0,e[hc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},EA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of hc(t))!Dy.call(e,s)&&s!==r&&yo(e,s,{get:()=>t[s],enumerable:!(n=xA(t,s))||n.enumerable});return e},V=e=>EA(yo({},"__esModule",{value:!0}),e),cn=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function TA(...e){let t=new String(e);return bo.set(t,e),t}function po(e){return e instanceof String&&bo.has(e)}function ry(e){return bo.get(e)||[]}var bo,pn=g({"src/lib/args/pathspec.ts"(){"use strict";bo=new WeakMap}}),at,wt=g({"src/lib/errors/git-error.ts"(){"use strict";at=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),mn,Cr=g({"src/lib/errors/git-response-error.ts"(){"use strict";wt(),mn=class extends at{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Ly,Ny=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";wt(),Ly=class extends at{constructor(e){super(void 0,e)}}}});function Py(e){return typeof e=="function"?e:Zt}function My(e){return typeof e=="function"&&e!==Zt}function Fy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function jy(e,t=0){return By(e)&&e.length>t?e[t]:void 0}function Ht(e,t=0){if(By(e)&&e.length>t)return e[e.length-1-t]}function By(e){return!!(e&&typeof e.length=="number")}function hn(e="",t=!0,r=`
56
- `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function gc(e,t){return hn(e,!0).map(r=>t(r))}function yc(e){return(0,wo.exists)(e,wo.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Uy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function xo(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Xe(e){return Array.isArray(e)?e:[e]}function Gy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function qy(e){return Xe(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function ln(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function fn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Vy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function rc(e=0){return new Promise(t=>setTimeout(t,e))}function nc(e){if(e!==!1)return e}var kr,Zt,gn,So=g({"src/lib/utils/util.ts"(){"use strict";kr="\0",Zt=()=>{},gn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ke(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function bc(e,t){let r=po(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function wc(e){return!!e&&gn(e)==="[object Object]"}function zy(e){return typeof e=="function"}var yn,ne,Wy,mo,xc,Hy=g({"src/lib/utils/argument-filters.ts"(){"use strict";So(),pn(),yn=e=>Array.isArray(e),ne=e=>typeof e=="string",Wy=e=>Array.isArray(e)&&e.every(ne),mo=e=>ne(e)||Array.isArray(e)&&e.every(ne),xc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),sc,OA=g({"src/lib/utils/exit-codes.ts"(){"use strict";sc=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(sc||{})}}),dn,RA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";dn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new dn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,bt,kA=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},bt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Zy(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},Yy),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Yy,CA=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Yy={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Sc(e,t=[]){return wc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return po(s)?r.push(s):bc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function de(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return Sc(vc(e),n),r||n.push(...AA(e)),n}function AA(e){let t=typeof Ht(e)=="function";return Ke(Ht(e,t?1:0),yn,[])}function vc(e){let t=zy(Ht(e));return Ke(Ht(e,t?1:0),wc)}function z(e,t=!0){let r=Py(Ht(e));return t||My(r)?r:void 0}var IA=g({"src/lib/utils/task-options.ts"(){"use strict";Hy(),So(),pn()}});function oc(e,t){return e(t.stdOut,t.stdErr)}function me(e,t,r,n=!0){return Xe(r).forEach(s=>{for(let o=hn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var $A=g({"src/lib/utils/task-parser.ts"(){"use strict";So()}}),Xy={};Z(Xy,{ExitCodes:()=>sc,GitOutputStreams:()=>dn,LineParser:()=>I,NOOP:()=>Zt,NULL:()=>kr,RemoteLineParser:()=>bt,append:()=>F,appendTaskOptions:()=>Sc,asArray:()=>Xe,asCamelCase:()=>Gy,asFunction:()=>Py,asNumber:()=>U,asStringArray:()=>qy,bufferToString:()=>fn,callTaskParser:()=>oc,createInstanceConfig:()=>Zy,delay:()=>rc,filterArray:()=>yn,filterFunction:()=>zy,filterHasLength:()=>xc,filterPlainObject:()=>wc,filterPrimitives:()=>bc,filterString:()=>ne,filterStringArray:()=>Wy,filterStringOrStringArray:()=>mo,filterType:()=>Ke,first:()=>jy,folderExists:()=>yc,forEachLineWithContent:()=>gc,getTrailingOptions:()=>de,including:()=>Uy,isUserFunction:()=>My,last:()=>Ht,objectToString:()=>gn,orVoid:()=>nc,parseStringResponse:()=>me,pick:()=>Vy,prefixedArray:()=>ln,remove:()=>xo,splitOn:()=>Fy,toLinesWithContent:()=>hn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>vc});var C=g({"src/lib/utils/index.ts"(){"use strict";Hy(),OA(),RA(),kA(),CA(),IA(),$A(),So()}}),Ky={};Z(Ky,{CheckRepoActions:()=>ic,checkIsBareRepoTask:()=>Qy,checkIsRepoRootTask:()=>Jy,checkIsRepoTask:()=>DA});function DA(e){switch(e){case"bare":return Qy();case"root":return Jy()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:vo,parser:_c}}function Jy(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:vo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Qy(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:vo,parser:_c}}function LA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var ic,vo,_c,eb=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),ic=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(ic||{}),vo=({exitCode:e},t,r,n)=>{if(e===128&&LA(t))return r(Buffer.from("false"));n(t)},_c=e=>e.trim()==="true"}});function NA(e,t){let r=new tb(e),n=e?nb:rb;return hn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(sb.test(o)?r.folders:r.files).push(o)}),r}var tb,rb,nb,sb,PA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),tb=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},rb=/^[a-z]+\s*/i,nb=/^[a-z]+\s+[a-z]+\s*/i,sb=/\/$/}}),ac={};Z(ac,{EMPTY_COMMANDS:()=>_o,adhocExecTask:()=>ob,configurationErrorTask:()=>pe,isBufferTask:()=>ab,isEmptyTask:()=>cb,straightThroughBufferTask:()=>ib,straightThroughStringTask:()=>ae});function ob(e){return{commands:_o,format:"empty",parser:e}}function pe(e){return{commands:_o,format:"empty",parser(){throw typeof e=="string"?new Ly(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function ib(e){return{commands:e,format:"buffer",parser(t){return t}}}function ab(e){return e.format==="buffer"}function cb(e){return e.format==="empty"||!e.commands.length}var _o,H=g({"src/lib/tasks/task.ts"(){"use strict";Ny(),_o=[]}}),ub={};Z(ub,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Ec,CONFIG_ERROR_MODE_REQUIRED:()=>Tc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Oc,CleanOptions:()=>co,cleanTask:()=>lb,cleanWithOptionsTask:()=>MA,isCleanOptionsArray:()=>FA});function MA(e,t){let{cleanMode:r,options:n,valid:s}=jA(e);return r?s.options?(n.push(...t),n.some(GA)?pe(Ec):lb(r,n)):pe(Oc+JSON.stringify(e)):pe(Tc)}function lb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return NA(e==="n",n)}}}function FA(e){return Array.isArray(e)&&e.every(t=>Rc.has(t))}function jA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{BA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&UA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function BA(e){return e==="f"||e==="n"}function UA(e){return/^-[a-z]$/i.test(e)&&Rc.has(e.charAt(1))}function GA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Ec,Tc,Oc,co,Rc,fb=g({"src/lib/tasks/clean.ts"(){"use strict";PA(),C(),H(),Ec="Git clean interactive mode is not supported",Tc='Git clean mode parameter ("n" or "f") is required',Oc="Git clean unknown option found in: ",co=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(co||{}),Rc=new Set(["i",...qy(Object.values(co))])}});function qA(e){let t=new pb;for(let r of db(e))t.addValue(r.file,String(r.key),r.value);return t}function VA(e,t){let r=null,n=[],s=new Map;for(let o of db(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function zA(e){return e.replace(/^(file):/,"")}function*db(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=zA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
- `)){let c=Fy(i,`
58
- `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var pb,WA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),pb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=Ht(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Xa(e,t){return typeof e=="string"&&cc.hasOwnProperty(e)?e:t}function HA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function ZA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return VA(n,e)}}}function YA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return qA(r)}}}function XA(){return{addConfig(e,t,...r){return this._runTask(HA(e,t,r[0]===!0,Xa(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(ZA(e,Xa(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(YA(Xa(e[0],void 0)),z(arguments))}}}var cc,mb=g({"src/lib/tasks/config.ts"(){"use strict";WA(),C(),cc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(cc||{})}});function KA(e){return hb.has(e)}var Ka,hb,gb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ka=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ka||{}),hb=new Set(Object.values(Ka))}});function JA(...e){return new bb().param(...e)}function QA(e){let t=new Set,r={};return gc(e,n=>{let[s,o,i]=n.split(kr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function eI(){return{grep(e){let t=z(arguments),r=de(arguments);for(let s of yb)if(r.includes(s))return this._runTask(pe(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=JA().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return QA(s)}},t)}}}var yb,an,ny,bb,wb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),yb=["-h"],an=Symbol("grepQuery"),bb=class{constructor(){this[ny]=[]}*[(ny=an,Symbol.iterator)](){for(let e of this[an])yield e}and(...e){return e.length&&this[an].push("--and","(",...ln(e,"-e"),")"),this}param(...e){return this[an].push(...ln(e,"-e")),this}}}}),xb={};Z(xb,{ResetMode:()=>uo,getResetMode:()=>rI,resetTask:()=>tI});function tI(e,t){let r=["reset"];return Sb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function rI(e){if(Sb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Sb(e){return vb.includes(e)}var uo,vb,_b=g({"src/lib/tasks/reset.ts"(){"use strict";H(),uo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(uo||{}),vb=Array.from(Object.values(uo))}});function nI(){return(0,ho.default)("simple-git")}function sy(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function sI(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function kc(e,t,r,n=nI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=sI(Ke(t,ne),i,n);return u(r);function c(l,f){return F(o,kc(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",p=i&&sy(i,f)||Zt,d=sy(n,`${s} ${f}`,p);return Object.assign(i?p:d,{label:e,sibling:c,info:d,step:u})}}var Eb=g({"src/lib/git-logger.ts"(){"use strict";C(),ho.default.formatters.L=e=>String(xc(e)?e.length:"-"),ho.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):gn(e)}}),io,uc,oI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";wt(),Eb(),io=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=io.getName(e.commands[0]),r=kc(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new at(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++io.counter}`}},uc=io,uc.counter=0}});function Wt(e,t){return{method:jy(e.commands)||"",commands:t}}function iI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function oy(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var lc,aI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";wt(),H(),C(),oI(),lc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new uc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return cn(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield cb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof at?Object.assign(t,{task:e}):new at(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return cn(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Wt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Wt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),ab(e)?oc(e.parser,o):oc(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return cn(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Wt(e,t)),r));if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",gn(f)),c(new dn(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new dn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return cn(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Wt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,un(Ce({},Wt(e,r)),{kill(p){l=p||l}}));let f=(0,Tb.spawn)(t,r,i);f.stdout.on("data",oy(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",oy(u,"stdErr",s,o.step("stdErr"))),f.on("error",iI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,un(Ce({},Wt(e,r)),{spawned:f,close(p,d){a({stdOut:c,stdErr:u,exitCode:p,rejection:l||d})},kill(p){f.killed||(l=p,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,un(Ce({},Wt(e,t)),{kill(n){r=n||r}})),r}}}}),Ob={};Z(Ob,{GitExecutor:()=>Rb});var Rb,cI=g({"src/lib/runners/git-executor.ts"(){"use strict";aI(),Rb=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new lc(this,this._scheduler,this._plugins)}chain(){return new lc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function uI(e,t,r=Zt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof mn?lI(o):o,void 0)};t.then(n,s)}function lI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Zt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var fI=g({"src/lib/task-callback.ts"(){"use strict";Cr(),C()}});function iy(e,t){return ob(r=>{if(!yc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var dI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function Ja(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=xo(t,"-B")),ae(t)}function pI(){return{checkout(){return this._runTask(Ja(de(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Ja(["-b",e,t,...de(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Ja(["-b",e,...de(arguments)]),z(arguments))}}}var mI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function hI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function gI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return me(hI(),[kb],e)}})}}}var kb,yI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),kb=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Gy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function bI(e){return me({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Cb,e)}var Cb,wI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Cb=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function xI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...ln(e,"-m"),...t,...r],format:"utf-8",parser:bI}}function SI(){return{commit(t,...r){let n=z(arguments),s=e(t)||xI(Xe(t),Xe(Ke(r[0],mo,[])),[...Ke(r[1],yn,[]),...de(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!mo(t)&&pe("git.commit: requires the commit message to be supplied as a string/string[]")}}var vI=g({"src/lib/tasks/commit.ts"(){"use strict";wI(),C(),H()}});function _I(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var EI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function TI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var OI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function RI(e,t,r){let n=String(r).trim(),s;if(s=Ab.exec(n))return new lo(e,t,!1,s[1]);if(s=Ib.exec(n))return new lo(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new lo(e,t,/^re/i.test(n),o)}var lo,Ab,Ib,kI=g({"src/lib/responses/InitSummary.ts"(){"use strict";lo=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Ab=/^Init.+ repository in (.+)$/,Ib=/^Rein.+ in (.+)$/}});function CI(e){return e.includes(Cc)}function AI(e=!1,t,r){let n=["init",...r];return e&&!CI(n)&&n.splice(1,0,Cc),{commands:n,format:"utf-8",parser(s){return RI(n.includes("--bare"),t,s)}}}var Cc,II=g({"src/lib/tasks/init.ts"(){"use strict";kI(),Cc="--bare"}});function Ac(e){for(let t=0;t<e.length;t++){let r=Ic.exec(e[t]);if(r)return`--${r[1]}`}return""}function $I(e){return Ic.test(e)}var Ic,bn=g({"src/lib/args/log-format.ts"(){"use strict";Ic=/^--(stat|numstat|name-only|name-status)(=|$)/}}),$b,DI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";$b=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Db(e=""){let t=Lb[e];return r=>me(new $b,t,r,!1)}var Qa,ay,cy,uy,Lb,Nb=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";bn(),DI(),gb(),C(),Qa=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],ay=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],cy=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],uy=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:nc(KA(t)&&t),from:nc(!!o&&n!==o&&n),similarity:U(r)})})],Lb={"":Qa,"--stat":Qa,"--numstat":ay,"--name-status":uy,"--name-only":cy}}});function LI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Pb(e=Lc,t=Mb,r=""){let n=Db(r);return function(s){let o=hn(s.trim(),!1,$c).map(function(i){let a=i.split(Dc),c=LI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var $c,Dc,Lc,Mb,Fb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Nb(),bn(),$c="\xF2\xF2\xF2\xF2\xF2\xF2 ",Dc=" \xF2\xF2",Lc=" \xF2 ",Mb=["hash","date","message","refs","author_name","author_email"]}}),jb={};Z(jb,{diffSummaryTask:()=>NI,validateLogFormatConfig:()=>Eo});function NI(e){let t=Ac(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Eo(r)||{commands:r,format:"utf-8",parser:Db(t)}}function Eo(e){let t=e.filter($I);if(t.length>1)return pe(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return pe(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Nc=g({"src/lib/tasks/diff.ts"(){"use strict";bn(),Nb(),H()}});function PI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function MI(e){return Object.keys(e).reduce((t,r)=>(r in fc||(t[r]=e[r]),t),{})}function Bb(e={},t=[]){let r=Ke(e.splitter,ne,Lc),n=!bc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=PI(n,r),i=[],a=[`--pretty=format:${$c}${o}${Dc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return ne(e.file)&&a.push("--follow",TA(e.file)),Sc(MI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function FI(e,t,r){let n=Pb(e,t,Ac(r));return{commands:["log",...r],format:"utf-8",parser:n}}function jI(){return{log(...r){let n=z(arguments),s=Bb(vc(arguments),Ke(arguments[0],yn)),o=t(...r)||Eo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return FI(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&pe("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var fc,Ub=g({"src/lib/tasks/log.ts"(){"use strict";bn(),pn(),Fb(),C(),H(),Nc(),fc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(fc||{})}}),fo,Gb,BI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";fo=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Gb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),dc,qb,UI=g({"src/lib/responses/PullSummary.ts"(){"use strict";dc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},qb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function ec(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function ly(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Vb,GI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Vb=[new bt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=ec(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=ec(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new bt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=ec(e.remoteMessages);s.total=ly(t),s.reused=ly(r),s.packReused=U(n)})]}});function zb(e,t){return me({remoteMessages:new Hb},Wb,t)}var Wb,Hb,Zb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),GI(),Wb=[new bt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Vb,new bt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new bt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],Hb=class{constructor(){this.all=[]}}}});function qI(e,t){let r=me(new qb,Yb,[e,t]);return r.message&&r}var fy,dy,py,my,Yb,hy,Pc,Xb=g({"src/lib/parsers/parse-pull.ts"(){"use strict";UI(),C(),Zb(),fy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,dy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,py=/^(create|delete) mode \d+ (.+)/,my=[new I(fy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(dy,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(py,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],Yb=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],hy=(e,t)=>me(new dc,my,[e,t]),Pc=(e,t)=>Object.assign(new dc,hy(e,t),zb(e,t))}}),gy,Kb,yy,VI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";BI(),C(),Xb(),gy=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new fo(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new fo(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new fo(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Kb=(e,t)=>Object.assign(yy(e,t),Pc(e,t)),yy=e=>me(new Gb,gy,e)}});function by(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=Kb(t,r);if(n.failed)throw new mn(n);return n}}:pe("Git.merge requires at least one option")}var zI=g({"src/lib/tasks/merge.ts"(){"use strict";Cr(),VI(),H()}});function WI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var wy,Jb,xy,HI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Zb(),wy=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=un(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(WI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=un(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],Jb=(e,t)=>{let r=xy(e,t),n=zb(e,t);return Ce(Ce({},r),n)},xy=(e,t)=>me({pushed:[]},wy,[e,t])}}),Qb={};Z(Qb,{pushTagsTask:()=>ZI,pushTask:()=>Mc});function ZI(e={},t){return F(t,"--tags"),Mc(e,t)}function Mc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),xo(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:Jb}}var ew=g({"src/lib/tasks/push.ts"(){"use strict";HI(),C()}});function YI(){return{showBuffer(){let e=["show",...de(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(ib(e),z(arguments))},show(){let e=["show",...de(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var XI=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),Sy,tw,KI=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Sy=/^(.+)\0(.+)$/,tw=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Sy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function vy(e){let[t,r]=e.split(kr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function tc(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function JI(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=rw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new tw(i,s,o))}}var _y,rw,nw,QI=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),KI(),_y=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},rw=new Map([be(" ","A",(e,t)=>F(e.created,t)),be(" ","D",(e,t)=>F(e.deleted,t)),be(" ","M",(e,t)=>F(e.modified,t)),be("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),be("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),be("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),be("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("R"," ",(e,t)=>{F(e.renamed,vy(t))}),be("R","M",(e,t)=>{let r=vy(t);F(e.renamed,r),F(e.modified,r.to)}),be("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),be("?","?",(e,t)=>F(e.not_added,t)),...tc("A","A","U"),...tc("D","D","U"),...tc("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),nw=function(e){let t=e.split(kr),r=new _y;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=kr+(t[n++]||"")),JI(r,o))}return r}}});function e1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!sw.includes(r))],parser(r){return nw(r)}}}var sw,t1=g({"src/lib/tasks/status.ts"(){"use strict";QI(),sw=["--null","-z"]}});function go(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function r1(){return go(0,0,0,"",!1)}function n1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:s1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Fc));n(t)}})}}}function s1(e){return e===Fc?r1():me(go(0,0,0,e),ow,e)}var Fc,ow,o1=g({"src/lib/tasks/version.ts"(){"use strict";C(),Fc="installed=false",ow=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),n,s))})]}}),iw={};Z(iw,{SimpleGitApi:()=>pc});var pc,i1=g({"src/lib/simple-git-api.ts"(){"use strict";fI(),dI(),mI(),yI(),vI(),mb(),EI(),wb(),OI(),II(),Ub(),zI(),ew(),XI(),t1(),H(),o1(),C(),pc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&uI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...Xe(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(iy(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(iy(e.path,e.root&&this._executor||void 0),t):this._runTask(pe("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(TI(e,t===!0),z(arguments))}init(e){return this._runTask(AI(e===!0,this._executor.cwd,de(arguments)),z(arguments))}merge(){return this._runTask(by(de(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(by([e,t,...de(arguments)]),z(arguments,!1)):this._runTask(pe("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Mc({remote:Ke(arguments[0],ne),branch:Ke(arguments[1],ne)},de(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...de(arguments)]),z(arguments))}status(){return this._runTask(e1(de(arguments)),z(arguments))}},Object.assign(pc.prototype,pI(),SI(),XA(),gI(),_I(),eI(),jI(),YI(),n1())}}),aw={};Z(aw,{Scheduler:()=>uw});var Ey,uw,a1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),Eb(),Ey=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,cw.createDeferred)();return{promise:t,done:r,id:e}}})(),uw=class{constructor(e=2){this.concurrency=e,this.logger=kc("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),xo(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Ey());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),lw={};Z(lw,{applyPatchTask:()=>c1});function c1(e,t){return ae(["apply",...t,...e])}var u1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function l1(e,t){return{branch:e,hash:t,success:!0}}function f1(e){return{branch:e,hash:null,success:!1}}var fw,d1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";fw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function dw(e,t){return t===1&&mc.test(e)}var Ty,mc,Oy,To,p1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";d1(),C(),Ty=/(\S+)\s+\(\S+\s([^)]+)\)/,mc=/^error[^']+'([^']+)'/m,Oy=[new I(Ty,(e,[t,r])=>{let n=l1(t,r);e.all.push(n),e.branches[t]=n}),new I(mc,(e,[t])=>{let r=f1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],To=(e,t)=>me(new fw,Oy,[e,t])}}),pw,m1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";pw=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function Ry(e){return e?e.charAt(0):""}function mw(e){return me(new pw,hw,e)}var hw,h1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";m1(),C(),hw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Ry(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(Ry(t),!1,r,n,s)})]}}),gw={};Z(gw,{branchLocalTask:()=>y1,branchTask:()=>g1,containsDeleteBranchCommand:()=>yw,deleteBranchTask:()=>w1,deleteBranchesTask:()=>b1});function yw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function g1(e){let t=yw(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?To(n,s).all[0]:mw(n)}}}function y1(){return{format:"utf-8",commands:["branch","-v"],parser:mw}}function b1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return To(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!dw(String(s),r))return i(s);o(n)}}}function w1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return To(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!dw(String(i),n))return c(i);throw new mn(r.parser(fn(o),fn(s)),String(i))}};return r}var x1=g({"src/lib/tasks/branch.ts"(){"use strict";Cr(),p1(),h1(),C()}}),bw,S1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";bw=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),ww={};Z(ww,{checkIgnoreTask:()=>v1});function v1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:bw}}var _1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";S1()}}),xw={};Z(xw,{cloneMirrorTask:()=>T1,cloneTask:()=>Sw});function E1(e){return/^--upload-pack(=|$)/.test(e)}function Sw(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(E1)?pe("git.fetch: potential exploit argument blocked."):ae(n)}function T1(e,t,r){return F(r,"--mirror"),Sw(e,t,r)}var O1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function R1(e,t){return me({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},vw,[e,t])}var vw,k1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),vw=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),_w={};Z(_w,{fetchTask:()=>A1});function C1(e){return/^--upload-pack(=|$)/.test(e)}function A1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(C1)?pe("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:R1}}var I1=g({"src/lib/tasks/fetch.ts"(){"use strict";k1(),H()}});function $1(e){return me({moves:[]},Ew,e)}var Ew,D1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Ew=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Tw={};Z(Tw,{moveTask:()=>L1});function L1(e,t){return{commands:["mv","-v",...Xe(e),t],format:"utf-8",parser:$1}}var N1=g({"src/lib/tasks/move.ts"(){"use strict";D1(),C()}}),Ow={};Z(Ow,{pullTask:()=>P1});function P1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return Pc(s,o)},onError(s,o,i,a){let c=qI(fn(s.stdOut),fn(s.stdErr));if(c)return a(new mn(c));a(o)}}}var M1=g({"src/lib/tasks/pull.ts"(){"use strict";Cr(),Xb(),C()}});function F1(e){let t={};return Rw(e,([r])=>t[r]={name:r}),Object.values(t)}function j1(e){let t={};return Rw(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function Rw(e,t){gc(e,r=>t(r.split(/\s+/)))}var B1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),kw={};Z(kw,{addRemoteTask:()=>U1,getRemotesTask:()=>G1,listRemotesTask:()=>q1,remoteTask:()=>V1,removeRemoteTask:()=>z1});function U1(e,t,r){return ae(["remote","add",...r,e,t])}function G1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?j1:F1}}function q1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function V1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function z1(e){return ae(["remote","remove",e])}var W1=g({"src/lib/tasks/remote.ts"(){"use strict";B1(),H()}}),Cw={};Z(Cw,{stashListTask:()=>H1});function H1(e={},t){let r=Bb(e),n=["stash","list",...r.commands,...t],s=Pb(r.splitter,r.fields,Ac(n));return Eo(n)||{commands:n,format:"utf-8",parser:s}}var Z1=g({"src/lib/tasks/stash-list.ts"(){"use strict";bn(),Fb(),Nc(),Ub()}}),Aw={};Z(Aw,{addSubModuleTask:()=>Y1,initSubModuleTask:()=>X1,subModuleTask:()=>Oo,updateSubModuleTask:()=>K1});function Y1(e,t){return Oo(["add",e,t])}function X1(e){return Oo(["init",...e])}function Oo(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function K1(e){return Oo(["update",...e])}var J1=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function Q1(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Iw(e,t):0}function Iw(e,t){return e===t?0:e>t?1:-1}function e$(e){return e.trim()}function ao(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var ky,$w,t$=g({"src/lib/responses/TagList.ts"(){"use strict";ky=class{constructor(e,t){this.all=e,this.latest=t}},$w=function(e,t=!1){let r=e.split(`
59
- `).map(e$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return Q1(ao(i[0]),ao(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Iw(ao(i[c]),ao(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new ky(r,n)}}}),Dw={};Z(Dw,{addAnnotatedTagTask:()=>s$,addTagTask:()=>n$,tagListTask:()=>r$});function r$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return $w(r,t)}}}function n$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function s$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var o$=g({"src/lib/tasks/tag.ts"(){"use strict";t$()}}),i$=_A({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(cI(),V(Ob)),{SimpleGitApi:n}=(i1(),V(iw)),{Scheduler:s}=(a1(),V(aw)),{configurationErrorTask:o}=(H(),V(ac)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:b}=(C(),V(Xy)),{applyPatchTask:T}=(u1(),V(lw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(x1(),V(gw)),{checkIgnoreTask:X}=(_1(),V(ww)),{checkIsRepoTask:we}=(eb(),V(Ky)),{cloneTask:ce,cloneMirrorTask:Ae}=(O1(),V(xw)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(fb(),V(ub)),{diffSummaryTask:Ar}=(Nc(),V(jb)),{fetchTask:xt}=(I1(),V(_w)),{moveTask:Hw}=(N1(),V(Tw)),{pullTask:Zw}=(M1(),V(Ow)),{pushTagsTask:Yw}=(ew(),V(Qb)),{addRemoteTask:Xw,getRemotesTask:Kw,listRemotesTask:Jw,remoteTask:Qw,removeRemoteTask:ex}=(W1(),V(kw)),{getResetMode:tx,resetTask:rx}=(_b(),V(xb)),{stashListTask:nx}=(Z1(),V(Cw)),{addSubModuleTask:sx,initSubModuleTask:ox,subModuleTask:ix,updateSubModuleTask:ax}=(J1(),V(Aw)),{addAnnotatedTagTask:cx,addTagTask:ux,tagListTask:lx}=(o$(),V(Dw)),{straightThroughBufferTask:fx,straightThroughStringTask:je}=(H(),V(ac));function R(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(R.prototype=Object.create(n.prototype)).constructor=R,R.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},R.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},R.prototype.stashList=function(h){return this._runTask(nx(b(arguments)||{},a(h)&&h||[]),d(arguments))};function Gc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),p(arguments))}R.prototype.clone=function(){return this._runTask(Gc("clone",ce,...arguments),d(arguments))},R.prototype.mirror=function(){return this._runTask(Gc("mirror",Ae,...arguments),d(arguments))},R.prototype.mv=function(h,E){return this._runTask(Hw(h,E),d(arguments))},R.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},R.prototype.pull=function(h,E,B,se){return this._runTask(Zw(f(h,u),f(E,u),p(arguments)),d(arguments))},R.prototype.fetch=function(h,E){return this._runTask(xt(f(h,u),f(E,u),p(arguments)),d(arguments))},R.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},R.prototype.tags=function(h,E){return this._runTask(lx(p(arguments)),d(arguments))},R.prototype.rebase=function(){return this._runTask(je(["rebase",...p(arguments)]),d(arguments))},R.prototype.reset=function(h){return this._runTask(rx(tx(h),p(arguments)),d(arguments))},R.prototype.revert=function(h){let E=d(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(je(["revert",...p(arguments,0,!0),h]),E)},R.prototype.addTag=function(h){let E=typeof h=="string"?ux(h):o("Git.addTag requires a tag name");return this._runTask(E,d(arguments))},R.prototype.addAnnotatedTag=function(h,E){return this._runTask(cx(h,E),d(arguments))},R.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.branch=function(h,E){return this._runTask(P(p(arguments)),d(arguments))},R.prototype.branchLocal=function(h){return this._runTask(M(),d(arguments))},R.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...p(arguments,0,!0));var se=d(arguments);return B.length?this._runTask(je(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},R.prototype.submoduleAdd=function(h,E,B){return this._runTask(sx(h,E),d(arguments))},R.prototype.submoduleUpdate=function(h,E){return this._runTask(ax(p(arguments,!0)),d(arguments))},R.prototype.submoduleInit=function(h,E){return this._runTask(ox(p(arguments,!0)),d(arguments))},R.prototype.subModule=function(h,E){return this._runTask(ix(p(arguments)),d(arguments))},R.prototype.listRemote=function(){return this._runTask(Jw(p(arguments)),d(arguments))},R.prototype.addRemote=function(h,E,B){return this._runTask(Xw(h,E,p(arguments)),d(arguments))},R.prototype.removeRemote=function(h,E){return this._runTask(ex(h),d(arguments))},R.prototype.getRemotes=function(h,E){return this._runTask(Kw(h===!0),d(arguments))},R.prototype.remote=function(h,E){return this._runTask(Qw(p(arguments)),d(arguments))},R.prototype.tag=function(h,E){let B=p(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(je(B),d(arguments))},R.prototype.updateServerInfo=function(h){return this._runTask(je(["update-server-info"]),d(arguments))},R.prototype.pushTags=function(h,E){let B=Yw({remote:f(h,u)},p(arguments));return this._runTask(B,d(arguments))},R.prototype.rm=function(h){return this._runTask(je(["rm","-f",...i(h)]),d(arguments))},R.prototype.rmKeepLocal=function(h){return this._runTask(je(["rm","--cached",...i(h)]),d(arguments))},R.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},R.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},R.prototype._catFile=function(h,E){var B=d(E),se=["cat-file"],$e=E[0];if(typeof $e=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray($e)&&se.push.apply(se,$e);let $o=h==="buffer"?fx(se):je(se);return this._runTask($o,B)},R.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):je(["diff",...p(arguments)]);return this._runTask(B,d(arguments))},R.prototype.diffSummary=function(){return this._runTask(Ar(p(arguments,1)),d(arguments))},R.prototype.applyPatch=function(h){let E=l(h)?T(i(h),p([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,d(arguments))},R.prototype.revparse=function(){let h=["rev-parse",...p(arguments,!0)];return this._runTask(je(h,!0),d(arguments))},R.prototype.clean=function(h,E,B){let se=xe(h),$e=se&&h.join("")||f(h,u)||"",$o=p([].slice.call(arguments,se?1:0));return this._runTask(Ie($e,$o),d(arguments))},R.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},R.prototype.clearQueue=function(){return this},R.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),d(arguments))},R.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),d(arguments))},t.exports=R}});pn();wt();var a$=class extends at{constructor(e,t){super(void 0,t),this.config=e}};wt();wt();var it=class extends at{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Cr();Ny();eb();fb();mb();gb();wb();_b();function c$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new it(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new it(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function u$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function l$(e,t){if(u$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new it(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function f$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new it(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new it(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new it(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function d$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||l$(s,i),t||f$(s,n.method)}),r}}}C();function p$(e){let t=ln(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Cy=(0,Rr.deferred)().promise;function m$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Rr.deferred)(),closeTimeout:(0,Rr.deferred)(),exit:(0,Rr.deferred)(),exitTimeout:(0,Rr.deferred)()},i=Promise.race([e===!1?Cy:o.closeTimeout.promise,t===!1?Cy:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>rc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return cn(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),p=!0,d=()=>void(p=!1);(u=a.stdout)==null||u.on("data",d),(l=a.stderr)==null||l.on("data",d),a.on("error",d),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,p&&(yield rc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var h$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ay="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function g$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Iy(e,t){if(e.length<1||e.length>2)throw new it(void 0,"binary",h$);if(e.some(g$))if(t)console.warn(Ay);else throw new it(void 0,"binary",Ay);let[n,s]=e;return{binary:n,prefix:s}}function y$(e,t=["git"],r=!1){let n=Iy(Xe(t),r);e.on("binary",s=>{n=Iy(Xe(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}wt();function b$(e){return!!(e.exitCode&&e.stdErr.length)}function w$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function x$(e=!1,t=b$,r=w$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function $y(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new at(void 0,n.toString("utf-8"))}:{error:n}}}}C();var S$=class{constructor(){this.plugins=new Set,this.events=new Lw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Xe(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function v$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Uy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:_$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function _$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function E$(e){let t=Vy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function T$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,p;(f=s.spawned.stdout)==null||f.off("data",c),(p=s.spawned.stderr)==null||p.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new it(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}pn();function O$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(po(o)){n(ry(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>po(i)&&ry(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var R$=i$();function k$(e,t){var r;let n=new S$,s=Zy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!yc(s.baseDir))throw new a$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(p$(s.config)),n.add(d$(s.unsafe)),n.add(O$()),n.add(m$(s.completion)),s.abort&&n.add(c$(s.abort)),s.progress&&n.add(v$(s.progress)),s.timeout&&n.add(T$(s.timeout)),s.spawnOptions&&n.add(E$(s.spawnOptions)),n.add($y(x$(!0))),s.errors&&n.add($y(s.errors)),y$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new R$(s,n)}Cr();var Nw=k$;async function Pw(){let e=Nw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var Bw=q(jw()),Bc=Bw.default.bold("@seed-design/codemod"),Uw=e=>({event:t,properties:r})=>console.log(Bc,t,r,e);var zw=(0,Ao.resolve)(__dirname,"transforms"),qw=Zc(),Co=Gw(),wn=null,Ww=null;function D$(){Pw().then(e=>{Ww=e,wn=Uw({...e}),L$(wn)})}function L$(e){N$(),qw.version(Co.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=Bg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=F$();s.list&&(Uc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Uc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Uc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,Ao.resolve)(zw,t,"index.js");console.log(Bc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await M$(i,t,r,s)}),qw.parse()}function N$(){(0,Io.satisfies)(process.versions.node,Co.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Co.engines.node}"
55
+ if (condition) { yield value; }`)};var ep=require("node:buffer"),tp=require("node:string_decoder");var gs=(e,t,r)=>{if(r)return;if(e)return{transform:$E.bind(void 0,new TextEncoder)};let n=new tp.StringDecoder(t);return{transform:DE.bind(void 0,n),final:LE.bind(void 0,n)}},$E=function*(e,t){ep.Buffer.isBuffer(t)?yield Ke(t):typeof t=="string"?yield e.encode(t):yield t},DE=function*(e,t){yield K(t)?e.write(t):t},LE=function*(e){let t=e.end();t!==""&&(yield t)};var Di=require("node:util"),Li=(0,Di.callbackify)(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(let s of t.currentIterable)n.push(s)}finally{delete t.currentIterable}}),ys=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=PE}=t[r];for await(let s of n(e))yield*ys(s,t,r+1)},rp=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*NE(r,Number(t),e)},NE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*ys(n,r,t+1)},np=(0,Di.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),PE=function*(e){yield e};var Ni=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},sp=(e,t)=>[...t.flatMap(r=>[..._t(r,e,0)]),...Ur(e)],_t=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=FE}=t[r];for(let s of n(e))yield*_t(s,t,r+1)},Ur=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*ME(r,Number(t),e)},ME=function*(e,t,r){if(e!==void 0)for(let n of e())yield*_t(n,r,t+1)},FE=function*(e){yield e};var Pi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=op(e,i,o),u=vt(t),l=vt(r),f=u?Li.bind(void 0,ys,a):Ni.bind(void 0,_t),p=u||l?Li.bind(void 0,rp,a):Ni.bind(void 0,Ur),d=u||l?np.bind(void 0,a):void 0;return{stream:new Gr.Transform({writableObjectMode:n,writableHighWaterMark:(0,Gr.getDefaultHighWaterMark)(n),readableObjectMode:s,readableHighWaterMark:(0,Gr.getDefaultHighWaterMark)(s),transform(T,P,M){f([T,c,0],this,M)},flush(T){p([c],this,T)},destroy:d})}},bs=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=op(i,r,a);e=sp(c,e)}return e},op=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:Kd(n,a)},gs(r,i,n),hs(r,o,n,c),{transform:e,final:t},{transform:Jd(s,a)},Yd({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var ip=(e,t)=>{for(let r of jE(e))BE(e,r,t)},jE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),BE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${lt[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>UE(a,n));r.input=Ir(i)},UE=(e,t)=>{let r=bs(e,t,"utf8",!0);return GE(r),Ir(r)},GE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var xs=require("node:fs");var ws=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Xt(r,n)&&!ge.has(t)&&qE(n)&&(e.some(({type:s,value:o})=>s==="native"&&VE.has(o))||e.every(({type:s})=>ve.has(s))),qE=e=>e===1||e===2,VE=new Set(["pipe","overlapped"]),ap=async(e,t,r,n)=>{for await(let s of e)zE(t)||up(s,r,n)},cp=(e,t,r)=>{for(let n of e)up(n,t,r)},zE=e=>e._readableState.pipes.length>0,up=(e,t,r)=>{let n=An(e);je({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var lp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>WE({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},WE=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:s,isMaxBuffer:o,verboseInfo:i},{buffer:a,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:f})=>{if(e===null)return;let p=cd(e,o,f),d=Ke(p),{stdioItems:x,objectMode:T}=t[r],P=HE([d],x,c,n),{serializedResult:M,finalResult:j=M}=ZE({chunks:P,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});YE({serializedResult:M,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:x,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&XE(M,x,s),Y}catch(X){return n.error=X,Y}},HE=(e,t,r,n)=>{try{return bs(e,t,r,!1)}catch(s){return n.error=s,e}},ZE=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:s,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ir(e)};let i=Xc(e,r);return n[o]?{serializedResult:i,finalResult:$i(i,!s[o],t)}:{serializedResult:i}},YE=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!ws({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=$i(e,!1,i);try{cp(a,t,n)}catch(c){r.error??=c}},XE=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>ds.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,xs.appendFileSync)(n,e):(r.add(o),(0,xs.writeFileSync)(n,e))}};var fp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,et(t,r,"all")]:Array.isArray(t)?[et(e,r,"all"),...t]:K(e)&&K(t)?Po([e,t]):`${e}${t}`};var Ss=require("node:events");var dp=async(e,t)=>{let[r,n]=await KE(e);return t.isForcefullyTerminated??=!1,[r,n]},KE=async e=>{let[t,r]=await Promise.allSettled([(0,Ss.once)(e,"spawn"),(0,Ss.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?pp(e):r.value},pp=async e=>{try{return await(0,Ss.once)(e,"exit")}catch{return pp(e)}},mp=async e=>{let[t,r]=await e;if(!JE(t,r)&&Mi(t,r))throw new De;return[t,r]},JE=(e,t)=>e===void 0&&t===void 0,Mi=(e,t)=>e!==0||t!==null;var hp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=QE(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=ad(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},QE=(e,t,r)=>e!==void 0?e:Mi(t,r)?new De:void 0;var yp=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=eT(e,t,r),f=nT({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return ir(f,c,u)},eT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=$n(e,t,r),a=tT(r),{file:c,commandArguments:u,options:l}=Qn(e,t,a);rT(l);let f=zd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},tT=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,rT=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&vs("ipcInput"),e&&vs("ipc: true"),r&&vs("detached: true"),n&&vs("cancelSignal")},vs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},nT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=sT({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:i,startTime:a});if(c.failed)return c;let{resultError:u,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d}=hp(c,r),{output:x,error:T=u}=lp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:o}),P=x.map((j,Y)=>et(j,r,Y)),M=et(fp(x,r),r,"all");return iT({error:T,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d,stdio:P,all:M,options:r,command:n,escapedCommand:s,startTime:a})},sT=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{ip(o,r);let a=oT(r);return(0,gp.spawnSync)(...es(e,t,a))}catch(a){return or({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},oT=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:cs(t)}),iT=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:s,stdio:o,all:i,options:a,command:c,escapedCommand:u,startTime:l})=>e===void 0?us({command:c,escapedCommand:u,stdio:o,all:i,ipcOutput:[],options:a,startTime:l}):Br({error:e,command:c,escapedCommand:u,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:i,ipcOutput:[],options:a,startTime:l,isSync:!0});var Tm=require("node:events"),Om=require("node:child_process");var ji=q(require("node:process"),1);var cr=require("node:events");var bp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(er({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Wn(e)}),aT({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),aT=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Gn(t,s);let o=ut(e,t,r),i=new AbortController;try{return await Promise.race([cT(o,n,i),uT(o,r,i),lT(o,r,i)])}catch(a){throw tr(e),a}finally{i.abort(),qn(t,s)}},cT=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,cr.once)(e,"message",{signal:r});return n}for await(let[n]of(0,cr.on)(e,"message",{signal:r}))if(t(n))return n},uT=async(e,t,{signal:r})=>{await(0,cr.once)(e,"disconnect",{signal:r}),Bl(t)},lT=async(e,t,{signal:r})=>{let[n]=await(0,cr.once)(e,"strict:error",{signal:r});throw jn(n,t)};var qr=require("node:events");var xp=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Fi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Fi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{er({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Wn(e)}),Gn(t,o);let i=ut(e,t,r),a=new AbortController,c={};return fT(e,i,a),dT({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),pT({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},fT=async(e,t,r)=>{try{await(0,qr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},dT=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,qr.once)(e,"strict:error",{signal:r.signal});n.error=jn(s,t),r.abort()}catch{}},pT=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:s,controller:o,state:i,reference:a}){try{for await(let[c]of(0,qr.on)(r,"message",{signal:o.signal}))wp(i),yield c}catch{wp(i)}finally{o.abort(),qn(t,a),n||tr(e),s&&await e}},wp=({error:e})=>{if(e)throw e};var Sp=(e,{ipc:t})=>{Object.assign(e,_p(e,!1,t))},vp=()=>{let e=ji.default,t=!0,r=ji.default.channel!==void 0;return{..._p(e,t,r),getCancelSignal:Sf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},_p=(e,t,r)=>({sendMessage:Xn.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:bp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:xp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ep=require("node:child_process"),ft=require("node:stream");var Tp=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{ki(n);let a=new Ep.ChildProcess;mT(a,n),Object.assign(a,{readable:hT,writable:gT,duplex:yT});let c=or({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=bT(c,i,s);return{subprocess:a,promise:u}},mT=(e,t)=>{let r=Vr(),n=Vr(),s=Vr(),o=Array.from({length:t.length-3},Vr),i=Vr(),a=[r,n,s,...o];Object.assign(e,{stdin:r,stdout:n,stderr:s,all:i,stdio:a})},Vr=()=>{let e=new ft.PassThrough;return e.end(),e},hT=()=>new ft.Readable({read(){}}),gT=()=>new ft.Writable({write(){}}),yT=()=>new ft.Duplex({read(){},write(){}}),bT=async(e,t,r)=>ir(e,t,r);var ur=require("node:fs"),Rp=require("node:buffer"),Ve=require("node:stream");var kp=(e,t)=>ms(wT,e,t,!1),zr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${lt[e]}.`)},Op={fileNumber:zr,generator:Pi,asyncGenerator:Pi,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let n=t||r;return{stream:Ve.Duplex.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},wT={input:{...Op,fileUrl:({value:e})=>({stream:(0,ur.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,ur.createReadStream)(e)}),webStream:({value:e})=>({stream:Ve.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:Ve.Readable.from(e)}),asyncIterable:({value:e})=>({stream:Ve.Readable.from(e)}),string:({value:e})=>({stream:Ve.Readable.from(e)}),uint8Array:({value:e})=>({stream:Ve.Readable.from(Rp.Buffer.from(e))})},output:{...Op,fileUrl:({value:e})=>({stream:(0,ur.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,ur.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Ve.Writable.fromWeb(e)}),iterable:zr,asyncIterable:zr,string:zr,uint8Array:zr}};var Wr=require("node:events"),Es=require("node:stream"),Gi=require("node:stream/promises");function Et(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)Ui(s);let t=e.some(({readableObjectMode:s})=>s),r=xT(e,t),n=new Bi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var xT=(e,t)=>{if(e.length===0)return(0,Es.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Bi=class extends Es.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(Ui(t),this.#t.has(t))return;this.#t.add(t),this.#n??=ST(this,this.#t,this.#o);let r=ET({passThroughStream:this,stream:t,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#s.set(t,r),t.pipe(this,{end:!1})}async remove(t){if(Ui(t),!this.#t.has(t))return!1;let r=this.#s.get(t);return r===void 0?!1:(this.#s.delete(t),t.unpipe(this),await r,!0)}},ST=async(e,t,r)=>{_s(e,Cp);let n=new AbortController;try{await Promise.race([vT(e,n),_T(e,t,r,n)])}finally{n.abort(),_s(e,-Cp)}},vT=async(e,{signal:t})=>{try{await(0,Gi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Ip(e,r),r}},_T=async(e,t,r,{signal:n})=>{for await(let[s]of(0,Wr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},Ui=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},ET=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{_s(e,Ap);let a=new AbortController;try{await Promise.race([TT(o,t,a),OT({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),RT({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),_s(e,-Ap)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?qi(e):kT(e))},TT=async(e,t,{signal:r})=>{try{await e,r.aborted||qi(t)}catch(n){r.aborted||Ip(t,n)}},OT=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Gi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;$p(i)?s.add(t):Dp(e,i)}},RT=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:s,controller:{signal:o}})=>{if(await(0,Wr.once)(e,s,{signal:o}),!e.readable)return(0,Wr.once)(o,"abort",{signal:o});t.delete(e),r.delete(e),n.delete(e)},kT=e=>{e.writable&&e.end()},Ip=(e,t)=>{$p(t)?qi(e):Dp(e,t)},$p=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",qi=e=>{(e.readable||e.writable)&&e.destroy()},Dp=(e,t)=>{e.destroyed||(e.once("error",CT),e.destroy(t))},CT=()=>{},_s=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Cp=2,Ap=1;var Vi=require("node:stream/promises");var lr=(e,t)=>{e.pipe(t),AT(e,t),IT(e,t)},AT=async(e,t)=>{if(!($e(e)||$e(t))){try{await(0,Vi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}zi(t)}},zi=e=>{e.writable&&e.end()},IT=async(e,t)=>{if(!($e(e)||$e(t))){try{await(0,Vi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Wi(e)}},Wi=e=>{e.readable&&e.destroy()};var Lp=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>ve.has(c)))$T(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!ve.has(c)))LT({subprocess:e,stream:a,direction:i,fdNumber:s,pipeGroups:n,controller:r})}for(let[s,o]of n.entries()){let i=o.length===1?o[0]:Et(o);lr(i,s)}},$T=(e,t,r,n)=>{r==="output"?lr(e.stdio[n],t):lr(t,e.stdio[n]);let s=DT[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},DT=["stdin","stdout","stderr"],LT=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;NT(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},NT=(e,{signal:t})=>{$e(e)&&xt(e,PT,t)},PT=2;var Pp=require("node:events");var Tt=[];Tt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Tt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Tt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ts=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Hi=Symbol.for("signal-exit emitter"),Zi=globalThis,MT=Object.defineProperty.bind(Object),Yi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Zi[Hi])return Zi[Hi];MT(Zi,Hi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let o of this.listeners[t])s=o(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},Os=class{},FT=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Xi=class extends Os{onExit(){return()=>{}}load(){}unload(){}},Ki=class extends Os{#t=Ji.platform==="win32"?"SIGINT":"SIGHUP";#r=new Yi;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Tt)this.#s[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(s+=o.__signal_exit_emitter__.count),n.length===s){this.unload();let i=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#t:r;i||t.kill(t.pid,a)}};this.#o=t.reallyExit,this.#n=t.emit}onExit(t,r){if(!Ts(this.#e))return()=>{};this.#i===!1&&this.load();let n=r!=null&&r.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of Tt)try{let r=this.#s[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#c(t,...r),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#i&&(this.#i=!1,Tt.forEach(t=>{let r=this.#s[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(t){return Ts(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(t,...r){let n=this.#n;if(t==="exit"&&Ts(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},Ji=globalThis.process,{onExit:Np,load:Oj,unload:Rj}=FT(Ts(Ji)?new Ki(Ji):new Xi);var Mp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Np(()=>{e.kill()});(0,Pp.addAbortListener)(n,()=>{s()})};var jp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=In(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=jT(r,n,s),{sourceStream:f,sourceError:p}=UT(e,u),{options:d,fileDescriptors:x}=Ue.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:x,startTime:o}},jT=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=BT(e,t,...r),a=Un(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},BT=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Fp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Lo(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,o,i]=wn(r,...n);return{destination:t(Fp)(s,o,i),pipeOptions:i}}if(Ue.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Fp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),UT=(e,t)=>{try{return{sourceStream:rr(e,t)}}catch(r){return{sourceError:r}}};var Up=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=GT({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw Qi({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},GT=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Wi(e),n;if(t!==void 0)return zi(r),t},Qi=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>or({error:e,command:Bp,escapedCommand:Bp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Bp="source.pipe(destination)";var Gp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var qp=require("node:stream/promises");var Vp=(e,t,r)=>{let n=Rs.has(t)?VT(e,t):qT(e,t);return xt(e,WT,r.signal),xt(t,HT,r.signal),zT(t),n},qT=(e,t)=>{let r=Et([e]);return lr(r,t),Rs.set(t,r),r},VT=(e,t)=>{let r=Rs.get(t);return r.add(e),r},zT=async e=>{try{await(0,qp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Rs.delete(e)},Rs=new WeakMap,WT=2,HT=1;var zp=require("node:util");var Wp=(e,t)=>e===void 0?[]:[ZT(e,t)],ZT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,zp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw Qi({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var ks=(e,...t)=>{if(W(t[0]))return ks.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=jp(e,...t),s=YT({...n,destination:r});return s.pipe=ks.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},YT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=XT(e,s);Up({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let p=Vp(t,o,f);return await Promise.race([Gp(l),...Wp(a,{sourceStream:t,mergedStream:p,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},XT=(e,t)=>Promise.allSettled([e,t]);var Kp=require("node:timers/promises");var Zp=require("node:events"),Yp=require("node:stream");var Cs=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return KT(t,i),Xp({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},KT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ea=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;JT(t,i,e);let a=e.readableObjectMode&&!o;return Xp({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},JT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Xp=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,Zp.on)(e,"data",{signal:t.signal,highWaterMark:Hp,highWatermark:Hp});return QT({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},ta=(0,Yp.getDefaultHighWaterMark)(!0),Hp=ta,QT=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=e0({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*_t(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Ur(a)}},e0=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[gs(e,r,!t),hs(e,s,!n,{})].filter(Boolean);var Jp=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=t0({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([r0(e),f]);return}let p=Ai(c,r),d=ea({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:p,allMixed:a}),[x]=await Promise.all([n0({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return x},t0=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!ws({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ea({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await ap(a,e,r,o)},r0=async e=>{await(0,Kp.setImmediate)(),e.readableFlowing===null&&e.resume()},n0=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await ss(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await os(r,{maxBuffer:o})):await as(r,{maxBuffer:o})}catch(a){return Qp(sd({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},ra=async e=>{try{return await e}catch(t){return Qp(t)}},Qp=({bufferedData:e})=>Zc(e)?new Uint8Array(e):e;var tm=require("node:stream/promises"),Hr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=s0(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,tm.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||a0(a,t,r,n)}finally{i.abort()}},s0=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&o0(e,r,n),n},o0=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{i0(t,r),n.call(e,...s)}},i0=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},a0=(e,t,r,n)=>{if(!c0(e,t,r,n))throw e},c0=(e,t,r,n=!0)=>r.propagating?em(e)||As(e):(r.propagating=!0,na(r,t)===n?em(e):As(e)),na=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",As=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",em=e=>(e==null?void 0:e.code)==="EPIPE";var rm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>sa({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),sa=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u})=>{if(!e)return;let l=Hr(e,t,u);if(na(u,t)){await l;return}let[f]=await Promise.all([Jp({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var nm=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Et([e,t].filter(Boolean)):void 0,sm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>sa({...u0(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:l0(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),u0=({stdout:e,stderr:t,all:r},[,n,s])=>{let o=n||s;return o?n?s?{stream:r,buffer:o}:{stream:e,buffer:o}:{stream:t,buffer:o}:{stream:r,buffer:o}},l0=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var um=require("node:events");var om=e=>Xt(e,"ipc"),im=(e,t)=>{let r=An(e);je({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var am=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=om(o),a=Je(t,"ipc"),c=Je(r,"ipc");for await(let u of Fi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(od(e,s,c),s.push(u)),i&&im(u,o);return s},cm=async(e,t)=>(await Promise.allSettled([e]),t);var lm=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:p,verboseInfo:d,fileDescriptors:x,originalStreams:T,onInternalError:P,controller:M})=>{let j=dp(e,p),Y={originalStreams:T,fileDescriptors:x,subprocess:e,exitPromise:j,propagating:!1},X=rm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),we=sm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),ce=[],Ce=am({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:d}),Ae=f0(T,e,Y),xe=d0(x,Y);try{return await Promise.race([Promise.all([{},mp(j),Promise.all(X),we,Ce,$f(e,f),...Ae,...xe]),P,p0(e,M),...Rf(e,o,p,M),...jl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:p,controller:M}),...Ef({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:M})])}catch(Cr){return p.terminationReason??="other",Promise.all([{error:Cr},j,Promise.all(X.map(wt=>ra(wt))),ra(we),cm(Ce,ce),Promise.allSettled(Ae),Promise.allSettled(xe)])}},f0=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Hr(n,s,r)),d0=(e,t)=>e.flatMap(({stdioItems:r},n)=>r.filter(({value:s,stream:o=s})=>Ne(o,{checkOpen:!1})&&!$e(o)).map(({type:s,value:o,stream:i=o})=>Hr(i,n,t,{isSameDirection:ve.has(s),stopOnExit:s==="native"}))),p0=async(e,{signal:t})=>{let[r]=await(0,um.once)(e,"error",{signal:t});throw r};var fm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Zr=(e,t,r)=>{let n=e[r];n.has(t)||n.set(t,[]);let s=n.get(t),o=Be();return s.push(o),{resolve:o.resolve.bind(o),promises:s}},fr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var pm=require("node:stream"),mm=require("node:util");var oa=require("node:stream/promises");var ia=async e=>{if(e!==void 0)try{await aa(e)}catch{}},dm=async e=>{if(e!==void 0)try{await ca(e)}catch{}},aa=async e=>{await(0,oa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},ca=async e=>{await(0,oa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Is=async(e,t)=>{if(await e,t)throw t},$s=(e,t,r)=>{r&&!As(r)?e.destroy(r):t&&e.destroy()};var hm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||ge.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ua(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=la(a,i),{read:p,onStdoutDataDone:d}=fa({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),x=new pm.Readable({read:p,destroy:(0,mm.callbackify)(pa.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return da({subprocessStdout:a,onStdoutDataDone:d,readable:x,subprocess:e}),x},ua=(e,t,r)=>{let n=rr(e,t),s=Zr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},la=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:ta},fa=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Be(),i=Cs({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){m0(this,i,o)},onStdoutDataDone:o}},m0=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},da=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await ca(e),await n,await ia(s),await t,r.readable&&r.push(null)}catch(o){await ia(s),gm(r,o)}},pa=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await fr(r,t)&&(gm(e,n),await Is(t,n))},gm=(e,t)=>{$s(e,e.readable,t)};var ym=require("node:stream"),ma=require("node:util");var bm=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=ha(e,r,t),i=new ym.Writable({...ga(n,e,s),destroy:(0,ma.callbackify)(ba.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return ya(n,i),i},ha=(e,t,r)=>{let n=Un(e,t),s=Zr(r,n,"writableFinal"),o=Zr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},ga=(e,t,r)=>({write:h0.bind(void 0,e),final:(0,ma.callbackify)(g0.bind(void 0,e,t,r))}),h0=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},g0=async(e,t,r)=>{await fr(r,t)&&(e.writable&&e.end(),await t)},ya=async(e,t,r)=>{try{await aa(e),t.writable&&t.end()}catch(n){await dm(r),wm(t,n)}},ba=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await fr(r,t),await fr(n,t)&&(wm(e,s),await Is(t,s))},wm=(e,t)=>{$s(e,e.writable,t)};var xm=require("node:stream"),Sm=require("node:util");var vm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||ge.has(r),{subprocessStdout:c,waitReadableDestroy:u}=ua(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:p}=ha(e,s,t),{readableEncoding:d,readableObjectMode:x,readableHighWaterMark:T}=la(c,a),{read:P,onStdoutDataDone:M}=fa({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new xm.Duplex({read:P,...ga(l,e,f),destroy:(0,Sm.callbackify)(y0.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:x,writableObjectMode:l.writableObjectMode,encoding:d});return da({subprocessStdout:c,onStdoutDataDone:M,readable:j,subprocess:e,subprocessStdin:l}),ya(l,j,c),j},y0=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([pa({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),ba({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var wa=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||ge.has(t),i=rr(e,r),a=Cs({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return b0(a,i,e)},b0=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var _m=(e,{encoding:t})=>{let r=fm();e.readable=hm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=bm.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=vm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=wa.bind(void 0,e,t),e[Symbol.asyncIterator]=wa.bind(void 0,e,t,{})};var Em=(e,t)=>{for(let[r,n]of x0){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},w0=(async()=>{})().constructor.prototype,x0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(w0,e)]);var Rm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=S0(e,t,r),{subprocess:p,promise:d}=_0({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return p.pipe=ks.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),Em(p,d),Ue.set(p,{options:l,fileDescriptors:f}),p},S0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=$n(e,t,r),{file:a,commandArguments:c,options:u}=Qn(e,t,r),l=v0(u),f=kp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},v0=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},_0=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,Om.spawn)(...es(e,t,r))}catch(x){return Tp({error:x,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Tm.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Lp(c,a,u),Mp(c,r,u);let f={},p=Be();c.kill=Pl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:u}),c.all=nm(c,r),_m(c,r),Sp(c,r);let d=E0({subprocess:c,options:r,startTime:n,verboseInfo:s,fileDescriptors:a,originalStreams:l,command:o,escapedCommand:i,context:f,onInternalError:p,controller:u});return{subprocess:c,promise:d}},E0=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:s,originalStreams:o,command:i,escapedCommand:a,context:c,onInternalError:u,controller:l})=>{let[f,[p,d],x,T,P]=await lm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let M=x.map((X,we)=>et(X,t,we)),j=et(T,t,"all"),Y=T0({errorInfo:f,exitCode:p,signal:d,stdio:M,all:j,ipcOutput:P,context:c,options:t,command:i,escapedCommand:a,startTime:r});return ir(Y,n,t)},T0=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,context:i,options:a,command:c,escapedCommand:u,startTime:l})=>"error"in e?Br({error:e.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof Ge,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):us({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Ds=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,O0(n,e[n],s)]));return{...e,...r}},O0=(e,t,r)=>R0.has(e)&&W(t)&&W(r)?{...t,...r}:r,R0=new Set(["env",...jo]);var dt=(e,t,r,n)=>{let s=(i,a,c)=>dt(i,a,r,c),o=(...i)=>k0({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},k0=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Ds(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=C0({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?yp(a,c,u):Rm(a,c,u,s)},C0=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=tu(t)?ru(t,r):[t,...r],[i,a,c]=wn(...o),u=Ds(Ds(n,s),c),{file:l=i,commandArguments:f=a,options:p=u,isSync:d=!1}=e({file:i,commandArguments:a,options:u});return{file:l,commandArguments:f,options:p,isSync:d}};var km=({file:e,commandArguments:t})=>Am(e,t),Cm=({file:e,commandArguments:t})=>({...Am(e,t),isSync:!0}),Am=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=A0(e);return{file:r,commandArguments:n}},A0=e=>{if(typeof e!="string")throw new TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t==="")return[];let r=[];for(let n of t.split(I0)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},I0=/ +/g;var Im=(e,t,r)=>{e.sync=t($0,r),e.s=e.sync},$m=({options:e})=>Dm(e),$0=({options:e})=>({...Dm(e),isSync:!0}),Dm=e=>({options:{...D0(e),...e}}),D0=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Lm={preferLocal:!0};var Nm=dt(()=>({})),QU=dt(()=>({isSync:!0})),eG=dt(km),tG=dt(Cm),rG=dt(kf),nG=dt($m,{},Lm,Im),{sendMessage:sG,getOneMessage:oG,getEachMessage:iG,getCancelSignal:aG}=vp();var Bw=require("fs"),Ro=require("path"),ko=q(Eg());var Me={};px(Me,{BRAND:()=>eC,DIRTY:()=>Rt,EMPTY_PATH:()=>$k,INVALID:()=>O,NEVER:()=>FC,OK:()=>re,ParseStatus:()=>ee,Schema:()=>L,ZodAny:()=>ht,ZodArray:()=>st,ZodBigInt:()=>Ct,ZodBoolean:()=>At,ZodBranded:()=>nn,ZodCatch:()=>Ut,ZodDate:()=>It,ZodDefault:()=>Bt,ZodDiscriminatedUnion:()=>Zs,ZodEffects:()=>Re,ZodEnum:()=>Ft,ZodError:()=>le,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>Xs,ZodIntersection:()=>Nt,ZodIssueCode:()=>m,ZodLazy:()=>Pt,ZodLiteral:()=>Mt,ZodMap:()=>wr,ZodNaN:()=>Sr,ZodNativeEnum:()=>jt,ZodNever:()=>Pe,ZodNull:()=>Dt,ZodNullable:()=>Ze,ZodNumber:()=>kt,ZodObject:()=>fe,ZodOptional:()=>Te,ZodParsedType:()=>b,ZodPipeline:()=>sn,ZodPromise:()=>gt,ZodReadonly:()=>Gt,ZodRecord:()=>Ys,ZodSchema:()=>L,ZodSet:()=>xr,ZodString:()=>mt,ZodSymbol:()=>yr,ZodTransformer:()=>Re,ZodTuple:()=>He,ZodType:()=>L,ZodUndefined:()=>$t,ZodUnion:()=>Lt,ZodUnknown:()=>nt,ZodVoid:()=>br,addIssueToContext:()=>y,any:()=>uC,array:()=>pC,bigint:()=>sC,boolean:()=>Ng,coerce:()=>MC,custom:()=>$g,date:()=>oC,datetimeRegex:()=>Ag,defaultErrorMap:()=>tt,discriminatedUnion:()=>yC,effect:()=>CC,enum:()=>OC,function:()=>_C,getErrorMap:()=>mr,getParsedType:()=>We,instanceof:()=>rC,intersection:()=>bC,isAborted:()=>Ws,isAsync:()=>hr,isDirty:()=>Hs,isValid:()=>pt,late:()=>tC,lazy:()=>EC,literal:()=>TC,makeIssue:()=>rn,map:()=>SC,nan:()=>nC,nativeEnum:()=>RC,never:()=>fC,null:()=>cC,nullable:()=>IC,number:()=>Lg,object:()=>mC,objectUtil:()=>Fa,oboolean:()=>PC,onumber:()=>NC,optional:()=>AC,ostring:()=>LC,pipeline:()=>DC,preprocess:()=>$C,promise:()=>kC,quotelessJson:()=>Ck,record:()=>xC,set:()=>vC,setErrorMap:()=>Ik,strictObject:()=>hC,string:()=>Dg,symbol:()=>iC,transformer:()=>CC,tuple:()=>wC,undefined:()=>aC,union:()=>gC,unknown:()=>lC,util:()=>N,void:()=>dC});var N;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let i of s)o[i]=i;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(let a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(let i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var Fa;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Fa||(Fa={}));var b=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),We=e=>{switch(typeof e){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(e)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(e)?b.array:e===null?b.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?b.promise:typeof Map<"u"&&e instanceof Map?b.map:typeof Set<"u"&&e instanceof Set?b.set:typeof Date<"u"&&e instanceof Date?b.date:b.object;default:return b.unknown}};var m=N.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ck=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),le=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};le.create=e=>new le(e);var Ak=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===b.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${N.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,N.assertNever(e)}return{message:r}},tt=Ak;var Tg=tt;function Ik(e){Tg=e}function mr(){return Tg}var rn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},$k=[];function y(e,t){let r=mr(),n=rn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===tt?void 0:tt].filter(s=>!!s)});e.common.issues.push(n)}var ee=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return O;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let o=await s.key,i=await s.value;n.push({key:o,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return O;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}},O=Object.freeze({status:"aborted"}),Rt=e=>({status:"dirty",value:e}),re=e=>({status:"valid",value:e}),Ws=e=>e.status==="aborted",Hs=e=>e.status==="dirty",pt=e=>e.status==="valid",hr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Oe=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Og=(e,t)=>{if(pt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le(e.common.issues);return this._error=r,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{let{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var L=class{get description(){return this._def.description}_getType(t){return We(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:We(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ee,ctx:{common:t.parent.common,data:t.data,parsedType:We(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(hr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:We(t)},s=this._parseSync({data:t,path:n.path,parent:n});return Og(n,s)}"~validate"(t){var n,s;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:We(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return pt(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>pt(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:We(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(hr(s)?s:Promise.resolve(s));return Og(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Re({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Te.create(this,this._def)}nullable(){return Ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return st.create(this)}promise(){return gt.create(this,this._def)}or(t){return Lt.create([this,t],this._def)}and(t){return Nt.create(this,t,this._def)}transform(t){return new Re({...$(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Bt({...$(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new nn({typeName:k.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Ut({...$(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return sn.create(this,t)}readonly(){return Gt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Dk=/^c[^\s-]{8,}$/i,Lk=/^[0-9a-z]+$/,Nk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Mk=/^[a-z0-9_-]{21}$/i,Fk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Uk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ja,Gk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Vk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Hk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Zk=new RegExp(`^${kg}$`);function Cg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Yk(e){return new RegExp(`^${Cg(e)}$`)}function Ag(e){let t=`${kg}T${Cg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Xk(e,t){return!!((t==="v4"||!t)&&Gk.test(e)||(t==="v6"||!t)&&Vk.test(e))}function Kk(e,t){if(!Fk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function Jk(e,t){return!!((t==="v4"||!t)&&qk.test(e)||(t==="v6"||!t)&&zk.test(e))}var mt=class e extends L{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==b.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.string,received:o.parsedType}),O}let n=new ee,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?y(s,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&y(s,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Bk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"email",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")ja||(ja=new RegExp(Uk,"u")),ja.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Pk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Mk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Dk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Lk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Nk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Ag(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Yk(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?jk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Xk(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?Kk(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Jk(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Wk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Hk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):N.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:m.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};mt.create=e=>new mt({checks:[],typeName:k.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});function Qk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return o%i/10**s}var kt=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==b.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.number,received:o.parsedType}),O}let n,s=new ee;for(let o of this._def.checks)o.kind==="int"?N.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Qk(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};kt.create=e=>new kt({checks:[],typeName:k.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var Ct=class e extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==b.bigint)return this._getInvalidInput(t);let n,s=new ee;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):N.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:b.bigint,received:r.parsedType}),O}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ct.create=e=>new Ct({checks:[],typeName:k.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$(e)});var At=class extends L{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==b.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.boolean,received:n.parsedType}),O}return re(t.data)}};At.create=e=>new At({typeName:k.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var It=class e extends L{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==b.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:b.date,received:o.parsedType}),O}if(Number.isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),O}let n=new ee,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),y(s,{code:m.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};It.create=e=>new It({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:k.ZodDate,...$(e)});var yr=class extends L{_parse(t){if(this._getType(t)!==b.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.symbol,received:n.parsedType}),O}return re(t.data)}};yr.create=e=>new yr({typeName:k.ZodSymbol,...$(e)});var $t=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.undefined,received:n.parsedType}),O}return re(t.data)}};$t.create=e=>new $t({typeName:k.ZodUndefined,...$(e)});var Dt=class extends L{_parse(t){if(this._getType(t)!==b.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.null,received:n.parsedType}),O}return re(t.data)}};Dt.create=e=>new Dt({typeName:k.ZodNull,...$(e)});var ht=class extends L{constructor(){super(...arguments),this._any=!0}_parse(t){return re(t.data)}};ht.create=e=>new ht({typeName:k.ZodAny,...$(e)});var nt=class extends L{constructor(){super(...arguments),this._unknown=!0}_parse(t){return re(t.data)}};nt.create=e=>new nt({typeName:k.ZodUnknown,...$(e)});var Pe=class extends L{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:b.never,received:r.parsedType}),O}};Pe.create=e=>new Pe({typeName:k.ZodNever,...$(e)});var br=class extends L{_parse(t){if(this._getType(t)!==b.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.void,received:n.parsedType}),O}return re(t.data)}};br.create=e=>new br({typeName:k.ZodVoid,...$(e)});var st=class e extends L{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==b.array)return y(r,{code:m.invalid_type,expected:b.array,received:r.parsedType}),O;if(s.exactLength!==null){let i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(y(r,{code:i?m.too_big:m.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(y(r,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(y(r,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Oe(r,i,r.path,a)))).then(i=>ee.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Oe(r,i,r.path,a)));return ee.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};st.create=(e,t)=>new st({type:e,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...$(t)});function gr(e){if(e instanceof fe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Te.create(gr(n))}return new fe({...e._def,shape:()=>t})}else return e instanceof st?new st({...e._def,type:gr(e.element)}):e instanceof Te?Te.create(gr(e.unwrap())):e instanceof Ze?Ze.create(gr(e.unwrap())):e instanceof He?He.create(e.items.map(t=>gr(t))):e}var fe=class e extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=N.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==b.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:b.object,received:u.parsedType}),O}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pe&&this._def.unknownKeys==="strip"))for(let u in s.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Oe(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Pe){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(y(s,{code:m.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let f=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Oe(s,f,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let f=await l.key,p=await l.value;u.push({key:f,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>ee.mergeObjectSync(n,u)):ee.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i;let s=((i=(o=this._def).errorMap)==null?void 0:i.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:k.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of N.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of N.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return gr(this)}partial(t){let r={};for(let n of N.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of N.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Te;)o=o._def.innerType;r[n]=o}return new e({...this._def,shape:()=>r})}keyof(){return Ig(N.objectKeys(this.shape))}};fe.create=(e,t)=>new fe({shape:()=>e,unknownKeys:"strip",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});fe.strictCreate=(e,t)=>new fe({shape:()=>e,unknownKeys:"strict",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});fe.lazycreate=(e,t)=>new fe({shape:e,unknownKeys:"strip",catchall:Pe.create(),typeName:k.ZodObject,...$(t)});var Lt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=o.map(a=>new le(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),O}if(r.common.async)return Promise.all(n.map(async o=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o,i=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(c=>new le(c));return y(r,{code:m.invalid_union,unionErrors:a}),O}}get options(){return this._def.options}};Lt.create=(e,t)=>new Lt({options:e,typeName:k.ZodUnion,...$(t)});var rt=e=>e instanceof Pt?rt(e.schema):e instanceof Re?rt(e.innerType()):e instanceof Mt?[e.value]:e instanceof Ft?e.options:e instanceof jt?N.objectValues(e.enum):e instanceof Bt?rt(e._def.innerType):e instanceof $t?[void 0]:e instanceof Dt?[null]:e instanceof Te?[void 0,...rt(e.unwrap())]:e instanceof Ze?[null,...rt(e.unwrap())]:e instanceof nn||e instanceof Gt?rt(e.unwrap()):e instanceof Ut?rt(e._def.innerType):[],Zs=class e extends L{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.object)return y(r,{code:m.invalid_type,expected:b.object,received:r.parsedType}),O;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(y(r,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),O)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let i=rt(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new e({typeName:k.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...$(n)})}};function Ba(e,t){let r=We(e),n=We(t);if(e===t)return{valid:!0,data:e};if(r===b.object&&n===b.object){let s=N.objectKeys(t),o=N.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=Ba(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===b.array&&n===b.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let i=e[o],a=t[o],c=Ba(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===b.date&&n===b.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Nt=class extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ws(o)||Ws(i))return O;let a=Ba(o.value,i.value);return a.valid?((Hs(o)||Hs(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),O)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Nt.create=(e,t,r)=>new Nt({left:e,right:t,typeName:k.ZodIntersection,...$(r)});var He=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.array)return y(n,{code:m.invalid_type,expected:b.array,received:n.parsedType}),O;if(n.data.length<this._def.items.length)return y(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Oe(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>ee.mergeArray(r,i)):ee.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};He.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new He({items:e,typeName:k.ZodTuple,rest:null,...$(t)})};var Ys=class e extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.object)return y(n,{code:m.invalid_type,expected:b.object,received:n.parsedType}),O;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Oe(n,a,n.path,a)),value:i._parse(new Oe(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ee.mergeObjectAsync(r,s):ee.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof L?new e({keyType:t,valueType:r,typeName:k.ZodRecord,...$(n)}):new e({keyType:mt.create(),valueType:t,typeName:k.ZodRecord,...$(r)})}},wr=class extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.map)return y(n,{code:m.invalid_type,expected:b.map,received:n.parsedType}),O;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Oe(n,a,n.path,[u,"key"])),value:o._parse(new Oe(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return O;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};wr.create=(e,t,r)=>new wr({valueType:t,keyType:e,typeName:k.ZodMap,...$(r)});var xr=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==b.set)return y(n,{code:m.invalid_type,expected:b.set,received:n.parsedType}),O;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(y(n,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(y(n,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return O;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>o._parse(new Oe(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};xr.create=(e,t)=>new xr({valueType:e,minSize:null,maxSize:null,typeName:k.ZodSet,...$(t)});var Xs=class e extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.function)return y(r,{code:m.invalid_type,expected:b.function,received:r.parsedType}),O;function n(a,c){return rn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mr(),tt].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return rn({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mr(),tt].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof gt){let a=this;return re(async function(...c){let u=new le([]),l=await a._def.args.parseAsync(c,o).catch(d=>{throw u.addIssue(n(c,d)),u}),f=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(f,o).catch(d=>{throw u.addIssue(s(f,d)),u})})}else{let a=this;return re(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new le([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new le([s(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:He.create(t).rest(nt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||He.create([]).rest(nt.create()),returns:r||nt.create(),typeName:k.ZodFunction,...$(n)})}},Pt=class extends L{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Pt.create=(e,t)=>new Pt({getter:e,typeName:k.ZodLazy,...$(t)});var Mt=class extends L{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return y(r,{received:r.data,code:m.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:t.data}}get value(){return this._def.value}};Mt.create=(e,t)=>new Mt({value:e,typeName:k.ZodLiteral,...$(t)});function Ig(e,t){return new Ft({values:e,typeName:k.ZodEnum,...$(t)})}var Ft=class e extends L{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:N.joinValues(n),received:r.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),O}return re(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Ft.create=Ig;var jt=class extends L{_parse(t){let r=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==b.string&&n.parsedType!==b.number){let s=N.objectValues(r);return y(n,{expected:N.joinValues(s),received:n.parsedType,code:m.invalid_type}),O}if(this._cache||(this._cache=new Set(N.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=N.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),O}return re(t.data)}get enum(){return this._def.values}};jt.create=(e,t)=>new jt({values:e,typeName:k.ZodNativeEnum,...$(t)});var gt=class extends L{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==b.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:b.promise,received:r.parsedType}),O;let n=r.parsedType===b.promise?r.data:Promise.resolve(r.data);return re(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gt.create=(e,t)=>new gt({type:e,typeName:k.ZodPromise,...$(t)});var Re=class extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{y(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){let i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return O;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?O:c.status==="dirty"?Rt(c.value):r.value==="dirty"?Rt(c.value):c});{if(r.value==="aborted")return O;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?O:a.status==="dirty"?Rt(a.value):r.value==="dirty"?Rt(a.value):a}}if(s.type==="refinement"){let i=a=>{let c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?O:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?O:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!pt(i))return O;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>pt(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):O);N.assertNever(s)}};Re.create=(e,t,r)=>new Re({schema:e,typeName:k.ZodEffects,effect:t,...$(r)});Re.createWithPreprocess=(e,t,r)=>new Re({schema:t,effect:{type:"preprocess",transform:e},typeName:k.ZodEffects,...$(r)});var Te=class extends L{_parse(t){return this._getType(t)===b.undefined?re(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Te.create=(e,t)=>new Te({innerType:e,typeName:k.ZodOptional,...$(t)});var Ze=class extends L{_parse(t){return this._getType(t)===b.null?re(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ze.create=(e,t)=>new Ze({innerType:e,typeName:k.ZodNullable,...$(t)});var Bt=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===b.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Bt.create=(e,t)=>new Bt({innerType:e,typeName:k.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Ut=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return hr(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:k.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var Sr=class extends L{_parse(t){if(this._getType(t)!==b.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:b.nan,received:n.parsedType}),O}return{status:"valid",value:t.data}}};Sr.create=e=>new Sr({typeName:k.ZodNaN,...$(e)});var eC=Symbol("zod_brand"),nn=class extends L{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},sn=class e extends L{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?O:o.status==="dirty"?(r.dirty(),Rt(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?O:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:k.ZodPipeline})}},Gt=class extends L{_parse(t){let r=this._def.innerType._parse(t),n=s=>(pt(s)&&(s.value=Object.freeze(s.value)),s);return hr(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Gt.create=(e,t)=>new Gt({innerType:e,typeName:k.ZodReadonly,...$(t)});function Rg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function $g(e,t={},r){return e?ht.create().superRefine((n,s)=>{let o=e(n);if(o instanceof Promise)return o.then(i=>{if(!i){let a=Rg(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!o){let i=Rg(t,n),a=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:a})}}):ht.create()}var tC={object:fe.lazycreate},k;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(k||(k={}));var rC=(e,t={message:`Input not instance of ${e.name}`})=>$g(r=>r instanceof e,t),Dg=mt.create,Lg=kt.create,nC=Sr.create,sC=Ct.create,Ng=At.create,oC=It.create,iC=yr.create,aC=$t.create,cC=Dt.create,uC=ht.create,lC=nt.create,fC=Pe.create,dC=br.create,pC=st.create,mC=fe.create,hC=fe.strictCreate,gC=Lt.create,yC=Zs.create,bC=Nt.create,wC=He.create,xC=Ys.create,SC=wr.create,vC=xr.create,_C=Xs.create,EC=Pt.create,TC=Mt.create,OC=Ft.create,RC=jt.create,kC=gt.create,CC=Re.create,AC=Te.create,IC=Ze.create,$C=Re.createWithPreprocess,DC=sn.create,LC=()=>Dg().optional(),NC=()=>Lg().optional(),PC=()=>Ng().optional(),MC={string:(e=>mt.create({...e,coerce:!0})),number:(e=>kt.create({...e,coerce:!0})),boolean:(e=>At.create({...e,coerce:!0})),bigint:(e=>Ct.create({...e,coerce:!0})),date:(e=>It.create({...e,coerce:!0}))};var FC=O;var Pg=Me.object({list:Me.boolean().optional(),log:Me.boolean().optional(),track:Me.boolean().optional(),parser:Me.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Me.string().optional(),ignoreConfig:Me.string().optional(),match:Me.any().optional()});var Cy=require("node:buffer"),ho=q(Yg(),1),fo=q(Va(),1),Sb=require("child_process"),sw=q(Wa(),1),Or=q(Wa(),1),Aw=require("node:events"),dc=Object.defineProperty,hA=Object.getOwnPropertyDescriptor,pc=Object.getOwnPropertyNames,gA=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[pc(e)[0]])(e=0)),t},yA=(e,t)=>function(){return t||(0,e[pc(e)[0]])((t={exports:{}}).exports,t),t.exports},Z=(e,t)=>{for(var r in t)dc(e,r,{get:t[r],enumerable:!0})},bA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of pc(t))!gA.call(e,s)&&s!==r&&dc(e,s,{get:()=>t[s],enumerable:!(n=hA(t,s))||n.enumerable});return e},V=e=>bA(dc({},"__esModule",{value:!0}),e);function wA(...e){let t=new String(e);return mo.set(t,e),t}function co(e){return e instanceof String&&mo.has(e)}function Xg(e){return mo.get(e)||[]}var mo,un=g({"src/lib/args/pathspec.ts"(){"use strict";mo=new WeakMap}}),it,bt=g({"src/lib/errors/git-error.ts"(){"use strict";it=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),ln,kr=g({"src/lib/errors/git-response-error.ts"(){"use strict";bt(),ln=class extends it{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),Ry,ky=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";bt(),Ry=class extends it{constructor(e){super(void 0,e)}}}});function Ay(e){return typeof e!="function"?Ht:e}function Iy(e){return typeof e=="function"&&e!==Ht}function $y(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Dy(e,t=0){return Ly(e)&&e.length>t?e[t]:void 0}function Wt(e,t=0){if(Ly(e)&&e.length>t)return e[e.length-1-t]}function Ly(e){return!!(e&&typeof e.length=="number")}function fn(e="",t=!0,r=`
56
+ `){return e.split(r).reduce((n,s)=>{let o=t?s.trim():s;return o&&n.push(o),n},[])}function mc(e,t){return fn(e,!0).map(r=>t(r))}function hc(e){return(0,ho.exists)(e,ho.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Ny(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function go(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Ye(e){return Array.isArray(e)?e:[e]}function Py(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function My(e){return Ye(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function an(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function cn(e){return(Array.isArray(e)?Cy.Buffer.concat(e):e).toString("utf-8")}function Fy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Qa(e=0){return new Promise(t=>setTimeout(t,e))}function ec(e){if(e!==!1)return e}var Rr,Ht,dn,yo=g({"src/lib/utils/util.ts"(){"use strict";Rr="\0",Ht=()=>{},dn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Xe(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function tc(e,t){let r=co(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function bo(e){return!!e&&dn(e)==="[object Object]"}function jy(e){return typeof e=="function"}var pn,ne,By,uo,gc,Uy=g({"src/lib/utils/argument-filters.ts"(){"use strict";yo(),un(),pn=e=>Array.isArray(e),ne=e=>typeof e=="string",By=e=>Array.isArray(e)&&e.every(ne),uo=e=>ne(e)||Array.isArray(e)&&e.every(ne),gc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),rc,xA=g({"src/lib/utils/exit-codes.ts"(){"use strict";rc=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(rc||{})}}),lo,SA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";lo=class Gy{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new Gy(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,yt,vA=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},yt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function qy(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...Vy},...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Vy,_A=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Vy={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function yc(e,t=[]){return bo(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];if(co(s))r.push(s);else if(tc(s,["boolean"]))r.push(n+"="+s);else if(Array.isArray(s))for(let o of s)tc(o,["string","number"])||r.push(n+"="+o);else r.push(n);return r},t):t}function pe(e,t=0,r=!1){let n=[];for(let s=0,o=t<0?e.length:t;s<o;s++)"string|number".includes(typeof e[s])&&n.push(String(e[s]));return yc(bc(e),n),r||n.push(...EA(e)),n}function EA(e){let t=typeof Wt(e)=="function";return Xe(Wt(e,t?1:0),pn,[])}function bc(e){let t=jy(Wt(e));return Xe(Wt(e,t?1:0),bo)}function z(e,t=!0){let r=Ay(Wt(e));return t||Iy(r)?r:void 0}var TA=g({"src/lib/utils/task-options.ts"(){"use strict";Uy(),yo(),un()}});function nc(e,t){return e(t.stdOut,t.stdErr)}function he(e,t,r,n=!0){return Ye(r).forEach(s=>{for(let o=fn(s,n),i=0,a=o.length;i<a;i++){let c=(u=0)=>{if(!(i+u>=a))return o[i+u]};t.some(({parse:u})=>u(c,e))}}),e}var OA=g({"src/lib/utils/task-parser.ts"(){"use strict";yo()}}),zy={};Z(zy,{ExitCodes:()=>rc,GitOutputStreams:()=>lo,LineParser:()=>I,NOOP:()=>Ht,NULL:()=>Rr,RemoteLineParser:()=>yt,append:()=>F,appendTaskOptions:()=>yc,asArray:()=>Ye,asCamelCase:()=>Py,asFunction:()=>Ay,asNumber:()=>U,asStringArray:()=>My,bufferToString:()=>cn,callTaskParser:()=>nc,createInstanceConfig:()=>qy,delay:()=>Qa,filterArray:()=>pn,filterFunction:()=>jy,filterHasLength:()=>gc,filterPlainObject:()=>bo,filterPrimitives:()=>tc,filterString:()=>ne,filterStringArray:()=>By,filterStringOrStringArray:()=>uo,filterType:()=>Xe,first:()=>Dy,folderExists:()=>hc,forEachLineWithContent:()=>mc,getTrailingOptions:()=>pe,including:()=>Ny,isUserFunction:()=>Iy,last:()=>Wt,objectToString:()=>dn,orVoid:()=>ec,parseStringResponse:()=>he,pick:()=>Fy,prefixedArray:()=>an,remove:()=>go,splitOn:()=>$y,toLinesWithContent:()=>fn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>bc});var C=g({"src/lib/utils/index.ts"(){"use strict";Uy(),xA(),SA(),vA(),_A(),TA(),OA(),yo()}}),Wy={};Z(Wy,{CheckRepoActions:()=>sc,checkIsBareRepoTask:()=>Zy,checkIsRepoRootTask:()=>Hy,checkIsRepoTask:()=>RA});function RA(e){switch(e){case"bare":return Zy();case"root":return Hy()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:wo,parser:wc}}function Hy(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:wo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Zy(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:wo,parser:wc}}function kA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var sc,wo,wc,Yy=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),sc=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(sc||{}),wo=({exitCode:e},t,r,n)=>{if(e===128&&kA(t))return r(Buffer.from("false"));n(t)},wc=e=>e.trim()==="true"}});function CA(e,t){let r=new Xy(e),n=e?Jy:Ky;return fn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(Qy.test(o)?r.folders:r.files).push(o)}),r}var Xy,Ky,Jy,Qy,AA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),Xy=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Ky=/^[a-z]+\s*/i,Jy=/^[a-z]+\s+[a-z]+\s*/i,Qy=/\/$/}}),oc={};Z(oc,{EMPTY_COMMANDS:()=>xo,adhocExecTask:()=>eb,configurationErrorTask:()=>me,isBufferTask:()=>rb,isEmptyTask:()=>nb,straightThroughBufferTask:()=>tb,straightThroughStringTask:()=>ae});function eb(e){return{commands:xo,format:"empty",parser:e}}function me(e){return{commands:xo,format:"empty",parser(){throw typeof e=="string"?new Ry(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function tb(e){return{commands:e,format:"buffer",parser(t){return t}}}function rb(e){return e.format==="buffer"}function nb(e){return e.format==="empty"||!e.commands.length}var xo,H=g({"src/lib/tasks/task.ts"(){"use strict";ky(),xo=[]}}),sb={};Z(sb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>xc,CONFIG_ERROR_MODE_REQUIRED:()=>Sc,CONFIG_ERROR_UNKNOWN_OPTION:()=>vc,CleanOptions:()=>so,cleanTask:()=>ob,cleanWithOptionsTask:()=>IA,isCleanOptionsArray:()=>$A});function IA(e,t){let{cleanMode:r,options:n,valid:s}=DA(e);return r?s.options?(n.push(...t),n.some(PA)?me(xc):ob(r,n)):me(vc+JSON.stringify(e)):me(Sc)}function ob(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return CA(e==="n",n)}}}function $A(e){return Array.isArray(e)&&e.every(t=>_c.has(t))}function DA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{LA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&NA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function LA(e){return e==="f"||e==="n"}function NA(e){return/^-[a-z]$/i.test(e)&&_c.has(e.charAt(1))}function PA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var xc,Sc,vc,so,_c,ib=g({"src/lib/tasks/clean.ts"(){"use strict";AA(),C(),H(),xc="Git clean interactive mode is not supported",Sc='Git clean mode parameter ("n" or "f") is required',vc="Git clean unknown option found in: ",so=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(so||{}),_c=new Set(["i",...My(Object.values(so))])}});function MA(e){let t=new cb;for(let r of ab(e))t.addValue(r.file,String(r.key),r.value);return t}function FA(e,t){let r=null,n=[],s=new Map;for(let o of ab(e,t))o.key===t&&(n.push(r=o.value),s.has(o.file)||s.set(o.file,[]),s.get(o.file).push(r));return{key:t,paths:Array.from(s.keys()),scopes:s,value:r,values:n}}function jA(e){return e.replace(/^(file):/,"")}function*ab(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=jA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
+ `)){let c=$y(i,`
58
+ `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var cb,BA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),cb=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=Wt(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Ha(e,t){return typeof e=="string"&&ic.hasOwnProperty(e)?e:t}function UA(e,t,r,n){let s=["config",`--${n}`];return r&&s.push("--add"),s.push(e,t),{commands:s,format:"utf-8",parser(o){return o}}}function GA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return FA(n,e)}}}function qA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return MA(r)}}}function VA(){return{addConfig(e,t,...r){return this._runTask(UA(e,t,r[0]===!0,Ha(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(GA(e,Ha(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(qA(Ha(e[0],void 0)),z(arguments))}}}var ic,ub=g({"src/lib/tasks/config.ts"(){"use strict";BA(),C(),ic=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(ic||{})}});function zA(e){return lb.has(e)}var Za,lb,fb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Za=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Za||{}),lb=new Set(Object.values(Za))}});function WA(...e){return new pb().param(...e)}function HA(e){let t=new Set,r={};return mc(e,n=>{let[s,o,i]=n.split(Rr);t.add(s),(r[s]=r[s]||[]).push({line:U(o),path:s,preview:i})}),{paths:t,results:r}}function ZA(){return{grep(e){let t=z(arguments),r=pe(arguments);for(let s of db)if(r.includes(s))return this._runTask(me(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=WA().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return HA(s)}},t)}}}var db,on,Kg,pb,mb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),H(),db=["-h"],on=Symbol("grepQuery"),pb=class{constructor(){this[Kg]=[]}*[(Kg=on,Symbol.iterator)](){for(let e of this[on])yield e}and(...e){return e.length&&this[on].push("--and","(",...an(e,"-e"),")"),this}param(...e){return this[on].push(...an(e,"-e")),this}}}}),hb={};Z(hb,{ResetMode:()=>oo,getResetMode:()=>XA,resetTask:()=>YA});function YA(e,t){let r=["reset"];return gb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function XA(e){if(gb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function gb(e){return yb.includes(e)}var oo,yb,bb=g({"src/lib/tasks/reset.ts"(){"use strict";H(),oo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(oo||{}),yb=Array.from(Object.values(oo))}});function KA(){return(0,fo.default)("simple-git")}function Jg(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...s)=>{e(n,...s),r(n,...s)}:e:(n,...s)=>{e(`%s ${n}`,t,...s),r&&r(n,...s)}}function JA(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Ec(e,t,r,n=KA()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=JA(Xe(t,ne),i,n);return u(r);function c(l,f){return F(o,Ec(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",p=i&&Jg(i,f)||Ht,d=Jg(n,`${s} ${f}`,p);return Object.assign(i?p:d,{label:e,sibling:c,info:d,step:u})}}var wb=g({"src/lib/git-logger.ts"(){"use strict";C(),fo.default.formatters.L=e=>String(gc(e)?e.length:"-"),fo.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):dn(e)}}),xb,QA=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var e;bt(),wb(),xb=(e=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=e.getName(r.commands[0]),s=Ec(this.logLabel,n);return{task:r,logger:s,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:s}]of Array.from(this._queue.entries()))n===r.task?(s.info("Failed %o",r),s("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):s.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new it(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting task"),n}static getName(r="empty"){return`task:${r}:${++e.counter}`}},e.counter=0,e)}});function zt(e,t){return{method:Dy(e.commands)||"",commands:t}}function eI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function Qg(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var ac,tI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";bt(),H(),C(),QA(),ac=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new xb}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return await(nb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n))}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}}onFatalException(e,t){let r=t instanceof it?Object.assign(t,{task:e}):new it(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",zt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],zt(e,e.commands)),s=await this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=await this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),rb(e)?nc(e.parser,o):nc(e.parser,o.asStrings())}async attemptEmptyTask(e,t){return t("empty task bypassing child process to call to task's parser"),e.parser(this)}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},{...zt(e,t),...r});if(l&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,l,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",dn(f)),c(new lo(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(a)))},u);if(l)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",s,a.length,o),u(l);n.info("retrieving task output complete"),c(new lo(Buffer.concat(i),Buffer.concat(a)))})}async gitResponse(e,t,r,n,s){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},zt(e,e.commands));return new Promise(a=>{let c=[],u=[];s.info("%s %o",t,r),s("%O",i);let l=this._beforeSpawn(e,r);if(l)return a({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,{...zt(e,r),kill(p){l=p||l}});let f=(0,Sb.spawn)(t,r,i);f.stdout.on("data",Qg(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",Qg(u,"stdErr",s,o.step("stdErr"))),f.on("error",eI(u,s)),n&&(s("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...zt(e,r),spawned:f,close(p,d){a({stdOut:c,stdErr:u,exitCode:p,rejection:l||d})},kill(p){f.killed||(l=p,f.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...zt(e,t),kill(n){r=n||r}}),r}}}}),vb={};Z(vb,{GitExecutor:()=>_b});var _b,rI=g({"src/lib/runners/git-executor.ts"(){"use strict";tI(),_b=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new ac(this,this._scheduler,this._plugins)}chain(){return new ac(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function nI(e,t,r=Ht){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof ln?sI(o):o,void 0)};t.then(n,s)}function sI(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=Ht};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,s){return s in e||(n[s]={enumerable:!1,configurable:!1,get(){return t(s),e.git[s]}}),n}}var oI=g({"src/lib/task-callback.ts"(){"use strict";kr(),C()}});function ey(e,t){return eb(r=>{if(!hc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var iI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),H()}});function Ya(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=go(t,"-B")),ae(t)}function aI(){return{checkout(){return this._runTask(Ya(pe(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Ya(["-b",e,t,...pe(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Ya(["-b",e,...pe(arguments)]),z(arguments))}}}var cI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),H()}});function uI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function lI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return he(uI(),[Eb],e)}})}}}var Eb,fI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Eb=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Py(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function dI(e){return he({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Tb,e)}var Tb,pI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Tb=[new I(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new I(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new I(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new I(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let s=parseInt(r,10)||0;n==="-"?e.summary.deletions=s:n==="+"&&(e.summary.insertions=s)})]}});function mI(e,t,r){return{commands:["-c","core.abbrev=40","commit",...an(e,"-m"),...t,...r],format:"utf-8",parser:dI}}function hI(){return{commit(t,...r){let n=z(arguments),s=e(t)||mI(Ye(t),Ye(Xe(r[0],uo,[])),[...Xe(r[1],pn,[]),...pe(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!uo(t)&&me("git.commit: requires the commit message to be supplied as a string/string[]")}}var gI=g({"src/lib/tasks/commit.ts"(){"use strict";pI(),C(),H()}});function yI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var bI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),H()}});function wI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var xI=g({"src/lib/tasks/hash-object.ts"(){"use strict";H()}});function SI(e,t,r){let n=String(r).trim(),s;if(s=Ob.exec(n))return new io(e,t,!1,s[1]);if(s=Rb.exec(n))return new io(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new io(e,t,/^re/i.test(n),o)}var io,Ob,Rb,vI=g({"src/lib/responses/InitSummary.ts"(){"use strict";io=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Ob=/^Init.+ repository in (.+)$/,Rb=/^Rein.+ in (.+)$/}});function _I(e){return e.includes(Tc)}function EI(e=!1,t,r){let n=["init",...r];return e&&!_I(n)&&n.splice(1,0,Tc),{commands:n,format:"utf-8",parser(s){return SI(n.includes("--bare"),t,s)}}}var Tc,TI=g({"src/lib/tasks/init.ts"(){"use strict";vI(),Tc="--bare"}});function Oc(e){for(let t=0;t<e.length;t++){let r=Rc.exec(e[t]);if(r)return`--${r[1]}`}return""}function OI(e){return Rc.test(e)}var Rc,mn=g({"src/lib/args/log-format.ts"(){"use strict";Rc=/^--(stat|numstat|name-only|name-status)(=|$)/}}),kb,RI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";kb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Cb(e=""){let t=Ab[e];return r=>he(new kb,t,r,!1)}var Xa,ty,ry,ny,Ab,Ib=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";mn(),RI(),fb(),C(),Xa=[new I(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:U(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new I(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:U(r),after:U(n),binary:!0})}),new I(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),s=/(\d+) d/.exec(r);e.changed=U(t),e.insertions=U(n==null?void 0:n[1]),e.deletions=U(s==null?void 0:s[1])})],ty=[new I(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let s=U(t),o=U(r);e.changed++,e.insertions+=s,e.deletions+=o,e.files.push({file:n,changes:s+o,insertions:s,deletions:o,binary:!1})}),new I(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],ry=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],ny=[new I(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,s,o])=>{e.changed++,e.files.push({file:o??n,changes:0,insertions:0,deletions:0,binary:!1,status:ec(zA(t)&&t),from:ec(!!o&&n!==o&&n),similarity:U(r)})})],Ab={"":Xa,"--stat":Xa,"--numstat":ty,"--name-status":ny,"--name-only":ry}}});function kI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function $b(e=Ac,t=Db,r=""){let n=Cb(r);return function(s){let o=fn(s.trim(),!1,kc).map(function(i){let a=i.split(Cc),c=kI(a[0].split(e),t);return a.length>1&&a[1].trim()&&(c.diff=n(a[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var kc,Cc,Ac,Db,Lb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Ib(),mn(),kc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Cc=" \xF2\xF2",Ac=" \xF2 ",Db=["hash","date","message","refs","author_name","author_email"]}}),Nb={};Z(Nb,{diffSummaryTask:()=>CI,validateLogFormatConfig:()=>So});function CI(e){let t=Oc(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),So(r)||{commands:r,format:"utf-8",parser:Cb(t)}}function So(e){let t=e.filter(OI);if(t.length>1)return me(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return me(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Ic=g({"src/lib/tasks/diff.ts"(){"use strict";mn(),Ib(),H()}});function AI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function II(e){return Object.keys(e).reduce((t,r)=>(r in cc||(t[r]=e[r]),t),{})}function Pb(e={},t=[]){let r=Xe(e.splitter,ne,Ac),n=bo(e.format)?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=AI(n,r),i=[],a=[`--pretty=format:${kc}${o}${Cc}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&a.push(`--max-count=${c}`),e.from||e.to){let u=e.symmetric!==!1?"...":"..";i.push(`${e.from||""}${u}${e.to||""}`)}return ne(e.file)&&a.push("--follow",wA(e.file)),yc(II(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function $I(e,t,r){let n=$b(e,t,Oc(r));return{commands:["log",...r],format:"utf-8",parser:n}}function DI(){return{log(...r){let n=z(arguments),s=Pb(bc(arguments),Xe(arguments[0],pn)),o=t(...r)||So(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return $I(r.splitter,r.fields,r.commands)}function t(r,n){return ne(r)&&ne(n)&&me("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var cc,Mb=g({"src/lib/tasks/log.ts"(){"use strict";mn(),un(),Lb(),C(),H(),Ic(),cc=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(cc||{})}}),ao,Fb,LI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";ao=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Fb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),uc,jb,NI=g({"src/lib/responses/PullSummary.ts"(){"use strict";uc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},jb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Ka(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function sy(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:U(t&&t[1]||"0"),delta:U(r&&r[1]||"0")}}var Bb,PI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Bb=[new yt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Ka(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=Ka(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new yt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=Ka(e.remoteMessages);s.total=sy(t),s.reused=sy(r),s.packReused=U(n)})]}});function Ub(e,t){return he({remoteMessages:new qb},Gb,t)}var Gb,qb,Vb=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),PI(),Gb=[new yt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Bb,new yt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new yt([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:U(t),summary:r,url:n}})],qb=class{constructor(){this.all=[]}}}});function MI(e,t){let r=he(new jb,zb,[e,t]);return r.message&&r}var oy,iy,ay,cy,zb,uy,$c,Wb=g({"src/lib/parsers/parse-pull.ts"(){"use strict";NI(),C(),Vb(),oy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,iy=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,ay=/^(create|delete) mode \d+ (.+)/,cy=[new I(oy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(iy,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new I(ay,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],zb=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],uy=(e,t)=>he(new uc,cy,[e,t]),$c=(e,t)=>Object.assign(new uc,uy(e,t),Ub(e,t))}}),ly,Hb,fy,FI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";LI(),C(),Wb(),ly=[new I(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new I(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new ao(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new ao(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new ao(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Hb=(e,t)=>Object.assign(fy(e,t),$c(e,t)),fy=e=>he(new Fb,ly,e)}});function dy(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=Hb(t,r);if(n.failed)throw new ln(n);return n}}:me("Git.merge requires at least one option")}var jI=g({"src/lib/tasks/merge.ts"(){"use strict";kr(),FI(),H()}});function BI(e,t,r){let n=r.includes("deleted"),s=r.includes("tag")||/^refs\/tags/.test(e),o=!r.includes("new");return{deleted:n,tag:s,branch:!s,new:!o,alreadyUpdated:o,local:e,remote:t}}var py,Zb,my,UI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Vb(),py=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(BI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:n}}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],Zb=(e,t)=>{let r=my(e,t),n=Ub(e,t);return{...r,...n}},my=(e,t)=>he({pushed:[]},py,[e,t])}}),Yb={};Z(Yb,{pushTagsTask:()=>GI,pushTask:()=>Dc});function GI(e={},t){return F(t,"--tags"),Dc(e,t)}function Dc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),go(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:Zb}}var Xb=g({"src/lib/tasks/push.ts"(){"use strict";UI(),C()}});function qI(){return{showBuffer(){let e=["show",...pe(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(tb(e),z(arguments))},show(){let e=["show",...pe(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var VI=g({"src/lib/tasks/show.ts"(){"use strict";C(),H()}}),hy,Kb,zI=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";hy=/^(.+)\0(.+)$/,Kb=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=hy.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function gy(e){let[t,r]=e.split(Rr);return{from:r||t,to:t}}function be(e,t,r){return[`${e}${t}`,r]}function Ja(e,...t){return t.map(r=>be(e,r,(n,s)=>F(n.conflicted,s)))}function WI(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(s,o,i){let a=`${s}${o}`,c=Jb.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new Kb(i,s,o))}}var yy,Jb,Qb,HI=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),zI(),yy=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Jb=new Map([be(" ","A",(e,t)=>F(e.created,t)),be(" ","D",(e,t)=>F(e.deleted,t)),be(" ","M",(e,t)=>F(e.modified,t)),be("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),be("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),be("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),be("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),be("R"," ",(e,t)=>{F(e.renamed,gy(t))}),be("R","M",(e,t)=>{let r=gy(t);F(e.renamed,r),F(e.modified,r.to)}),be("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),be("?","?",(e,t)=>F(e.not_added,t)),...Ja("A","A","U"),...Ja("D","D","U"),...Ja("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,s=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,i=/\son\s([\S]+)$/,a;a=r.exec(t),e.ahead=a&&+a[1]||0,a=n.exec(t),e.behind=a&&+a[1]||0,a=s.exec(t),e.current=a&&a[1],a=o.exec(t),e.tracking=a&&a[1],a=i.exec(t),e.current=a&&a[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),Qb=function(e){let t=e.split(Rr),r=new yy;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=Rr+(t[n++]||"")),WI(r,o))}return r}}});function ZI(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!ew.includes(r))],parser(r){return Qb(r)}}}var ew,YI=g({"src/lib/tasks/status.ts"(){"use strict";HI(),ew=["--null","-z"]}});function po(e=0,t=0,r=0,n="",s=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:s},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function XI(){return po(0,0,0,"",!1)}function KI(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:JI,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(Lc));n(t)}})}}}function JI(e){return e===Lc?XI():he(po(0,0,0,e),tw,e)}var Lc,tw,QI=g({"src/lib/tasks/version.ts"(){"use strict";C(),Lc="installed=false",tw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,po(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,po(U(t),U(r),n,s))})]}}),rw={};Z(rw,{SimpleGitApi:()=>lc});var lc,e1=g({"src/lib/simple-git-api.ts"(){"use strict";oI(),iI(),cI(),fI(),gI(),ub(),bI(),mb(),xI(),TI(),Mb(),jI(),Xb(),VI(),YI(),H(),QI(),C(),lc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&nI(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(ae(["add",...Ye(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(ey(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(ey(e.path,e.root&&this._executor||void 0),t):this._runTask(me("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(wI(e,t===!0),z(arguments))}init(e){return this._runTask(EI(e===!0,this._executor.cwd,pe(arguments)),z(arguments))}merge(){return this._runTask(dy(pe(arguments)),z(arguments))}mergeFromTo(e,t){return ne(e)&&ne(t)?this._runTask(dy([e,t,...pe(arguments)]),z(arguments,!1)):this._runTask(me("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Dc({remote:Xe(arguments[0],ne),branch:Xe(arguments[1],ne)},pe(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...pe(arguments)]),z(arguments))}status(){return this._runTask(ZI(pe(arguments)),z(arguments))}},Object.assign(lc.prototype,aI(),hI(),VA(),lI(),yI(),ZA(),DI(),qI(),KI())}}),nw={};Z(nw,{Scheduler:()=>ow});var by,ow,t1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),wb(),by=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,sw.createDeferred)();return{promise:t,done:r,id:e}}})(),ow=class{constructor(e=2){this.concurrency=e,this.logger=Ec("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=F(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),go(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,by());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),iw={};Z(iw,{applyPatchTask:()=>r1});function r1(e,t){return ae(["apply",...t,...e])}var n1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";H()}});function s1(e,t){return{branch:e,hash:t,success:!0}}function o1(e){return{branch:e,hash:null,success:!1}}var aw,i1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";aw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function cw(e,t){return t===1&&fc.test(e)}var wy,fc,xy,vo,a1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";i1(),C(),wy=/(\S+)\s+\(\S+\s([^)]+)\)/,fc=/^error[^']+'([^']+)'/m,xy=[new I(wy,(e,[t,r])=>{let n=s1(t,r);e.all.push(n),e.branches[t]=n}),new I(fc,(e,[t])=>{let r=o1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],vo=(e,t)=>he(new aw,xy,[e,t])}}),uw,c1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";uw=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,s){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:s}}}}});function Sy(e){return e?e.charAt(0):""}function lw(e){return he(new uw,fw,e)}var fw,u1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";c1(),C(),fw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Sy(t),!0,r,n,s)}),new I(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,n,s])=>{e.push(Sy(t),!1,r,n,s)})]}}),dw={};Z(dw,{branchLocalTask:()=>f1,branchTask:()=>l1,containsDeleteBranchCommand:()=>pw,deleteBranchTask:()=>p1,deleteBranchesTask:()=>d1});function pw(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function l1(e){let t=pw(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,s){return t?vo(n,s).all[0]:lw(n)}}}function f1(){return{format:"utf-8",commands:["branch","-v"],parser:lw}}function d1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return vo(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!cw(String(s),r))return i(s);o(n)}}}function p1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return vo(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!cw(String(i),n))return c(i);throw new ln(r.parser(cn(o),cn(s)),String(i))}};return r}var m1=g({"src/lib/tasks/branch.ts"(){"use strict";kr(),a1(),u1(),C()}}),mw,h1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";mw=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),hw={};Z(hw,{checkIgnoreTask:()=>g1});function g1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:mw}}var y1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";h1()}}),gw={};Z(gw,{cloneMirrorTask:()=>w1,cloneTask:()=>yw});function b1(e){return/^--upload-pack(=|$)/.test(e)}function yw(e,t,r){let n=["clone",...r];return ne(e)&&n.push(e),ne(t)&&n.push(t),n.find(b1)?me("git.fetch: potential exploit argument blocked."):ae(n)}function w1(e,t,r){return F(r,"--mirror"),yw(e,t,r)}var x1=g({"src/lib/tasks/clone.ts"(){"use strict";H(),C()}});function S1(e,t){return he({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},bw,[e,t])}var bw,v1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),bw=[new I(/From (.+)$/,(e,[t])=>{e.remote=t}),new I(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new I(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new I(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new I(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,s])=>{e.updated.push({name:n,tracking:s,to:r,from:t})})]}}),ww={};Z(ww,{fetchTask:()=>E1});function _1(e){return/^--upload-pack(=|$)/.test(e)}function E1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(_1)?me("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:S1}}var T1=g({"src/lib/tasks/fetch.ts"(){"use strict";v1(),H()}});function O1(e){return he({moves:[]},xw,e)}var xw,R1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),xw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Sw={};Z(Sw,{moveTask:()=>k1});function k1(e,t){return{commands:["mv","-v",...Ye(e),t],format:"utf-8",parser:O1}}var C1=g({"src/lib/tasks/move.ts"(){"use strict";R1(),C()}}),vw={};Z(vw,{pullTask:()=>A1});function A1(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(s,o){return $c(s,o)},onError(s,o,i,a){let c=MI(cn(s.stdOut),cn(s.stdErr));if(c)return a(new ln(c));a(o)}}}var I1=g({"src/lib/tasks/pull.ts"(){"use strict";kr(),Wb(),C()}});function $1(e){let t={};return _w(e,([r])=>t[r]={name:r}),Object.values(t)}function D1(e){let t={};return _w(e,([r,n,s])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),s&&n&&(t[r].refs[s.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function _w(e,t){mc(e,r=>t(r.split(/\s+/)))}var L1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Ew={};Z(Ew,{addRemoteTask:()=>N1,getRemotesTask:()=>P1,listRemotesTask:()=>M1,remoteTask:()=>F1,removeRemoteTask:()=>j1});function N1(e,t,r){return ae(["remote","add",...r,e,t])}function P1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?D1:$1}}function M1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function F1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function j1(e){return ae(["remote","remove",e])}var B1=g({"src/lib/tasks/remote.ts"(){"use strict";L1(),H()}}),Tw={};Z(Tw,{stashListTask:()=>U1});function U1(e={},t){let r=Pb(e),n=["stash","list",...r.commands,...t],s=$b(r.splitter,r.fields,Oc(n));return So(n)||{commands:n,format:"utf-8",parser:s}}var G1=g({"src/lib/tasks/stash-list.ts"(){"use strict";mn(),Lb(),Ic(),Mb()}}),Ow={};Z(Ow,{addSubModuleTask:()=>q1,initSubModuleTask:()=>V1,subModuleTask:()=>_o,updateSubModuleTask:()=>z1});function q1(e,t){return _o(["add",e,t])}function V1(e){return _o(["init",...e])}function _o(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function z1(e){return _o(["update",...e])}var W1=g({"src/lib/tasks/sub-module.ts"(){"use strict";H()}});function H1(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Rw(e,t):0}function Rw(e,t){return e===t?0:e>t?1:-1}function Z1(e){return e.trim()}function no(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var vy,kw,Y1=g({"src/lib/responses/TagList.ts"(){"use strict";vy=class{constructor(e,t){this.all=e,this.latest=t}},kw=function(e,t=!1){let r=e.split(`
59
+ `).map(Z1).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return H1(no(i[0]),no(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Rw(no(i[c]),no(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new vy(r,n)}}}),Cw={};Z(Cw,{addAnnotatedTagTask:()=>J1,addTagTask:()=>K1,tagListTask:()=>X1});function X1(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return kw(r,t)}}}function K1(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function J1(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Q1=g({"src/lib/tasks/tag.ts"(){"use strict";Y1()}}),e$=yA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(rI(),V(vb)),{SimpleGitApi:n}=(e1(),V(rw)),{Scheduler:s}=(t1(),V(nw)),{configurationErrorTask:o}=(H(),V(oc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:x}=(C(),V(zy)),{applyPatchTask:T}=(n1(),V(iw)),{branchTask:P,branchLocalTask:M,deleteBranchesTask:j,deleteBranchTask:Y}=(m1(),V(dw)),{checkIgnoreTask:X}=(y1(),V(hw)),{checkIsRepoTask:we}=(Yy(),V(Wy)),{cloneTask:ce,cloneMirrorTask:Ce}=(x1(),V(gw)),{cleanWithOptionsTask:Ae,isCleanOptionsArray:xe}=(ib(),V(sb)),{diffSummaryTask:Cr}=(Ic(),V(Nb)),{fetchTask:wt}=(T1(),V(ww)),{moveTask:qw}=(C1(),V(Sw)),{pullTask:Vw}=(I1(),V(vw)),{pushTagsTask:zw}=(Xb(),V(Yb)),{addRemoteTask:Ww,getRemotesTask:Hw,listRemotesTask:Zw,remoteTask:Yw,removeRemoteTask:Xw}=(B1(),V(Ew)),{getResetMode:Kw,resetTask:Jw}=(bb(),V(hb)),{stashListTask:Qw}=(G1(),V(Tw)),{addSubModuleTask:ex,initSubModuleTask:tx,subModuleTask:rx,updateSubModuleTask:nx}=(W1(),V(Ow)),{addAnnotatedTagTask:sx,addTagTask:ox,tagListTask:ix}=(Q1(),V(Cw)),{straightThroughBufferTask:ax,straightThroughStringTask:Fe}=(H(),V(oc));function R(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(R.prototype=Object.create(n.prototype)).constructor=R,R.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},R.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},R.prototype.stashList=function(h){return this._runTask(Qw(x(arguments)||{},a(h)&&h||[]),d(arguments))};function Fc(h,E,B,se){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(se,u),p(arguments))}R.prototype.clone=function(){return this._runTask(Fc("clone",ce,...arguments),d(arguments))},R.prototype.mirror=function(){return this._runTask(Fc("mirror",Ce,...arguments),d(arguments))},R.prototype.mv=function(h,E){return this._runTask(qw(h,E),d(arguments))},R.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,se){E.checkout(se.latest,h)})})},R.prototype.pull=function(h,E,B,se){return this._runTask(Vw(f(h,u),f(E,u),p(arguments)),d(arguments))},R.prototype.fetch=function(h,E){return this._runTask(wt(f(h,u),f(E,u),p(arguments)),d(arguments))},R.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},R.prototype.tags=function(h,E){return this._runTask(ix(p(arguments)),d(arguments))},R.prototype.rebase=function(){return this._runTask(Fe(["rebase",...p(arguments)]),d(arguments))},R.prototype.reset=function(h){return this._runTask(Jw(Kw(h),p(arguments)),d(arguments))},R.prototype.revert=function(h){let E=d(arguments);return typeof h!="string"?this._runTask(o("Commit must be a string"),E):this._runTask(Fe(["revert",...p(arguments,0,!0),h]),E)},R.prototype.addTag=function(h){let E=typeof h=="string"?ox(h):o("Git.addTag requires a tag name");return this._runTask(E,d(arguments))},R.prototype.addAnnotatedTag=function(h,E){return this._runTask(sx(h,E),d(arguments))},R.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),d(arguments))},R.prototype.branch=function(h,E){return this._runTask(P(p(arguments)),d(arguments))},R.prototype.branchLocal=function(h){return this._runTask(M(),d(arguments))},R.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let Ie=0;Ie<B.length&&E;Ie++)if(!c(B[Ie])){B.splice(Ie,B.length-Ie);break}B.push(...p(arguments,0,!0));var se=d(arguments);return B.length?this._runTask(Fe(B,this._trimmed),se):this._runTask(o("Raw: must supply one or more command to execute"),se)},R.prototype.submoduleAdd=function(h,E,B){return this._runTask(ex(h,E),d(arguments))},R.prototype.submoduleUpdate=function(h,E){return this._runTask(nx(p(arguments,!0)),d(arguments))},R.prototype.submoduleInit=function(h,E){return this._runTask(tx(p(arguments,!0)),d(arguments))},R.prototype.subModule=function(h,E){return this._runTask(rx(p(arguments)),d(arguments))},R.prototype.listRemote=function(){return this._runTask(Zw(p(arguments)),d(arguments))},R.prototype.addRemote=function(h,E,B){return this._runTask(Ww(h,E,p(arguments)),d(arguments))},R.prototype.removeRemote=function(h,E){return this._runTask(Xw(h),d(arguments))},R.prototype.getRemotes=function(h,E){return this._runTask(Hw(h===!0),d(arguments))},R.prototype.remote=function(h,E){return this._runTask(Yw(p(arguments)),d(arguments))},R.prototype.tag=function(h,E){let B=p(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(Fe(B),d(arguments))},R.prototype.updateServerInfo=function(h){return this._runTask(Fe(["update-server-info"]),d(arguments))},R.prototype.pushTags=function(h,E){let B=zw({remote:f(h,u)},p(arguments));return this._runTask(B,d(arguments))},R.prototype.rm=function(h){return this._runTask(Fe(["rm","-f",...i(h)]),d(arguments))},R.prototype.rmKeepLocal=function(h){return this._runTask(Fe(["rm","--cached",...i(h)]),d(arguments))},R.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},R.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},R.prototype._catFile=function(h,E){var B=d(E),se=["cat-file"],Ie=E[0];if(typeof Ie=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),B);Array.isArray(Ie)&&se.push.apply(se,Ie);let Co=h==="buffer"?ax(se):Fe(se);return this._runTask(Co,B)},R.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):Fe(["diff",...p(arguments)]);return this._runTask(B,d(arguments))},R.prototype.diffSummary=function(){return this._runTask(Cr(p(arguments,1)),d(arguments))},R.prototype.applyPatch=function(h){let E=l(h)?T(i(h),p([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(E,d(arguments))},R.prototype.revparse=function(){let h=["rev-parse",...p(arguments,!0)];return this._runTask(Fe(h,!0),d(arguments))},R.prototype.clean=function(h,E,B){let se=xe(h),Ie=se&&h.join("")||f(h,u)||"",Co=p([].slice.call(arguments,se?1:0));return this._runTask(Ae(Ie,Co),d(arguments))},R.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},R.prototype.clearQueue=function(){return this},R.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),d(arguments))},R.prototype.checkIsRepo=function(h,E){return this._runTask(we(f(h,u)),d(arguments))},t.exports=R}});un();bt();var t$=class extends it{constructor(e,t){super(void 0,t),this.config=e}};bt();bt();var ot=class extends it{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};kr();ky();Yy();ib();ub();fb();mb();bb();function r$(e){return e?[{type:"spawn.before",action(n,s){e.aborted&&s.kill(new ot(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,s){function o(){s.kill(new ot(void 0,"abort","Abort signal received"))}e.addEventListener("abort",o),s.spawned.on("close",()=>e.removeEventListener("abort",o))}}]:void 0}function n$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function s$(e,t){if(n$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new ot(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function o$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new ot(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new ot(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new ot(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function i$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((s,o)=>{let i=o<r.length?r[o+1]:"";e||s$(s,i),t||o$(s,n.method)}),r}}}C();function a$(e){let t=an(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var _y=(0,Or.deferred)().promise;function c$({onClose:e=!0,onExit:t=50}={}){function r(){let s=-1,o={close:(0,Or.deferred)(),closeTimeout:(0,Or.deferred)(),exit:(0,Or.deferred)(),exitTimeout:(0,Or.deferred)()},i=Promise.race([e===!1?_y:o.closeTimeout.promise,t===!1?_y:o.exitTimeout.promise]);return n(e,o.close,o.closeTimeout),n(t,o.exit,o.exitTimeout),{close(a){s=a,o.close.done()},exit(a){s=a,o.exit.done()},get exitCode(){return s},result:i}}function n(s,o,i){s!==!1&&(s===!0?o.promise:o.promise.then(()=>Qa(s))).then(i.done)}return{type:"spawn.after",async action(s,{spawned:o,close:i}){var l,f;let a=r(),c=!0,u=()=>void(c=!1);(l=o.stdout)==null||l.on("data",u),(f=o.stderr)==null||f.on("data",u),o.on("error",u),o.on("close",p=>a.close(p)),o.on("exit",p=>a.exit(p));try{await a.result,c&&await Qa(50),i(a.exitCode)}catch(p){i(a.exitCode,p)}}}}C();var u$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Ey="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function l$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function Ty(e,t){if(e.length<1||e.length>2)throw new ot(void 0,"binary",u$);if(e.some(l$))if(t)console.warn(Ey);else throw new ot(void 0,"binary",Ey);let[n,s]=e;return{binary:n,prefix:s}}function f$(e,t=["git"],r=!1){let n=Ty(Ye(t),r);e.on("binary",s=>{n=Ty(Ye(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}bt();function d$(e){return!!(e.exitCode&&e.stdErr.length)}function p$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function m$(e=!1,t=d$,r=p$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Oy(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new it(void 0,n.toString("utf-8"))}:{error:n}}}}C();var h$=class{constructor(){this.plugins=new Set,this.events=new Aw.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=F(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Ye(e).forEach(r=>r&&this.plugins.add(F(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,s=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===e&&(n=o.action(n,s));return n}};C();function g$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Ny(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:y$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function y$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function b$(e){let t=Fy(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function w$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var u,l;let o;function i(){o&&clearTimeout(o),o=setTimeout(c,e)}function a(){var f,p;(f=s.spawned.stdout)==null||f.off("data",i),(p=s.spawned.stderr)==null||p.off("data",i),s.spawned.off("exit",a),s.spawned.off("close",a),o&&clearTimeout(o)}function c(){a(),s.kill(new ot(void 0,"timeout","block timeout reached"))}r&&((u=s.spawned.stdout)==null||u.on("data",i)),t&&((l=s.spawned.stderr)==null||l.on("data",i)),s.spawned.on("exit",a),s.spawned.on("close",a),i()}}}un();function x$(){return{type:"spawn.args",action(e){let t=[],r;function n(s){(r=r||[]).push(...s)}for(let s=0;s<e.length;s++){let o=e[s];if(co(o)){n(Xg(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>co(i)&&Xg(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var S$=e$();function v$(e,t){var s;let r=new h$,n=qy(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!hc(n.baseDir))throw new t$(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(a$(n.config)),r.add(i$(n.unsafe)),r.add(x$()),r.add(c$(n.completion)),n.abort&&r.add(r$(n.abort)),n.progress&&r.add(g$(n.progress)),n.timeout&&r.add(w$(n.timeout)),n.spawnOptions&&r.add(b$(n.spawnOptions)),r.add(Oy(m$(!0))),n.errors&&r.add(Oy(n.errors)),f$(r,n.binary,(s=n.unsafe)==null?void 0:s.allowUnsafeCustomBinary),new S$(n,r)}kr();var Iw=v$;async function $w(){let e=Iw();try{let{current:t}=await e.branchLocal(),r=(await e.getRemotes(!0)).map(({name:o,refs:{fetch:i}})=>({name:o,url:i})),n=r.find(({name:o})=>o==="origin")??r[0];return{possibleRepositoryName:n?n.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await e.revparse(["--show-toplevel"])).split("/").pop(),branch:t,remotes:r}}catch{return null}}var Pw=q(Nw()),Pc=Pw.default.bold("@seed-design/codemod"),Mw=e=>({event:t,properties:r})=>console.log(Pc,t,r,e);var Uw=(0,Ro.resolve)(__dirname,"transforms"),jw=Vc(),Oo=Fw(),hn=null,Gw=null;function R$(){$w().then(e=>{Gw=e,hn=Mw({...e}),k$(hn)})}function k$(e){C$(),jw.version(Oo.version).help().command("[transformName] [...paths]","\uCF54\uB4DC \uBCC0\uD658 (codemod)").option("-l, --list","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D\uC744 \uBCF4\uC5EC\uC918\uC694").option("--log","\uB85C\uADF8\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--no-track","\uC0AC\uC6A9 \uD1B5\uACC4\uB97C \uC218\uC9D1\uD558\uC9C0 \uC54A\uC544\uC694").option("-p, --parser <parser>","jscodeshift\uAC00 \uC0AC\uC6A9\uD560 \uD30C\uC11C\uB97C \uC9C0\uC815\uD574\uC694 (babel|babylon|flow|ts|tsx)",{default:"tsx"}).option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod replace-react-icon src/ui").action(async(t,r,n)=>{let s=Pg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=$$();s.list&&(Mc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Mc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Mc(o),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let i=(0,Ro.resolve)(Uw,t,"index.js");console.log(Pc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await I$(i,t,r,s)}),jw.parse()}function C$(){(0,ko.satisfies)(process.versions.node,Oo.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Oo.engines.node}"
60
60
  Node.js \uBC84\uC804\uC744 \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC8FC\uC138\uC694.
61
61
  \uD604\uC7AC \uBC84\uC804: ${process.versions.node}
62
62
 
63
- $ nvm install ${(0,Io.minVersion)(Co.engines.node)}`),process.exit(1))}var P$=["replace-alpha-color","replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function M$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,Ao.resolve)(process.cwd(),d));c&&(wn==null||wn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l],p=i;if(P$.includes(t))if(i){let d=i.split(",").map(b=>b.trim());d.includes("css")||(p=[...d,"css"].join(","))}else p="js,jsx,ts,tsx,css";p&&f.push("--extensions",p),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Ww)};await jm("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function F$(){return(0,Vw.readdirSync)(zw)}function Uc(e){console.log(`
63
+ $ nvm install ${(0,ko.minVersion)(Oo.engines.node)}`),process.exit(1))}var A$=["replace-alpha-color","replace-css-seed-design-color-variable","replace-css-seed-design-typography-variable"];async function I$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,track:c}=n,u=require.resolve("jscodeshift/bin/jscodeshift"),l=r.map(d=>(0,Ro.resolve)(process.cwd(),d));c&&(hn==null||hn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:l,options:n}}));let f=[u,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...l],p=i;if(A$.includes(t))if(i){let d=i.split(",").map(x=>x.trim());d.includes("css")||(p=[...d,"css"].join(","))}else p="js,jsx,ts,tsx,css";p&&f.push("--extensions",p),a&&f.push("--ignore-config",a);try{let d={...process.env,LOG:String(s),TRACK:String(c),GIT_INFO:JSON.stringify(Gw)};await Nm("node",f,{stdio:"inherit",env:d});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function $$(){return(0,Bw.readdirSync)(Uw)}function Mc(e){console.log(`
64
64
  \uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
65
65
  `,e.join(`
66
- `))}D$();
66
+ `))}R$();