lete,t,r,n,i,o,s,a;functionl(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0});}functionc(e){returne&&e.__esModule?e.default:e;}functionu(e,t,r){if("function"==typeoft&&(r=t,t={}),!r){if("function"!=typeofPromise)throwTypeError("callback not provided");returnnewPromise(function(r,n){u(e,t||{},function(e,t){e?n(e):r(t);});});}rS(e,t||{},function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n);});}functionp(e,t){letr;letn=e.options.env||process.env,i=process.cwd(),o=null!=e.options.cwd,s=o&&void0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd);}catch(e){}try{r=rb.sync(e.command,{path:n[r$({env:n})],pathExt:t?ip.delimiter:void0});}catch(e){}finally{s&&process.chdir(i);}returnr&&(r=ip.resolve(o?e.options.cwd:"",r)),r;}functiond(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args});}functionf(e,t){returniR&&1===e&&!t.file?d(t.original,"spawn"):null;}functionh(e,t,r){letn=rT(e,t,r),i=t5.spawn(n.command,n.args,n.options);returnr_.hookChildProcess(i,n),i;}asyncfunctionm(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=r4(t);returnawaitnewPromise((t,i)=>{leto=e=>{e&&n.getBufferedLength()<=r2.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),i(e);};(async()=>{try{awaitot(e,n),t();}catch(e){o(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&o(newor());});}),n.getBufferedValue();}functiong(){return(process.getuid?.()===0||!!process.env.CI)&&null!==c(rb).sync("sudo",{nothrow:!0});}functionv(e,t=[],r=oh){returng()?rR.commandSync("sudo "+[e,...t].map(e=>`'${e}'`).join(" "),r):rR.sync(e,t,r);}functionE(e,t=[],r=oh){returng()?rR.command("sudo "+[e,...t].map(e=>`'${e}'`).join(" "),r):c(rR)(e,t,r);}asyncfunctiony(e){if(("linux"===c(rt).platform||"darwin"===c(rt).platform)&&g()&&void0!==c(rt).env.SUDO_USER){lett=(0,id.statSync)(e).isDirectory();awaitE("chown",[...(t?["-R"]:[]),c(rt).env.SUDO_USER,e],oh);}}functionw(e){returng()&&"string"==typeofprocess.env.SUDO_USER?"darwin"===process.platform?(0,ip.join)("/Users/",process.env.SUDO_USER,e):(0,ip.join)("/home/",process.env.SUDO_USER,e):c(rx)("~/"+e);}functionx(e,t,r,n){returnnew(r||(r=Promise))(function(i,o){functions(e){try{l(n.next(e));}catch(e){o(e);}}functiona(e){try{l(n.throw(e));}catch(e){o(e);}}functionl(e){vart;e.done?i(e.value):((t=e.value)instanceofr?t:newr(function(e){e(t);})).then(s,a);}l((n=n.apply(e,t||[])).next());});}functionb(e,t){functionr(r){returnfunction(l){returnfunction(r){if(n)throwTypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)returno;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case0:case1:o=r;break;case4:returna.label++,{value:r[1],done:!1};case5:a.label++,i=r[1],r=[0];continue;case7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue;}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break;}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break;}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break;}o[2]&&a.ops.pop(),a.trys.pop();continue;}r=t.call(e,a);}catch(e){r=[6,e],i=0;}finally{n=o=0;}if(5&r[0])throwr[1];return{value:r[0]?r[1]:void0,done:!0};}([r,l]);};}varn,i,o,s,a={label:0,sent:function(){if(1&o[0])throwo[1];returno[1];},trys:[],ops:[]};returns={next:r(0),throw:r(1),return:r(2)},"function"==typeofSymbol&&(s[Symbol.iterator]=function(){returnthis;}),s;}asyncfunctionI(){try{awaitc(nc)({pkg:c(nR)});}catch(e){(0,rg.warning)("Failed to check for updates: "+(einstanceofError?e.message+e.stack:e));}}functionS(e){returnnull==e?[]:Array.isArray(e)?e:[e];}functionR(e){lett="string"==typeofe?"\n":"\n".charCodeAt(),r="string"==typeofe?"\r":"\r".charCodeAt();returne[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===r&&(e=e.slice(0,-1)),e;}functionO(e={}){let{env:t=proces
`),(0,nO.info)(`${e}="${n}"wasaddedto"${sS}`));return;}process.env[e]=n;}async function D(e){switch(process.platform){case"win32":await P(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),(0,nO.info)(`"${e}" was added to the PATH.`);return;case"linux":case"darwin":awaitk(),(0,id.appendFileSync)(sS,`
`),(0,nO.info)(`"${e}"wasaddedto"${sS}"`);return;default:return;}}async function k(){if(sR)return;let e="# Automatically Generated by setup-cpp\nexport SOURCE_CPPRC=0";if(await(0,nA.pathExists)(sS)){let t=(0,id.readFileSync)(sS,"utf8");if(t.includes(e))return;}(0,id.appendFileSync)(sS,`
`),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--cppcache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));let o=i.architecture??process.arch,s=process.env.SETUP_CPP_DIR??w(""),a=[],l=[],u=ry.create({autoloadLocales:!0});ry.addLocale(c(rw)),rv.addLocale(c(rE));let p=await az();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!eZ(e[t])),i=n.length>=1?e[n[0]]:"true";return!n.some(t=>e[t]!==i)&&(r.forEach(t=>{e[t]=i;}),!0);}(i,["llvm","clangtidy","clangformat"]))return(0,rg.error)("The same version must be used for llvm, clangformat and clangtidy"),1;er()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&((0,rg.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await el("python-pygments"));let d=!1,f=!1;for(let e of ld){if(rm.isCI&&0!==l.length){f=!0;break;}let n=i[e];void 0!==n&&(t=Date.now(),d=await tS(e,n,p,o,s,a,l,6e4*parseFloat(i.timeout??"20")),r=Date.now(),(0,rg.info)("took "+(u.format(t,r)||"0 seconds")));}if(!f){let e=i.compiler;if(void 0!==e){let t=Date.now();await tJ(e,p,s,o,a,d,l);let r=Date.now();(0,rg.info)("took "+(u.format(t,r)||"0 seconds"));}}if(await U(),0===a.length&&0===l.length)return(0,rg.warning)("setup-cpp was called without any arguments. Nothing to do."),0;if(a.forEach(e=>(0,rg.success)(e)),l.forEach(e=>(0,rg.error)(e)),(0,rg.info)("setup-cpp finished"),!rm.GITHUB_ACTIONS)switch(process.platform){case"win32":(0,rg.warning)("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":(0,rg.warning)("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");}returnawaitn,0===l.length?0:1;}vartZ,t0,t1,t2,t3,t4,t6,t5,t7,t8,t9,re,rt,rr,rn,ri,ro,rs,ra,rl,rc,ru,rp,rd,rf,rh,rm,rg,rv,rE,ry,rw,rx,rb,rI,rS,rR,rO,rT,rC,r$,rA,rP,rN,r_,rL,rD,rk,rU,rj,rM,rF,rG,rB,rH,rV,rX,rq,rK,rz,rW,rY,rJ,rQ,rZ,r0,r1,r2,r3,r4,r6,r5,r7,r8,r9,ne,nt,nr,nn,ni,no,ns,na,nl,nc,nu,np,nd,nf,nh,nm,ng,nv,nE,ny,nw,nx,nb,nI,nS,nR,nO,nT,nC,n$,nA,nP,nN,n_,nL,nD,nk,nU,nj,nM,nF,nG,nB,nH,nV,nX,nq,nK,nz,nW,nY,nJ,nQ,nZ,n0,n1,n2,n3,n4,n6,n5,n7,n8,n9,ie,it,ir,ii,io,is,ia,il,ic,iu=require("os"),ip=require("path"),id=require("fs"),ih=require("crypto"),im=require("http"),ig=require("https");require("net"),t1=require("tls"),t2=require("events"),t3=require("assert"),t4=require("util"),t6=require("fs"),t5=require("child_process"),t7=require("string_decoder"),t8=require("timers"),t9=require("buffer"),re=require("stream"),rt=require("process"),rr=require("buffer"),rn=require("path"),ri=require("child_process"),ro=require("process"),rs=require("url"),ra=require("os"),rl=require("util"),rc=require("url"),ru=require("console"),rp="undefined"!=typeofglobalThis?globalThis:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:{},rd={},rf={},null==(rh=rp.parcelRequire810d)&&((rh=function(e){if(einrd)returnrd[e].exports;if(einrf){vart=rf[e];deleterf[e];varr={id:e,exports:{}};returnrd[e]=r,t.call(r.exports,r,r.exports),r.exports;}varn=Error("Cannotfindmodule'"+e+"'");thrown.code="MODULE_NOT_FOUND",n;}).register=function(e,t){rf[e]=t;},rp.parcelRequire810d=rh),rh.register("dTX7a",function(e,t){varr;functionn(e){return"string"==typeofe?!!i[e]:"env"ine?i[e.env]&&i[e.env].includes(e.includes):"any"ine?e.any.some(function(e){return!!i[e];}):Object.keys(e).every(function(t){returni[t]===e[t];});}r=rh("gjIAX");leti=process.env;Object.defineProperty(e.exports,"_vendors",{value:r.map(function(e){returne.constant;})}),e.exports.name=null,e.exports.isPR=null,r.forEach(function(t){letr=Array.isArray(t.env)?t.env:[t.env],o=r.every(function(e){returnn(e);});if(e.exports[t.constant]=o,o)switch(e.exports.name=t.name,typeoft.pr){
${n.message}`:m,E=[v,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;},rV={};const iF=["stdin","stdout","stderr"],iG=e=>iF.some(t=>void 0!==e[t]),iB=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return iF.map(t=>e[t]);if(iG(e))throw Error("It's not possible to provide `stdio` in combination with one of "+iF.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);letr=Math.max(t.length,iF.length);returnArray.from({length:r},(e,r)=>t[r]);};(rV=iB).node=e=>{lett=iB(e);return"ipc"===t?"ipc":void0===t||"string"==typeoft?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"];},rX={},rq={},rK=rp.process;constiH=function(e){returne&&"object"==typeofe&&"function"==typeofe.removeListener&&"function"==typeofe.emit&&"function"==typeofe.reallyExit&&"function"==typeofe.listeners&&"function"==typeofe.kill&&"number"==typeofe.pid&&"function"==typeofe.on;};if(iH(rK)){variV,iX=t3,iq=rh("1YMV0"),iK=/^win/i.test(rK.platform),iz=t2;"function"!=typeofiz&&(iz=iz.EventEmitter),rK.__signal_exit_emitter__?iV=rK.__signal_exit_emitter__:((iV=rK.__signal_exit_emitter__=newiz()).count=0,iV.emitted={}),iV.infinite||(iV.setMaxListeners(1/0),iV.infinite=!0);variW=function(){iQ&&iH(rp.process)&&(iQ=!1,iq.forEach(function(e){try{rK.removeListener(e,iJ[e]);}catch(e){}}),rK.emit=i2,rK.reallyExit=i0,iV.count-=1);};(rq=function(e,t){if(!iH(rp.process))returnfunction(){};iX.equal(typeofe,"function","a callback must be provided for exit handler"),!1===iQ&&iZ();varr="exit";returnt&&t.alwaysLast&&(r="afterexit"),iV.on(r,e),function(){iV.removeListener(r,e),0===iV.listeners("exit").length&&0===iV.listeners("afterexit").length&&iW();};}).unload=iW;variY=function(e,t,r){iV.emitted[e]||(iV.emitted[e]=!0,iV.emit(e,t,r));},iJ={};iq.forEach(function(e){iJ[e]=function(){iH(rp.process)&&rK.listeners(e).length===iV.count&&(iW(),iY("exit",null,e),iY("afterexit",null,e),iK&&"SIGHUP"===e&&(e="SIGINT"),rK.kill(rK.pid,e));};}),rq.signals=function(){returniq;};variQ=!1,iZ=function(){!iQ&&iH(rp.process)&&(iQ=!0,iV.count+=1,iq=iq.filter(function(e){try{returnrK.on(e,iJ[e]),!0;}catch(e){return!1;}}),rK.emit=i3,rK.reallyExit=i1);};rq.load=iZ;vari0=rK.reallyExit,i1=function(e){iH(rp.process)&&(rK.exitCode=e||0,iY("exit",rK.exitCode,null),iY("afterexit",rK.exitCode,null),i0.call(rK,rK.exitCode));},i2=rK.emit,i3=function(e,t){if(!("exit"===e&&iH(rp.process)))returni2.apply(this,arguments);void0!==t&&(rK.exitCode=t);varr=i2.apply(this,arguments);returniY("exit",rK.exitCode,null),iY("afterexit",rK.exitCode,null),r;};}elserq=function(){returnfunction(){};};consti4=(e,t,r,n)=>{if(!i6(t,r,n))return;leti=i7(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},i6=(e,{forceKillAfterTimeout:t},r)=>i5(e)&&!1!==t&&r,i5=e=>e===iu.constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),i7=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},i8=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},i9=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=rq(()=>{e.kill();});returnn.finally(()=>{i();});};rz=(rX={spawnedKill(e,t="SIGTERM",r={}){letn=e(t);returni4(e,t,r,n),n;},spawnedCancel(e,t){letr=e.kill();r&&(t.isCanceled=!0);},setupTimeout(e,{timeout:t,killSignal:r="SIGTERM"},n){leti;if(0===t||void0===t)returnn;leto=newPromise((n,o)=>{i=setTimeout(()=>{i8(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});returnPromise.race([o,s]);},validateTimeout({timeout:e}){if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\
${t}`,oy=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ow=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ox=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=oE.bind(null,n,t.toString());Object.defineProperty(i,"name",ow),Object.defineProperty(e,"toString",{...oy,value:i});},ob=new WeakMap(),oI=(e,t={})=>{let r;if("function"!=typeof e)throw TypeError("Expected a function");let n=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(ob.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function\`${i}\` can only be called once`);returnr;};return!function(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(letnofReflect.ownKeys(t))om(e,t,n,r);ov(e,t),ox(e,t,n);}(o,e),ob.set(o,n),o;};oI.callCount=e=>{if(!ob.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnob.get(e);},nT=oI;constoS=()=>Array.from({length:oT-oO+1},oR),oR=(e,t)=>({name:"SIGRT"+(t+1),number:oO+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),oO=34,oT=64,oC=[{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:"t
${n.message}`:m,E=[v,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;},oU=["stdin","stdout","stderr"],oj=e=>oU.some(t=>void 0!==e[t]),oM=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return oU.map(t=>e[t]);if(oj(e))throw Error("It's not possible to provide `stdio` in combination with one of "+oU.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);letr=Math.max(t.length,oU.length);returnArray.from({length:r},(e,r)=>t[r]);},oF=(e,t="SIGTERM",r={})=>{letn=e(t);returnoG(e,t,r,n),n;},oG=(e,t,r,n)=>{if(!oB(t,r,n))return;leti=oV(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},oB=(e,{forceKillAfterTimeout:t},r)=>oH(e)&&!1!==t&&r,oH=e=>e===c(ra).constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),oV=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},oX=(e,t)=>{letr=e.kill();r&&(t.isCanceled=!0);},oq=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},oK=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;if(0===t||void0===t)returnn;leto=newPromise((n,o)=>{i=setTimeout(()=>{oq(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});returnPromise.race([o,s]);},oz=({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);},oW=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=c(rq)(()=>{e.kill();});returnn.finally(()=>{i();});},oY=e=>einstanceofri.ChildProcess&&"function"==typeofe.then,oJ=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,t6.createWriteStream)(r)),e;if($(r))returne[t].pipe(r),e;if(!oY(r))throwTypeError("The second argument must be a string, a stream or an Execa child process.");if(!$(r.stdin))throwTypeError("The target child process's stdin must be available.");returne[t].pipe(r.stdin),r;},oQ=e=>{null!==e.stdout&&(e.pipeStdout=oJ.bind(void0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=oJ.bind(void0,e,"stderr")),void0!==e.all&&(e.pipeAll=oJ.bind(void0,e,"all"));},oZ=e=>{if(void0!==e)throwTypeError("The `input` and `inputFile` options cannot be both set.");},o0=({input:e,inputFile:t})=>"string"!=typeoft?e:(oZ(e),(0,t6.readFileSync)(t)),o1=e=>{lett=o0(e);if(C(t))throwTypeError("The `input` option cannot be a stream in sync mode");returnt;},o2=({input:e,inputFile:t})=>"string"!=typeoft?e:(oZ(e),(0,t6.createReadStream)(t)),o3=(e,t)=>{letr=o2(t);void0!==r&&(C(r)?r.pipe(e.stdin):e.stdin.end(r));},o4=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;letr=c(r5)();returne.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},o6=async(e,t)=>{if(e&&void0!==t){e.destroy();try{returnawaitt;}catch(e){returne.bufferedData;}}},o5=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)returnt?c(r1)(e,{encoding:t,maxBuffer:n}):c(r1).buffer(e,{maxBuffer:n});},o7=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{leta=o5(e,{encoding:n,buffer:i,maxBuffer:o}),l=o5(t,{encoding:n,buffer:i,maxBuffer:o}),c=o5(r,{encoding:n,buffer:i,maxBuffer:2*o});try{returnawaitPromise.all([s,a,l,c]);}catch(n){returnPromise.all([{error:n,signal:n.signal,timedOut:n.timedOut},o6(e,a),o6(t,l),o6(r,c)]);}},o8=(async()=>{})().constructor.prototype,o9=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(o8,e)]),se=(e,t)=>{for(let[r,n]ofo9){leti="function"==typeoft?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i});}},st=e=>newPromise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r});}),e.on("error",e=>{r(
${n.message}`:v,w=[y,t,e].filter(Boolean).join("\n");return E?(n.originalMessage=n.message,n.message=w):n=Error(w),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=h,n.stdout=e,n.stderr=t,n.cwd=f,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=u,n.killed=p&&!l,n;},sC=["stdin","stdout","stderr"],s$=e=>sC.some(t=>void 0!==e[t]),sA=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return sC.map(t=>e[t]);if(s$(e))throw Error("It's not possible to provide `stdio` in combination with one of "+sC.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);letr=Math.max(t.length,sC.length);returnArray.from({length:r},(e,r)=>t[r]);},sP=(e,t="SIGTERM",r={})=>{letn=e(t);returnsN(e,t,r,n),n;},sN=(e,t,r,n)=>{if(!s_(t,r,n))return;leti=sD(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},s_=(e,{forceKillAfterTimeout:t},r)=>sL(e)&&!1!==t&&r,sL=e=>e===c(ra).constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),sD=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},sk=(e,t)=>{letr=e.kill();r&&(t.isCanceled=!0);},sU=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},sj=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;if(0===t||void0===t)returnn;leto=newPromise((n,o)=>{i=setTimeout(()=>{sU(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});returnPromise.race([o,s]);},sM=({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);},sF=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=c(rq)(()=>{e.kill();});returnn.finally(()=>{i();});},sG=e=>einstanceofri.ChildProcess&&"function"==typeofe.then,sB=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,t6.createWriteStream)(r)),e;if($(r))returne[t].pipe(r),e;if(!sG(r))throwTypeError("The second argument must be a string, a stream or an Execa child process.");if(!$(r.stdin))throwTypeError("The target child process's stdin must be available.");returne[t].pipe(r.stdin),r;},sH=e=>{null!==e.stdout&&(e.pipeStdout=sB.bind(void0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=sB.bind(void0,e,"stderr")),void0!==e.all&&(e.pipeAll=sB.bind(void0,e,"all"));},sV=e=>{if(void0!==e)throwTypeError("The `input` and `inputFile` options cannot be both set.");},sX=({input:e,inputFile:t})=>"string"!=typeoft?e:(sV(e),(0,t6.readFileSync)(t)),sq=e=>{lett=sX(e);if(C(t))throwTypeError("The `input` option cannot be a stream in sync mode");returnt;},sK=({input:e,inputFile:t})=>"string"!=typeoft?e:(sV(e),(0,t6.createReadStream)(t)),sz=(e,t)=>{letr=sK(t);void0!==r&&(C(r)?r.pipe(e.stdin):e.stdin.end(r));},sW=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;letr=c(r5)();returne.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},sY=async(e,t)=>{if(e&&void0!==t){e.destroy();try{returnawaitt;}catch(e){returne.bufferedData;}}},sJ=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)returnt?c(r1)(e,{encoding:t,maxBuffer:n}):c(r1).buffer(e,{maxBuffer:n});},sQ=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{leta=sJ(e,{encoding:n,buffer:i,maxBuffer:o}),l=sJ(t,{encoding:n,buffer:i,maxBuffer:o}),c=sJ(r,{encoding:n,buffer:i,maxBuffer:2*o});try{returnawaitPromise.all([s,a,l,c]);}catch(n){returnPromise.all([{error:n,signal:n.signal,timedOut:n.timedOut},sY(e,a),sY(t,l),sY(r,c)]);}},sZ=(async()=>{})().constructor.prototype,s0=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(sZ,e)]),s1=(e,t)=>{for(let[r,n]ofs0){leti="function"==typeoft?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i});}},s2=e=>newPromise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r});}),e.on("error