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);});});}rW(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=rV.sync(e.command,{path:n[rY({env:n})],pathExt:t?iY.delimiter:void0});}catch(e){}finally{s&&process.chdir(i);}returnr&&(r=iY.resolve(o?e.options.cwd:"",r)),r;}functionf(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args});}functiond(e,t){returni5&&1===e&&!t.file?f(t.original,"spawn"):null;}functionh(e,t,r){letn=rq(e,t,r),i=rw.spawn(n.command,n.args,n.options);returnr1.hookChildProcess(i,n),i;}functionm(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";}functionv(e){returnnull!==e&&"object"==typeofe&&"function"==typeofe.pipe;}functiong(e){returnv(e)&&!1!==e.writable&&"function"==typeofe._write&&"object"==typeofe._writableState;}asyncfunctiony(e,t){if(!e)throwError("Expected a stream");let{maxBuffer:r}=t={maxBuffer:1/0,...t},n=r7(t);returnawaitnewPromise((t,i)=>{leto=e=>{e&&n.getBufferedLength()<=r8.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),i(e);};(async()=>{try{awaito0(e,n),t();}catch(e){o(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&o(newo1());});}),n.getBufferedValue();}functionE(e,t,r){letn;leti=sE(e,t,r),o=sa(e,t),s=sl(e,t);sg(s,i.options),oY(i.options);try{n=c(rS).spawn(i.file,i.args,i.options);}catch(t){lete=new(c(rS).ChildProcess)();returnsn(e,Promise.reject(ob({error:t,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}))),e;}leta=si(n),l=oW(n,i.options,a),u=oJ(n,i.options,l),p={isCanceled:!1};n.kill=oG.bind(null,n.kill.bind(n)),n.cancel=oV.bind(null,n,p);letf=r2(async()=>{let[{error:e,exitCode:t,signal:r,timedOut:a},l,c,f]=awaitse(n,i.options,u),d=sw(i.options,l),h=sw(i.options,c),m=sw(i.options,f);if(e||0!==t||null!==r){letl=ob({error:e,exitCode:t,signal:r,stdout:d,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:d,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};});returno8(n,i.options),n.all=o5(n,i.options),oQ(n),sn(n,f),n;}functionw(e,t,r){letn;leti=sE(e,t,r),o=sa(e,t),s=sl(e,t);sg(s,i.options);leta=o4(i.options);try{n=c(rS).spawnSync(i.file,i.args,{...i.options,input:a});}catch(e){throwob({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1});}letl=sw(i.options,n.stdout,n.error),u=sw(i.options,n.stderr,n.error);if(n.error||0!==n.status||null!==n.signal){lete=ob({stdout:l,stderr:u,error:n.error,signal:n.signal,exitCode:n.status,command:o,escapedCommand:s,parsed:i,timedOut:n.error&&"ETIMEDOUT"===n.error.code,isCanceled:!1,killed:null!==n.signal});if(!i.options.reject)returne;throwe;}return{command:o,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};}function_(t,r=["-NoProfile","-NoLogo","-NonInteractive"],n={stdio:"inherit"}){returnE(function(){if(void0===e){lett=c(nr).sync("pwsh",{nothrow:!0});null!==t&&(e=t);letr=c(nr).sync("powershell",{nothrow:!0});null!==r&&(e=r);}if(void0===e)throwError("Could not find powershell");returne;}(),[...r,"-c",t],n);}functionb(){vare,t;return((null===(e=(t=process).getuid)||void0===e?void0:e.call(t))===0||!!process.en
`;try{await Promise.all([N(e),A(t,T("~/.bashrc")),A(t,T("~/.profile"))]);}catch(e){(0,rG.warning)(`Failedtoadd${t}to.profileor.bashrc.Youshouldadditmanually:${e}`);}}async function N(e){let t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`
apt-getupdate-o${s1}-y`),a=r,c=1===o?s.replace(/ -y \$PKG/g," -y clang-format-"+a):s,l=c=await tX(c),c=V()?l.replace(/apt-get/g,"nala"):l,await(0,ni.writeFile)(t,c),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}];}async function tX(e){let t=e.replace(/apt-get install -y/g,`apt-getinstall-oDpkg::Options::="--force-overwrite"-o${s1}-y--fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map(async e=>{let r=e.replace("$LLVM_VERSION","*");(await Y(r))&&((0,rL.info)("Removing conflicting package "+r),t=t.replace(e,""));})),t;}function tW(e,t,r){let n=`${t}${e}${r}`;return`https://github.com/llvm/llvm-project/releases/download/llvmorg-${e}/${n}`;}function tY(e,t,r){let n=`${t}${e}${r}`;return`https://releases.llvm.org/${e}/${n}`;}async function tJ(e){let t;if(a3.has(e))return null;let r="LLVM-",n=c(ig)(e,"3.7.0")?"-win32.exe":"-win64.exe",i=c(ig)(e,"9.0.1"),o=!1;return i&&(t=tY(e,r,n),(await ik(t))||(o=!0)),(o||!i)&&(t=tW(e,r,n)),t;}function tK(e,t){switch(e){case"darwin":return function(e){if(a4.has(e))return null;let t="9.0.0"===e?"-darwin-apple":"-apple-darwin",r="clang+llvm-",n=`-x86_64${t}.tar.xz`;return c(ig)(e,"9.0.1")?tY(e,r,n):tW(e,r,n);}(t);case"linux":return function(e){let t,r,n=e,i=a6.get(n);if(void 0!==i&&(n=i),n.includes("ubuntu")){let e=n.replace(/-ubuntu-.*/,"");if(!a2.has(e))throw Error("Unsupported Ubuntu version: "+e);t=n.replace(e,""),n=eW(a2,e)[0];}else""!==n&&n in a8?t=a8[n]:(t=a8[a5],(0,rG.warning)(`Falling back to LLVM version ${a5} ${t} for the Ubuntu.`));let o="clang+llvm-";return(r="5.0.0"===n?`-linux-x86_64${t}.tar.xz`:t.includes("-rhel86")?`-x86_64-unknown-linux-gnu${t}.tar.xz`:`-x86_64-linux-gnu${t}.tar.xz`,c(ig)(n,"9.0.1"))?tY(n,o,r):tW(n,o,r);}(t);case"win32":return tJ(t);default:return null;}}async function tZ(e,t,r){let[n,i]=await eY(a2,t,e,tK);return(0,rG.info)("specific llvm version: "+n),{url:i,extractedFolderName:"",binRelativeDir:"bin",binFileName:(0,im.addExeExt)("clang"),extractFunction:"win32"===t?ej:(e,t)=>eU(e,t,1)};}async function tQ(e,t,r){var n;let i=await a7(e,t,r);return await t4(null!==(n=i.installDir)&&void 0!==n?n:t),i;}async function t0(e,t,r){let[n,i]=await Promise.all([t1(e,t,r),t6()]);return await le(r),n;}async function t1(e,t,r,n=iz.All){let i=Number.parseInt(function(e){if(null===c(ij)(e))try{let t=c(iv)(e);if(null!==t)return(0,rG.info)(`Coerced version '${e}' to '${t}'`),t.version;}catch(e){}return e;}(e).split(".")[0],10);try{if(em())return await tz(i,n);}catch(e){(0,rG.info)("Failed to install llvm via system package manager "+e);}let o=await eG("llvm",e,tZ,t,r);return await a9(i),o;}async function t2(e){em()&&(e<=10?await en([{name:"libtinfo5"}]):await en([{name:"libtinfo-dev"}]));}async function t3(e){"linux"===process.platform&&(await tI(tr("gcc",void 0,await aU()),"",e,40));}async function t4(e){var t,r;let n=null!==(t=process.env.LD_LIBRARY_PATH)&&void 0!==t?t:"",i=null!==(r=process.env.DYLD_LIBRARY_PATH)&&void 0!==r?r:"",o=[C("LLVM_PATH",e,lo),C("LD_LIBRARY_PATH",`${e}/lib${iY.delimiter}${n}`,lo),C("DYLD_LIBRARY_PATH",`${e}/lib${iY.delimiter}${i}`,lo),C("LDFLAGS",`-L"${e}/lib"`,lo),C("CPPFLAGS",`-I"${e}/include"`,lo),C("CC",(0,im.addExeExt)(`${e}/bin/clang`),lo),C("CXX",(0,im.addExeExt)(`${e}/bin/clang++`),lo),C("LIBRARY_PATH",`${e}/lib`,lo),tO()];em()&&o.push(q("cc",`${e}/bin/clang`,lo,60),q("cxx",`${e}/bin/clang++`,lo,60),q("clang",`${e}/bin/clang`,lo),q("clang++",`${e}/bin/clang++`,lo),q("lld",`${e}/bin/lld`,lo),q("ld.lld",`${e}/bin/ld.lld`,lo),q("llvm-ar",`${e}/bin/llvm-ar`,lo)),await Promise.all(o);}async function t6(){if(rM.GITHUB_ACTIONS){let e=(0,im.join)(iV,"llvm_matcher.json");if(!(await(0,nG.pathExists)(e)))return(0,rG.warning)("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");(0,rG.info)("::add-matcher::"+e);}}async function t8(e,t,r){switch(process.platform){case"win32":return eg("make",e);case"darwin":return await ef("make",e),await k("/usr/local/opt/make/libexec/gnubin",lo),{binDir:"/usr/l
`),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:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));let l=null!==(t=a.architecture)&&void 0!==t?t:process.arch,u=null!==(r=process.env.SETUP_CPP_DIR)&&void 0!==r?r:T("~"),p=[],f=[],d=nV.create({autoloadLocales:!0});nV.addLocale(c(nX)),nq.addLocale(c(nz));let h=await aU();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!tn(e[t])),i=n.length>=1?e[n[0]]:"true";if(n.some(t=>e[t]!==i))return!1;for(let t of r)e[t]=i;return!0;}(a,["llvm","clangtidy","clangformat"]))return(0,rG.error)("The same version must be used for llvm, clangformat and clangtidy"),1;eh()&&"string"==typeof a.cppcheck&&"string"==typeof a.gcovr&&((0,rG.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await e_("python-pygments"));let m=!1,v=!1;for(let e of ln){if(rM.isCI&&0!==f.length){v=!0;break;}let t=a[e];void 0!==t&&(i=Date.now(),m=await tH(e,t,h,l,u,p,f,6e4*Number.parseFloat(null!==(n=a.timeout)&&void 0!==n?n:"20")),o=Date.now(),(0,rG.info)("took "+(d.format(i,o)||"0 seconds")));}if(!v){let e=a.compiler;if(void 0!==e){let t=Date.now();await ru(e,h,u,l,p,m,f);let r=Date.now();(0,rG.info)("took "+(d.format(t,r)||"0 seconds"));}}if(await $(lo),0===p.length&&0===f.length)return(0,rG.warning)("setup-cpp was called without any arguments. Nothing to do."),0;for(let e of p)(0,rG.success)(e);for(let e of f)(0,rG.error)(e);if((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.");}returnawaits,0===f.length?0:1;}varrf,rd,rh,rm,rv,rg,ry,rE,rw,r_,rb,rx,rO,rS,rR,rI,rT,rP,rN,rA,r$,rC,rL,rk,rD,rj,rF,rU,rM,rG,rB,rH,rq,rz,rV,rX,rW,rY,rJ,rK,rZ,rQ,r0,r1,r2,r3,r4,r6,r8,r5,r7,r9,ne,nt,nr,nn,ni,no,ns,na,nl,nc,nu,np,nf,nd,nh,nm,nv,ng,ny,nE,nw,n_,nb,nx,nO,nS,nR,nI,nT,nP,nN,nA,n$,nC,nL,nk,nD,nj,nF,nU,nM,nG,nB,nH,nq,nz,nV,nX,nW,nY,nJ,nK,nZ,nQ,n0,n1,n2,n3,n4,n6,n8,n5,n7,n9,ie,it,ir,ii,io,is,ia,il,ic,iu,ip,id,ih,im,iv,ig,iy,iE,iw,i_,ib,ix,iO,iS,iR,iI,iT,iP,iN,iA,i$,iC,iL,ik,iD,ij,iF,iU,iM,iG,iB,iH,iq,iz,iV,iX,iW=require("os"),iY=require("path"),iJ=require("fs"),iK=require("crypto"),iZ=require("http"),iQ=require("https");require("net"),rm=require("tls"),rv=require("events"),rg=require("assert"),ry=require("util"),rE=require("fs"),rw=require("child_process"),r_=require("string_decoder"),rb=require("timers"),rx=require("buffer"),rO=require("path"),rS=require("child_process"),rR=require("process"),rI=require("url"),rT=require("os"),rP=require("buffer"),rN=require("stream"),rA=require("util"),r$=require("process"),rC=require("url"),rL=require("console"),rD={},rj={},null==(rF=(rk=globalThis).parcelRequire810d)&&((rF=function(e){if(einrD)returnrD[e].exports;if(einrj){vart=rj[e];deleterj[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){rj[e]=t;},rk.parcelRequire810d=rF),(rU=rF.register)("dKklS",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=rF("ksAXT");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){
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;}),rU("3bZps",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);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r];}}),Object.defineProperty(e,n,i);}: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.prototype.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(iZ),f=i(iQ),d=i(rF("iZzl4")),h=i(rF("bbp3j"));(c=s||(e.exports.HttpCodes=s={}))[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=a={})).Accept="accept",u.ContentType="content-type",(l||(e.exports.MediaTypes=l={})).ApplicationJson="application/json",e.exports.getProxyUrl=function(e){let t=d.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 y extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,y.prototype);}}e.exports.HttpClientError=y;class E{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());});}));});}readBodyBuffer(){return o(this,void 0,void 0,function*(){return new Promise(e=>o(this,void 0,void 0,function*(){let t=[];this.message.on("data",e=>{t.push(e);}),this.message.on("end",()=>{e(Buffer.concat(t));});}));});}}e.exports.HttpClientResponse=E,e.exports.isHttps=function(e){return"https:"===new URL(e).protocol;},e.exports.HttpClient=class{const
${t}`,os=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),oa=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ol=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=oo.bind(null,n,t.toString());Object.defineProperty(i,"name",oa),Object.defineProperty(e,"toString",{...os,value:i});},oc=new WeakMap(),ou=(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(oc.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))or(e,t,n,r);oi(e,t),ol(e,t,n);}(o,e),oc.set(o,n),o;};ou.callCount=e=>{if(!oc.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnoc.get(e);},r2=ou;constop=()=>Array.from({length:oh-od+1},of),of=(e,t)=>({name:"SIGRT"+(t+1),number:od+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),od=34,oh=64,om=[{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,E=[y,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),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=d,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;},ox=["stdin","stdout","stderr"],oO=e=>ox.some(t=>void 0!==e[t]),oS=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return ox.map(t=>e[t]);if(oO(e))throw Error("It's not possible to provide `stdio` in combination with one of "+ox.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,ox.length)},(e,r)=>t[r]);};r3={};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(r4=rk.process)){varoI,oT=rg,oP=rF("bJALw"),oN=/^win/i.test(r4.platform),oA=rv;"function"!=typeofoA&&(oA=oA.EventEmitter),r4.__signal_exit_emitter__?oI=r4.__signal_exit_emitter__:((oI=r4.__signal_exit_emitter__=newoA()).count=0,oI.emitted={}),oI.infinite||(oI.setMaxListeners(1/0),oI.infinite=!0);varo$=function(){ok&&oR(rk.process)&&(ok=!1,oP.forEach(function(e){try{r4.removeListener(e,oL[e]);}catch(e){}}),r4.emit=oU,r4.reallyExit=oj,oI.count-=1);};(r3=function(e,t){if(!oR(rk.process))returnfunction(){};oT.equal(typeofe,"function","a callback must be provided for exit handler"),!1===ok&&oD();varr="exit";returnt&&t.alwaysLast&&(r="afterexit"),oI.on(r,e),function(){oI.removeListener(r,e),0===oI.listeners("exit").length&&0===oI.listeners("afterexit").length&&o$();};}).unload=o$;varoC=function(e,t,r){oI.emitted[e]||(oI.emitted[e]=!0,oI.emit(e,t,r));},oL={};oP.forEach(function(e){oL[e]=function(){oR(rk.process)&&r4.listeners(e).length===oI.count&&(o$(),oC("exit",null,e),oC("afterexit",null,e),oN&&"SIGHUP"===e&&(e="SIGINT"),r4.kill(r4.pid,e));};}),r3.signals=function(){returnoP;};varok=!1,oD=function(){!ok&&oR(rk.process)&&(ok=!0,oI.count+=1,oP=oP.filter(function(e){try{returnr4.on(e,oL[e]),!0;}catch(e){return!1;}}),r4.emit=oM,r4.reallyExit=oF);};r3.load=oD;varoj=r4.reallyExit,oF=function(e){oR(rk.process)&&(r4.exitCode=e||0,oC("exit",r4.exitCode,null),oC("afterexit",r4.exitCode,null),oj.call(r4,r4.exitCode));},oU=r4.emit,oM=function(e,t){if(!("exit"===e&&oR(rk.process)))returnoU.apply(this,arguments);void0!==t&&(r4.exitCode=t);varr=oU.apply(this,arguments);returnoC("exit",r4.exitCode,null),oC("afterexit",r4.exitCode,null),r;};}elser3=function(){returnfunction(){};};constoG=(e,t="SIGTERM",r={})=>{letn=e(t);returnoB(e,t,r,n),n;},oB=(e,t,r,n)=>{if(!oH(t,r,n))return;leti=setTimeout(()=>{e("SIGKILL");},oz(r));i.unref&&i.unref();},oH=(e,{forceKillAfterTimeout:t},r)=>oq(e)&&!1!==t&&r,oq=e=>e===c(rT).constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),oz=({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;},oV=(e,t)=>{e.kill()&&(t.isCanceled=!0);},oX=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},oW=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;return0===t||void0===t?n:Promise.race([newPromise((n,o)=>{i=setTimeout(()=>{oX(e,r,o);},t);}),n.finally(()=>{clearTimeout(i);})]);},oY=({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);},oJ=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=c(r3)(()=>{e.kill();});returnn.finally(()=>{i();});},oK=e=>einstanceofrS.ChildProcess&&"function"==typeofe.then,oZ=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,rE.createWriteStream)(r)),e;if(g