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);});});}rj(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=rk.sync(e.command,{path:n[rM({env:n})],pathExt:t?nW.delimiter:void0});}catch(e){}finally{s&&process.chdir(i);}returnr&&(r=nW.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){returniG&&1===e&&!t.file?d(t.original,"spawn"):null;}functionh(e,t,r){letn=rL(e,t,r),i=re.spawn(n.command,n.args,n.options);returnrH.hookChildProcess(i,n),i;}functionm(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;}functionv(e={}){let{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path";}functiong({env:e=c(rs).env,...t}={}){letr=v({env:e={...e}});returnt.path=e[r],e[r]=function(e={}){lett;let{cwd:r=c(rs).cwd(),path:n=c(rs).env[v()],execPath:i=c(rs).execPath}=e,o=iinstanceofURL?c(ra).fileURLToPath(i):i,s=rinstanceofURL?c(ra).fileURLToPath(r):r,a=c(ri).resolve(s),l=[];for(;t!==a;)l.push(c(ri).join(a,"node_modules/.bin")),t=a,a=c(ri).resolve(a,"..");returnl.push(c(ri).resolve(s,o,"..")),[...l,n].join(c(ri).delimiter);}(t),e;}functionE(e){returnnull!==e&&"object"==typeofe&&"function"==typeofe.pipe;}functiony(e){returnE(e)&&!1!==e.writable&&"function"==typeofe._write&&"object"==typeofe._writableState;}asyncfunctionw(e,t){if(!e)throwError("Expected a stream");let{maxBuffer:r}=t={maxBuffer:1/0,...t},n=rY(t);returnawaitnewPromise((t,i)=>{leto=e=>{e&&n.getBufferedLength()<=rK.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),i(e);};(async()=>{try{awaito$(e,n),t();}catch(e){o(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&o(newo_());});}),n.getBufferedValue();}functionx(e,t,r){letn;leti=o6(e,t,r),o=oX(e,t),s=oK(e,t);o4(s,i.options),oS(i.options);try{n=c(ro).spawn(i.file,i.args,i.options);}catch(t){lete=new(c(ro).ChildProcess)();returnoH(e,Promise.reject(i7({error:t,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}))),e;}leta=oV(n),l=oI(n,i.options,a),u=oO(n,i.options,l),p={isCanceled:!1};n.kill=og.bind(null,n.kill.bind(n)),n.cancel=ob.bind(null,n,p);letd=rV(async()=>{let[{error:e,exitCode:t,signal:r,timedOut:a},l,c,d]=awaitoF(n,i.options,u),f=o5(i.options,l),h=o5(i.options,c),m=o5(i.options,d);if(e||0!==t||null!==r){letl=i7({error:e,exitCode:t,signal:r,stdout:f,stderr:h,all:m,command:o,escapedCommand:s,parsed:i,timedOut:a,isCanceled:p.isCanceled||!!i.options.signal&&i.options.signal.aborted,killed:n.killed});if(!i.options.reject)returnl;throwl;}return{command:o,escapedCommand:s,exitCode:0,stdout:f,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};});returnok(n,i.options),n.all=oU(n,i.options),oA(n),oH(n,d),n;}functionb(e,t,r){letn;leti=o6(e,t,r),o=oX(e,t),s=oK(e,t);o4(s,i.options);leta=oL(i.options);try{n=c(ro).spawnSync(i.file,i.args,{...i.options,input:a});}catch(e){throwi7({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1});}letl=o5(i.options,n.stdout,n.error),u=o5(i.options,n.stderr,n.error);if(n.error||0!==n.status||null!==n.signal){lete=i7({stdout:l,stderr:u,error:n.error,signal:n.signal,exitCode:n.status,command:o,escapedCommand:s,parsed:i,timedOut:n.er
`),(0,na.info)(`${e}="${n}"wasaddedto"${s0}`));return;}process.env[e]=n;}async function M(e){switch(process.platform){case"win32":await D(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),(0,na.info)(`"${e}" was added to the PATH.`);return;case"linux":case"darwin":awaitF(),(0,nY.appendFileSync)(s0,`
`),(0,na.info)(`"${e}"wasaddedto"${s0}"`);return;default:return;}}async function F(){if(s1)return;let e="# Automatically Generated by setup-cpp\nexport SOURCE_CPPRC=0";if((await(0,nu.pathExists)(s0))&&(0,nY.readFileSync)(s0,"utf8").includes(e))return;(0,nY.appendFileSync)(s0,`
`),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??A("~"),a=[],l=[],u=rI.create({autoloadLocales:!0});rI.addLocale(c(rS)),rb.addLocale(c(rR));let p=await aR();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!e1(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,rx.error)("The same version must be used for llvm, clangformat and clangtidy"),1;ei()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&((0,rx.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await eu("python-pygments"));let d=!1,f=!1;for(let e of ls){if(rw.isCI&&0!==l.length){f=!0;break;}let n=i[e];void 0!==n&&(t=Date.now(),d=await tC(e,n,p,o,s,a,l,6e4*parseFloat(i.timeout??"20")),r=Date.now(),(0,rx.info)("took "+(u.format(t,r)||"0 seconds")));}if(!f){let e=i.compiler;if(void 0!==e){let t=Date.now();await t1(e,p,s,o,a,d,l);let r=Date.now();(0,rx.info)("took "+(u.format(t,r)||"0 seconds"));}}if(await G(),0===a.length&&0===l.length)return(0,rx.warning)("setup-cpp was called without any arguments. Nothing to do."),0;if(a.forEach(e=>(0,rx.success)(e)),l.forEach(e=>(0,rx.error)(e)),(0,rx.info)("setup-cpp finished"),!rw.GITHUB_ACTIONS)switch(process.platform){case"win32":(0,rx.warning)("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":(0,rx.warning)("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");}returnawaitn,0===l.length?0:1;}vart4,t3,t6,t5,t8,t7,t9,re,rt,rr,rn,ri,ro,rs,ra,rl,rc,ru,rp,rd,rf,rh,rm,rv,rg,rE,ry,rw,rx,rb,rR,rI,rS,rO,rT,rC,rA,r$,r_,rN,rP,rL,rD,rk,rU,rj,rM,rF,rG,rB,rH,rV,rq,rz,rX,rK,rW,rY,rJ,rQ,rZ,r0,r1,r2,r4,r3,r6,r5,r8,r7,r9,ne,nt,nr,nn,ni,no,ns,na,nl,nc,nu,np,nd,nf,nh,nm,nv,ng,nE,ny,nw,nx,nb,nR,nI,nS,nO,nT,nC,nA,n$,n_,nN,nP,nL,nD,nk,nU,nj,nM,nF,nG,nB,nH,nV,nq,nz,nX,nK=require("os"),nW=require("path"),nY=require("fs"),nJ=require("crypto"),nQ=require("http"),nZ=require("https");require("net"),t6=require("tls"),t5=require("events"),t8=require("assert"),t7=require("util"),t9=require("fs"),re=require("child_process"),rt=require("string_decoder"),rr=require("timers"),rn=require("buffer"),ri=require("path"),ro=require("child_process"),rs=require("process"),ra=require("url"),rl=require("os"),rc=require("buffer"),ru=require("stream"),rp=require("util"),rd=require("process"),rf=require("url"),rh=require("console"),rv={},rg={},null==(rE=(rm=globalThis).parcelRequire810d)&&((rE=function(e){if(einrv)returnrv[e].exports;if(einrg){vart=rg[e];deleterg[e];varr={id:e,exports:{}};returnrv[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){rg[e]=t;},rm.parcelRequire810d=rE),(ry=rE.register)("52cQ1",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=rE("jgqtC");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]).every(function(e){returnn(e);});if(e.exports[t.constant]=r,r)switch(e.exports.name=t.name,typeoft.pr){case"string":e.exports.isPR=!!i[t.pr];break;case"object":"env"int.pr?e.exports.isPR=t.pr.envini&&i[t.pr.env]!==t.pr.ne:"any"int.pr?e.exports.isPR=t.pr.any.some(function(e){return!!i[e];}):e.exports.isPR=n(t.pr);b
ErrorMessage:${e.message}`);})).result)||void 0===t?void 0:t.value;if(!n)throw Error("Response json body do not have ID Token field");return n;});}static getIDToken(e){return r(this,void 0,void 0,function*(){try{let t=s.getIDTokenUrl();if(e){let r=encodeURIComponent(e);t=`${t}&audience=${r}`;}o.debug("ID token url is "+t);let r=yield s.getCall(t);return o.setSecret(r),r;}catch(e){throw Error("Error message: "+e.message);}});}}e.exports.OidcClient=s;}),ry("a7JAS",function(e,t){var r,n,i,o,s,a,l,c,u;r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r];}),n=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),i=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t;},o=e.exports&&e.exports.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e));}catch(e){o(e);}}function a(e){try{l(n.throw(e));}catch(e){o(e);}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t);})).then(s,a);}l((n=n.apply(e,t||[])).next());});},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.HttpClient=e.exports.isHttps=e.exports.HttpClientResponse=e.exports.HttpClientError=e.exports.getProxyUrl=e.exports.MediaTypes=e.exports.Headers=e.exports.HttpCodes=void 0;let p=i(nQ),d=i(nZ),f=i(rE("8gh3V")),h=i(rE("7i1qo"));(c=s=e.exports.HttpCodes||(e.exports.HttpCodes={}))[c.OK=200]="OK",c[c.MultipleChoices=300]="MultipleChoices",c[c.MovedPermanently=301]="MovedPermanently",c[c.ResourceMoved=302]="ResourceMoved",c[c.SeeOther=303]="SeeOther",c[c.NotModified=304]="NotModified",c[c.UseProxy=305]="UseProxy",c[c.SwitchProxy=306]="SwitchProxy",c[c.TemporaryRedirect=307]="TemporaryRedirect",c[c.PermanentRedirect=308]="PermanentRedirect",c[c.BadRequest=400]="BadRequest",c[c.Unauthorized=401]="Unauthorized",c[c.PaymentRequired=402]="PaymentRequired",c[c.Forbidden=403]="Forbidden",c[c.NotFound=404]="NotFound",c[c.MethodNotAllowed=405]="MethodNotAllowed",c[c.NotAcceptable=406]="NotAcceptable",c[c.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",c[c.RequestTimeout=408]="RequestTimeout",c[c.Conflict=409]="Conflict",c[c.Gone=410]="Gone",c[c.TooManyRequests=429]="TooManyRequests",c[c.InternalServerError=500]="InternalServerError",c[c.NotImplemented=501]="NotImplemented",c[c.BadGateway=502]="BadGateway",c[c.ServiceUnavailable=503]="ServiceUnavailable",c[c.GatewayTimeout=504]="GatewayTimeout",(u=a=e.exports.Headers||(e.exports.Headers={})).Accept="accept",u.ContentType="content-type",(l=e.exports.MediaTypes||(e.exports.MediaTypes={})).ApplicationJson="application/json",e.exports.getProxyUrl=function(e){let t=f.getProxyUrl(new URL(e));return t?t.href:"";};let m=[s.MovedPermanently,s.ResourceMoved,s.SeeOther,s.TemporaryRedirect,s.PermanentRedirect],v=[s.BadGateway,s.ServiceUnavailable,s.GatewayTimeout],g=["OPTIONS","GET","DELETE","HEAD"];class E extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,E.prototype);}}e.exports.HttpClientError=E;class y{constructor(e){this.message=e;}readBody(){return o(this,void 0,void 0,function*(){return new Promise(e=>o(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on("data",e=>{t=Buffer.concat([t,e]);}),this.message.on("end",()=>{e(t.toString());});}));});}}e.exports.HttpClientResponse=y,e.exports.isHttps=function(e){return"https:"===new URL(e).protocol;},e.exports.HttpClient=class{constructor(e,t,r){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(thi
${t}`,iz=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),iX=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),iK=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=iq.bind(null,n,t.toString());Object.defineProperty(i,"name",iX),Object.defineProperty(e,"toString",{...iz,value:i});},iW=new WeakMap(),iY=(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(iW.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))iB(e,t,n,r);iV(e,t),iK(e,t,n);}(o,e),iW.set(o,n),o;};iY.callCount=e=>{if(!iW.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returniW.get(e);},rV=iY;constiJ=()=>Array.from({length:i0-iZ+1},iQ),iQ=(e,t)=>({name:"SIGRT"+(t+1),number:iZ+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),iZ=34,i0=64,i1=[{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}`:v,y=[E,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=y):n=Error(y),n.shortMessage=E,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;},i9=["stdin","stdout","stderr"],oe=e=>i9.some(t=>void 0!==e[t]),ot=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return i9.map(t=>e[t]);if(oe(e))throw Error("It's not possible to provide `stdio` in combination with one of "+i9.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);returnArray.from({length:Math.max(t.length,i9.length)},(e,r)=>t[r]);};rq={};constor=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(or(rz=rm.process)){varon,oi=t8,oo=rE("e1Rfe"),os=/^win/i.test(rz.platform),oa=t5;"function"!=typeof oa&&(oa=oa.EventEmitter),rz.__signal_exit_emitter__?on=rz.__signal_exit_emitter__:((on=rz.__signal_exit_emitter__=new oa()).count=0,on.emitted={}),on.infinite||(on.setMaxListeners(1/0),on.infinite=!0);var ol=function(){op&&or(rm.process)&&(op=!1,oo.forEach(function(e){try{rz.removeListener(e,ou[e]);}catch(e){}}),rz.emit=om,rz.reallyExit=of,on.count-=1);};(rq=function(e,t){if(!or(rm.process))return function(){};oi.equal(typeof e,"function","acallbackmustbeprovidedforexithandler"),!1===op&&od();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),on.on(r,e),function(){on.removeListener(r,e),0===on.listeners("exit").length&&0===on.listeners("afterexit").length&&ol();};}).unload=ol;var oc=function(e,t,r){on.emitted[e]||(on.emitted[e]=!0,on.emit(e,t,r));},ou={};oo.forEach(function(e){ou[e]=function(){or(rm.process)&&rz.listeners(e).length===on.count&&(ol(),oc("exit",null,e),oc("afterexit",null,e),os&&"SIGHUP"===e&&(e="SIGINT"),rz.kill(rz.pid,e));};}),rq.signals=function(){return oo;};var op=!1,od=function(){!op&&or(rm.process)&&(op=!0,on.count+=1,oo=oo.filter(function(e){try{return rz.on(e,ou[e]),!0;}catch(e){return!1;}}),rz.emit=ov,rz.reallyExit=oh);};rq.load=od;var of=rz.reallyExit,oh=function(e){or(rm.process)&&(rz.exitCode=e||0,oc("exit",rz.exitCode,null),oc("afterexit",rz.exitCode,null),of.call(rz,rz.exitCode));},om=rz.emit,ov=function(e,t){if(!("exit"===e&&or(rm.process)))return om.apply(this,arguments);void 0!==t&&(rz.exitCode=t);var r=om.apply(this,arguments);return oc("exit",rz.exitCode,null),oc("afterexit",rz.exitCode,null),r;};}else rq=function(){return function(){};};const og=(e,t="SIGTERM",r={})=>{let n=e(t);return oE(e,t,r,n),n;},oE=(e,t,r,n)=>{if(!oy(t,r,n))return;let i=setTimeout(()=>{e("SIGKILL");},ox(r));i.unref&&i.unref();},oy=(e,{forceKillAfterTimeout:t},r)=>ow(e)&&!1!==t&&r,ow=e=>e===c(rl).constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),ox=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e;},ob=(e,t)=>{e.kill()&&(t.isCanceled=!0);},oR=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timedout"),{timedOut:!0,signal:t}));},oI=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{let i;return 0===t||void 0===t?n:Promise.race([new Promise((n,o)=>{i=setTimeout(()=>{oR(e,r,o);},t);}),n.finally(()=>{clearTimeout(i);})]);},oS=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);},oO=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=c(rq)(()=>{e.kill();});return n.finally(()=>{i();});},oT=e=>e instanceof ro.ChildProcess&&"function"==typeof e.then,oC=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,t9.createWriteStream)(r)),e;if(y
${n.message}`:h,g=[v,t,e].filter(Boolean).join("\n");return m?(n.originalMessage=n.message,n.message=g):n=Error(g),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;},sn=["stdin","stdout","stderr"],si=e=>sn.some(t=>void 0!==e[t]),so=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return sn.map(t=>e[t]);if(si(e))throw Error("It's not possible to provide `stdio` in combination with one of "+sn.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);returnArray.from({length:Math.max(t.length,sn.length)},(e,r)=>t[r]);},ss=(e,t="SIGTERM",r={})=>{letn=e(t);returnsa(e,t,r,n),n;},sa=(e,t,r,n)=>{if(!sl(t,r,n))return;leti=setTimeout(()=>{e("SIGKILL");},su(r));i.unref&&i.unref();},sl=(e,{forceKillAfterTimeout:t},r)=>sc(e)&&!1!==t&&r,sc=e=>e===c(rl).constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),su=({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;},sp=(e,t)=>{e.kill()&&(t.isCanceled=!0);},sd=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},sf=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;return0===t||void0===t?n:Promise.race([newPromise((n,o)=>{i=setTimeout(()=>{sd(e,r,o);},t);}),n.finally(()=>{clearTimeout(i);})]);},sh=({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);},sm=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=c(rq)(()=>{e.kill();});returnn.finally(()=>{i();});},sv=e=>einstanceofro.ChildProcess&&"function"==typeofe.then,sg=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,t9.createWriteStream)(r)),e;if(y(r))returne[t].pipe(r),e;if(!sv(r))throwTypeError("The second argument must be a string, a stream or an Execa child process.");if(!y(r.stdin))throwTypeError("The target child process's stdin must be available.");returne[t].pipe(r.stdin),r;},sE=e=>{null!==e.stdout&&(e.pipeStdout=sg.bind(void0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=sg.bind(void0,e,"stderr")),void0!==e.all&&(e.pipeAll=sg.bind(void0,e,"all"));},sy=e=>{if(void0!==e)throwTypeError("The `input` and `inputFile` options cannot be both set.");},sw=({input:e,inputFile:t})=>"string"!=typeoft?e:(sy(e),(0,t9.readFileSync)(t)),sx=e=>{lett=sw(e);if(E(t))throwTypeError("The `input` option cannot be a stream in sync mode");returnt;},sb=({input:e,inputFile:t})=>"string"!=typeoft?e:(sy(e),(0,t9.createReadStream)(t)),sR=(e,t)=>{letr=sb(t);void0!==r&&(E(r)?r.pipe(e.stdin):e.stdin.end(r));},sI=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;letr=c(rQ)();returne.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},sS=async(e,t)=>{if(e&&void0!==t){e.destroy();try{returnawaitt;}catch(e){returne.bufferedData;}}},sO=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)returnt?c(rX)(e,{encoding:t,maxBuffer:n}):c(rX).buffer(e,{maxBuffer:n});},sT=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{leta=sO(e,{encoding:n,buffer:i,maxBuffer:o}),l=sO(t,{encoding:n,buffer:i,maxBuffer:o}),c=sO(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},sS(e,a),sS(t,l),sS(r,c)]);}},sC=(async()=>{})().constructor.prototype,sA=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(sC,e)]),s$=(e,t)=>{for(let[r,n]ofsA){leti="function"==typeoft?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i});}},s_=e=>newPromise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r});}),e.on("error",e=>{r(e);}),e.stdin&&e.stdin.on("error",e=>{r(e)