mirror of https://github.com/aminya/setup-cpp.git
4 lines
305 KiB
JavaScript
4 lines
305 KiB
JavaScript
#!/usr/bin/env node
|
||
function e(e){return null==e?[]:Array.isArray(e)?e:[e]}function t(e,t,r,n){var i,o=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(i=+r)==0?i:r),!!r)):0*(i=+r)==0?i:r;e[t]=null==o?s:Array.isArray(o)?o.concat(s):[o,s]}function r(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if({}.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}function i(){return Bi?Gi:(Bi=1,Gi={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2})}function o(){if(Vi)return Hi;Vi=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return Hi=e}function s(){return qi||(qi=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=i(),a=o(),c=(t=e.exports={}).re=[],u=t.safeRe=[],l=t.src=[],f=t.safeSrc=[],p=t.t={};let d=0;const h="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[h,n]],y=(e,t,r)=>{const n=(e=>{for(const[t,r]of m)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),i=d++;a(e,i,t),p[e]=i,l[i]=t,f[i]=n,c[i]=RegExp(t,r?"g":void 0),u[i]=RegExp(n,r?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),y("MAINVERSION",`(${l[p.NUMERICIDENTIFIER]})\\.(${l[p.NUMERICIDENTIFIER]})\\.(${l[p.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${l[p.NUMERICIDENTIFIERLOOSE]})\\.(${l[p.NUMERICIDENTIFIERLOOSE]})\\.(${l[p.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${l[p.NUMERICIDENTIFIER]}|${l[p.NONNUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${l[p.NUMERICIDENTIFIERLOOSE]}|${l[p.NONNUMERICIDENTIFIER]})`),y("PRERELEASE",`(?:-(${l[p.PRERELEASEIDENTIFIER]}(?:\\.${l[p.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${l[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[p.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",h+"+"),y("BUILD",`(?:\\+(${l[p.BUILDIDENTIFIER]}(?:\\.${l[p.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${l[p.MAINVERSION]}${l[p.PRERELEASE]}?${l[p.BUILD]}?`),y("FULL",`^${l[p.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${l[p.MAINVERSIONLOOSE]}${l[p.PRERELEASELOOSE]}?${l[p.BUILD]}?`),y("LOOSE",`^${l[p.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",l[p.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),y("XRANGEIDENTIFIER",l[p.NUMERICIDENTIFIER]+"|x|X|\\*"),y("XRANGEPLAIN",`[v=\\s]*(${l[p.XRANGEIDENTIFIER]})(?:\\.(${l[p.XRANGEIDENTIFIER]})(?:\\.(${l[p.XRANGEIDENTIFIER]})(?:${l[p.PRERELEASE]})?${l[p.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${l[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[p.XRANGEIDENTIFIERLOOSE]})(?:${l[p.PRERELEASELOOSE]})?${l[p.BUILD]}?)?)?`),y("XRANGE",`^${l[p.GTLT]}\\s*${l[p.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${l[p.GTLT]}\\s*${l[p.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),y("COERCE",l[p.COERCEPLAIN]+"(?:$|[^\\d])"),y("COERCEFULL",l[p.COERCEPLAIN]+`(?:${l[p.PRERELEASE]})?(?:${l[p.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",l[p.COERCE],!0),y("COERCERTLFULL",l[p.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${l[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",y("TILDE",`^${l[p.LONETILDE]}${l[p.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${l[p.LONETILDE]}${l[p.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${l[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",y("CARET",`^${l[p.LONECARET]}${l[p.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${l[p.LONECARET]}${l[p.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${l[p.GTLT]}\\s*(${l[p.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${l[p.GTLT]}\\s*(${l[p.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${l[p.GTLT]}\\s*(${l[p.LOOSEPLAIN]}|${l[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${l[p.XRANGEPLAIN]})\\s+-\\s+(${l[p.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${l[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[p.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Is,Is.exports)),Is.exports}function a(){if(Wi)return zi;Wi=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return zi=r=>r?"object"!=typeof r?e:r:t}function c(){if(Yi)return Xi;Yi=1;const e=/^[0-9]+$/,t=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:r>t?-1:1};return Xi={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}function u(){if(Ji)return Ki;Ji=1;const e=o(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=i(),{safeRe:n,safeSrc:u,t:l}=s(),f=a(),{compareIdentifiers:p}=c();class d{constructor(i,o){if(o=f(o),i instanceof d){if(i.loose===!!o.loose&&i.includePrerelease===!!o.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;const s=i.trim().match(o.loose?n[l.LOOSE]:n[l.FULL]);if(!s)throw new TypeError("Invalid Version: "+i);if(this.raw=i,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>r||0>this.major)throw new TypeError("Invalid major version");if(this.minor>r||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>r||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=s[4]?s[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&r>t)return t}return e})):[],this.build=s[5]?s[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof d)){if("string"==typeof t&&t===this.version)return 0;t=new d(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof d||(e=new d(e,this.options)),p(this.major,e.major)||p(this.minor,e.minor)||p(this.patch,e.patch)}comparePre(t){if(t instanceof d||(t=new d(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{const n=this.prerelease[r],i=t.prerelease[r];if(e("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return p(n,i)}while(++r)}compareBuild(t){t instanceof d||(t=new d(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(e("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return p(n,i)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){const e=RegExp(`^${this.options.loose?u[l.PRERELEASELOOSE]:u[l.PRERELEASE]}$`),r=("-"+t).match(e);if(!r||r[1]!==t)throw Error("invalid identifier: "+t)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===p(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}}return Ki=d}function l(){if(Zi)return Qi;Zi=1;const e=u();return Qi=(t,r,n=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(i){if(!n)return null;throw i}}}function f(){if(to)return eo;to=1;const e=l();return eo=(t,r)=>{const n=e(t,r);return n?n.version:null}}function p(){if(uo)return co;uo=1;const e=u();return co=(t,r)=>new e(t,r).major}function d(){if(wo)return vo;wo=1;const e=u();return vo=(t,r,n)=>new e(t,n).compare(new e(r,n))}function h(){if(Oo)return So;Oo=1;const e=u();return So=(t,r,n)=>{const i=new e(t,n),o=new e(r,n);return i.compare(o)||i.compareBuild(o)}}function m(){if(No)return To;No=1;const e=d();return To=(t,r,n)=>e(t,r,n)>0}function y(){if(Co)return $o;Co=1;const e=d();return $o=(t,r,n)=>0>e(t,r,n)}function v(){if(Lo)return Ao;Lo=1;const e=d();return Ao=(t,r,n)=>0===e(t,r,n)}function w(){if(Do)return ko;Do=1;const e=d();return ko=(t,r,n)=>0!==e(t,r,n)}function g(){if(jo)return Fo;jo=1;const e=d();return Fo=(t,r,n)=>e(t,r,n)>=0}function E(){if(Mo)return Uo;Mo=1;const e=d();return Uo=(t,r,n)=>0>=e(t,r,n)}function _(){if(Bo)return Go;Bo=1;const e=v(),t=w(),r=m(),n=g(),i=y(),o=E();return Go=(s,a,c,u)=>{switch(a){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return r(s,c,u);case">=":return n(s,c,u);case"<":return i(s,c,u);case"<=":return o(s,c,u);default:throw new TypeError("Invalid operator: "+a)}}}function b(){if(Vo)return Ho;Vo=1;const e=u(),t=l(),{safeRe:r,t:n}=s();return Ho=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i+=""),"string"!=typeof i)return null;let s=null;if((o=o||{}).rtl){const e=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);return null===s?null:t(`${s[2]}.${s[3]||"0"}.${s[4]||"0"}${o.includePrerelease&&s[5]?"-"+s[5]:""}${o.includePrerelease&&s[6]?"+"+s[6]:""}`,o)}}function S(){if(Xo)return Wo;Xo=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof c)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=r.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&E(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;this.set.length>e;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;t.length>e;e++)e>0&&(this.formatted+=" "),this.formatted+=(""+t[e]).trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&v)|(this.options.loose&&w))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose;e=e.replace(i?p[d.HYPHENRANGELOOSE]:p[d.HYPHENRANGE],A(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(p[d.COMPARATORTRIM],h),l("comparator trim",e),e=e.replace(p[d.TILDETRIM],m),l("tilde trim",e),e=e.replace(p[d.CARETTRIM],y),l("caret trim",e);let o=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>C(e,this.options)));i&&(o=o.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(p[d.COMPARATORLOOSE]))))),l("range list",o);const s=new Map,a=o.map((e=>new c(e,this.options)));for(const r of a){if(g(r))return[r];s.set(r.value,r)}s.size>1&&s.has("")&&s.delete("");const u=[...s.values()];return r.set(t,u),u}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>_(t,r)&&e.set.some((e=>_(e,r)&&t.every((t=>e.every((e=>t.intersects(e,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new f(e,this.options)}catch(t){return!1}for(let r=0;this.set.length>r;r++)if(L(this.set[r],e,this.options))return!0;return!1}}Wo=t;const r=new(zo?qo:(zo=1,qo=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),n=a(),c=O(),l=o(),f=u(),{safeRe:p,t:d,comparatorTrimReplace:h,tildeTrimReplace:m,caretTrimReplace:y}=s(),{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:w}=i(),g=e=>"<0.0.0-0"===e.value,E=e=>""===e.value,_=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},b=(e,t)=>(l("comp",e,t),e=P(e,t),l("caret",e),e=R(e,t),l("tildes",e),e=T(e,t),l("xrange",e),e=$(e,t),l("stars",e),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,R=(e,t)=>e.trim().split(/\s+/).map((e=>I(e,t))).join(" "),I=(e,t)=>e.replace(t.loose?p[d.TILDELOOSE]:p[d.TILDE],((t,r,n,i,o)=>{let s;return l("tilde",e,t,r,n,i,o),S(r)?s="":S(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:S(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(l("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,l("tilde return",s),s})),P=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{l("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?p[d.CARETLOOSE]:p[d.CARET],((t,n,i,o,s)=>{let a;return l("caret",e,t,n,i,o,s),S(n)?a="":S(i)?a=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(o)?a="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(l("replaceCaret pr",s),a="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(l("no pr"),a="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),l("caret return",a),a}))},T=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>N(e,t))).join(" ")),N=(e,t)=>(e=e.trim()).replace(t.loose?p[d.XRANGELOOSE]:p[d.XRANGE],((r,n,i,o,s,a)=>{l("xRange",e,r,n,i,o,s,a);const c=S(i),u=c||S(o),f=u||S(s);return"="===n&&f&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),"<"===n&&(a="-0"),r=`${n+i}.${o}.${s}${a}`):u?r=`>=${i}.0.0${a} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${a} <${i}.${+o+1}.0-0`),l("xRange return",r),r})),$=(e,t)=>(l("replaceStars",e,t),e.trim().replace(p[d.STAR],"")),C=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(p[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),A=e=>(t,r,n,i,o,s,a,c,u,l,f,p)=>`${r=S(n)?"":S(i)?`>=${n}.0.0${e?"-0":""}`:S(o)?`>=${n}.${i}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=S(u)?"":S(l)?`<${+u+1}.0.0-0`:S(f)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${f}-${p}`:e?`<${u}.${l}.${+f+1}-0`:"<="+c}`.trim(),L=(e,t,r)=>{for(let n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;e.length>r;r++)if(l(e[r].semver),e[r].semver!==c.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return Wo}function O(){if(Ko)return Yo;Ko=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,i){if(i=r(i),n instanceof t){if(n.loose===!!i.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),l("comparator",n,i),this.options=i,this.loose=!!i.loose,this.parse(n),this.value=this.semver===e?"":this.operator+this.semver.version,l("comp",this)}parse(t){const r=t.match(this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR]);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),this.semver=r[2]?new f(r[2],this.options.loose):e}toString(){return this.value}test(t){if(l("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new f(t,this.options)}catch(r){return!1}return c(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new p(e.value,n).test(this.value):""===e.operator?""===e.value||new p(this.value,n).test(e.semver):!((n=r(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Yo=t;const r=a(),{safeRe:n,t:i}=s(),c=_(),l=o(),f=u(),p=S();return Yo}function R(){if(Qo)return Jo;Qo=1;const e=S();return Jo=(t,r,n)=>{try{r=new e(r,n)}catch(i){return!1}return r.test(t)}}function I(){if(ls)return us;ls=1;const e=u(),t=O(),{ANY:r}=t,n=S(),i=R(),o=m(),s=y(),a=E(),c=g();return us=(u,l,f,p)=>{let d,h,m,y,v;switch(u=new e(u,p),l=new n(l,p),f){case">":d=o,h=a,m=s,y=">",v=">=";break;case"<":d=s,h=c,m=o,y="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,p))return!1;for(let e=0;l.set.length>e;++e){let n=null,i=null;if(l.set[e].forEach((e=>{e.semver===r&&(e=new t(">=0.0.0")),n=n||e,i=i||e,d(e.semver,n.semver,p)?n=e:m(e.semver,i.semver,p)&&(i=e)})),n.operator===y||n.operator===v)return!1;if((!i.operator||i.operator===y)&&h(u,i.semver))return!1;if(i.operator===v&&m(u,i.semver))return!1}return!0}}function P(){if(bs)return _s;bs=1;const e=s(),t=i(),r=u(),n=c(),o=l(),a=f(),P=function(){if(no)return ro;no=1;const e=l();return ro=(t,r)=>{const n=e(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null}}(),x=function(){if(oo)return io;oo=1;const e=u();return io=(t,r,n,i,o)=>{"string"==typeof n&&(o=i,i=n,n=void 0);try{return new e(t instanceof e?t.version:t,n).inc(r,i,o).version}catch(s){return null}}}(),T=function(){if(ao)return so;ao=1;const e=l();return so=(t,r)=>{const n=e(t,null,!0),i=e(r,null,!0),o=n.compare(i);if(0===o)return null;const s=o>0,a=s?n:i,c=s?i:n,u=!!a.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(a))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"}}(),N=p(),$=function(){if(fo)return lo;fo=1;const e=u();return lo=(t,r)=>new e(t,r).minor}(),C=function(){if(ho)return po;ho=1;const e=u();return po=(t,r)=>new e(t,r).patch}(),A=function(){if(yo)return mo;yo=1;const e=l();return mo=(t,r)=>{const n=e(t,r);return n&&n.prerelease.length?n.prerelease:null}}(),L=d(),k=function(){if(Eo)return go;Eo=1;const e=d();return go=(t,r,n)=>e(r,t,n)}(),D=function(){if(bo)return _o;bo=1;const e=d();return _o=(t,r)=>e(t,r,!0)}(),F=h(),j=function(){if(Io)return Ro;Io=1;const e=h();return Ro=(t,r)=>t.sort(((t,n)=>e(t,n,r)))}(),U=function(){if(xo)return Po;xo=1;const e=h();return Po=(t,r)=>t.sort(((t,n)=>e(n,t,r)))}(),M=m(),G=y(),B=v(),H=w(),V=g(),q=E(),z=_(),W=b(),X=O(),Y=S(),K=R(),J=function(){if(es)return Zo;es=1;const e=S();return Zo=(t,r)=>new e(t,r).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}(),Q=function(){if(rs)return ts;rs=1;const e=u(),t=S();return ts=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),Z=function(){if(is)return ns;is=1;const e=u(),t=S();return ns=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),ee=function(){if(ss)return os;ss=1;const e=u(),t=S(),r=m();return os=(n,i)=>{n=new t(n,i);let o=new e("0.0.0");if(n.test(o))return o;if(o=new e("0.0.0-0"),n.test(o))return o;o=null;for(let t=0;n.set.length>t;++t){let i=null;n.set[t].forEach((t=>{const n=new e(t.semver.version);switch(t.operator){case">":0===n.prerelease.length?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":i&&!r(n,i)||(i=n);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+t.operator)}})),!i||o&&!r(o,i)||(o=i)}return o&&n.test(o)?o:null}}(),te=function(){if(cs)return as;cs=1;const e=S();return as=(t,r)=>{try{return new e(t,r).range||"*"}catch(n){return null}}}(),re=I(),ne=function(){if(ps)return fs;ps=1;const e=I();return fs=(t,r,n)=>e(t,r,">",n)}(),ie=function(){if(hs)return ds;hs=1;const e=I();return ds=(t,r,n)=>e(t,r,"<",n)}(),oe=function(){if(ys)return ms;ys=1;const e=S();return ms=(t,r,n)=>(t=new e(t,n),r=new e(r,n),t.intersects(r,n))}(),se=function(){if(ws)return vs;ws=1;const e=R(),t=d();return vs=(r,n,i)=>{const o=[];let s=null,a=null;const c=r.sort(((e,r)=>t(e,r,i)));for(const t of c)e(t,n,i)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)u.push(e===t?e:t||e!==c[0]?t?e===c[0]?"<="+t:`${e} - ${t}`:">="+e:"*");const l=u.join(" || ");return("string"==typeof n.raw?n.raw:n+"").length>l.length?l:n}}(),ae=function(){if(Es)return gs;Es=1;const e=S(),t=O(),{ANY:r}=t,n=R(),i=d(),o=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],a=(e,t,a)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r){if(1===t.length&&t[0].semver===r)return!0;e=a.includePrerelease?o:s}if(1===t.length&&t[0].semver===r){if(a.includePrerelease)return!0;t=s}const l=new Set;let f,p,d,h,m,y,v;for(const r of e)">"===r.operator||">="===r.operator?f=c(f,r,a):"<"===r.operator||"<="===r.operator?p=u(p,r,a):l.add(r.semver);if(l.size>1)return null;if(f&&p){if(d=i(f.semver,p.semver,a),d>0)return null;if(0===d&&(">="!==f.operator||"<="!==p.operator))return null}for(const r of l){if(f&&!n(r,f+"",a))return null;if(p&&!n(r,p+"",a))return null;for(const e of t)if(!n(r,e+"",a))return!1;return!0}let w=!(!p||a.includePrerelease||!p.semver.prerelease.length)&&p.semver,g=!(!f||a.includePrerelease||!f.semver.prerelease.length)&&f.semver;w&&1===w.prerelease.length&&"<"===p.operator&&0===w.prerelease[0]&&(w=!1);for(const r of t){if(v=v||">"===r.operator||">="===r.operator,y=y||"<"===r.operator||"<="===r.operator,f)if(g&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===g.major&&r.semver.minor===g.minor&&r.semver.patch===g.patch&&(g=!1),">"===r.operator||">="===r.operator){if(h=c(f,r,a),h===r&&h!==f)return!1}else if(">="===f.operator&&!n(f.semver,r+"",a))return!1;if(p)if(w&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===w.major&&r.semver.minor===w.minor&&r.semver.patch===w.patch&&(w=!1),"<"===r.operator||"<="===r.operator){if(m=u(p,r,a),m===r&&m!==p)return!1}else if("<="===p.operator&&!n(p.semver,r+"",a))return!1;if(!r.operator&&(p||f)&&0!==d)return!1}return!(f&&y&&!p&&0!==d||p&&v&&!f&&0!==d||g||w)},c=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};return gs=(t,r,n={})=>{if(t===r)return!0;t=new e(t,n),r=new e(r,n);let i=!1;e:for(const e of t.set){for(const t of r.set){const r=a(e,t,n);if(i=i||null!==r,r)continue e}if(i)return!1}return!0}}();return _s={parse:o,valid:a,clean:P,inc:x,diff:T,major:N,minor:$,patch:C,prerelease:A,compare:L,rcompare:k,compareLoose:D,compareBuild:F,sort:j,rsort:U,gt:M,lt:G,eq:B,neq:H,gte:V,lte:q,cmp:z,coerce:W,Comparator:X,Range:Y,satisfies:K,toComparators:J,maxSatisfying:Q,minSatisfying:Z,minVersion:ee,validRange:te,outside:re,gtr:ne,ltr:ie,intersects:oe,simplifyRange:se,subset:ae,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers}}function x(){return Ls||(Ls=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.toCommandProperties=Us.toCommandValue=void 0,Us.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Us.toCommandProperties=function(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}),Us}function T(e){const t="https:"===e.protocol;if(function(e){if(!e.hostname)return!1;if(function(e){const t=e.toLowerCase();return"localhost"===t||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}(e.hostname))return!0;const t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;e.port?r=Number(e.port):"http:"===e.protocol?r=80:"https:"===e.protocol&&(r=443);const n=[e.hostname.toUpperCase()];"number"==typeof r&&n.push(`${n[0]}:${r}`);for(const i of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===i||n.some((e=>e===i||e.endsWith("."+i)||i.startsWith(".")&&e.endsWith(""+i))))return!0;return!1}(e))return;const r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Bs(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Bs("http://"+r)}}function N(){if(ca)return Gs;ca=1;var e=Gs&&Gs.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.OidcClient=void 0;const t=sa,r=function(){if(aa)return va;aa=1;var e=va&&va.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};return Object.defineProperty(va,"__esModule",{value:!0}),va.PersonalAccessTokenCredentialHandler=va.BearerCredentialHandler=va.BasicCredentialHandler=void 0,va.BasicCredentialHandler=class{constructor(e,t){this.username=e,this.password=t}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from(`${this.username}:${this.password}`).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},va.BearerCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Bearer "+this.token}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},va.PersonalAccessTokenCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},va}(),n=k();class i{static createHttpClient(e=!0,n=10){const o={allowRetries:e,maxRetries:n};return new t.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(i.getRequestToken())],o)}static getRequestToken(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(t){var r;return e(this,void 0,void 0,(function*(){const e=i.createHttpClient(),n=yield e.getJson(t).catch((e=>{throw Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)})),o=null===(r=n.result)||void 0===r?void 0:r.value;if(!o)throw Error("Response json body do not have ID Token field");return o}))}static getIDToken(t){return e(this,void 0,void 0,(function*(){try{let e=i.getIDTokenUrl();t&&(e=`${e}&audience=${encodeURIComponent(t)}`),(0,n.debug)("ID token url is "+e);const r=yield i.getCall(e);return(0,n.setSecret)(r),r}catch(e){throw Error("Error message: "+e.message)}}))}}return Gs.OidcClient=i,Gs}function $(){return ua||(ua=1,function(e){var t=wa&&wa.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=Ln,n=Xn,{access:i,appendFile:o,writeFile:s}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY",e.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";const a=new class{constructor(){this._buffer=""}filePath(){return t(this,void 0,void 0,(function*(){if(this._filePath)return this._filePath;const t=process.env[e.SUMMARY_ENV_VAR];if(!t)throw Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield i(t,n.constants.R_OK|n.constants.W_OK)}catch(r){throw Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");return t?`<${e}${n}>${t}</${e}>`:`<${e}${n}>`}write(e){return t(this,void 0,void 0,(function*(){const t=!!(null==e?void 0:e.overwrite),r=yield this.filePath(),n=t?s:o;return yield n(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()}))}clear(){return t(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:!0})}))}stringify(){return this._buffer}isEmptyBuffer(){return 0===this._buffer.length}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t}),n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=!1){const r=t?"ol":"ul",n=e.map((e=>this.wrap("li",e))).join(""),i=this.wrap(r,n);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if("string"==typeof e)return this.wrap("td",e);const{header:t,data:r,colspan:n,rowspan:i}=e,o=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(o,r,s)})).join("");return this.wrap("tr",t)})).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{},o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i}),s=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(s).addEOL()}addHeading(e,t){const r="h"+t,n=this.wrap(["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t}),n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}};e.markdownSummary=a,e.summary=a}(wa)),wa}function C(){return fa||(fa=1,function(e){function t(e){return(1&e.mode)>0||(8&e.mode)>0&&e.gid===process.getgid()||(64&e.mode)>0&&e.uid===process.getuid()}var r,n=Oa&&Oa.__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]}),i=Oa&&Oa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Oa&&Oa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=Oa&&Oa.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getCmdPath=e.tryGetExecutablePath=e.isRooted=e.isDirectory=e.exists=e.READONLY=e.UV_FS_O_EXLOCK=e.IS_WINDOWS=e.unlink=e.symlink=e.stat=e.rmdir=e.rm=e.rename=e.readlink=e.readdir=e.open=e.mkdir=e.lstat=e.copyFile=e.chmod=void 0;const a=o(Xn),c=o(Fn);e.chmod=(r=a.promises).chmod,e.copyFile=r.copyFile,e.lstat=r.lstat,e.mkdir=r.mkdir,e.open=r.open,e.readdir=r.readdir,e.readlink=r.readlink,e.rename=r.rename,e.rm=r.rm,e.rmdir=r.rmdir,e.stat=r.stat,e.symlink=r.symlink,e.unlink=r.unlink,e.IS_WINDOWS="win32"===process.platform,e.UV_FS_O_EXLOCK=268435456,e.READONLY=a.constants.O_RDONLY,e.exists=function(t){return s(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(r){if("ENOENT"===r.code)return!1;throw r}return!0}))},e.isDirectory=function(t,r=!1){return s(this,void 0,void 0,(function*(){return(r?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){return t=t||"",e.IS_WINDOWS?(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\"):t.replace(/\/\/+/g,"/")}(t)))throw Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.tryGetExecutablePath=function(r,n){return s(this,void 0,void 0,(function*(){let i;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(i))return r;const o=r;for(const a of n){r=o+a,i=void 0;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const i of yield e.readdir(t))if(n===i.toUpperCase()){r=c.join(t,i);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(i))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Oa)),Oa}function A(){function e(e){return c(this,void 0,void 0,(function*(){if(f.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield f.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function t(e){return c(this,void 0,void 0,(function*(){u.ok(e,"a path argument must be provided"),yield f.mkdir(e,{recursive:!0})}))}function r(e){return c(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(f.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(l.delimiter))e&&t.push(e);if(f.isRooted(e)){const r=yield f.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(l.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(l.delimiter))e&&r.push(e);const n=[];for(const i of r){const r=yield f.tryGetExecutablePath(l.join(i,e),t);r&&n.push(r)}return n}))}function n(e,r,o,s){return c(this,void 0,void 0,(function*(){if(o>=255)return;o++,yield t(r);const a=yield f.readdir(e);for(const t of a){const a=`${e}/${t}`,c=`${r}/${t}`;(yield f.lstat(a)).isDirectory()?yield n(a,c,o,s):yield i(a,c,s)}yield f.chmod(r,(yield f.stat(e)).mode)}))}function i(e,t,r){return c(this,void 0,void 0,(function*(){if((yield f.lstat(e)).isSymbolicLink()){try{yield f.lstat(t),yield f.unlink(t)}catch(n){"EPERM"===n.code&&(yield f.chmod(t,"0666"),yield f.unlink(t))}const r=yield f.readlink(e);yield f.symlink(r,t,f.IS_WINDOWS?"junction":null)}else(yield f.exists(t))&&!r||(yield f.copyFile(e,t))}))}if(pa)return Sa;pa=1;var o=Sa&&Sa.__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]}),s=Sa&&Sa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Sa&&Sa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&o(t,e,r);return s(t,e),t},c=Sa&&Sa.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.findInPath=Sa.which=Sa.mkdirP=Sa.rmRF=Sa.mv=Sa.cp=void 0;const u=fi,l=a(Fn),f=a(C());return Sa.cp=function(e,t,r={}){return c(this,void 0,void 0,(function*(){const{force:o,recursive:s,copySourceDirectory:a}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),c=(yield f.exists(t))?yield f.stat(t):null;if(c&&c.isFile()&&!o)return;const u=c&&c.isDirectory()&&a?l.join(t,l.basename(e)):t;if(!(yield f.exists(e)))throw Error("no such file or directory: "+e);if((yield f.stat(e)).isDirectory()){if(!s)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield n(e,u,0,o)}else{if(""===l.relative(e,u))throw Error(`'${u}' and '${e}' are the same file`);yield i(e,u,o)}}))},Sa.mv=function(r,n,i={}){return c(this,void 0,void 0,(function*(){if(yield f.exists(n)){let t=!0;if((yield f.isDirectory(n))&&(n=l.join(n,l.basename(r)),t=yield f.exists(n)),t){if(null!=i.force&&!i.force)throw Error("Destination already exists");yield e(n)}}yield t(l.dirname(n)),yield f.rename(r,n)}))},Sa.rmRF=e,Sa.mkdirP=t,Sa.which=function e(t,n){return c(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(n){const r=yield e(t,!1);if(!r)throw Error(f.IS_WINDOWS?`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}const i=yield r(t);return i&&i.length>0?i[0]:""}))},Sa.findInPath=r,Sa}function L(){function e(e,t,r){return i(this,void 0,void 0,(function*(){const n=s.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const i=n[0];return t=n.slice(1).concat(t||[]),new s.ToolRunner(i,t,r).exec()}))}if(ha)return _a;ha=1;var t=_a&&_a.__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]}),r=_a&&_a.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=_a&&_a.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=_a&&_a.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(_a,"__esModule",{value:!0}),_a.getExecOutput=_a.exec=void 0;const o=ui,s=n(function(){if(da)return ba;da=1;var e=ba&&ba.__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]}),t=ba&&ba.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ba&&ba.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&Object.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=ba&&ba.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(ba,"__esModule",{value:!0}),ba.argStringToArray=ba.ToolRunner=void 0;const i=r(Ln),o=r(ai),s=r(li),a=r(Fn),c=r(A()),u=r(C()),l=pi,f="win32"===process.platform;ba.ToolRunner=class extends o.EventEmitter{constructor(e,t,r){if(super(),!e)throw Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){const r=this._getSpawnFileName(),n=this._getSpawnArgs(e);let i=t?"":"[command]";if(f)if(this._isCmdFile()){i+=r;for(const e of n)i+=" "+e}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n)i+=" "+e}else{i+=this._windowsQuoteCmdArg(r);for(const e of n)i+=" "+this._windowsQuoteCmdArg(e)}else{i+=r;for(const e of n)i+=" "+e}return i}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(i.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+i.EOL.length),o=n.indexOf(i.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return f&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(f&&this._isCmdFile()){let t='/D /S /C "'+this._windowsQuoteCmdArg(this.toolPath);for(const r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=!1;for(const o of e)if(t.some((e=>e===o))){r=!0;break}if(!r)return e;let n='"',i=!0;for(let o=e.length;o>0;o--)n+=e[o-1],i&&"\\"===e[o-1]?n+="\\":'"'===e[o-1]?(i=!0,n+='"'):i=!1;return n+='"',n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let n=e.length;n>0;n--)t+=e[n-1],r&&"\\"===e[n-1]?t+="\\":'"'===e[n-1]?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){const t={cwd:(e=e||{}).cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){const r={};return r.cwd=(e=e||{}).cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return n(this,void 0,void 0,(function*(){return!u.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))&&(this.toolPath=a.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield c.which(this.toolPath,!0),new Promise(((e,t)=>n(this,void 0,void 0,(function*(){this._debug("exec tool: "+this.toolPath),this._debug("arguments:");for(const e of this.args)this._debug(" "+e);const r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+i.EOL);const n=new p(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield u.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),a=s.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let c="";a.stdout&&a.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),c=this._processLineBuffer(e,c,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let l="";if(a.stderr&&a.stderr.on("data",(e=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(e),l=this._processLineBuffer(e,l,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),a.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),a.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),a.on("close",(e=>{n.processExitCode=e,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()})),n.on("done",((r,n)=>{c.length>0&&this.emit("stdline",c),l.length>0&&this.emit("errline",l),a.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!a.stdin)throw Error("child process missing stdin");a.stdin.end(this.options.input)}}))))}))}},ba.argStringToArray=function(e){function t(e){i&&'"'!==e&&(o+="\\"),o+=e,i=!1}const r=[];let n=!1,i=!1,o="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&i?t(a):"\\"===a&&n?i=!0:" "!==a||n?t(a):o.length>0&&(r.push(o),o=""):i?t(a):n=!n}return o.length>0&&r.push(o.trim()),r};class p extends o.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=l.setTimeout(p.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):0===this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)):e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){e.done||(!e.processClosed&&e.processExited&&e._debug(`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`),e._setResult())}}return ba}());return _a.exec=e,_a.getExecOutput=function(t,r,n){var s,a;return i(this,void 0,void 0,(function*(){let i="",c="";const u=new o.StringDecoder("utf8"),l=new o.StringDecoder("utf8"),f=null===(s=null==n?void 0:n.listeners)||void 0===s?void 0:s.stdout,p=null===(a=null==n?void 0:n.listeners)||void 0===a?void 0:a.stderr,d=Object.assign(Object.assign({},null==n?void 0:n.listeners),{stdout:e=>{i+=u.write(e),f&&f(e)},stderr:e=>{c+=l.write(e),p&&p(e)}}),h=yield e(t,r,Object.assign(Object.assign({},n),{listeners:d}));return i+=u.end(),c+=l.end(),{exitCode:h,stdout:i,stderr:c}}))},_a}function k(){return ya||(ya=1,function(e){function t(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function r(e,t={}){(0,u.issueCommand)("error",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)}function n(e){(0,u.issue)("group",e)}function i(){(0,u.issue)("endgroup")}var o=Fs&&Fs.__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]}),s=Fs&&Fs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Fs&&Fs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&o(t,e,r);return s(t,e),t},c=Fs&&Fs.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.toPlatformPath=e.toWin32Path=e.toPosixPath=e.markdownSummary=e.summary=e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const u=function(){function e(e,t,r){const n=new s(e,t,r);process.stdout.write(""+n+i.EOL)}if(ks)return js;ks=1;var t=js&&js.__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]}),r=js&&js.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=js&&js.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(js,"__esModule",{value:!0}),js.issue=js.issueCommand=void 0;const i=n(Ln),o=x();js.issueCommand=e,js.issue=function(t,r=""){e(t,{},r)};class s{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(const n in this.properties)if(this.properties.hasOwnProperty(n)){const i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${t=i,(0,o.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+="::"+function(e){return(0,o.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}return js}(),l=function(){if(Ds)return Ms;Ds=1;var e=Ms&&Ms.__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]}),t=Ms&&Ms.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ms&&Ms.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.prepareKeyValueMessage=Ms.issueFileCommand=void 0;const n=r(ni),i=r(Xn),o=r(Ln),s=x();return Ms.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!i.existsSync(r))throw Error("Missing file at path: "+r);i.appendFileSync(r,`${(0,s.toCommandValue)(t)}${o.EOL}`,{encoding:"utf8"})},Ms.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+n.randomUUID(),i=(0,s.toCommandValue)(t);if(e.includes(r))throw Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(i.includes(r))throw Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${o.EOL}${i}${o.EOL}${r}`},Ms}(),f=x(),p=a(Ln),d=a(Fn),h=N();var m,y;(y=m||(e.ExitCode=m={}))[y.Success=0]="Success",y[y.Failure=1]="Failure",e.exportVariable=function(e,t){const r=(0,f.toCommandValue)(t);if(process.env[e]=r,process.env.GITHUB_ENV)return(0,l.issueFileCommand)("ENV",(0,l.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("set-env",{name:e},r)},e.setSecret=function(e){(0,u.issueCommand)("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?(0,l.issueFileCommand)("PATH",e):(0,u.issueCommand)("add-path",{},e),process.env.PATH=`${e}${d.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,r){const n=t(e,r).split("\n").filter((e=>""!==e));return r&&!1===r.trimWhitespace?n:n.map((e=>e.trim()))},e.getBooleanInput=function(e,r){const n=t(e,r);if(["true","True","TRUE"].includes(n))return!0;if(["false","False","FALSE"].includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},e.setOutput=function(e,t){if(process.env.GITHUB_OUTPUT)return(0,l.issueFileCommand)("OUTPUT",(0,l.prepareKeyValueMessage)(e,t));process.stdout.write(p.EOL),(0,u.issueCommand)("set-output",{name:e},(0,f.toCommandValue)(t))},e.setCommandEcho=function(e){(0,u.issue)("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=m.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){(0,u.issueCommand)("debug",{},e)},e.error=r,e.warning=function(e,t={}){(0,u.issueCommand)("warning",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){(0,u.issueCommand)("notice",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+p.EOL)},e.startGroup=n,e.endGroup=i,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{i()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return(0,l.issueFileCommand)("STATE",(0,l.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("save-state",{name:e},(0,f.toCommandValue)(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield h.OidcClient.getIDToken(e)}))};var v=$();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return v.summary}});var w=$();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return w.markdownSummary}});var g=function(){if(la)return ga;la=1;var e=ga&&ga.__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]}),t=ga&&ga.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ga&&ga.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(ga,"__esModule",{value:!0}),ga.toPlatformPath=ga.toWin32Path=ga.toPosixPath=void 0;const n=r(Fn);return ga.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},ga.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},ga.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},ga}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return g.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return g.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return g.toPlatformPath}}),e.platform=a((ma||(ma=1,function(e){var t=Ea&&Ea.__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]}),r=Ea&&Ea.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Ea&&Ea.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=Ea&&Ea.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=Ea&&Ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getDetails=e.isLinux=e.isMacOS=e.isWindows=e.arch=e.platform=void 0;const s=o(Ln),a=n(L());e.platform=s.default.platform(),e.arch=s.default.arch(),e.isWindows="win32"===e.platform,e.isMacOS="darwin"===e.platform,e.isLinux="linux"===e.platform,e.getDetails=function(){return i(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield i(void 0,void 0,void 0,e.isWindows?function*(){const{stdout:e}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:t}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:t.trim(),version:e.trim()}}:e.isMacOS?function*(){var e,t,r,n;const{stdout:i}=yield a.getExecOutput("sw_vers",void 0,{silent:!0}),o=null!==(t=null===(e=i.match(/ProductVersion:\s*(.+)/))||void 0===e?void 0:e[1])&&void 0!==t?t:"";return{name:null!==(n=null===(r=i.match(/ProductName:\s*(.+)/))||void 0===r?void 0:r[1])&&void 0!==n?n:"",version:o}}:function*(){const{stdout:e}=yield a.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,r]=e.trim().split("\n");return{name:t,version:r}})),{platform:e.platform,arch:e.arch,isWindows:e.isWindows,isMacOS:e.isMacOS,isLinux:e.isLinux})}))}}(Ea)),Ea))}(Fs)),Fs}function D(e){return Ia?Ra.error(e):console.log(`[31m${e}[0m`)}function F(e){return Ia?Ra.warning(e):console.log(`[33m${e}[0m`)}function j(e){return Ia?Ra.notice(e):console.log(`[94m${e}[0m`)}function U(e){return Ia?Ra.info(e):console.log(e)}function M(){if(La)return Aa;La=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=Fn,r=e?";":":",n=function(){function e(r,n,i){if("function"==typeof n&&(i=n,n={}),!i){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(t,i){e(r,n||{},(function(e,r){e?i(e):t(r)}))}))}t(r,n||{},(function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),i(e,t)}))}return Ca||(Ca=1,t="win32"===process.platform||Rs.TESTING_WINDOWS?function(){function e(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;r.length>n;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function t(t,n,i){r.stat(t,(function(r,o){i(r,!r&&e(o,t,n))}))}if(xa)return Pa;xa=1,Pa=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=Xn;return Pa}():function(){function e(e,n,i){r.stat(e,(function(e,r){i(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,o=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=a|c;return r&parseInt("001",8)||r&c&&i===s||r&a&&n===o||r&u&&0===o}(e,t)}if(Na)return Ta;Na=1,Ta=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=Xn;return Ta}(),$a=e,e.sync=function(e,r){try{return t.sync(e,r||{})}catch(n){if(r&&r.ignoreErrors||"EACCES"===n.code)return!1;throw n}}),$a;var t}(),i=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),o=(t,n)=>{const i=n.colon||r,o=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(i)],s=e?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(i):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},s=(e,r,s)=>{"function"==typeof r&&(s=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:u}=o(e,r),l=[],f=n=>new Promise(((o,s)=>{if(n===a.length)return r.all&&l.length?o(l):s(i(e));const c=a[n],u=/^".*"$/.test(c)?c.slice(1,-1):c,f=t.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;o(p(d,n,0))})),p=(e,t,i)=>new Promise(((o,s)=>{if(i===c.length)return o(f(t+1));const a=c[i];n(e+a,{pathExt:u},((n,s)=>{if(!n&&s){if(!r.all)return o(e+a);l.push(e+a)}return o(p(e,t,i+1))}))}));return s?f(0).then((e=>s(null,e)),s):f(0)};return Aa=s,s.sync=(e,r)=>{r=r||{};const{pathEnv:s,pathExt:a,pathExtExe:c}=o(e,r),u=[];for(let i=0;s.length>i;i++){const o=s[i],f=/^".*"$/.test(o)?o.slice(1,-1):o,p=t.join(f,e),d=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let e=0;a.length>e;e++){const t=d+a[e];try{if(n.sync(t,{pathExt:c})){if(!r.all)return t;u.push(t)}}catch(l){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw i(e)},Aa}function G(){if(za)return qa;za=1;const e=Fn,t=function(){function e(e,i){const o=e.options.env||process.env,s=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(l){}let u;try{u=r.sync(e.command,{path:o[n({env:o})],pathExt:i?t.delimiter:void 0})}catch(f){}finally{c&&process.chdir(s)}return u&&(u=t.resolve(a?e.options.cwd:"",u)),u}if(Fa)return Da;Fa=1;const t=Fn,r=M(),n=function(){if(ka)return Ja.exports;ka=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};return Ja.exports=e,Ja.exports.default=e,Ja.exports}();return Da=function(t){return e(t)||e(t,!0)}}(),r=function(){if(ja)return Qa;ja=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Qa.command=function(t){return t.replace(e,"^$1")},Qa.argument=function(t,r){return t=(t=`"${t=(t=(t=""+t).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Qa}(),n=function(){if(Va)return Ha;Va=1;const e=Xn,t=function(){if(Ba)return Ga;Ba=1;const e=Ma?Ua:(Ma=1,Ua=/^#!(.*)/);return Ga=(t="")=>{const r=t.match(e);if(!r)return null;const[n,i]=r[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?i:i?`${o} ${i}`:o}}();return Ha=function(r){const n=Buffer.alloc(150);let i;try{i=e.openSync(r,"r"),e.readSync(i,n,0,150,0),e.closeSync(i)}catch(o){}return t(""+n)}}(),i="win32"===process.platform,o=/\.(?:com|exe)$/i,s=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;return qa=function(a,c,u){c&&!Array.isArray(c)&&(u=c,c=null);const l={command:a,args:c=c?c.slice(0):[],options:u=Object.assign({},u),file:void 0,original:{command:a,args:c}};return u.shell?l:function(a){if(!i)return a;const c=function(e){e.file=t(e);const r=e.file&&n(e.file);return r?(e.args.unshift(e.file),e.command=r,t(e)):e.file}(a),u=!o.test(c);if(a.options.forceShell||u){const t=s.test(c);a.command=e.normalize(a.command),a.command=r.command(a.command),a.args=a.args.map((e=>r.argument(e,t)));const n=[a.command].concat(a.args).join(" ");a.args=["/d","/s","/c",`"${n}"`],a.command=process.env.comspec||"cmd.exe",a.options.windowsVerbatimArguments=!0}return a}(l)}}function B(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function H(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function V(e){return H(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}function q(e,t,r){const n=eu(e,t,r),i=Wc(e,t),o=Xc(e,t);let s;Zc(o,n.options),(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(n.options);try{s=mi.spawn(n.file,n.args,n.options)}catch(p){const e=new mi.ChildProcess,t=Promise.reject(yc({error:p,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Hc(e,t),e}const a=(e=>new Promise(((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)}))})))(s),c=((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let i;const o=new Promise(((n,o)=>{i=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,o)}),t)})),s=n.finally((()=>{clearTimeout(i)}));return Promise.race([o,s])})(s,n.options,a),u=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const i=bc((()=>{e.kill()}));return n.finally((()=>{i()}))})(s,n.options,c),l={isCanceled:!1};s.kill=Sc.bind(null,s.kill.bind(s)),s.cancel=xc.bind(null,s,l);const f=ac((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,f,p]=await(async({stdout:t,stderr:r,all:n},{encoding:i,buffer:o,maxBuffer:s},a)=>{const c=Mc(t,{encoding:i,buffer:o,maxBuffer:s}),u=Mc(r,{encoding:i,buffer:o,maxBuffer:s}),l=Mc(n,{encoding:i,buffer:o,maxBuffer:2*s});try{return await Promise.all([a,c,u,l])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},Uc(t,c),Uc(r,u),Uc(n,l)])}})(s,n.options,u),d=tu(n.options,c),h=tu(n.options,f),m=tu(n.options,p);if(e||0!==t||null!==r){const c=yc({error:e,exitCode:t,signal:r,stdout:d,stderr:h,all:m,command:i,escapedCommand:o,parsed:n,timedOut:a,isCanceled:l.isCanceled||!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:i,escapedCommand:o,exitCode:0,stdout:d,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(jc(e),Si(t)))(t);void 0!==r&&(H(r)?r.pipe(e.stdin):e.stdin.end(r))})(s,n.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=Fc();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Tc.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Tc.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Tc.bind(void 0,e,"all"))})(s),Hc(s,f),s}function z(e,t,r){const n=eu(e,t,r),i=Wc(e,t),o=Xc(e,t);Zc(o,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(jc(e),Oi(t)))(e);if(H(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=mi.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw yc({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=tu(n.options,a.stdout,a.error),u=tu(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=yc({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:i,escapedCommand:o,exitCode:0,stdout:c,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function W(){return ou||(ou=1,function(e){var t=cu&&cu.__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]}),r=cu&&cu.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=cu&&cu.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=cu&&cu.__exportStar||function(e,r){for(var n in e)"default"===n||{}.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;const o=n(function(){if(ru)return uu;ru=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.sync=uu.isexe=void 0;const e=Xn,t=Ti;uu.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},uu.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t)=>e.isFile()&&n(e,t),n=(e,t)=>{const r=t.uid??process.getuid?.(),n=t.groups??process.getgroups?.()??[],i=t.gid??process.getgid?.()??n[0];if(void 0===r||void 0===i)throw Error("cannot get uid or gid");const o=new Set([i,...n]),s=e.mode,a=e.uid,c=e.gid,u=parseInt("100",8),l=parseInt("010",8),f=u|l;return!!(s&parseInt("001",8)||s&l&&o.has(c)||s&u&&a===r||s&f&&0===r)};return uu}());e.posix=o;const s=n(function(){if(nu)return lu;nu=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.sync=lu.isexe=void 0;const e=Xn,t=Ti;lu.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),e,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},lu.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),t,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t,r)=>e.isFile()&&((e,t)=>{const{pathExt:r=process.env.PATHEXT||""}=t,n=r.split(";");if(-1!==n.indexOf(""))return!0;for(let i=0;n.length>i;i++){const t=n[i].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);return lu}());e.win32=s,i((iu||(iu=1,Object.defineProperty(fu,"__esModule",{value:!0})),fu),e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:o;e.isexe=a.isexe,e.sync=a.sync}(cu)),cu}function X(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return q(function(){if(void 0===du){const e=pu.sync("pwsh",{nothrow:!0});null!==e&&(du=e);const t=pu.sync("powershell",{nothrow:!0});null!==t&&(du=t)}if(void 0===du)throw Error("Could not find powershell");return du}(),[...t,"-c",e],r)}function Y(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function K(){return null!==pu.sync("sudo",{nothrow:!0})}function J(){return 0===process.getuid?.()||!!process.env.CI}function Q(){return J()&&K()}function Z(e){return Q()?"sudo "+e:e}function ee(e,t=[],r=yu){return Q()?function(e,t){const[r,...n]=Kc(e);return z(r,n,t)}(re(e,t),r):z(e,ne(t),r)}function te(e,t=[],r=yu){return Q()?function(e,t){const[r,...n]=Kc(e);return q(r,n,t)}(re(e,t),r):q(e,ne(t),r)}function re(e,t){return"sudo "+ne([e,...t]).join(" ")}function ne(e){return e.map((e=>`'${e}'`))}function ie(){return"win32"===process.platform?vu():J()}async function oe(e){if(("linux"===process.platform||"darwin"===process.platform)&&Q()&&void 0!==process.env.SUDO_USER){let t=Xn.statSync(e).isDirectory();await te("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],yu)}}function se(){if(bu)return _u;bu=1;var e=(Eu?gu:(Eu=1,gu=function(){}))();return _u=function(t){return t!==e&&null!==t}}function ae(){if(Ou)return Su;Ou=1;var e=se(),t=[].forEach,r=Object.create;return Su=function(n){var i=r(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(t),i)})),i},Su}function ce(){if(Lu)return Au;Lu=1;var e=function(){if(Cu)return $u;Cu=1;var e=Nu?Tu:(Nu=1,Tu=(Iu?Ru:(Iu=1,Ru=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}))()?Math.sign:xu?Pu:(xu=1,Pu=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1})),t=Math.abs,r=Math.floor;return $u=function(n){return isNaN(n)?0:0!==(n=Number(n))&&isFinite(n)?e(n)*r(t(n)):n}}(),t=Math.max;return Au=function(r){return t(0,e(r))}}function ue(){if(Du)return ku;Du=1;var e=ce();return ku=function(t,r,n){var i;return isNaN(t)?0>(i=r)?1:n&&i?i-1:i:!1!==t&&e(t)}}function le(){return ju?Fu:(ju=1,Fu=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e})}function fe(){if(Mu)return Uu;Mu=1;var e=se();return Uu=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}function pe(){return Vu||(Vu=1,Hu=function(){if(Bu)return Gu;Bu=1;var e=le(),t=fe(),r=function(){}.bind,n=function(){}.call,i=Object.keys,o={}.propertyIsEnumerable;return Gu=function(s,a){return function(c,u){var l,f=arguments[2],p=arguments[3];return c=Object(t(c)),e(u),l=i(c),p&&l.sort("function"==typeof p?r.call(p,c):void 0),"function"!=typeof s&&(s=l[s]),n.call(s,l,(function(e,t){return o.call(c,e)?n.call(u,f,c[e],e,c,t):a}))}},Gu}()("forEach")),Hu}function de(){return qu||(qu=1),hp}function he(){return nl||(nl=1,rl=(Wu?zu:(Wu=1,zu=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}))()?Object.assign:function(){if(tl)return el;tl=1;var e=Zu?Qu:(Zu=1,Qu=(Yu?Xu:(Yu=1,Xu=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Ju)return Ku;Ju=1;var e=se(),t=Object.keys;return Ku=function(r){return t(e(r)?Object(r):r)}}()),t=fe(),r=Math.max;return el=function(n,i){var o,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=i[e]}catch(t){o||(o=t)}},s=1;c>s;++s)e(i=arguments[s]).forEach(a);if(void 0!==o)throw o;return n},el}()),rl}function me(){if(cl)return al;cl=1;var e=fe(),t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols;return al=function(o,s){var a,c=Object(e(s));if(o=Object(e(o)),n(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),"function"==typeof i&&i(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return o}}function ye(){if(ul)return yp.exports;ul=1;var e,t,r=ce();try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(n){}return t=me(),e=function(){var e=[];return function(t){var r,n=0;if(e[t])return e[t];for(r=[];t--;)r.push("a"+(++n).toString(36));return Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),yp.exports=function(i,o){var s;if(o=r(o),i.length===o)return i;s=e(o)(i);try{t(s,i)}catch(n){}return s},yp.exports}function ve(){return fl?ll:(fl=1,ll=function(e){return null!=e})}function we(){if(gl)return wl;gl=1;var e=function(){if(vl)return yl;vl=1;var e=function(){if(ml)return hl;ml=1;var e=function(){if(dl)return pl;dl=1;var e=ve(),t={object:!0,function:!0,undefined:!0};return pl=function(r){return!!e(r)&&hasOwnProperty.call(t,typeof r)}}();return hl=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(r){return!1}}}();return yl=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(r){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,r=function(){}.toString;return wl=function(n){return!!e(n)&&!t.test(r.call(n))}}function ge(){if(Il)return vp.exports;Il=1;var e=ve(),t=we(),r=he(),n=ae(),i=(Rl||(Rl=1,Ol=function(){if(_l)return El;_l=1;var e="razdwatrzy";return El=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?"".contains:function(){if(Sl)return bl;Sl=1;var e="".indexOf;return bl=function(t){return e.call(this,t,arguments[1])>-1},bl}()),Ol),o=vp.exports=function(t,o){var s,a,c,u,l;return 2>arguments.length||"string"!=typeof t?(u=o,o=t,t=null):u=arguments[2],e(t)?(s=i.call(t,"c"),a=i.call(t,"e"),c=i.call(t,"w")):(s=c=!0,a=!1),l={value:o,configurable:s,enumerable:a,writable:c},u?r(n(u),l):l};return o.gs=function(o,s,a){var c,u,l,f;return"string"!=typeof o?(l=a,a=s,s=o,o=null):l=arguments[3],e(s)?t(s)?e(a)?t(a)||(l=a,a=void 0):a=void 0:(l=s,s=a=void 0):s=void 0,e(o)?(c=i.call(o,"c"),u=i.call(o,"e")):(c=!0,u=!1),f={get:s,set:a,configurable:c,enumerable:u},l?r(n(l),f):f},vp.exports}function Ee(){return kl?Ll:(kl=1,Ll=($l?Nl:($l=1,Nl=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Al)return Cl;Al=1;var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};return Cl=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()}())}function _e(){if(Gl)return Ml;Gl=1;var e=Ul?jl:(Ul=1,jl=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return Ml=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function be(){return Jl?Kl:(Jl=1,Kl=function(){if(Fl)return Dl;Fl=1;var e=Ee(),t={object:!0,symbol:!0};return Dl=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?Ee().Symbol:function(){if(Yl)return Xl;Yl=1;var e,t,r,n=ge(),i=_e(),o=Ee().Symbol,s=function(){if(Hl)return Bl;Hl=1;var e=ge(),t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Bl=function(i){for(var o,s,a=0;n[i+(a||"")];)++a;return n[i+=a||""]=!0,t(r,o="@@"+i,e.gs(null,(function(r){s||(s=!0,t(this,o,e(r)),s=!1)}))),o}}(),a=function(){if(ql)return Vl;ql=1;var e=ge(),t=Ee().Symbol;return Vl=function(r){return Object.defineProperties(r,{hasInstance:e("",t&&t.hasInstance||r("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||r("isConcatSpreadable")),iterator:e("",t&&t.iterator||r("iterator")),match:e("",t&&t.match||r("match")),replace:e("",t&&t.replace||r("replace")),search:e("",t&&t.search||r("search")),species:e("",t&&t.species||r("species")),split:e("",t&&t.split||r("split")),toPrimitive:e("",t&&t.toPrimitive||r("toPrimitive")),toStringTag:e("",t&&t.toStringTag||r("toStringTag")),unscopables:e("",t&&t.unscopables||r("unscopables"))})}}(),c=function(){if(Wl)return zl;Wl=1;var e=ge(),t=_e(),r=Object.create(null);return zl=function(n){return Object.defineProperties(n,{for:e((function(e){return r[e]?r[e]:r[e]=n(e+"")})),keyFor:e((function(e){var n;for(n in t(e),r)if(r[n]===e)return n}))})}}(),u=Object.create,l=Object.defineProperties,f=Object.defineProperty;if("function"==typeof o)try{o(),r=!0}catch(p){}else o=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},Xl=e=function e(i){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?o(i):(a=u(t.prototype),l(a,{__description__:n("",i=void 0===i?"":i+""),__name__:n("",s(i))}))},a(e),c(e),l(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),l(e.prototype,{toString:n((function(){return"Symbol ("+i(this).__description__+")"})),valueOf:n((function(){return i(this)}))}),f(e.prototype,e.toPrimitive,n("",(function(){var e=i(this);return"symbol"==typeof e?e:""+e}))),f(e.prototype,e.toStringTag,n("c","Symbol")),f(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),f(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),Xl}())}function Se(){return cf?af:(cf=1,af=(Tl?xl:(Tl=1,xl=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}))()?Array.from:function(){if(sf)return of;sf=1;var e=be().iterator,t=function(){if(Zl)return Ql;Zl=1;var e={}.toString,t=e.call(function(){return arguments}());return Ql=function(r){return e.call(r)===t}}(),r=function(){if(tf)return ef;tf=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return ef=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=ce(),i=le(),o=fe(),s=se(),a=function(){if(nf)return rf;nf=1;var e={}.toString,t=e.call("");return rf=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,u=function(){}.call,l={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;return of=function(p){var d,h,m,y,v,w,g,E,_,b,S=arguments[1],O=arguments[2];if(p=Object(o(p)),s(S)&&i(S),this&&this!==Array&&r(this))d=this;else{if(!S){if(t(p))return 1!==(v=p.length)?Array.apply(null,p):((y=[,])[0]=p[0],y);if(c(p)){for(y=Array(v=p.length),h=0;v>h;++h)y[h]=p[h];return y}}y=[]}if(!c(p))if(void 0!==(_=p[e])){for(g=i(_).call(p),d&&(y=new d),E=g.next(),h=0;!E.done;)b=S?u.call(S,O,E.value,h):E.value,d?(l.value=b,f(y,h,l)):y[h]=b,E=g.next(),++h;v=h}else if(a(p)){for(v=p.length,d&&(y=new d),h=0,m=0;v>h;++h)b=p[h],v>h+1&&(55296>(w=b.charCodeAt(0))||w>56319||(b+=p[++h])),b=S?u.call(S,O,b,m):b,d?(l.value=b,f(y,m,l)):y[m]=b,++m;v=m}if(void 0===v)for(v=n(p.length),d&&(y=new d(v)),h=0;v>h;++h)b=S?u.call(S,O,p[h],h):p[h],d?(l.value=b,f(y,h,l)):y[h]=b;return d&&(l.value=null,y.length=v),y},of}())}function Oe(){if(yf)return mf;yf=1;var e,t,r,n,i,o=(sl||(sl=1,e=mp,t=he(),r=function(){if(ol)return il;ol=1;var e=se(),t={function:!0,object:!0};return il=function(r){return e(r)&&t[typeof r]||!1}}(),n=se(),i=Error.captureStackTrace,e.exports=function(o){var s=Error(o),a=arguments[1],c=arguments[2];return n(c)||r(a)&&(c=a,a=null),n(c)&&t(s,c),n(a)&&(s.code=a),i&&i(s,e.exports),s}),mp.exports),s=ye(),a=ge(),c=function(){return Pl||(Pl=1,e=wp,wp.exports,u=ge(),l=le(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,y={}.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0},n=function(e,t){var n,o;return l(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e){var t,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;n=i[t];++t)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];f.call(i,this,o)}},s={on:r=function(e,t){var r;return l(t),y.call(this,"__ee__")?r=this.__ee__:(r=v.value=d(null),h(this,"__ee__",v),v.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:i=function(e,t){var r,n,i,o;if(l(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},emit:o},a={on:u(r),once:u(n),off:u(i),emit:u(o)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s),wp.exports;var e,t,r,n,i,o,s,a,c,u,l,f,p,d,h,m,y,v}().methods,u=function(){if(pf)return ff;pf=1;var e,t=function(){if(lf)return uf;lf=1;var e=Se(),t=Array.isArray;return uf=function(r){return t(r)?r:e(r)}}(),r=se(),n=le(),i=[].slice;return e=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(i.call(e,this.length))},ff=function(i){return(i=t(i)).forEach((function(e){r(e)&&n(e)})),e.bind(i)}}(),l=function(){if(hf)return df;hf=1;var e=le();return df=function(t){var r;return"function"==typeof t?{set:t,get:t}:(r={get:e(t.get)},void 0!==t.set?(r.set=e(t.set),t.delete&&(r.delete=e(t.delete)),t.clear&&(r.clear=e(t.clear)),r):(r.set=r.get,r))}}(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperties,m=c.on,y=c.emit;return mf=function(e,t,r){var n,i,c,v,w,g,E,_,b,S,O,R,I,P,x,T=d(null);return i=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(S=l(r.normalizer),c=S.get,v=S.set,w=S.delete,g=S.clear),null!=r.resolvers&&(x=u(r.resolvers)),P=c?s((function(t){var r,i,s=arguments;if(x&&(s=x(s)),null!==(r=c(s))&&hasOwnProperty.call(T,r))return O&&n.emit("get",r,s,this),T[r];if(i=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),null===r){if(null!==(r=c(s)))throw o("Circular invocation","CIRCULAR_INVOCATION");r=v(s)}else if(hasOwnProperty.call(T,r))throw o("Circular invocation","CIRCULAR_INVOCATION");return T[r]=i,R&&n.emit("set",r,null,i),i}),i):0===t?function(){var t;if(hasOwnProperty.call(T,"data"))return O&&n.emit("get","data",arguments,this),T.data;if(t=arguments.length?f.call(e,this,arguments):p.call(e,this),hasOwnProperty.call(T,"data"))throw o("Circular invocation","CIRCULAR_INVOCATION");return T.data=t,R&&n.emit("set","data",null,t),t}:function(t){var r,i,s=arguments;if(x&&(s=x(arguments)),i=s[0]+"",hasOwnProperty.call(T,i))return O&&n.emit("get",i,s,this),T[i];if(r=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),hasOwnProperty.call(T,i))throw o("Circular invocation","CIRCULAR_INVOCATION");return T[i]=r,R&&n.emit("set",i,null,r),r},n={original:e,memoized:P,profileName:r.profileName,get:function(e){return x&&(e=x(e)),c?c(e):e[0]+""},has:function(e){return hasOwnProperty.call(T,e)},delete:function(e){var t;hasOwnProperty.call(T,e)&&(w&&w(e),t=T[e],delete T[e],I&&n.emit("delete",e,t))},clear:function(){var e=T;g&&g(),T=d(null),n.emit("clear",e)},on:function(e,t){return"get"===e?O=!0:"set"===e?R=!0:"delete"===e&&(I=!0),m.call(this,e,t)},emit:y,updateEnv:function(){e=n.original}},E=c?s((function(e){var t,r=arguments;x&&(r=x(r)),null!==(t=c(r))&&n.delete(t)}),i):0===t?function(){return n.delete("data")}:function(e){return x&&(e=x(arguments)[0]),n.delete(e)},_=s((function(){var e,r=arguments;return 0===t?T.data:(x&&(r=x(r)),e=c?c(r):r[0]+"",T[e])})),b=s((function(){var e,r=arguments;return 0===t?n.has("data"):(x&&(r=x(r)),null!==(e=c?c(r):r[0]+"")&&n.has(e))})),h(P,{__memoized__:a(!0),delete:a(E),clear:a(n.clear),_get:a(_),_has:a(b)}),n},mf}function Re(){if(Nf)return Tf;Nf=1;var e=xf?Pf:(xf=1,Pf=(Of?Sf:(Of=1,Sf=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:If?Rf:(If=1,Rf=function(e){return e!=e})),t=ce(),r=fe(),n=[].indexOf,i={}.hasOwnProperty,o=Math.abs,s=Math.floor;return Tf=function(a){var c,u,l;if(!e(a))return n.apply(this,arguments);for(u=t(r(this).length),c=l=isNaN(l=arguments[1])?0:0>l?t(this.length)-s(o(l)):s(l);u>c;++c)if(i.call(this,c)&&e(this[c]))return c;return-1},Tf}function Ie(){if(jf)return Ff;jf=1;var e=le(),t=pe(),r=function(){}.call;return Ff=function(n,i){var o={},s=arguments[2];return e(i),t(n,(function(e,t,n,a){o[t]=r.call(i,s,e,t,n,a)})),o},Ff}function Pe(){if(Mf)return Uf;Mf=1;var e=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},t=function(t){var r,n,i=document.createTextNode(""),o=0;return new t((function(){var e;if(r)n&&(r=n.concat(r));else{if(!n)return;r=n}if(n=r,r=null,"function"==typeof n)return e=n,n=null,void e();for(i.data=o=++o%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(i,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,i.data=o=++o%2)}};return Uf=function(){if("object"==typeof process&&process&&"function"==typeof process.nextTick)return process.nextTick;if("function"==typeof queueMicrotask)return function(t){queueMicrotask(e(t))};if("object"==typeof document&&document){if("function"==typeof MutationObserver)return t(MutationObserver);if("function"==typeof WebKitMutationObserver)return t(WebKitMutationObserver)}return"function"==typeof setImmediate?function(t){setImmediate(e(t))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(t){setTimeout(e(t),0)}:null}()}function xe(){return qf?Vf:(qf=1,Vf=function(e){return"function"==typeof e})}function Te(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return ep||(ep=1,_p.exports=e,_p.exports.default=e),_p.exports}function Ne(){if(tp)return Ep;tp=1;var e=Ie(),t=function(){if(Hf)return Bf;Hf=1;var e=[].forEach,t=Object.create;return Bf=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Bf}(),r=function(){if(Yf)return Xf;Yf=1;var e=fe(),t=function(){if(Wf)return zf;Wf=1;var e=xe();return zf=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Xf=function(r){return t(e(r))}}(),n=function(){if(Zf)return Qf;Zf=1;var e=function(){if(Jf)return Kf;Jf=1;var e=xe();return Kf=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return Qf=function(t){var r=e(t);return r.length>100&&(r=r.slice(0,99)+"…"),r.replace(/[\n\r\u2028\u2029]/g,(function(e){return JSON.stringify(e).slice(1,-1)}))}}(),i=Te(),o=Pe(),s=Object.create,a=t("then","then:finally","done","done:finally");return de().promise=function(t,c){var u=s(null),l=s(null),f=s(null);if(!0===t)t=null;else if(t=r(t),!a[t])throw new TypeError("'"+n(t)+"' is not valid promise mode");c.on("set",(function(e,r,n){var s=!1;if(!i(n))return l[e]=n,void c.emit("setasync",e,1);u[e]=1,f[e]=n;var a=function(t){var r=u[e];if(s)throw Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");r&&(delete u[e],l[e]=t,c.emit("setasync",e,r))},p=function(){s=!0,u[e]&&(delete u[e],delete f[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){o(p)};"function"==typeof(n=n.then((function(e){o(a.bind(this,e))}),h)).finally&&n.finally(h)}else if("done"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");n.done(a,p)}else if("done:finally"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof n.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");n.done(a),n.finally(p)}})),c.on("get",(function(e,t,r){var n;if(u[e])++u[e];else{var s=function(){c.emit("getasync",e,t,r)};i(n=f[e])?"function"==typeof n.done?n.done(s):n.then((function(){o(s)})):s()}})),c.on("delete",(function(e){if(delete f[e],u[e])delete u[e];else if(hasOwnProperty.call(l,e)){var t=l[e];delete l[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=l;l=s(null),u=s(null),f=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},Ep}async function $e(e){try{return await Ri.access(e),!0}catch{return!1}}function Ce(e){const t=function(){if(Q()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?jn("/Users/",process.env.SUDO_USER):jn("/home/",process.env.SUDO_USER);{const e=kn();if(""===e)return;return e}}();return void 0===t?e:e.replace(Pp,t)}async function Ae(e){const t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`\n# Automatically Generated by envosman ${e.guard}\nexport SOURCE_${e.guard.toUpperCase()}RC=0\n`;await $e(e.rcPath)&&((await Tp(e.rcPath,"utf8")).includes(t)||(await xp(e.rcPath,`\n${t}\n`),U(`Added ${t} to ${e.rcPath}`)))}async function Le(e,t){await $e(t)&&((await Tp(t,"utf-8")).includes(e)||(await xp(t,e),U(`${e} was added to ${t}`)))}async function ke(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:$p,...r},i=function(e,t=!1){const r=t?kp(e):e;return Bp(r,'"',"\\")}(t??"",n.escapeSpace);try{if(Hp)try{if(!n.overwrite&&void 0!==process.env[e])return void U(`Environment variable ${e} is already defined. Skipping.`);Ra.exportVariable(e,i)}catch(o){D(o),await De(e,i,n)}else await De(e,i,n)}catch(o){D(`${o}\nFailed to export environment variable ${e}=${i}. You should add it manually.`)}}async function De(e,t,r){const n=t??"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await X(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void U(`${e}='${n}' was set in the environment.`)):void U(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await Cp(r),r.overwrite?(await Vp(r.rcPath,`\nexport ${e}="${n}"\n`),U(`${e}="${n}" was added to "${r.rcPath}`)):(await Vp(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),U(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)),void(process.env[e]=n)}process.env[e]=n}async function Fe(e,t={}){const r={rcPath:$p,...t};if(!function(e){return!!Wp.some((t=>t.test(e)))&&(process.env.PATH?.split(Un)??[]).includes(e)}(e)){process.env.PATH=`${e}${Un}${process.env.PATH}`;try{if(qp)try{Ra.addPath(e)}catch(n){D(n),await je(e,r)}else await je(e,r)}catch(n){D(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function je(e,t){switch(process.platform){case"win32":return await X(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void U(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await Cp(t),await zp(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void U(`"${e}" was added to "${t.rcPath}"`);default:return}}function Ue(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function Me(){return Xp||(Xp=1,e=Jp,function(){function t(e,t,i){if(r(e),"object"!=typeof i)throw Error("List of variants should be specified as an object");var o=n[e](t);return void 0!==i[o]?i[o]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{Ue(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var n={};e.exports={create:function(e){return r(e),{pluralize:function(r,n){return t(e,r,n)}}},addLocale:function(e,t){n[e]=t},pluralize:t}}()),Jp.exports;var e}function Ge(){return Kp?Yp:(Kp=1,Yp=Me())}function Be(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function He(e,t){return Object.keys(t).forEach((r=>{"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:()=>t[r]})})),e}function Ve(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function qe(e,t=!0){return t?Mn(e):Mn(e,Gn(e))}function ze(e){return Bn(e).replace(RegExp(Be(Hn)+"$"),"")}function We(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Xe(e,t){const r=Gn(e),n=`${t}${Mn(e,r)}${r}`;return jn(Vn(e),n)}function Ye(e,t){const r=Gn(e),n=`${Mn(e,r)}${t}${r}`;return jn(Vn(e),n)}function Ke(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Je(e){return"win32"===process.platform?e:"./"+e}function Qe(e){const t=Gn(e).length;return e.slice(0,-t)}function Ze(e,t){return hd(e,t)}function et(e,t){const r=qn(t,e);return!(!r||".."===r||r.startsWith(".."+Hn)||r===zn(e))}function tt(){if("linux"!==process.platform)return!1;try{return function(){try{return _i.accessSync("/etc/alpine-release"),!0}catch{return!1}}()}catch{return!1}}async function rt(){return async function(e){if(!(await Pd()))throw Error("apk is not available on this system");try{const t="/etc/apk/repositories";if(!(await $e(t)))throw Error("APK repositories file not found at "+t);return U("Adding repository: "+e),await $i(t,e+"\n"),await xd.clear(),await xd(),U("Successfully added repository: "+e),!0}catch(t){throw Error(`Failed to add repository ${e}: ${t}`)}}(`https://dl-cdn.alpinelinux.org/alpine/v${(await async function(){const e="/etc/alpine-release";if(!(await $e(e)))throw Error("Alpine release file not found at "+e);return Ni(e,"utf8")}()).split(".").slice(0,2).join(".")}/community/`)}async function nt(e){return(await Promise.all(e.map((async e=>await async function(e){try{const{exitCode:t}=await te("apk",["info","-e",e.name],{reject:!1,stdio:["ignore","pipe","ignore"]});if(0!==t)return!1;if(void 0===e.version||""===e.version)return!0;const{stdout:r}=await te("apk",["info","-v",e.name],{stdio:["ignore","pipe","ignore"]});return r.trim().split("-").slice(-1)[0]===e.version}catch(t){return!1}}(e)?void 0:e)))).filter((e=>void 0!==e)).map(it)}function it(e){return void 0!==e.version&&""!==e.version?`${e.name}=${e.version}`:e.name}async function ot(e,t=!1){if(!(await Pd()))throw Error("apk is not available on this system");try{await Td(),t&&await xd.clear(),await xd();const r=await nt(e);return 0===r.length?(U("All packages are already installed"),{binDir:"/usr/bin"}):(U("Installing "+r.join(" ")),await te("apk",["add",...r]),U("Successfully installed "+r.join(" ")),{binDir:"/usr/bin"})}catch(r){throw F(`Failed to install ${e.map((e=>it(e))).join(" ")}: ${r}`),r}}async function st(e,t,r,n=40){Nd?await async function(e,t,r=40){await te("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Cp(r),await $d(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function at(e){const t={...process.env,DEBIAN_FRONTEND:"noninteractive"};return"nala"===e&&(void 0===t.LANG&&(t.LANG="C.UTF-8"),void 0===t.LC_ALL&&(t.LC_ALL="C.UTF-8")),t}function ct(){return null!==pu.sync("nala",{nothrow:!0})}function ut(){let e;return e=ct()?"nala":"apt-get",e}async function lt(e){try{const{stdout:t}=await q("dpkg",["-s",e],{env:at("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function ft(e,t=ut()){return(await Promise.all(e.map((e=>pt(e,t))))).filter((e=>void 0!==e))}async function pt(e,t=ut()){const r=await async function(e,t){const{name:r,version:n,fallBackToLatest:i=!1}=t;switch(await dt(e,r,n,i)){case jd.NameDashVersion:return`${r}-${n}`;case jd.NameEqualsVersion:return`${r}=${n}`;case jd.Name:return r;default:throw Error(`Could not find package '${r}' ${n??"with unspecified version"}`)}}(t,e);return await lt(r)?void 0:r}async function dt(e,t,r,n){const i=void 0!==r&&""!==r,o=!i||n;if(i){if(await async function(e,t,r){try{const{stdout:n}=await q("apt-cache",["search","--names-only",`^${Be(t)}-${Be(r)}$`],{env:at(e),stdio:"pipe"});if(""!==n.trim())return!0}catch{}return!1}(e,t,r))return jd.NameDashVersion;if(await ht(e,`${t}=${r}`))return jd.NameEqualsVersion}const s=()=>{i&&n&&U(`Could not find package ${t} ${r}. Falling back to latest version.`)};return o&&await ht(e,t)?(s(),jd.Name):Dd?o?(s(),jd.Name):jd.None:(Fd(e),dt(e,t,r,n))}async function ht(e,t){try{const{stdout:r}=await q("apt-cache",["show",t],{env:at(e),stdio:"pipe",verbose:!0});if(""!==r.trim())return!0}catch{}return!1}async function mt(){if(await lt("software-properties-common"))return;const e="apt-get";ee(e,["install","-y","--fix-broken","-o",kd,"software-properties-common"],{...yu,env:at(e)})}async function yt(e,t=!1){try{const n=ut();for(const{name:t,version:r}of e)U(`Installing ${t} ${r??""} via ${n}`);t&&Fd.clear(),Fd(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>e.repository??[])))];await Promise.all(r.map((t=>async function(e,t=ut()){await Md(t),await mt(),ee("add-apt-repository",["-y","--no-update",e],{...yu,env:at(t)}),Fd.clear(),Fd(t)}(t,e))))}(n,e);const i=await ft(e,n);if(0===i.length)return U("All packages are already installed"),{binDir:"/usr/bin/"};await Md(n);try{await async function(e){await Promise.all(e.map((async e=>{var t;void 0!==e.key&&await(t=e.key,"keyUrl"in t?vt(t):async function({key:e,keyServer:t=Hd,fileName:r,keyStorePath:n=Hd}){try{gt(r);const i=jn(n,r);return await $e(i)||(wt(),await te("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+i,"--keyserver",t,"--recv-keys",e]),await te("chmod",["644",i])),i}catch(i){return void F(`Failed to add apt key via server ${t}: ${i}`)}}(t))})))}(e),ee(n,["install","--fix-broken","-y",...i],{...yu,env:at(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;Gd.some((e=>"string"==typeof r.stderr&&r.stderr.includes(e)))&&(F(`Failed to install packages ${i}. Retrying...`),ee(n,["install","--fix-broken","-y","-o",kd,...i],{...yu,env:at(n)}))}return{binDir:"/usr/bin/"}}catch(r){throw Error("Failed to install apt packages: "+(r instanceof Error?`${r.message}\n${r.stack}`:r+""))}}async function vt({keyUrl:e,fileName:t,keyStorePath:r=Bd}){try{gt(t);const n=jn(r,t);if(!(await $e(n))){wt(),await yt([{name:"ca-certificates"}]);const r=jn(Dn(),t),i=new Ld.DownloaderHelper(e,Dn(),{fileName:t});i.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await i.start(),ee("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),ee("chmod",["644",n])}return n}catch(n){return void F(`Failed to add apt key via download ${e}: ${n}`)}}function wt(){ee("gpg",["-k"])}function gt(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Et(e={}){if(!["darwin","linux"].includes(process.platform)||"linux"===process.platform&&"x64"!==process.arch)return void F(`Brew is not supported on ${process.platform} ${process.arch}`);if("string"==typeof Vd)return{binDir:Vd};const t=await pu("brew",{nothrow:!0});if(null!==t)return Vd=Vn(t),{binDir:Vd};await yt([{name:"ca-certificates"}]);const r=new Ld.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Dn(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),z("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Vd=_t(),await Fe(Vd,e.rcOptions),{binDir:Vd}}function _t(){return jn(St(),"bin")}function bt(){return jn(_t(),"brew")}function St(){if("darwin"===process.platform)return"arm64"===process.arch?"/opt/homebrew":"/usr/local";if("linux"===process.platform)return"/home/linuxbrew/.linuxbrew";throw Error("Unsupported platform for brew")}function Ot(e,t){return void 0!==t&&""!==t?`${e}@${t}`:e}async function Rt(e){try{const t=bt();return(await q(t,["--prefix",e],{stdio:"pipe"})).stdout}catch{return}}async function It(e,t,r={}){"overwrite"in r||(r.overwrite=!0),!0===r.cask&&(r.overwrite=!1),U(`Installing ${e} ${t??""} via brew`),qd&&null!==pu.sync("brew",{nothrow:!0})||(await Et(),qd=!0);const n=bt(),i=["install",Ot(e,t)];for(const[a,c]of Object.entries(r))"boolean"==typeof c&&c?i.push("--"+a):"string"==typeof c&&i.push("--"+a,c);const o=z(n,[...i,"--dry-run"],{stdio:"pipe"});0===o.exitCode&&RegExp(`.*${e}.* is already installed and up-to-date.[\\s\\S]*`).test(o.stderr)?U(`${e} ${t??""} is already installed and up-to-date`):z(n,i,{stdio:"inherit"});const s=await async function(e,t){const r=Ot(e,t),n=await Rt(r);if(void 0!==n)return n;const i=await Rt(e);return void 0!==i?i:function(e,t){const r=St(),n=jn(r,"opt",t);if(Kn(n))return n;const i=jn(r,"opt",e);if(Kn(i))return i;const o=jn(r,"Cellar",t);if(Kn(o))return o;const s=jn(r,"Cellar",e);if(Kn(s))return s;const a=jn(r,"lib",t);if(Kn(a))return a;const c=jn(r,"lib",e);return Kn(c)?c:void 0}(e,r)}(e,t);return void 0===s?(F(`Failed to find installation directory for ${e} ${t}`),{binDir:_t(),installDir:void 0}):{installDir:s,binDir:jn(s,"bin")}}function Pt(e){const t=Ra.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function xt(e,t){let r=`✅ ${e} was installed successfully:`;return void 0===t||("installDir"in t&&(r+="\n- The installation directory is "+t.installDir),""!==t.binDir&&(r+="\n- The binary directory is "+t.binDir)),r}async function Tt(){if("darwin"===process.platform)try{const e=await zd.getExecOutput("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ke("SDKROOT",t.trim(),Wd):D("SDKROOT not set")}catch(e){D(e)}}function Nt(){return"linux"===process.platform&&(void 0===Xd&&(Xd=null!==pu.sync("dnf",{nothrow:!0})),Xd)}function $t(){return"linux"===process.platform&&(void 0===Yd&&(Yd=null!==pu.sync("pacman",{nothrow:!0})),Yd)}function Ct(){return"linux"===process.platform&&(void 0===Kd&&(Kd=null!==pu.sync("apt-get",{nothrow:!0})),Kd)}async function At(e){for(const{name:t,version:r}of e)U(`Installing ${t} ${r??""} via dnf`);return ee("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0===t||""===t)return e;const{stdout:r}=await q("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;const{stdout:n}=await q("dnf",["search","-q",`${e}${t}`]);return""!==n.trim()?`${e}${t}`:(F(`Failed to install ${e} ${t} via dnf, trying without version`),e)}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Lt(e,t,r){U(`Installing ${e} ${t??""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===pu.sync("yay",{nothrow:!0}))try{ee("pacman",["-S","--noconfirm","base-devel","git"]);const e=jn(Dn(),"yay");ee("mkdir",["-p",e]),J()?(F("Creating a non-root user to build yay"),ee("useradd",["-m","-G","wheel","builder"]),ee("passwd",["-d","builder"]),ee("chown",["-R","builder:builder",e]),ee("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),eh=!0,z("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),z("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(z("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:Dn()}),z("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),z("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),Jd||"yay"===r||(ee(n,["-Sy","--noconfirm"]),Jd=!0),Qd||"yay"===r||(ee(n,["-S","--noconfirm","base-devel"]),Qd=!0);const i=e=>"yay"===r?J()&&eh?ee("su",["-","builder","-c","yay -S --noconfirm "+e]):z(r,["-S","--noconfirm",e]):ee(r??n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await q(e,["-Si",t]);for(const e of n.matchAll(Zd))r.push(e[1])}catch(n){F(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{i(`${e}=${t}`)}catch{i(`${e}${t}`)}else U(`Failed to install ${e} ${t} via pacman, trying without version`),i(e)}else i(e);return{binDir:"/usr/bin/"}}async function kt(e,t=ih){try{const r=await zd.getExecOutput(e,["--version"]),n=r.stdout||r.stderr||"",i=n.trim().match(t)?.[1];return th(i)??void 0}catch(r){return void console.error(r)}}async function Dt(e,t,r=ih){const n=await kt(e,r);if(void 0===n||""===t)return!1;try{return-1!==rh(n,t)}catch{return nh(n,t)}}function Ft(e){if(null===fd(e))try{const t=th(e);if(null!==t)return U(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}async function jt(){const e=jn(Mm,"gcc_matcher.json");if(!(await $e(e)))return F("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");U("::add-matcher::"+e)}async function Ut(e){const t=await Ni(e,"utf-8");return JSON.parse(t)}function Mt(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const a of r)n.set(a,a);else for(const a of r){const e=t.filterMapTag(a);void 0!==e&&n.set(e,a)}if(0===n.size)return;const i=t.versionSatisfies??nh,o=function(e){if(null===fd(e))try{const t=th(e);if(null!==t){const r=/^[<=>^~]/.test(t.version)?t.version:"^"+t.version;return U(`Coerced version '${e}' to '${r}'`),r}}catch(t){}return e}(t.version),s=[];for(const[a,c]of n.entries())i(a,o)&&s.push(c);if(0!==s.length)for(const a of s){let r=e[a];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=Gt(a,r,t);if(void 0!==n)return n}}function Gt(e,t,r){if(!(void 0!==r.keywords&&0!==r.keywords.length||void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length))return{tag:e,name:t[0]};let n=[];if(void 0!==r.keywords&&0!==r.keywords.length)for(const i of t)r.keywords.every((e=>!("string"!=typeof e||!i.includes(e))||Array.isArray(e)&&e.some((e=>i.includes(e)))))&&n.push(i);else n=t;if(0!==n.length){if(void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length){const t=n.map((e=>{let t=0;for(const n of r.optionalKeywords)("string"==typeof n&&e.includes(n)||Array.isArray(n)&&n.some((t=>e.includes(t))))&&t++;return t})),i=Math.max(...t);return{tag:e,name:n[t.indexOf(i)]}}return{tag:e,name:n[0]}}}function Bt(){return oh||(oh=1,ym.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},ym.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}),ym}function Ht(){function e(e,t){Object.defineProperty(e,o,{get:function(){return t}})}function t(e){function n(e,t){return this instanceof n?(m.apply(this,arguments),this):n.apply(Object.create(n.prototype),arguments)}function i(e,t){return this instanceof i?(y.apply(this,arguments),this):i.apply(Object.create(i.prototype),arguments)}function o(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return g(t,n,i,(function(a,c){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)}c(e),e.gracefulify=t,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var s=e.readFile;e.readFile=function(e,t,n){return"function"==typeof t&&(n=t,t=null),function e(t,n,i,o){return s(t,n,(function(s){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?"function"==typeof i&&i.apply(this,arguments):r([e,[t,n,i],s,o||Date.now(),Date.now()])}))}(e,t,n)};var a=e.writeFile;e.writeFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return a(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)};var l=e.appendFile;l&&(e.appendFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return l(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var f=e.copyFile;f&&(e.copyFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=0),function e(t,n,i,o,s){return f(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var p=e.readdir;e.readdir=function(e,t,n){function i(e,t,n,i){return function(s,a){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(a&&a.sort&&a.sort(),"function"==typeof n&&n.call(this,s,a)):r([o,[e,t,n],s,i||Date.now(),Date.now()])}}"function"==typeof t&&(n=t,t=null);var o=d.test(process.version)?function(e,t,r,n){return p(e,i(e,t,r,n))}:function(e,t,r,n){return p(e,t,i(e,t,r,n))};return o(e,t,n)};var d=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var h=u(e);n=h.ReadStream,i=h.WriteStream}var m=e.ReadStream;m&&(n.prototype=Object.create(m.prototype),n.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var y=e.WriteStream;y&&(i.prototype=Object.create(y.prototype),i.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return n},set:function(e){n=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return i},set:function(e){i=e},enumerable:!0,configurable:!0});var v=n;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var w=i;Object.defineProperty(e,"FileWriteStream",{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var g=e.open;return e.open=o,e}function r(e){d("ENQUEUE",e[0].name,e[1]),a[o].push(e),i()}function n(){for(var e=Date.now(),t=0;a[o].length>t;++t)a[o][t].length>2&&(a[o][t][3]=e,a[o][t][4]=e);i()}function i(){if(clearTimeout(p),p=void 0,0!==a[o].length){var e=a[o].shift(),t=e[0],r=e[1],n=e[2],s=e[3],c=e[4];if(void 0===s)d("RETRY",t.name,r),t.apply(null,r);else if(6e4>Date.now()-s){var u=Date.now()-c;Math.min(1.2*Math.max(c-s,1),100)>u?a[o].push(e):(d("RETRY",t.name,r),t.apply(null,r.concat([s])))}else{d("TIMEOUT",t.name,r);var l=r.pop();"function"==typeof l&&l.call(null,n)}void 0===p&&(p=setTimeout(i,0))}}if(dh)return ph;dh=1;var o,s,a=Xn,c=function(){if(ah)return sh;ah=1;var e=ji,t=process.cwd,r=null,n=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=t.call(process)),r};try{process.cwd()}catch(o){}if("function"==typeof process.chdir){var i=process.chdir;process.chdir=function(e){r=null,i.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,i)}return sh=function(t){function r(e){return e?function(r,n,i){return e.call(t,r,n,(function(e){l(e)&&(e=null),i&&i.apply(this,arguments)}))}:e}function i(e){return e?function(r,n){try{return e.call(t,r,n)}catch(o){if(!l(o))throw o}}:e}function s(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(e){l(e)&&(e=null),o&&o.apply(this,arguments)}))}:e}function a(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(o){if(!l(o))throw o}}:e}function c(e){return e?function(r,n,i){function o(e,t){t&&(0>t.uid&&(t.uid+=4294967296),0>t.gid&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function u(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i&&(0>i.uid&&(i.uid+=4294967296),0>i.gid&&(i.gid+=4294967296)),i}:e}function l(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var f;e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&((f=t).lchmod=function(t,r,n){f.open(t,e.O_WRONLY|e.O_SYMLINK,r,(function(e,t){e?n&&n(e):f.fchmod(t,r,(function(e){f.close(t,(function(t){n&&n(e||t)}))}))}))},f.lchmodSync=function(t,r){var n,i=f.openSync(t,e.O_WRONLY|e.O_SYMLINK,r),s=!0;try{n=f.fchmodSync(i,r),s=!1}finally{if(s)try{f.closeSync(i)}catch(o){}else f.closeSync(i)}return n}),t.lutimes||function(t){e.hasOwnProperty("O_SYMLINK")&&t.futimes?(t.lutimes=function(r,n,i,o){t.open(r,e.O_SYMLINK,(function(e,r){e?o&&o(e):t.futimes(r,n,i,(function(e){t.close(r,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(r,n,i){var s,a=t.openSync(r,e.O_SYMLINK),c=!0;try{s=t.futimesSync(a,n,i),c=!1}finally{if(c)try{t.closeSync(a)}catch(o){}else t.closeSync(a)}return s}):t.futimes&&(t.lutimes=function(e,t,r,n){n&&process.nextTick(n)},t.lutimesSync=function(){})}(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(e,t,r){r&&process.nextTick(r)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(e,t,r,n){n&&process.nextTick(n)},t.lchownSync=function(){}),"win32"===n&&(t.rename="function"!=typeof t.rename?t.rename:function(e){function r(r,n,i){var o=Date.now(),s=0;e(r,n,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&6e4>Date.now()-o)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?e(r,n,a):i(c)}))}),s),void(100>s&&(s+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.rename)),t.read="function"!=typeof t.read?t.read:function(e){function r(r,n,i,o,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,p){if(l&&"EAGAIN"===l.code&&10>u)return u++,e.call(t,r,n,i,o,s,c);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync="function"!=typeof t.readSync?t.readSync:function(e){return function(r,n,i,s,a){for(var c=0;;)try{return e.call(t,r,n,i,s,a)}catch(o){if("EAGAIN"===o.code&&10>c){c++;continue}throw o}}}(t.readSync)},sh}(),u=function(){if(uh)return ch;uh=1;var e=Pi.Stream;return ch=function(t){return{ReadStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536;for(var s=Object.keys(i=i||{}),a=0,c=s.length;c>a;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}null===this.fd?t.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()})):process.nextTick((function(){o._read()}))},WriteStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0;for(var o=Object.keys(i=i||{}),s=0,a=o.length;a>s;s++){var c=o[s];this[c]=i[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(0>this.start)throw Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}(),l=function(){if(fh)return lh;fh=1,lh=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var r={__proto__:e(t)};else r=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})),r};var e=Object.getPrototypeOf||function(e){return e.__proto__};return lh}(),f=ci;"function"==typeof Symbol&&"function"==typeof Symbol.for?(o=Symbol.for("graceful-fs.queue"),s=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",s="___graceful-fs.previous");var p,d=function(){};return f.debuglog?d=f.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=f.format.apply(f,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),a[o]||(e(a,Rs[o]||[]),a.close=function(e){function t(t,r){return e.call(a,t,(function(e){e||n(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,s,{value:e}),t}(a.close),a.closeSync=function(e){function t(t){e.apply(a,arguments),n()}return Object.defineProperty(t,s,{value:e}),t}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(a[o]),fi.equal(a[o].length,0)}))),Rs[o]||e(Rs,a[o]),ph=t(l(a)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched&&(ph=t(a),a.__patched=!0),ph}function Vt(){return hh||(hh=1,function(e){const t=Bt().fromCallback,r=Ht(),n=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof r[e]));Object.assign(e,r),n.forEach((n=>{e[n]=t(r[n])})),e.exists=function(e,t){return"function"==typeof t?r.exists(e,t):new Promise((t=>r.exists(e,t)))},e.read=function(e,t,n,i,o,s){return"function"==typeof s?r.read(e,t,n,i,o,s):new Promise(((s,a)=>{r.read(e,t,n,i,o,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},e.write=function(e,t,...n){return"function"==typeof n[n.length-1]?r.write(e,t,...n):new Promise(((i,o)=>{r.write(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffer:r})}))}))},e.readv=function(e,t,...n){return"function"==typeof n[n.length-1]?r.readv(e,t,...n):new Promise(((i,o)=>{r.readv(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesRead:t,buffers:r})}))}))},e.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?r.writev(e,t,...n):new Promise(((i,o)=>{r.writev(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffers:r})}))}))},"function"==typeof r.realpath.native?e.realpath.native=t(r.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(mm)),mm}function qt(){if(mh)return wm;mh=1;const e=Fn;return wm.checkPath=function(t){if("win32"===process.platform&&/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=Error("Path contains invalid characters: "+t);throw e.code="EINVAL",e}},wm}function zt(){if(yh)return vm;yh=1;const e=Vt(),{checkPath:t}=qt(),r=e=>"number"==typeof e?e:{mode:511,...e}.mode;return vm.makeDir=async(n,i)=>(t(n),e.mkdir(n,{mode:r(i),recursive:!0})),vm.makeDirSync=(n,i)=>(t(n),e.mkdirSync(n,{mode:r(i),recursive:!0})),vm}function Wt(){if(wh)return vh;wh=1;const e=Bt().fromPromise,{makeDir:t,makeDirSync:r}=zt(),n=e(t);return vh={mkdirs:n,mkdirsSync:r,mkdirp:n,mkdirpSync:r,ensureDir:n,ensureDirSync:r}}function Xt(){if(Eh)return gh;Eh=1;const e=Bt().fromPromise,t=Vt();return gh={pathExists:e((function(e){return t.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:t.existsSync}}function Yt(){if(bh)return _h;bh=1;const e=Vt(),t=Bt().fromPromise;return _h={utimesMillis:t((async function(t,r,n){const i=await e.open(t,"r+");let o=null;try{await e.futimes(i,r,n)}finally{try{await e.close(i)}catch(s){o=s}}if(o)throw o})),utimesMillisSync:function(t,r,n){const i=e.openSync(t,"r+");return e.futimesSync(i,r,n),e.closeSync(i)}}}function Kt(){function e(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function t(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e)),n=i.resolve(t).split(i.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function r(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}if(Oh)return Sh;Oh=1;const n=Vt(),i=Fn,o=Bt().fromPromise;return Sh={checkPaths:o((async function(o,s,a,c){const{srcStat:u,destStat:l}=await function(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}})),checkPathsSync:function(o,s,a,c){const{srcStat:u,destStat:l}=function(e,t,r){let i;const o=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=o(e);try{i=o(t)}catch(a){if("ENOENT"===a.code)return{srcStat:s,destStat:null};throw a}return{srcStat:s,destStat:i}}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}},checkParentPaths:o((async function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=await n.stat(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)})),checkParentPathsSync:function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=n.statSync(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)},isSrcSubdir:t,areIdentical:e}}function Jt(){async function e(e,t,r){return!r.filter||r.filter(e,t)}async function t(o,s,a,u){const l=u.dereference?n.stat:n.lstat,f=await l(s);if(f.isDirectory())return async function(r,o,s,a,u){o||await n.mkdir(a);const l=[];for await(const f of await n.opendir(s)){const r=i.join(s,f.name),n=i.join(a,f.name);l.push(e(r,n,u).then((e=>{if(e)return c.checkPaths(r,n,"copy",u).then((({destStat:e})=>t(e,r,n,u)))})))}await Promise.all(l),o||await n.chmod(a,r.mode)}(f,o,s,a,u);if(f.isFile()||f.isCharacterDevice()||f.isBlockDevice())return async function(e,t,i,o,s){if(!t)return r(e,i,o,s);if(s.overwrite)return await n.unlink(o),r(e,i,o,s);if(s.errorOnExist)throw Error(`'${o}' already exists`)}(f,o,s,a,u);if(f.isSymbolicLink())return async function(e,t,r,o){let s=await n.readlink(t);if(o.dereference&&(s=i.resolve(process.cwd(),s)),!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(u){if("EINVAL"===u.code||"UNKNOWN"===u.code)return n.symlink(s,r);throw u}if(o.dereference&&(a=i.resolve(process.cwd(),a)),c.isSrcSubdir(s,a))throw Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(o,s,a,u);if(f.isSocket())throw Error("Cannot copy a socket file: "+s);if(f.isFIFO())throw Error("Cannot copy a FIFO pipe: "+s);throw Error("Unknown file: "+s)}async function r(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}if(Ih)return Rh;Ih=1;const n=Vt(),i=Fn,{mkdirs:o}=Wt(),{pathExists:s}=Xt(),{utimesMillis:a}=Yt(),c=Kt();return Rh=async function(r,n,a={}){"function"==typeof a&&(a={filter:a}),a.clobber=!("clobber"in a)||!!a.clobber,a.overwrite="overwrite"in a?!!a.overwrite:a.clobber,a.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:u,destStat:l}=await c.checkPaths(r,n,"copy",a);if(await c.checkParentPaths(r,u,n,"copy"),!(await e(r,n,a)))return;const f=i.dirname(n);await s(f)||await o(f),await t(l,r,n,a)}}function Qt(){function e(e,i,a,c){const l=(c.dereference?o.statSync:o.lstatSync)(i);if(l.isDirectory())return function(e,t,i,s,a){return t?n(i,s,a):function(e,t,i,s){return o.mkdirSync(i),n(t,i,s),r(i,e)}(e.mode,i,s,a)}(l,e,i,a,c);if(l.isFile()||l.isCharacterDevice()||l.isBlockDevice())return function(e,r,n,i,s){return r?function(e,r,n,i){if(i.overwrite)return o.unlinkSync(n),t(e,r,n,i);if(i.errorOnExist)throw Error(`'${n}' already exists`)}(e,n,i,s):t(e,n,i,s)}(l,e,i,a,c);if(l.isSymbolicLink())return function(e,t,r,n){let i=o.readlinkSync(t);if(n.dereference&&(i=s.resolve(process.cwd(),i)),e){let e;try{e=o.readlinkSync(r)}catch(a){if("EINVAL"===a.code||"UNKNOWN"===a.code)return o.symlinkSync(i,r);throw a}if(n.dereference&&(e=s.resolve(process.cwd(),e)),u.isSrcSubdir(i,e))throw Error(`Cannot copy '${i}' to a subdirectory of itself, '${e}'.`);if(u.isSrcSubdir(e,i))throw Error(`Cannot overwrite '${e}' with '${i}'.`);return function(e,t){return o.unlinkSync(t),o.symlinkSync(e,t)}(i,r)}return o.symlinkSync(i,r)}(e,i,a,c);if(l.isSocket())throw Error("Cannot copy a socket file: "+i);if(l.isFIFO())throw Error("Cannot copy a FIFO pipe: "+i);throw Error("Unknown file: "+i)}function t(e,t,n,i){return o.copyFileSync(t,n),i.preserveTimestamps&&function(e,t,n){(function(e){return!(128&e)})(e)&&function(e,t){r(e,128|t)}(n,e),function(e,t){const r=o.statSync(e);c(t,r.atime,r.mtime)}(t,n)}(e.mode,t,n),r(n,e.mode)}function r(e,t){return o.chmodSync(e,t)}function n(e,t,r){const n=o.opendirSync(e);try{let o;for(;null!==(o=n.readSync());)i(o.name,e,t,r)}finally{n.closeSync()}}function i(t,r,n,i){const o=s.join(r,t),a=s.join(n,t);if(i.filter&&!i.filter(o,a))return;const{destStat:c}=u.checkPathsSync(o,a,"copy",i);return e(c,o,a,i)}if(xh)return Ph;xh=1;const o=Ht(),s=Fn,a=Wt().mkdirsSync,c=Yt().utimesMillisSync,u=Kt();return Ph=function(t,r,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:i,destStat:c}=u.checkPathsSync(t,r,"copy",n);if(u.checkParentPathsSync(t,i,r,"copy"),n.filter&&!n.filter(t,r))return;const l=s.dirname(r);return o.existsSync(l)||a(l),e(c,t,r,n)}}function Zt(){if(Nh)return Th;Nh=1;const e=Bt().fromPromise;return Th={copy:e(Jt()),copySync:Qt()}}function er(){if(Ch)return $h;Ch=1;const e=Ht(),t=Bt().fromCallback;return $h={remove:t((function(t,r){e.rm(t,{recursive:!0,force:!0},r)})),removeSync:function(t){e.rmSync(t,{recursive:!0,force:!0})}}}function tr(){function e(e){let t;try{t=r.readdirSync(e)}catch{return i.mkdirsSync(e)}t.forEach((t=>{t=n.join(e,t),o.removeSync(t)}))}if(Lh)return Ah;Lh=1;const t=Bt().fromPromise,r=Vt(),n=Fn,i=Wt(),o=er(),s=t((async function(e){let t;try{t=await r.readdir(e)}catch{return i.mkdirs(e)}return Promise.all(t.map((t=>o.remove(n.join(e,t)))))}));return Ah={emptyDirSync:e,emptydirSync:e,emptyDir:s,emptydir:s}}function rr(){if(Dh)return kh;Dh=1;const e=Bt().fromPromise,t=Fn,r=Vt(),n=Wt();return kh={createFile:e((async function(e){let i;try{i=await r.stat(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);let s=null;try{s=await r.stat(o)}catch(a){if("ENOENT"===a.code)return await n.mkdirs(o),void(await r.writeFile(e,""));throw a}s.isDirectory()?await r.writeFile(e,""):await r.readdir(o)})),createFileSync:function(e){let i;try{i=r.statSync(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);try{r.statSync(o).isDirectory()||r.readdirSync(o)}catch(s){if(!s||"ENOENT"!==s.code)throw s;n.mkdirsSync(o)}r.writeFileSync(e,"")}}}function nr(){if(jh)return Fh;jh=1;const e=Bt().fromPromise,t=Fn,r=Vt(),n=Wt(),{pathExists:i}=Xt(),{areIdentical:o}=Kt();return Fh={createLink:e((async function(e,s){let a,c;try{a=await r.lstat(s)}catch{}try{c=await r.lstat(e)}catch(l){throw l.message=l.message.replace("lstat","ensureLink"),l}if(a&&o(c,a))return;const u=t.dirname(s);await i(u)||await n.mkdirs(u),await r.link(e,s)})),createLinkSync:function(e,i){let s;try{s=r.lstatSync(i)}catch{}try{const t=r.lstatSync(e);if(s&&o(t,s))return}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}const a=t.dirname(i);return r.existsSync(a)||n.mkdirsSync(a),r.linkSync(e,i)}}}function ir(){if(Mh)return Uh;Mh=1;const e=Fn,t=Vt(),{pathExists:r}=Xt(),n=Bt().fromPromise;return Uh={symlinkPaths:n((async function(n,i){if(e.isAbsolute(n)){try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:n}}const o=e.dirname(i),s=e.join(o,n);if(await r(s))return{toCwd:s,toDst:n};try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:e.relative(o,n)}})),symlinkPathsSync:function(r,n){if(e.isAbsolute(r)){if(!t.existsSync(r))throw Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}const i=e.dirname(n),o=e.join(i,r);if(t.existsSync(o))return{toCwd:o,toDst:r};if(!t.existsSync(r))throw Error("relative srcpath does not exist");return{toCwd:r,toDst:e.relative(i,r)}}}}function or(){if(Bh)return Gh;Bh=1;const e=Vt(),t=Bt().fromPromise;return Gh={symlinkType:t((async function(t,r){if(r)return r;let n;try{n=await e.lstat(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"})),symlinkTypeSync:function(t,r){if(r)return r;let n;try{n=e.lstatSync(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}}}function sr(){if(Vh)return Hh;Vh=1;const e=Bt().fromPromise,t=Fn,r=Vt(),{mkdirs:n,mkdirsSync:i}=Wt(),{symlinkPaths:o,symlinkPathsSync:s}=ir(),{symlinkType:a,symlinkTypeSync:c}=or(),{pathExists:u}=Xt(),{areIdentical:l}=Kt();return Hh={createSymlink:e((async function(e,i,s){let c;try{c=await r.lstat(i)}catch{}if(c&&c.isSymbolicLink()){const[t,n]=await Promise.all([r.stat(e),r.stat(i)]);if(l(t,n))return}const f=await o(e,i);e=f.toDst;const p=await a(f.toCwd,s),d=t.dirname(i);return await u(d)||await n(d),r.symlink(e,i,p)})),createSymlinkSync:function(e,n,o){let a;try{a=r.lstatSync(n)}catch{}if(a&&a.isSymbolicLink()){const t=r.statSync(e),i=r.statSync(n);if(l(t,i))return}const u=s(e,n);e=u.toDst,o=c(u.toCwd,o);const f=t.dirname(n);return r.existsSync(f)||i(f),r.symlinkSync(e,n,o)}}}function ar(){if(zh)return qh;zh=1;const{createFile:e,createFileSync:t}=rr(),{createLink:r,createLinkSync:n}=nr(),{createSymlink:i,createSymlinkSync:o}=sr();return qh={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:r,createLinkSync:n,ensureLink:r,ensureLinkSync:n,createSymlink:i,createSymlinkSync:o,ensureSymlink:i,ensureSymlinkSync:o}}function cr(){return Xh?Wh:(Xh=1,Wh={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const o=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}})}function ur(){if(Qh)return Jh;Qh=1;const e=function(){if(Kh)return Yh;let e;Kh=1;try{e=Ht()}catch(s){e=Xn}const t=Bt(),{stringify:r,stripBom:n}=cr(),i=t.fromPromise((async function(r,i={}){"string"==typeof i&&(i={encoding:i});const o=i.fs||e,s=!("throws"in i)||i.throws;let a,c=await t.fromCallback(o.readFile)(r,i);c=n(c);try{a=JSON.parse(c,i?i.reviver:null)}catch(u){if(s)throw u.message=`${r}: ${u.message}`,u;return null}return a})),o=t.fromPromise((async function(n,i,o={}){const s=o.fs||e,a=r(i,o);await t.fromCallback(s.writeFile)(n,a,o)}));return Yh={readFile:i,readFileSync:function(t,r={}){"string"==typeof r&&(r={encoding:r});const i=r.fs||e,o=!("throws"in r)||r.throws;try{let e=i.readFileSync(t,r);return e=n(e),JSON.parse(e,r.reviver)}catch(s){if(o)throw s.message=`${t}: ${s.message}`,s;return null}},writeFile:o,writeFileSync:function(t,n,i={}){const o=i.fs||e,s=r(n,i);return o.writeFileSync(t,s,i)}}}();return Jh={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync}}function lr(){if(em)return Zh;em=1;const e=Bt().fromPromise,t=Vt(),r=Fn,n=Wt(),i=Xt().pathExists;return Zh={outputFile:e((async function(e,o,s="utf-8"){const a=r.dirname(e);return await i(a)||await n.mkdirs(a),t.writeFile(e,o,s)})),outputFileSync:function(e,...i){const o=r.dirname(e);t.existsSync(o)||n.mkdirsSync(o),t.writeFileSync(e,...i)}}}function fr(){if(rm)return tm;rm=1;const{stringify:e}=cr(),{outputFile:t}=lr();return tm=async function(r,n,i={}){const o=e(n,i);await t(r,o,i)}}function pr(){if(im)return nm;im=1;const{stringify:e}=cr(),{outputFileSync:t}=lr();return nm=function(r,n,i){const o=e(n,i);t(r,o,i)}}function dr(){if(sm)return om;sm=1;const e=Bt().fromPromise,t=ur();return t.outputJson=e(fr()),t.outputJsonSync=pr(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,om=t}function hr(){if(cm)return am;cm=1;const e=Vt(),t=Fn,{copy:r}=Zt(),{remove:n}=er(),{mkdirp:i}=Wt(),{pathExists:o}=Xt(),s=Kt();return am=async function(a,c,u={}){const l=u.overwrite||u.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await s.checkPaths(a,c,"move",u);await s.checkParentPaths(a,f,c,"move");const d=t.dirname(c);return t.parse(d).root!==d&&await i(d),async function(t,i,s,a){if(!a)if(s)await n(i);else if(await o(i))throw Error("dest already exists.");try{await e.rename(t,i)}catch(c){if("EXDEV"!==c.code)throw c;await async function(e,t,i){const o={overwrite:i,errorOnExist:!0,preserveTimestamps:!0};return await r(e,t,o),n(e)}(t,i,s)}}(a,c,l,p)}}function mr(){function e(e,r,o){try{t.renameSync(e,r)}catch(s){if("EXDEV"!==s.code)throw s;return function(e,t,r){return n(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),i(e)}(e,r,o)}}if(lm)return um;lm=1;const t=Ht(),r=Fn,n=Zt().copySync,i=er().removeSync,o=Wt().mkdirpSync,s=Kt();return um=function(n,a,c){const u=(c=c||{}).overwrite||c.clobber||!1,{srcStat:l,isChangingCase:f=!1}=s.checkPathsSync(n,a,"move",c);return s.checkParentPathsSync(n,l,a,"move"),function(e){const t=r.dirname(e);return r.parse(t).root===t}(a)||o(r.dirname(a)),function(r,n,o,s){if(s)return e(r,n,o);if(o)return i(n),e(r,n,o);if(t.existsSync(n))throw Error("dest already exists.");return e(r,n,o)}(n,a,u,f)}}function yr(){if(pm)return fm;pm=1;const e=Bt().fromPromise;return fm={move:e(hr()),moveSync:mr()}}function vr(){return hm?dm:(hm=1,dm={...Vt(),...Zt(),...tr(),...ar(),...dr(),...Wt(),...yr(),...lr(),...Xt(),...er()})}async function wr(e,t,r){if("win32"!==process.platform)return;if("string"==typeof Em)return{binDir:Em};const n=pu.sync("choco",{nothrow:!0});if(null!==n)return Em=Vn(n),{binDir:Em};let i="powershell.exe";const o=pu.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==o&&(i=o),z(i,["-NoProfile","-InputFormat","None","-ExecutionPolicy","Bypass","-Command","[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"],{stdio:"inherit"});const s=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await Fe(s,Wd);const a=pu.sync("choco",{nothrow:!0});return Em=null!==a?Vn(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await $e(Em)?{binDir:Em}:void 0}async function gr(e,t,r=[]){U(`Installing ${e} ${t??""} via chocolatey`),_m&&null!==pu.sync("choco",{nothrow:!0})||(await wr(0,0,process),_m=!0);const n=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=n,void 0!==t&&""!==t)z("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{z("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(s){if(!s.message.includes("exit code 3010"))throw s;U(e+" might require a reboot for the completion of the installation.")}const o=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin";return await Fe(o,Wd),{binDir:o}}async function Er(e,t,r){switch(process.platform){case"win32":return gr("7zip",e);case"darwin":return It("p7zip",e);case"linux":if($t())return Lt("p7zip",e);if(Nt())return At([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(Ct())return yt([{name:"p7zip-full",version:e}]);if(await Pd())return ot([{name:"p7zip",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function _r(){return bm||(bm=1,function(e,t){function r(e){N[e]=$++}function n(e){for(var t=0;A.length>t;t++){var r=A[t][0],n=A[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>O)return null;if(!(t.loose?x[N.LOOSE]:x[N.FULL]).test(e))return null;try{return new o(e,t)}catch(r){return null}}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof o))return new o(e,t);S("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[N.LOOSE]:x[N.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>R||0>this.major)throw new TypeError("Invalid major version");if(this.minor>R||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>R||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&R>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=k.test(e),n=k.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1}function a(e,t,r){return new o(e,r).compare(new o(t,r))}function c(e,t,r){return a(e,t,r)>0}function u(e,t,r){return 0>a(e,t,r)}function l(e,t,r){return 0===a(e,t,r)}function f(e,t,r){return 0!==a(e,t,r)}function p(e,t,r){return a(e,t,r)>=0}function d(e,t,r){return 0>=a(e,t,r)}function h(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return l(e,r,n);case"!=":return f(e,r,n);case">":return c(e,r,n);case">=":return p(e,r,n);case"<":return u(e,r,n);case"<=":return d(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function m(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof m){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof m))return new m(e,t);e=e.trim().split(/\s+/).join(" "),S("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===D?"":this.operator+this.semver.version,S("comp",this)}function y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof y)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new y(e.raw,t);if(e instanceof m)return new y(e.value,t);if(!(this instanceof y))return new y(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function v(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function w(e){return!e||"x"===e.toLowerCase()||"*"===e}function g(e,t,r,n,i,o,s,a,c,u,l,f,p){return((t=w(r)?"":w(n)?">="+r+".0.0":w(i)?">="+r+"."+n+".0":">="+t)+" "+(a=w(c)?"":w(u)?"<"+(+c+1)+".0.0":w(l)?"<"+c+"."+(+u+1)+".0":f?"<="+c+"."+u+"."+l+"-"+f:"<="+a)).trim()}function E(e,t,r){for(var n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;e.length>n;n++)if(S(e[n].semver),e[n].semver!==D&&e[n].semver.prerelease.length>0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new y(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var i,s,a,l,f;switch(e=new o(e,n),t=new y(t,n),r){case">":i=c,s=d,a=u,l=">",f=">=";break;case"<":i=u,s=p,a=c,l="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_(e,t,n))return!1;for(var h=0;t.set.length>h;++h){var v=null,w=null;if(t.set[h].forEach((function(e){e.semver===D&&(e=new m(">=0.0.0")),w=w||e,i(e.semver,(v=v||e).semver,n)?v=e:a(e.semver,w.semver,n)&&(w=e)})),v.operator===l||v.operator===f)return!1;if((!w.operator||w.operator===l)&&s(e,w.semver))return!1;if(w.operator===f&&a(e,w.semver))return!1}return!0}var S;t=xm.exports=o,S="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var O=256,R=Number.MAX_SAFE_INTEGER||9007199254740991,I=O-6,P=t.re=[],x=t.safeRe=[],T=t.src=[],N=t.tokens={},$=0,C="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",O],[C,I]];r("NUMERICIDENTIFIER"),T[N.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),T[N.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),T[N.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+C+"*",r("MAINVERSION"),T[N.MAINVERSION]="("+T[N.NUMERICIDENTIFIER]+")\\.("+T[N.NUMERICIDENTIFIER]+")\\.("+T[N.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),T[N.MAINVERSIONLOOSE]="("+T[N.NUMERICIDENTIFIERLOOSE]+")\\.("+T[N.NUMERICIDENTIFIERLOOSE]+")\\.("+T[N.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),T[N.PRERELEASEIDENTIFIER]="(?:"+T[N.NUMERICIDENTIFIER]+"|"+T[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),T[N.PRERELEASEIDENTIFIERLOOSE]="(?:"+T[N.NUMERICIDENTIFIERLOOSE]+"|"+T[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),T[N.PRERELEASE]="(?:-("+T[N.PRERELEASEIDENTIFIER]+"(?:\\."+T[N.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),T[N.PRERELEASELOOSE]="(?:-?("+T[N.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+T[N.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),T[N.BUILDIDENTIFIER]=C+"+",r("BUILD"),T[N.BUILD]="(?:\\+("+T[N.BUILDIDENTIFIER]+"(?:\\."+T[N.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),T[N.FULLPLAIN]="v?"+T[N.MAINVERSION]+T[N.PRERELEASE]+"?"+T[N.BUILD]+"?",T[N.FULL]="^"+T[N.FULLPLAIN]+"$",r("LOOSEPLAIN"),T[N.LOOSEPLAIN]="[v=\\s]*"+T[N.MAINVERSIONLOOSE]+T[N.PRERELEASELOOSE]+"?"+T[N.BUILD]+"?",r("LOOSE"),T[N.LOOSE]="^"+T[N.LOOSEPLAIN]+"$",r("GTLT"),T[N.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),T[N.XRANGEIDENTIFIERLOOSE]=T[N.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),T[N.XRANGEIDENTIFIER]=T[N.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),T[N.XRANGEPLAIN]="[v=\\s]*("+T[N.XRANGEIDENTIFIER]+")(?:\\.("+T[N.XRANGEIDENTIFIER]+")(?:\\.("+T[N.XRANGEIDENTIFIER]+")(?:"+T[N.PRERELEASE]+")?"+T[N.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),T[N.XRANGEPLAINLOOSE]="[v=\\s]*("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[N.XRANGEIDENTIFIERLOOSE]+")(?:"+T[N.PRERELEASELOOSE]+")?"+T[N.BUILD]+"?)?)?",r("XRANGE"),T[N.XRANGE]="^"+T[N.GTLT]+"\\s*"+T[N.XRANGEPLAIN]+"$",r("XRANGELOOSE"),T[N.XRANGELOOSE]="^"+T[N.GTLT]+"\\s*"+T[N.XRANGEPLAINLOOSE]+"$",r("COERCE"),T[N.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),P[N.COERCERTL]=RegExp(T[N.COERCE],"g"),x[N.COERCERTL]=RegExp(n(T[N.COERCE]),"g"),r("LONETILDE"),T[N.LONETILDE]="(?:~>?)",r("TILDETRIM"),T[N.TILDETRIM]="(\\s*)"+T[N.LONETILDE]+"\\s+",P[N.TILDETRIM]=RegExp(T[N.TILDETRIM],"g"),x[N.TILDETRIM]=RegExp(n(T[N.TILDETRIM]),"g"),r("TILDE"),T[N.TILDE]="^"+T[N.LONETILDE]+T[N.XRANGEPLAIN]+"$",r("TILDELOOSE"),T[N.TILDELOOSE]="^"+T[N.LONETILDE]+T[N.XRANGEPLAINLOOSE]+"$",r("LONECARET"),T[N.LONECARET]="(?:\\^)",r("CARETTRIM"),T[N.CARETTRIM]="(\\s*)"+T[N.LONECARET]+"\\s+",P[N.CARETTRIM]=RegExp(T[N.CARETTRIM],"g"),x[N.CARETTRIM]=RegExp(n(T[N.CARETTRIM]),"g"),r("CARET"),T[N.CARET]="^"+T[N.LONECARET]+T[N.XRANGEPLAIN]+"$",r("CARETLOOSE"),T[N.CARETLOOSE]="^"+T[N.LONECARET]+T[N.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),T[N.COMPARATORLOOSE]="^"+T[N.GTLT]+"\\s*("+T[N.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),T[N.COMPARATOR]="^"+T[N.GTLT]+"\\s*("+T[N.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),T[N.COMPARATORTRIM]="(\\s*)"+T[N.GTLT]+"\\s*("+T[N.LOOSEPLAIN]+"|"+T[N.XRANGEPLAIN]+")",P[N.COMPARATORTRIM]=RegExp(T[N.COMPARATORTRIM],"g"),x[N.COMPARATORTRIM]=RegExp(n(T[N.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),T[N.HYPHENRANGE]="^\\s*("+T[N.XRANGEPLAIN]+")\\s+-\\s+("+T[N.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),T[N.HYPHENRANGELOOSE]="^\\s*("+T[N.XRANGEPLAINLOOSE]+")\\s+-\\s+("+T[N.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),T[N.STAR]="(<|>)?=?\\s*\\*";for(var L=0;$>L;L++)S(L,T[L]),P[L]||(P[L]=RegExp(T[L]),x[L]=RegExp(n(T[L])));t.parse=i,t.valid=function(e,t){var r=i(e,t);return r?r.version:null},t.clean=function(e,t){var r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=o,o.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},o.prototype.toString=function(){return this.version},o.prototype.compare=function(e){return S("SemVer.compare",this.version,this.options,e),e instanceof o||(e=new o(e,this.options)),this.compareMain(e)||this.comparePre(e)},o.prototype.compareMain=function(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},o.prototype.comparePre=function(e){if(e instanceof o||(e=new o(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.prototype.compareBuild=function(e){e instanceof o||(e=new o(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new o(e,r).inc(t,n).version}catch(i){return null}},t.diff=function(e,t){if(l(e,t))return null;var r=i(e),n=i(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return o+a;return s},t.compareIdentifiers=s;var k=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new o(e,t).major},t.minor=function(e,t){return new o(e,t).minor},t.patch=function(e,t){return new o(e,t).patch},t.compare=a,t.compareLoose=function(e,t){return a(e,t,!0)},t.compareBuild=function(e,t,r){var n=new o(e,r),i=new o(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return a(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=c,t.lt=u,t.eq=l,t.neq=f,t.gte=p,t.lte=d,t.cmp=h,t.Comparator=m;var D={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[N.COMPARATORLOOSE]:x[N.COMPARATOR]);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),this.semver=t[2]?new o(t[2],this.options.loose):D},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(S("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if("string"==typeof e)try{e=new o(e,this.options)}catch(t){return!1}return h(e,this.operator,this.semver,this.options)},m.prototype.intersects=function(e,t){if(!(e instanceof m))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new y(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new y(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=h(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=h(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=y,y.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},y.prototype.toString=function(){return this.range},y.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[N.HYPHENRANGELOOSE]:x[N.HYPHENRANGE],g),S("hyphen replace",e),e=e.replace(x[N.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,x[N.COMPARATORTRIM]),e=(e=(e=e.replace(x[N.TILDETRIM],"$1~")).replace(x[N.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[N.COMPARATORLOOSE]:x[N.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return S("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return S("caret",e,t),e.replace(t.loose?x[N.CARETLOOSE]:x[N.CARET],(function(t,r,n,i,o){var s;return S("caret",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(S("replaceCaret pr",o),s="0"===r?"0"===n?">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+"-"+o+" <"+(+r+1)+".0.0"):(S("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+i+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+" <"+(+r+1)+".0.0"),S("caret return",s),s}))}(e,t)})).join(" ")}(e,t),S("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[N.TILDELOOSE]:x[N.TILDE],(function(t,r,n,i,o){var s;return S("tilde",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(S("replaceTilde pr",o),s=">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0",S("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),S("tildes",e),e=function(e,t){return S("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[N.XRANGELOOSE]:x[N.XRANGE],(function(r,n,i,o,s,a){S("xRange",e,r,n,i,o,s,a);var c=w(i),u=c||w(o),l=u||w(s);return"="===n&&l&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&l?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),r=n+i+"."+o+"."+s+a):u?r=">="+i+".0.0"+a+" <"+(+i+1)+".0.0"+a:l&&(r=">="+i+"."+o+".0"+a+" <"+i+"."+(+o+1)+".0"+a),S("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),S("xrange",e),e=function(e,t){return S("replaceStars",e,t),e.trim().replace(x[N.STAR],"")}(e,t),S("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(n=n.filter((function(e){return!!e.match(r)}))),n.map((function(e){return new m(e,this.options)}),this)},y.prototype.intersects=function(e,t){if(!(e instanceof y))throw new TypeError("a Range is required");return this.set.some((function(r){return v(r,t)&&e.set.some((function(e){return v(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new y(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},y.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(r){return!1}for(var t=0;this.set.length>t;t++)if(E(this.set[t],e,this.options))return!0;return!1},t.satisfies=_,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minVersion=function(e,t){e=new y(e,t);var r=new o("0.0.0");if(e.test(r))return r;if(r=new o("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;e.set.length>n;++n)e.set[n].forEach((function(e){var t=new o(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!c(r,t)||(r=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new y(e,t).range||"*"}catch(r){return null}},t.ltr=function(e,t,r){return b(e,t,"<",r)},t.gtr=function(e,t,r){return b(e,t,">",r)},t.outside=b,t.prerelease=function(e,t){var r=i(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new y(e,r),t=new y(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof o)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[N.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[N.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[N.COERCERTL].lastIndex=-1}else r=e.match(x[N.COERCE]);return null===r?null:i(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,xm.exports)),xm.exports}function br(e){const t=e.split(".").pop();return"tar"===t?0:"gz"===t||"tgz"===t?1:"xz"===t||"txz"===t?2:"zip"===t?3:("7z"===t||"exe"===t||F(`Unknown archive type: ${t}. Defaulting to 7z`),4)}function Sr(e){switch(e){case 0:case 1:case 2:return Pr;case 3:return Ir;default:return Or}}async function Or(e,t){const r=Mn(e);if(/.*\.tar\..+$/.test(r)){const n=Vn(e);await Rr(e,n);const i=r.slice(0,-3),o=jn(n,i);await Rr(o,n),await Ci(o);const s=i.slice(0,-4),a=jn(n,s);U(`Moving ${a} to ${t}`),await gm.move(a,t,{overwrite:!0})}else await Rr(e,t);return t}async function Rr(e,t){U(`7z: extracting ${e} to ${t}`),await q(await async function(){return void 0===Cm&&(null===pu.sync("7z",{nothrow:!0})&&await Er("",0,process),Cm="7z"),Cm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await oe(t)}async function Ir(e,t){return null!==pu.sync("7z",{nothrow:!0})?Or(e,t):null!==pu.sync("unzip",{nothrow:!0})?(await q("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await oe(t),t):Or(e,t)}async function Pr(e,t,r=0,n=[]){await async function(e){switch(U("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&($t()?(await Lt("gzip"),await Lt("tar")):Nt()?await At([{name:"gzip"},{name:"tar"}]):Ct()?await yt([{name:"gzip"},{name:"tar"}]):await Pd()&&await ot([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&($t()?(await Lt("xz"),await Lt("tar")):Nt()?await At([{name:"xz"},{name:"tar"}]):Ct()?await yt([{name:"xz-utils"},{name:"tar"}]):await Pd()&&await ot([{name:"xz"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(br(e));try{await gm.mkdirp(t)}catch{}try{await q("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(i){"win32"===process.platform&&i.message.includes("Can't create '\\\\?\\C:")&&F(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await oe(t),t}async function xr(e,t,r,n,i){U(`Installing ${e} ${t} ${i} via direct downloading`),process.env.RUNNER_TEMP=process.env.RUNNER_TEMP??Dn(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??jn(Dn(),"setup-cpp","hostedtoolcache");const{url:o,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:u}=await r(t,process.platform,i);if(Dm)try{const r=$m.find(e,t);if(r){const n=jn(r,c),i=jn(n,s);if(await $e(jn(i,a)))return U(`${e} ${t} was found in the cache at ${i}.`),await Fe(i,Wd),{installDir:n,binDir:i}}}catch{}const l=jn(n,c),f=jn(l,s),p=jn(f,a);return await async function(e,t,r,n,i,o,s,a){if((await Promise.all([$e(e),$e(t)])).includes(!1))try{const e=await async function(e,t,r){U(`Download ${e} ${t}`);return await km((()=>{const e=jn(process.env.RUNNER_TEMP??Dn(),`${Date.now()}-${Mn(r)}`);return $m.downloadTool(r,e)}),{name:r,max:4,backoffBase:2e3,report:e=>U(e)})}(r,n,i);U(`Extracting ${e} to ${o}`);const t=s??Sr(br(i));await t(e,o)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${i}: ${c}`)}if(U(`Add ${e} to PATH`),await Fe(e,Wd),!(await $e(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await Ai(t,"755")}catch(c){F(`Failed to make ${t} executable: ${c}`)}}(f,p,e,t,o,n,u,i),await async function(e,t,r){Dm&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==Pt("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await $m.cacheDir(e,t,r))}(n,e,t),{installDir:l,binDir:f}}async function Tr(e,t,r){let n;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||(n=await gr("gcc-arm-embedded",e));try{n=await xr("g++",e,Nr,t,r)}catch(i){U(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),n=await async function(e,t){let r;if(await gr("mingw",e),"x64"===t&&await $e("C:/tools/mingw64/bin")?(r="C:/tools/mingw64/bin",await Fe(r,Wd)):"ia32"===t&&await $e("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await Fe(r,Wd)):await $e((process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(r=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin"),void 0!==r)return{binDir:r}}(e,r)}break;case"linux":if($t())n=await Lt("mingw-w64-gcc",e);else if(Nt())n=await At([{name:"mingw64-gcc",version:e}]);else if(Ct())n=await yt([{name:"mingw-w64",version:e}]);else{if(!(await Pd()))throw Error("Unsupported Linux distro for "+r);await rt(),n=await ot([{name:"mingw-w64-gcc",version:e},{name:"mingw-w64-crt",version:e}])}break;default:throw Error("Unsupported platform for "+r)}return void 0!==n&&await async function(e){const t=[];"win32"===process.platform&&t.push(ke("CC",We(e+"/gcc"),Wd),ke("CXX",We(e+"/g++"),Wd)),Fm&&await jt(),await Promise.all(t)}(n.binDir),n}async function Nr(e,t,r){if("win32"!==t)throw Error(`Unsupported platform '${t}'`);const n=await Ut(jn(jm,"github_brechtsanders_winlibs_mingw.json")),i=$r(e),o=Cr(e),s=Ar(e),a=Mt(n,{version:e,keywords:[{x64:"x86_64",ia32:"i386"}[r]??r],filterName:e=>!(void 0!==i&&i!==$r(e)||void 0!==o&&o!==Cr(e)||void 0!==s&&s!==Ar(e)),versionSatisfies:(e,t)=>{const r=th(e);if(null===r)throw Error(`Invalid MinGW asset version: '${e}'`);return nh(r,t)&&(void 0===i||i===$r(e))&&(void 0===o||o===Cr(e))}});if(void 0===a)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:We("g++"),extractedFolderName:"mingw64",extractFunction:Or,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${a.tag}/${a.name}`}}function $r(e){const t=e.match(/(ucrt|msvcrt)/);return null!==t?t[1]:void 0}function Cr(e){const t=e.match(/(posix|mcf)/);return null!==t?t[1]:void 0}function Ar(e){const t=e.match(/(seh|dwarf)/);return null!==t?t[1]:void 0}async function Lr(e,t,r,n=40){let i;switch(process.platform){case"win32":i=await Tr(e,t,r);break;case"darwin":i=await It("gcc",e);break;case"linux":if($t())i=await Lt("gcc",e);else if(Nt())i=await At([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]);else if(await Pd())i=await ot([{name:"gcc",version:e},{name:"g++",version:e}]);else if(Ct())if(""===e)i=await yt([{name:"gcc"},{name:"g++"}]);else try{i=await yt([{name:"gcc",version:e},{name:"g++",version:e}])}catch(o){i=await yt([{name:"gcc",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}},{name:"g++",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])}break;default:throw Error("Unsupported platform for "+r)}if(void 0!==i)return await async function(e,t,r=40){if("win32"===process.platform)return;const n=[];{const i=function(e){try{const t=Ft(e),r=Id(t);return 5>r?e:""+r}catch{return e}}(e),[o,s]=await Promise.all([kr("gcc",t,i),kr("g++",t,i)]);n.push(ke("CC",o,Wd),ke("CXX",s,Wd)),Ct()&&n.push(st("cc",o,Wd,r),st("cxx",s,Wd,r),st("gcc",o,Wd,r),st("g++",s,Wd,r))}n.push(Tt()),Um&&await jt(),await Promise.all(n)}(e,i.binDir,n),i}async function kr(e,t,r){if(await $e(`${t}/${e}-${r}`))return We(`${t}/${e}-${r}`);const n=RegExp(`^${Be(e)}-?([\\d\\.\\-]*)(?:\\.exe)?$`),i=(await Li(t)).filter((e=>n.test(e))).sort(((e,t)=>{const r=e.match(n)?.[1]??"",i=t.match(n)?.[1]??"";try{return function(e,t){const r=th(e),n=th(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(r,i)}catch{return 0}}));for(const o of i){const e=`${t}/${o}`;if(""===r||o.includes(r)||(await Dr(e))?.includes(r))return We(e)}return await $e(`${t}/${e}`)?We(`${t}/${e}`):We(e)}async function Dr(e){try{const{stdout:t}=await q(e,["--version"],{stdio:"pipe"}),r=t.match(/(gcc|g\+\+).* \(.*\) ([\d.]+)/);if(null!==r)return r[2];F("Failed to parse gcc version from: "+t)}catch(t){D("Failed to get gcc version: "+t)}}function Fr(e,t,r=null){return Ur(t)?jr(e,r)??"":t}function jr(e,t=null){const r=ry()[e];if(void 0===r)return;if("string"==typeof r)return r;const n=r[process.platform]??r.else;if(void 0===n)throw Error(`Platform "${process.platform}" not found in versions data for tool "${e}"`);if("string"==typeof n)return n;const i=n,o=Ct()?"ubuntu":$t()?"archlinux":tt()?"alpine":Nt()?"fedora":"else",s=i[o]??i.else;if(void 0===s)throw Error(`Distro "${o}" not found in versions data for tool "${e}"`);if("string"==typeof s)return s;const a=s,c=null!==t?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).filter((e=>!Number.isNaN(e))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0!==n?t[n]??t.else:t.else}(t,a):a.else;if(void 0===c)throw Error(`Architecture "${process.arch}" not found in versions data for tool "${e}"`);return"string"==typeof c?c:c[process.arch]??c.else}function Ur(e){return"true"===e||void 0===e}async function Mr(e,t,r){Ra.startGroup("Setup Python");const n=await async function(e,t,r){const n=function(e){return e.startsWith(">")}(e)?"":e;let i,o=await Gr(t);if(void 0!==o){const e=Vn(o);i={bin:o,installDir:e,binDir:e}}else{if(ny)try{U("Installing python in GitHub Actions");const{setupActionsPython:e}=await import("./assets/actions_python-4hsZpmjR.mjs");if(await e(n,t,r),o=await Gr(t),void 0===o)throw Error("Python binary could not be found");const s=Vn(o);i={bin:o,installDir:s,binDir:s}}catch(s){F(""+s)}void 0===i&&(i=await async function(e,t){let r;switch(process.platform){case"win32":{e?await gr("python3",t,["--params=/InstallDir:"+e]):await gr("python3",t);const n=await Gr(e);if(void 0===n)throw Error("Python binary could not be found");const i=Vn(n);await Fe(i,Wd),r={installDir:i,binDir:i,bin:n};break}case"darwin":{r=await It("python3",t);const e=await q("brew",["--prefix","python"],{stdio:"pipe"}),n=jn(e.stdout,"libexec","bin");await Fe(n,Wd);break}case"linux":if($t())r=await Lt("python",t);else if(Nt())r=await At([{name:"python3",version:t}]);else if(Ct())r=await yt([{name:"python3",version:t},{name:"python-is-python3"}]);else{if(!(await Pd()))throw Error("Unsupported linux distributions");r=await ot([{name:"python3",version:t}])}break;default:throw Error("Unsupported platform")}return r}(t,n))}if(void 0===o||void 0===i.bin){if(o=await Gr(t),void 0===o)throw Error("Python binary could not be found");i={bin:o,installDir:Vn(o),binDir:Vn(o)}}return i}(e,t,r);fi(void 0!==n.bin);const i=n.bin;Ra.endGroup(),Ra.startGroup("Setup venv"),await async function(e){if(await async function(e){try{return await q(e,["-m","venv","-h"],{stdio:"ignore"}),!Ct()||lt("python3-venv")}catch{}return!1}(e))U("venv module already installed.");else try{await Zr("venv")}catch(t){U(`Failed to install venv: ${""+t}. Ignoring...`)}}(i),Ra.endGroup(),Ra.startGroup("Setup pip");const o=await async function(e){const t=await Hr();return void 0===t?(U("pip was not found. Installing pip"),await async function(e){await qr(e)||(await Zr("pip"),await qr(e))}(e),Hr()):t}(i);if(Ra.endGroup(),void 0===o)throw Error("pip was not installed correctly");return Ra.startGroup("Setup pipx"),await async function(e){try{if(!(await Qr(e))){try{await Zr("pipx")}catch(t){j("pipx was not installed completely for the system-wide python: "+t)}try{await Qr(e)||await Yr(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){j(`pipx was not installed completely for ${e}: ${t}`)}}if(await Qr(e))await q(e,["-m","pipx","ensurepath"],{stdio:"inherit"});else{if(!(await async function(){return null!==await pu("pipx",{nothrow:!0})}()))throw Error("pipx module or pipx binary not found. Corrput pipx installation.");j(`pipx module not found for ${e}. Trying to install with pipx binary...`),await q("pipx",["ensurepath"],{stdio:"inherit"})}}catch(t){j(`Failed to install pipx completely for ${e}: ${""+t}. Ignoring...`)}}(i),Ra.endGroup(),Ra.startGroup("Setup wheel"),await async function(e){try{await Yr(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Yr(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){U(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(i),Ra.endGroup(),n}async function Gr(e){for(const t of["python","python3"]){const r=await Br(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Wn(kn()).root,t=(await Li(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Br(t,jn(e,r));if(void 0!==n)return n}}}async function Br(e,t){try{const r=jr("python");if(void 0!==t){const n=jn(t,We(e));if(await $e(n)&&await Dt(n,r))return n}const n=await pu(e,{nothrow:!0,all:!0})??[];for(const e of n)if(await Dt(e,r))return e}catch{}}async function Hr(){for(const e of["pip3","pip"]){const t=await Vr(e);if(void 0!==t)return t}}async function Vr(e){try{const t=jr("pip"),r=await pu(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await Dt(e,t))return e}catch{}}async function qr(e){if(await dy(e))return!1;try{return await q(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){U(""+t);try{return await q(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){U(""+r)}}return!1}function zr(){if(!("version"in Ln)||"function"!=typeof Ln.version)return null;const e=Ln.version().match(/(\d+)\.(\d+)\.(\d+)/);return null===e?null:[Number.parseInt(e[1],10),Number.parseInt(e[2],10),Number.parseInt(e[3],10)]}function Wr(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function Xr(e,t,r={}){return Yr(await async function(e){if(void 0!==ly)return ly;const t=e??Fr("python",void 0,await ay());return ly=(await Mr(t,"",process.arch)).bin,ly}(r.pythonVersion),e,t,r)}async function Yr(e,t,r,n={}){const{usePipx:i=!0,user:o=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=i&&!a&&await Qr(e),u=!c&&await dy(e),l=c?"pipx":"pip",f=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await q(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==r.exitCode||"string"!=typeof r.stdout)return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const e of Object.values(n.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,f):await async function(e,t){try{return 0===(await q(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,f);if(t)return{binDir:c?await Kr():await Jr(e,f)}}if(!u&&await async function(e,t){return 0===(await q(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,f))try{Ra.info(`Installing ${t} ${r??""} via ${l}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,i=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&o?["--user"]:[],u=process.env;c&&o&&(u.PIPX_HOME=await cy(),u.PIPX_BIN_DIR=await uy()),z(e,["-m",l,...i,...a,n],{stdio:"inherit",env:u})}catch(p){if(Ra.info(`Failed to install ${t} via ${l}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await Zr(t))throw Error(`Failed to install ${t} via ${l}: ${p}.`)}else if(null===await Zr(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);return{binDir:c?await Kr():await Jr(e,f)}}function Kr(){return uy()}async function Jr(e,t){const r=await fy(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>$e(jn(e,We(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=pu.sync(We(t),{nothrow:!0});return null!==n?Vn(n):e[e.length-1]}(r,t);return await Fe(n,Wd),n}async function Qr(e){return 0===(await q(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}async function Zr(e,t){if("linux"===process.platform){Ra.info(`Installing ${e} via the system package manager`);const t="pipx"!==e||$t();if($t())return Lt(t?"python-"+e:e);if(Nt())return At([{name:t?"python3-"+e:e}]);if(Ct())return yt([{name:t?"python3-"+e:e}]);if(await Pd())return ot([{name:t?"py3-"+e:e}])}else if("darwin"===process.platform)return["venv"].includes(e)?null:It(e);return null}function en(e){const t=fd(e),r=null!==t?Id(t):e;return ke("GCOV",""!==r?"gcov-"+r:"gcov",Wd)}async function tn(){"darwin"===process.platform&&(null!==await pu("clang",{nothrow:!0})&&null!==await pu("clang++",{nothrow:!0})&&(j("Assuming clang is an Apple Clang compiler"),await Promise.all([ke("CC","clang",Wd),ke("CXX","clang++",Wd)])),Ui("Apple Clang automatic installation is not supported yet"))}function rn(e){return vy.includes(e)?"arm64":my.includes(e)?"amd64":e}function nn(e,t,r){const n=th(e)??e;switch(t){case"win32":{const t=by(n,"v3.19.6");let i;my.includes(r)?i=t?"win64-x64":"windows-x86_64":yy.includes(r)?i=t?"win32-x86":"windows-i386":vy.includes(r)?i="windows-arm64":(U(`Trying unsupported arch '${r}' for cmake on Windows`),i="windows-"+r);const o=`cmake-${e}-${i}`;return{binRelativeDir:"bin/",binFileName:We("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.zip`}}case"darwin":{const t=`cmake-${e}-${by(n,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:We("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=by(n,"v3.19.8");let i;vy.includes(r)?i=t?"Linux-aarch64":"linux-aarch64":my.includes(r)?i=t?"Linux-x86_64":"linux-x86_64":(U(`Trying unsupported arch '${r}' for cmake on Linux`),i="linux-"+r);const o=`cmake-${e}-${i}`;return{binRelativeDir:"bin/",binFileName:We("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}async function on(e,t,r){return await Pd()?ot([{name:"cmake"}]):xr("cmake",e,nn,t,r)}function sn(e,t,r){return Xr("cmakelang[YAML]",e)}async function an(e,t,r){switch(process.platform){case"win32":return await gr("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await Fe(e,Wd),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return It("graphviz",e);case"linux":if($t())return Lt("graphviz",e);if(Nt())return At([{name:"graphviz",version:e}]);if(Ct())return yt([{name:"graphviz",version:e}]);if(await Pd())return ot([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function cn(e,t){const{ArchiveHdi:r}=await import("./assets/index-DbYobIHH.mjs"),n=new r(e);await n.read((async e=>{await e.extract(jn(t,e.path))}))}function un(e,t,r){switch(t){case"linux":{if("arm64"===process.arch)throw Error("Doxygen binaries are not available for Linux arm64");const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:We("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:We("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.windows.x64.bin.zip`}}case"darwin":{const t="Doxygen-"+e;return{binRelativeDir:"Doxygen/Doxygen.app/Contents/Resources/",binFileName:We("doxygen"),extractedFolderName:t,extractFunction:cn,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function ln(e,t,r){const n=await pu("git",{nothrow:!0});if(null===n)switch(process.platform){case"win32":{const t=await gr("git",e),r=function(){const e=["C:/Program Files/Git/bin/git.exe","C:/Program Files (x86)/Git/bin/git.exe"];for(const t of e)if(Kn(t))return t;return F("Git not found in the default locations. Add git to PATH manually."),null}();return null!==r&&await Fe(r,Wd),t}case"darwin":return It("git",e);case"linux":if($t())return Lt("git",e);if(Nt())return At([{name:"git",version:e}]);if(Ct())return yt([{name:"git",version:e}]);if(await Pd())return ot([{name:"git",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}else U("Git already installed at "+n)}async function fn(e,t,r){const{keywords:n,optionalKeywords:i}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),my.includes(t)?(n.push("64"),n.push("x86_64")):(U(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),my.includes(t)?n.push("x86_64"):vy.includes(t)?n.push("arm64"):(U(`Using arch ${t} for infer`),r.push(t));break;default:U(`Using ${e} ${t} for infer`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(t,r),o=Mt(await Ut(jn(Ry,"github_facebook_infer.json")),{version:e,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==o)return{url:`https://github.com/facebook/infer/releases/download/${o.tag}/${o.name}`,extractedFolderName:""+Mn(o.name,".tar.xz"),binRelativeDir:"bin",binFileName:We("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${i}`)}function pn(e,t,r){const n=function(e,t){switch(e){case"win32":return my.includes(t)||yy.includes(t)?"win":vy.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return my.includes(t)||yy.includes(t)?"linux":vy.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:We("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}async function dn(e,t,r){return await Pd()?(await rt(),await ot([{name:"ninja-build"},{name:"ninja-is-really-ninja"}]),await Fe("/usr/lib/ninja-build/bin",Wd),{binDir:"/usr/lib/ninja-build/bin",installDir:"/usr/lib/ninja-build/",bin:"/usr/lib/ninja-build/bin/ninja"}):xr("ninja",e,pn,t,r)}function hn(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:We("kcov")}}function mn(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:We("kcov"),extractFunction:yn}}async function yn(e,t){const r=await Pr(e,t,1),n=await async function(){let e=pu.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await on(Fr("cmake",void 0,await ay()),jn(Ce("~"),"cmake"),"");e=jn(t,"cmake")}return null===pu.sync("ninja",{nothrow:!0})&&await dn(Fr("ninja",void 0,await ay()),jn(Ce("~"),"ninja"),""),e}();"linux"===process.platform&&($t()?await Promise.all([Lt("libdwarf"),Lt("libcurl-openssl")]):Nt()?await At([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):Ct()&&await yt([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==pu.sync("patch",{nothrow:!0})){const e=jn(Iy,"gcc13.patch");await q("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else U("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const i=jn(r,"build");return await q(n,["-S",r,"-B",i,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await q(n,["--build",i,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function vn(e,t,r,n,i,o,s){void 0!==t&&await $e(t)&&(U(`Adding ${t} to PATH`),await ke("VCTargetsPath",t,Wd)),await Ty.setupMSVCDevCmd(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),i,n,o,s,e)}async function wn(e,t,r,n,i,o){if("win32"!==process.platform)return;const s=Ty.vsversion_to_versionnumber(e);U(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=Ty.findVcvarsall(s);u=!0,U("Found the pre-installed version of MSVC at "+e)}catch{}if(!u)try{"14.0"===s?(a="14.0",await gr("visualcpp-build-tools","14.0.25420.1",["--ignore-dependencies"]),c="C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140"):"15.0"===s?(a="14.16",await gr("visualstudio2017buildtools","15.9.41.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16"):"16.0"===s?(a="14.29",await gr("visualstudio2019buildtools","16.11.7.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"):"17.0"===s?(a=void 0,await gr("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):D(`The given MSVC versions ${e} is not supported yet.`)}catch(l){D(l)}await vn(s,c,r,a,n,i,o),Ny&&await async function(){const e=jn($y,"msvc_matcher.json");if(!(await $e(e)))return F("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");U("::add-matcher::"+e)}()}async function gn(e,t,r){if("win32"===process.platform)return await gr("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await Fe(e,Wd),e}()}}function En(e,t,r){return{url:_n(t,r,e),binRelativeDir:"",binFileName:We("pwsh"),extractedFolderName:""}}function _n(e,t,r){switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/PowerShell-${r}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${{arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t]??"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function bn(e,t,r){try{return await Pd()?Sn(e):await xr("pwsh",e,En,t,r)}catch(n){return D(`Failed to setup pwsh via download: ${n}. Trying package managers...`),Sn(e)}}async function Sn(e,t,r){switch(process.platform){case"win32":{await gr("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await Fe(t,Wd),{binDir:t}}case"darwin":return It("powershell",e,{cask:!0,overwrite:!1});case"linux":if($t())return Lt("powershell-bin",e,"yay");if(Nt())return await At([{name:"curl"}]),ee("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),At([{name:"powershell",version:e}]);if(Ct()){await yt([{name:"curl"}]);const t=await ay();return ee("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),ee("dpkg",["-i","packages-microsoft-prod.deb"]),yt([{name:"powershell",version:e}],!0)}if(await Pd())return ot([{name:"powershell",version:void 0}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function On(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),i=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),o="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:We("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${i}.${o}`}}async function Rn(e,t,r,n,i,o,s,a=Vy){Ra.startGroup(`Installing ${e} ${t}`);try{await async function(e,t,r,n,i,o){const s=My.includes(e);let a;if("vcvarsall"===e)await vn(Fr(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Et({rcOptions:Wd});else{const o=jn(i,s?"llvm":e),c=Fr(e,t,r),u=Gy[e];a=await u(c,o,n)}o.push(xt(e,a))}(e,t,r,n,i,o)}catch(c){D(c),c instanceof Error&&void 0!==c.stack&&D(c.stack),s.push(e+" failed to install")}Ra.endGroup()}async function In(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:i}=await async function(e,t){const r=[],n=[];switch(e){case"win32":{n.push(".exe",".exe");const e=[];my.includes(t)?(e.push("win64"),n.push(["x86_64","X64"])):yy.includes(t)?e.push("win32"):vy.includes(t)?e.push("woa64"):(U(`Using arch ${t} for LLVM`),e.push(t)),e.push("windows","Windows"),r.push(e);break}case"linux":{const e=["linux","Linux"];if(Ct()){n.push("ubuntu");const e=await ay();if(null!==e){n.push(""+e[0]);const t=10>e[1]?"0"+e[1]:""+e[1];n.push(`${e[0]}.${t}`),n.push(`${e[0]}.${t}.${e[2]}`)}}else Nt()&&n.push("rhel");my.includes(t)?r.push(["x86_64","X64"]):yy.includes(t)?r.push("x86"):vy.includes(t)?r.push("aarch64"):wy.includes(t)?r.push("armv7a"):gy.includes(t)?r.push("powerpc64le"):Ey.includes(t)?r.push("sparc64"):(U(`Using arch ${t} for LLVM`),r.push(t)),r.push(e);break}case"darwin":r.push(["apple","macos","macOS"]),my.includes(t)?n.push(["x86_64","X64"]):vy.includes(t)?n.push(["arm64","ARM64"]):(U(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),my.includes(t)?r.push("amd64"):yy.includes(t)?r.push("i386"):(U(`Using arch ${t} for LLVM`),r.push(t));break;case"solaris":r.push("solaris"),my.includes(t)?r.push("amd64"):_y.includes(t)?r.push("sparcv9"):(U(`Using arch ${t} for LLVM`),r.push(t));break;default:U(`Using ${e} ${t} for LLVM`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),o=Mt(await Ut(jn(Wy,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==o)return`https://github.com/llvm/llvm-project/releases/download/${o.tag}/${o.name}`;const s=Mt(await Ut(jn(Wy,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:i});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${i}`)}(t,r,e);return U("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:We("clang"),extractFunction:"win32"===t?Sr(br(n)):(e,t)=>Pr(e,t,1)}}async function Pn(e,t,r){const n=await xn(e,t,r);return await Jy(r),await async function(){if(!Yy)return;const e=jn(Ky,"llvm_matcher.json");if(!(await $e(e)))return F("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");U("::add-matcher::"+e)}(),void 0!==n.installDir&&await async function(e,t){const r=process.env.LD_LIBRARY_PATH??"",n=process.env.DYLD_LIBRARY_PATH??"",i=hy(t),o=[ke("CC",We(e+"/bin/clang"),Wd),ke("CXX",We(e+"/bin/clang++"),Wd),ke("LLVM_PATH",e,Wd),ke("LLVM_LD_LIBRARY_PATH",`${r}${Un}${e}/lib`,Wd),ke("LLVM_DYLD_LIBRARY_PATH",`${n}${Un}${e}/lib`,Wd),ke("LLVM_LDFLAGS","-L"+Wr(e+"/lib"),Wd),ke("LLVM_CPPFLAGS","-I"+Wr(e+"/include"),Wd),await $e(`${e}/lib/clang/${t}/include`)?ke("LLVM_CPATH",`${e}/lib/clang/${t}/include`,Wd):await $e(`${e}/lib/clang/${i}/include`)?ke("LLVM_CPATH",`${e}/lib/clang/${i}/include`,Wd):Promise.resolve(),ke("LLVM_LIBRARY_PATH",e+"/lib",Wd),Tt()];if(Ct()){const t=60;o.push(st("cc",e+"/bin/clang",Wd,t),st("cxx",e+"/bin/clang++",Wd,t),st("clang",e+"/bin/clang",Wd),st("clang++",e+"/bin/clang++",Wd),st("lld",e+"/bin/lld",Wd),st("ld.lld",e+"/bin/ld.lld",Wd),st("llvm-ar",e+"/bin/llvm-ar",Wd))}await Promise.all(o)}(n.installDir,e),n}async function xn(e,t,r,n=zy.All){const i=await async function(e,t=0){if(Ct())try{return await async function(e,t=0){const r=hy(e),n="/usr/lib/llvm-"+r;await yt([{name:"ca-certificates"}]);const i=new Ld.DownloaderHelper("https://apt.llvm.org/llvm.sh",Dn(),{fileName:"llvm.sh"});i.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await i.start();const o=await Ni(i.getDownloadPath(),"utf-8"),s=jn(Dn(),"llvm-setup-cpp.sh");return await async function(e,t,r,n){let i=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);i=function(e){return e.replace(/add-apt-repository\s*(-y)?\s*"\${REPO_NAME}"/g,'add-apt-repository -y -n "${REPO_NAME}"\napt-get update -o '+kd)}(i),i=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,i,r),i=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${kd} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const r=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await q("dpkg",["-l",e],{env:at("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Mi("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(i),i=function(e){return ct()?e.replace(/apt-get/g,"nala"):e}(i),await ki(t,i)}(o,s,r,t),await mt(),await yt([{name:"lsb-release"},{name:"wget"},{name:"gnupg"}]),await Ai(s,"755"),await te("bash",[s,""+r,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:Vy}),await Fe(n+"/bin",Wd),{installDir:""+n,binDir:n+"/bin",bin:n+"/bin/clang++"}}(e,t)}catch(r){Mi(`Failed to install llvm via system package manager ${r}. Trying to remove the repository`);try{ee(jn(qy,"llvm_repo_remove.bash"),[""+hy(e)])}catch(n){Mi("Failed to remove llvm repository "+n)}}}(e,n);if(void 0!==i)return i;const o=await async function(e){if(await Pd())try{return await function(e){return ot([{name:"llvm"+hy(e)}])}(e)}catch(t){U(`Failed to install llvm via system package manager ${t}.`)}}(e);if(void 0!==o)return o;const s=await async function(e){if("darwin"!==process.platform)return Promise.resolve(void 0);try{return await async function(e){const t=hy(e),r=await It("llvm",""+t,{"force-bottle":!0});return await Fe(r.binDir,Wd),r}(e)}catch(t){return void U("Failed to install llvm via brew: "+t)}}(e);return void 0!==s?s:async function(e,t,r){const n=await xr("llvm",e,In,t,r);return await Xy(hy(e),r),n}(e,t,r)}function Tn(e,t,r){return xn(e,t,r,zy.ClangFormat)}function Nn(e,t,r){return xn(e,t,r)}async function $n(e={}){const t=e.architecture??process.arch,r=process.env.SETUP_CPP_DIR??Ce("~"),n=[],i=[],o=ad.create({autoloadLocales:!0});let s,a;ad.addLocale(ld),Qp.addLocale(ed);const c=await ay(),u=void 0!==e.compiler?function(e){try{const t=e.match(Qy);if(null===t)return{compiler:e,version:void 0};const r=t[1],n=e.slice(0,t.index).replace(/[.-]$/,"");return r.match(/^\d{4}$/)||null!==fd(r)||U("Non-semver version format: "+r),{compiler:n,version:r}}catch(t){return D(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(e.compiler):void 0;if(!function(e,t,r){const n=void 0!==r&&t.includes(r.compiler),i=(n?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),o=i.filter((t=>!Ur(n&&"compiler"===t&&void 0!==r?r.version:e[t]))),s=0!==o.length?n&&"compiler"===o[0]&&void 0!==r?r.version??"true":e[o[0]]??"true":"true";if(o.some((t=>n&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${s}`:e[t]!==s)))return!1;for(const a of i)e[a]=n&&"compiler"===a&&void 0!==r?`${r.compiler}-${s}`:s;return!0}(e,[...My,"compiler"],u))return{successMessages:[],errorMessages:["The same version must be used for llvm, clang-format and clang-tidy"]};$t()&&"string"==typeof e.cppcheck&&"string"==typeof e.gcovr&&(U("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Lt("python-pygments"));const l=By.filter((t=>{const r=e[t];return void 0!==r&&"false"!==r})),f=void 0===e["setup-cpp"]||e["setup-cpp"]?async function(e,t="npm"){try{return null!==await pu("setup-cpp",{nothrow:!0})?`setup-cpp@${e} already installed`:(U(`Installing setup-cpp@${e} via ${t}...`),await q(t,["install","-g","setup-cpp@"+e],{stdio:"inherit",timeout:6e4}),`setup-cpp@${e} installed successfully`)}catch(r){return Error(`Failed to install the setup-cpp@${e} CLI: ${r}. Ignoring...`)}}(xs.version,e["node-package-manager"]):Promise.resolve(void 0);let p=!1;for(const h of l){const u=e[h],l=void 0!==e.timeout?60*Number.parseFloat(e.timeout)*1e3:void 0;if(s=Date.now(),await Rn(h,u,c,t,r,n,i,l),a=Date.now(),U("took "+(o.format(s,a)||"0 seconds")),0!==i.length&&Cs.isCI){p=!0;break}}if(!p&&void 0!==u){const e=Date.now();await async function(e,t,r,n,i,o,s){let a;try{if(Ra.startGroup(`Installing ${e} ${t??""}`),e in Ly)a=await Pn(Fr("llvm",t,r),jn(n,"llvm"),i),await ke("GCOV","llvm-cov gcov",Wd);else if(e in ky){const e=Fr("gcc",t,r);a=await Lr(e,jn(n,"gcc"),i),await en(e)}else if(e in Dy){const e=Fr("mingw",t,r);a=await Tr(e,jn(n,"gcc"),i),await en(e)}else e in Fy?a=await wn(Fr("msvc",t,r),jn(n,"msvc"),i):e in jy?await tn():(a=null,s.push("Unsupported compiler "+e))}catch(c){D(c),c instanceof Error&&D(c.stack??""),s.push(`Failed to install the ${e} compiler ${t}`)}null!==a&&o.push(xt(e,a)),Ra.endGroup()}(u.compiler,u.version,c,r,t,n,i);const s=Date.now();U("took "+(o.format(e,s)||"0 seconds"))}const d=await f;return"string"==typeof d&&n.push(d),await async function(e){if(await $e(e.rcPath)){const t=(await Tp(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Np(e.rcPath,r.join("\n")),await oe(e.rcPath)}}(Wd),{successMessages:n,errorMessages:i}}function Cn(r){const n=Object.fromEntries(Hy.map((e=>[e,Pt(e)])));return function(r,n){var i,o,s,a,c,u={_:[]},l=0,f=0,p=0,d=(r=r||[]).length;const h=void 0!==(n=n||{}).alias,m=void 0!==n.unknown,y=void 0!==n.default;if(n.alias=n.alias||{},n.string=e(n.string),n.boolean=e(n.boolean),h)for(i in n.alias)for(o=n.alias[i]=e(n.alias[i]),l=0;o.length>l;l++)(n.alias[o[l]]=o.concat(i)).splice(l,1);for(l=n.boolean.length;l-- >0;)for(f=(o=n.alias[n.boolean[l]]||[]).length;f-- >0;)n.boolean.push(o[f]);for(l=n.string.length;l-- >0;)for(f=(o=n.alias[n.string[l]]||[]).length;f-- >0;)n.string.push(o[f]);if(y)for(i in n.default)if(a=typeof n.default[i],o=n.alias[i]=n.alias[i]||[],void 0!==n[a])for(n[a].push(i),l=0;o.length>l;l++)n[a].push(o[l]);const v=m?Object.keys(n.alias):[];for(l=0;d>l;l++){if("--"===(s=r[l])){u._=u._.concat(r.slice(++l));break}for(f=0;s.length>f&&45===s.charCodeAt(f);f++);if(0===f)u._.push(s);else if("no-"===s.substring(f,f+3)){if(a=s.substring(f+3),m&&!~v.indexOf(a))return n.unknown(s);u[a]=!1}else{for(p=f+1;s.length>p&&61!==s.charCodeAt(p);p++);for(a=s.substring(f,p),c=s.substring(++p)||l+1===d||45===(""+r[l+1]).charCodeAt(0)||r[++l],o=2===f?[a]:a,p=0;o.length>p;p++){if(a=o[p],m&&!~v.indexOf(a))return n.unknown("-".repeat(f)+a);t(u,a,o.length>p+1||c,n)}}}if(y)for(i in n.default)void 0===u[i]&&(u[i]=n.default[i]);if(h)for(i in u)for(o=n.alias[i]||[];o.length>0;)u[o.shift()]=u[i];return u}(r,{string:[...Hy,"timeout","node-package-manager"],default:n,alias:{h:"help",v:"version"},boolean:["help","version","setup-cpp"]})}import An from"process";import Ln,{homedir as kn,tmpdir as Dn}from"os";import Fn,{join as jn,delimiter as Un,basename as Mn,extname as Gn,normalize as Bn,sep as Hn,dirname as Vn,relative as qn,resolve as zn,parse as Wn}from"path";import Xn,{promises as Yn,existsSync as Kn,mkdir as Jn,stat as Qn,statSync as Zn,mkdirSync as ei}from"fs";import*as ti from"https";import ri from"https";import ni from"crypto";import*as ii from"http";import oi from"http";import"net";import si from"tls";import ai from"events";import ci from"util";import ui from"string_decoder";import li from"child_process";import fi from"assert";import pi from"timers";import{Buffer as di}from"node:buffer";import hi from"node:path";import mi,{ChildProcess as yi}from"node:child_process";import vi from"node:process";import{fileURLToPath as wi}from"node:url";import gi,{constants as Ei}from"node:os";import _i,{createWriteStream as bi,createReadStream as Si,readFileSync as Oi,promises as Ri}from"node:fs";import Ii from"buffer";import Pi from"stream";import{debuglog as xi}from"node:util";import Ti,{readFile as Ni,appendFile as $i,rm as Ci,chmod as Ai,readdir as Li,writeFile as ki}from"fs/promises";import Di,{fileURLToPath as Fi}from"url";import ji from"constants";import{error as Ui,info as Mi}from"console";var Gi,Bi,Hi,Vi,qi,zi,Wi,Xi,Yi,Ki,Ji,Qi,Zi,eo,to,ro,no,io,oo,so,ao,co,uo,lo,fo,po,ho,mo,yo,vo,wo,go,Eo,_o,bo,So,Oo,Ro,Io,Po,xo,To,No,$o,Co,Ao,Lo,ko,Do,Fo,jo,Uo,Mo,Go,Bo,Ho,Vo,qo,zo,Wo,Xo,Yo,Ko,Jo,Qo,Zo,es,ts,rs,ns,is,os,ss,as,cs,us,ls,fs,ps,ds,hs,ms,ys,vs,ws,gs,Es,_s,bs,Ss,Os,Rs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Is={exports:{}};const Ps=r(function(){function e(e,t,r,n){return new(r||(r=Promise))((function(t,i){function o(e){try{a(n.next(e))}catch(t){i(t)}}function s(e){try{a(n.throw(e))}catch(t){i(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,s)}a((n=n.call(e)).next())}))}function t(e,t){function r(r){return function(c){return function(r){if(n)throw new TypeError("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)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7: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]&&o[3]>r[1])){a.label=r[1];break}if(6===r[0]&&o[1]>a.label){a.label=o[1],o=r;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}if(Os)return Ss;Os=1;var r=An,n=P(),i=Ln,o=Fn,s=Xn,a=ri,c=r.env.npm_package_json,u=r.env.npm_config_user_agent,l=!(!u||!u.startsWith("npm")),f=!(!c||!c.endsWith("package.json")),p=l||f,d=!(!u||!u.startsWith("yarn")),h=p||d,m=i.homedir(),y=process.env.XDG_CONFIG_HOME||o.join(m,".config","simple-update-notifier"),v=function(e){return o.join(y,"".concat(e.replace("@","").replace("/","__"),".json"))},w=function(r,n){return e(void 0,0,void 0,(function(){var e;return t(this,(function(t){return e="https://registry.npmjs.org/-/package/".concat(r,"/dist-tags"),[2,new Promise((function(t,r){a.get(e,(function(e){var i="";e.on("data",(function(e){return i+=e})),e.on("end",(function(){try{var e=JSON.parse(i)[n];e||r(Error("Error getting version")),t(e)}catch(o){r(Error("Could not parse version response"))}}))})).on("error",(function(e){return r(e)}))}))]}))}))},g=function(r){var i=r.pkg,o=r.updateCheckInterval,a=void 0===o?864e5:o,c=r.distTag,u=void 0===c?"latest":c,l=r.alwaysRun,f=r.debug;return e(void 0,0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return s.existsSync(y)||s.mkdirSync(y,{recursive:!0}),e=function(e){var t=v(e);try{if(!s.existsSync(t))return;return JSON.parse(s.readFileSync(t,"utf8")).lastUpdateCheck}catch(r){return}}(i.name),l||!e||e<(new Date).getTime()-a?[4,w(i.name,u)]:[3,2];case 1:return o=t.sent(),c=v(i.name),s.writeFileSync(c,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),n.gt(o,i.version)?[2,o]:(f&&console.error("Latest version (".concat(o,") not newer than current version (").concat(i.version,")")),[3,3]);case 2:f&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(a,"ms but only ").concat((new Date).getTime()-e,"ms since last check.")),t.label=3;case 3:return[2,!1]}var c}))}))};return Ss=function(r){return e(void 0,0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:if(!r.alwaysRun&&(!process.stdout.isTTY||h&&!r.shouldNotifyInNpmScript))return r.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,g(r)];case 2:return(e=t.sent())&&console.error(function(e){for(var t=e.split("\n"),r=Math.max.apply(Math,t.map((function(e){return e.length}))),n=["┌".concat("─".repeat(r+2),"┐")],i=0,o=t;o.length>i;i++)n.push("│ ".concat(o[i].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(r.pkg.name," available!\nCurrent Version: ").concat(r.pkg.version,"\nLatest Version: ").concat(e))),[3,4];case 3:return n=t.sent(),r.debug&&n instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",n),[3,4];case 4:return[2]}}))}))}}()),xs={name:"setup-cpp",version:"1.5.3"};var Ts={};const Ns=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}];var $s,Cs=($s||($s=1,function(e){function t(e){return"string"==typeof e?!!n[e]:"env"in e?n[e.env]&&n[e.env].includes(e.includes):"any"in e?e.any.some((function(e){return!!n[e]})):Object.keys(e).every((function(t){return n[t]===e[t]}))}const r=Ns,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,e.id=null,r.forEach((function(r){const i=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));e[r.constant]=i,i&&(e.name=r.name,e.isPR=function(e){switch(typeof e.pr){case"string":return!!n[e.pr];case"object":return"env"in e.pr?"any"in e.pr?e.pr.any.some((function(t){return n[e.pr.env]===t})):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?e.pr.any.some((function(e){return!!n[e]})):t(e.pr);default:return null}}(r),e.id=r.constant)})),e.isCI=!("false"===n.CI||!(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name))}(Ts)),Ts);const As=r(Cs);var Ls,ks,Ds,Fs={},js={},Us={},Ms={},Gs={};class Bs extends URL{_decodedUsername;_decodedPassword;constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var Hs,Vs,qs,zs,Ws,Xs,Ys,Ks,Js={},Qs=(qs||(qs=1,Vs=function(){function e(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,i,o){for(var s=r(n,i,o),a=0,c=t.requests.length;c>a;++a){var u=t.requests[a];if(u.host===s.host&&u.port===s.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function t(t,r){var i=this;e.prototype.createSocket.call(i,t,(function(e){var s=t.request.getHeader("host"),a=n({},i.options,{socket:e,servername:s?s.replace(/:.*$/,""):t.host}),c=o.connect(0,a);i.sockets[i.sockets.indexOf(e)]=c,r(c)}))}function r(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function n(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var i=Object.keys(n),o=0,s=i.length;s>o;++o){var a=i[o];void 0!==n[a]&&(e[a]=n[a])}}return e}if(Hs)return Js;Hs=1;var i,o=si,s=oi,a=ri,c=ai,u=ci;return Js.httpOverHttp=function(t){var r=new e(t);return r.request=s.request,r},Js.httpsOverHttp=function(r){var n=new e(r);return n.request=s.request,n.createSocket=t,n.defaultPort=443,n},Js.httpOverHttps=function(t){var r=new e(t);return r.request=a.request,r},Js.httpsOverHttps=function(r){var n=new e(r);return n.request=a.request,n.createSocket=t,n.defaultPort=443,n},u.inherits(e,c.EventEmitter),e.prototype.addRequest=function(e,t,i,o){var s=this,a=n({request:e},s.options,r(t,i,o));this.maxSockets>s.sockets.length?s.createSocket(a,(function(t){function r(){s.emit("free",t,a)}function n(e){s.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)})):s.requests.push(a)},e.prototype.createSocket=function(e,t){function r(r,n,a){var u;return c.removeAllListeners(),n.removeAllListeners(),200!==r.statusCode?(i("tunneling socket could not be established, statusCode=%d",r.statusCode),n.destroy(),(u=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):a.length>0?(i("got illegal response body from proxy"),n.destroy(),(u=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):(i("tunneling connection has established"),o.sockets[o.sockets.indexOf(s)]=n,t(n))}var o=this,s={};o.sockets.push(s);var a=n({},o.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(a.localAddress=e.localAddress),a.proxyAuth&&(a.headers=a.headers||{},a.headers["Proxy-Authorization"]="Basic "+new Buffer(a.proxyAuth).toString("base64")),i("making CONNECT request");var c=o.request(a);c.useChunkedEncodingByDefault=!1,c.once("response",(function(e){e.upgrade=!0})),c.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),c.once("connect",r),c.once("error",(function(t){c.removeAllListeners(),i("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=Error("tunneling socket could not be established, cause="+t.message);r.code="ECONNRESET",e.request.emit("error",r),o.removeSocket(s)})),c.end()},e.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},i=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},Js.debug=i,Js}()),Vs);(Ws=zs||(zs={}))[Ws.OK=200]="OK",Ws[Ws.MultipleChoices=300]="MultipleChoices",Ws[Ws.MovedPermanently=301]="MovedPermanently",Ws[Ws.ResourceMoved=302]="ResourceMoved",Ws[Ws.SeeOther=303]="SeeOther",Ws[Ws.NotModified=304]="NotModified",Ws[Ws.UseProxy=305]="UseProxy",Ws[Ws.SwitchProxy=306]="SwitchProxy",Ws[Ws.TemporaryRedirect=307]="TemporaryRedirect",Ws[Ws.PermanentRedirect=308]="PermanentRedirect",Ws[Ws.BadRequest=400]="BadRequest",Ws[Ws.Unauthorized=401]="Unauthorized",Ws[Ws.PaymentRequired=402]="PaymentRequired",Ws[Ws.Forbidden=403]="Forbidden",Ws[Ws.NotFound=404]="NotFound",Ws[Ws.MethodNotAllowed=405]="MethodNotAllowed",Ws[Ws.NotAcceptable=406]="NotAcceptable",Ws[Ws.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Ws[Ws.RequestTimeout=408]="RequestTimeout",Ws[Ws.Conflict=409]="Conflict",Ws[Ws.Gone=410]="Gone",Ws[Ws.TooManyRequests=429]="TooManyRequests",Ws[Ws.InternalServerError=500]="InternalServerError",Ws[Ws.NotImplemented=501]="NotImplemented",Ws[Ws.BadGateway=502]="BadGateway",Ws[Ws.ServiceUnavailable=503]="ServiceUnavailable",Ws[Ws.GatewayTimeout=504]="GatewayTimeout",(Ys=Xs||(Xs={})).Accept="accept",Ys.ContentType="content-type",(Ks||(Ks={})).ApplicationJson="application/json";const Zs=[zs.MovedPermanently,zs.ResourceMoved,zs.SeeOther,zs.TemporaryRedirect,zs.PermanentRedirect],ea=[zs.BadGateway,zs.ServiceUnavailable,zs.GatewayTimeout],ta=["OPTIONS","GET","DELETE","HEAD"];class ra extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,ra.prototype)}statusCode;result}class na{constructor(e){this.message=e}message;async readBody(){return new Promise((async e=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])})),this.message.on("end",(()=>{e(""+t)}))}))}async readBodyBuffer(){return new Promise((async e=>{const t=[];this.message.on("data",(e=>{t.push(e)})),this.message.on("end",(()=>{e(Buffer.concat(t))}))}))}}class ia{userAgent;handlers;requestOptions;_ignoreSslError=!1;_socketTimeout;_allowRedirects=!0;_allowRedirectDowngrade=!1;_maxRedirects=50;_allowRetries=!1;_maxRetries=1;_agent;_proxyAgent;_proxyAgentDispatcher;_keepAlive=!1;_disposed=!1;constructor(e,t,r){this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries))}async options(e,t){return this.request("OPTIONS",e,null,t||{})}async get(e,t){return this.request("GET",e,null,t||{})}async del(e,t){return this.request("DELETE",e,null,t||{})}async post(e,t,r){return this.request("POST",e,t,r||{})}async patch(e,t,r){return this.request("PATCH",e,t,r||{})}async put(e,t,r){return this.request("PUT",e,t,r||{})}async head(e,t){return this.request("HEAD",e,null,t||{})}async sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[Xs.Accept]=this._getExistingOrDefaultHeader(t,Xs.Accept,Ks.ApplicationJson);const r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xs.Accept]=this._getExistingOrDefaultHeader(r,Xs.Accept,Ks.ApplicationJson),r[Xs.ContentType]=this._getExistingOrDefaultHeader(r,Xs.ContentType,Ks.ApplicationJson);const i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xs.Accept]=this._getExistingOrDefaultHeader(r,Xs.Accept,Ks.ApplicationJson),r[Xs.ContentType]=this._getExistingOrDefaultHeader(r,Xs.ContentType,Ks.ApplicationJson);const i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xs.Accept]=this._getExistingOrDefaultHeader(r,Xs.Accept,Ks.ApplicationJson),r[Xs.ContentType]=this._getExistingOrDefaultHeader(r,Xs.ContentType,Ks.ApplicationJson);const i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const i=new URL(t);let o=this._prepareRequest(e,i,n);const s=this._allowRetries&&ta.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(o,r),a&&a.message&&a.message.statusCode===zs.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,o,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&Zs.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===i.protocol&&i.protocol!==c.protocol&&!this._allowRedirectDowngrade)throw Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(await a.readBody(),c.hostname!==i.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];o=this._prepareRequest(e,c,n),a=await this.requestRaw(o,r),t--}if(!a.message.statusCode||!ea.includes(a.message.statusCode))return a;c+=1,s>c&&(await a.readBody(),await this._performExponentialBackoff(c))}while(s>c);return a}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}async requestRaw(e,t){return new Promise(((r,n)=>{this.requestRawWithCallback(e,t,(function(e,t){e?n(e):t?r(t):n(Error("Unknown error"))}))}))}requestRawWithCallback(e,t,r){function n(e,t){i||(i=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let i=!1;const o=e.httpModule.request(e.options,(e=>{n(void 0,new na(e))}));let s;o.on("socket",(e=>{s=e})),o.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),o.on("error",(function(e){n(e)})),t&&"string"==typeof t&&o.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){o.end()})),t.pipe(o)):o.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=T(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i="https:"===n.parsedUrl.protocol;n.httpModule=i?ti:ii;const o=i?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},oa(this.requestOptions.headers),oa(e||{})):oa(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=oa(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=T(e),n=r&&r.hostname;if(this._keepAlive&&n&&(t=this._proxyAgent),n||(t=this._agent),t)return t;const i="https:"===e.protocol;let o=100;if(this.requestOptions&&(o=this.requestOptions.maxSockets||ii.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=i?s?Qs.httpsOverHttps:Qs.httpsOverHttp:s?Qs.httpOverHttps:Qs.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=i?new ti.Agent(e):new ii.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}async _getProxyAgentDispatcher(e,t){let r;if(this._keepAlive&&(r=this._proxyAgentDispatcher),r)return r;const n="https:"===e.protocol;return r=new(await import("./assets/proxy-agent-BmRoX2ZW.mjs").then((e=>e.p)))({uri:t.href,pipelining:this._keepAlive?1:0,...(t.username||t.password)&&{token:"Basic "+Buffer.from(`${t.username}:${t.password}`).toString("base64")}}),this._proxyAgentDispatcher=r,n&&this._ignoreSslError&&(r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:!1})),r}async _performExponentialBackoff(e){const t=5*Math.pow(2,e=Math.min(10,e));return new Promise((e=>setTimeout((()=>e()),t)))}async _processResponse(e,t){return new Promise((async(r,n)=>{const i=e.message.statusCode||0,o={statusCode:i,result:null,headers:{}};let s,a;i===zs.NotFound&&r(o);try{a=await e.readBody(),a&&a.length>0&&(s=t&&t.deserializeDates?JSON.parse(a,(function(e,t){if("string"==typeof t){const e=new Date(t);if(!isNaN(e.valueOf()))return e}return t})):JSON.parse(a),o.result=s),o.headers=e.message.headers}catch(c){}if(i>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${i})`;const t=new ra(e,i);t.result=o.result,n(t)}else r(o)}))}}const oa=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),sa=n(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return Xs},HttpClient:ia,HttpClientError:ra,HttpClientResponse:na,get HttpCodes(){return zs},get MediaTypes(){return Ks},getProxyUrl:function(e){const t=T(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var aa,ca,ua,la,fa,pa,da,ha,ma,ya,va={},wa={},ga={},Ea={},_a={},ba={},Sa={},Oa={},Ra=k();const{GITHUB_ACTIONS:Ia}=As;var Pa,xa,Ta,Na,$a,Ca,Aa,La,ka,Da,Fa,ja,Ua,Ma,Ga,Ba,Ha,Va,qa,za,Wa,Xa,Ya,Ka={exports:{}},Ja={exports:{}},Qa={};const Za=r(function(){function e(e,i,o){const s=r(e,i,o),a=t.spawn(s.command,s.args,s.options);return n.hookChildProcess(a,s),a}if(Ya)return Ka.exports;Ya=1;const t=li,r=G(),n=function(){function e(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function t(t,n){return r&&1===t&&!n.file?e(n.original,"spawn"):null}if(Xa)return Wa;Xa=1;const r="win32"===process.platform;return Wa={hookChildProcess:function(e,n){if(!r)return;const i=e.emit;e.emit=function(r,o){if("exit"===r){const r=t(o,n);if(r)return i.call(e,"error",r)}return i.apply(e,arguments)}},verifyENOENT:t,verifyENOENTSync:function(t,n){return r&&1===t&&!n.file?e(n.original,"spawnSync"):null},notFoundError:e},Wa}();return Ka.exports=e,Ka.exports.spawn=e,Ka.exports.sync=function(e,i,o){const s=r(e,i,o),a=t.spawnSync(s.command,s.args,s.options);return a.error=a.error||n.verifyENOENTSync(a.status,s),a},Ka.exports._parse=r,Ka.exports._enoent=n,Ka.exports}()),ec=({env:e=vi.env,...t}={})=>{const r=B({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=vi.cwd(),path:t=vi.env[B()],preferLocal:r=!0,execPath:n=vi.execPath,addExecPath:i=!0}={})=>{const o=e instanceof URL?wi(e):e,s=hi.resolve(o),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(hi.join(t,"node_modules/.bin")),r=t,t=hi.resolve(t,"..")})(a,s),i&&((e,t,r)=>{const n=t instanceof URL?wi(t):t;e.push(hi.resolve(r,n,".."))})(a,n,s),[...a,t].join(hi.delimiter)})(t),e},tc=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);!rc(i,o)&&n||Object.defineProperty(e,r,o)},rc=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},nc=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ic=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),oc=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),sc=new WeakMap,ac=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",o=function(...s){if(sc.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`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))tc(e,t,i,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,i=nc.bind(null,n,""+t);Object.defineProperty(i,"name",oc),Object.defineProperty(e,"toString",{...ic,value:i})})(e,t,n)}(o,e),sc.set(o,n),o};ac.callCount=e=>{if(!sc.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return sc.get(e)};const cc=(e,t)=>({name:"SIGRT"+(t+1),number:uc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),uc=34,lc=[{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"}],fc=()=>{const e=Array.from({length:64-uc+1},cc);return[...lc,...e].map(pc)},pc=({name:e,number:t,description:r,action:n,forced:i=!1,standard:o})=>{const{signals:{[e]:s}}=Ei,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:i,standard:o}},dc=({name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s}],hc=(()=>{const e=fc();return Object.fromEntries(e.map(dc))})(),mc=(e,t)=>{const r=t.find((({name:t})=>Ei.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=fc(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=mc(e,t);if(void 0===r)return{};const{name:n,description:i,supported:o,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const yc=({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:f,cwd:p=vi.cwd()}}})=>{const d=void 0===(i=null===i?void 0:i)?void 0:hc[i].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${i})`:void 0!==o?"failed with exit code "+o:"failed")({timedOut:c,timeout:f,errorCode:n&&n.code,signal:i,signalDescription:d,exitCode:o=null===o?void 0:o,isCanceled:u}),m=`Command ${h}: ${s}`,y="[object Error]"==={}.toString.call(n),v=y?`${m}\n${n.message}`:m,w=[v,t,e].filter(Boolean).join("\n");return y?(n.originalMessage=n.message,n.message=w):n=Error(w),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=p,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=u,n.killed=l&&!c,n},vc=["stdin","stdout","stderr"];var wc,gc,Ec={exports:{}},_c={exports:{}};const bc=r(function(){if(gc)return Ec.exports;gc=1;var e=Rs.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=fi,i=(wc||(wc=1,(y=_c).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&y.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&y.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),_c.exports),o=/^win/i.test(e.platform),s=ai;"function"!=typeof s&&(s=s.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new s).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),Ec.exports=function(e,i){if(!t(Rs.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===l&&f();var o="exit";return i&&i.alwaysLast&&(o="afterexit"),r.on(o,e),function(){r.removeListener(o,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&a()}};var a=function(){l&&t(Rs.process)&&(l=!1,i.forEach((function(t){try{e.removeListener(t,u[t])}catch(r){}})),e.emit=h,e.reallyExit=p,r.count-=1)};Ec.exports.unload=a;var c=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},u={};i.forEach((function(n){u[n]=function(){t(Rs.process)&&e.listeners(n).length===r.count&&(a(),c("exit",null,n),c("afterexit",null,n),o&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}})),Ec.exports.signals=function(){return i};var l=!1,f=function(){!l&&t(Rs.process)&&(l=!0,r.count+=1,i=i.filter((function(t){try{return e.on(t,u[t]),!0}catch(r){return!1}})),e.emit=m,e.reallyExit=d)};Ec.exports.load=f;var p=e.reallyExit,d=function(r){t(Rs.process)&&(e.exitCode=r||0,c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),p.call(e,e.exitCode))},h=e.emit,m=function(r,n){if("exit"===r&&t(Rs.process)){void 0!==n&&(e.exitCode=n);var i=h.apply(this,arguments);return c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),i}return h.apply(this,arguments)}}else Ec.exports=function(){return function(){}};var y;return Ec.exports}()),Sc=(e,t="SIGTERM",r={})=>{const n=e(t);return Oc(e,t,r,n),n},Oc=(e,t,r,n)=>{if(!Rc(t,r,n))return;const i=Pc(r),o=setTimeout((()=>{e("SIGKILL")}),i);o.unref&&o.unref()},Rc=(e,{forceKillAfterTimeout:t},r)=>Ic(e)&&!1!==t&&r,Ic=e=>e===gi.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Pc=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},xc=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Tc=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(bi(r)),e;if(V(r))return e[t].pipe(r),e;if(!(e=>e instanceof yi&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!V(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Nc,$c,Cc,Ac={exports:{}};const Lc=r(function(){async function e(e,r){if(!e)throw Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,a=i(r);return await new Promise(((r,i)=>{const c=e=>{e&&a.getBufferedLength()<=t.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),i(e)};(async()=>{try{await o(e,a),r()}catch(t){c(t)}})(),a.on("data",(()=>{a.getBufferedLength()>n&&c(new s)}))})),a.getBufferedValue()}if(Cc)return Ac.exports;Cc=1;const{constants:t}=Ii,r=Pi,{promisify:n}=ci,i=function(){if($c)return Nc;$c=1;const{PassThrough:e}=Pi;return Nc=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const i="buffer"===n;let o=!1;r?o=!(n||i):n=n||"utf8",i&&(n=null);const s=new e({objectMode:o});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",(e=>{c.push(e),o?a=c.length:a+=e.length})),s.getBufferedValue=()=>r?c:i?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}}(),o=n(r.pipeline);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}return Ac.exports=e,Ac.exports.buffer=(t,r)=>e(t,{...r,encoding:"buffer"}),Ac.exports.array=(t,r)=>e(t,{...r,array:!0}),Ac.exports.MaxBufferError=s,Ac.exports}());var kc,Dc;const Fc=r(function(){if(Dc)return kc;Dc=1;const{PassThrough:e}=Pi;return kc=function(){function t(e){return Array.isArray(e)?(e.forEach(t),this):(n.push(e),e.once("end",r.bind(null,e)),e.once("error",i.emit.bind(i,"error")),e.pipe(i,{end:!1}),this)}function r(e){!(n=n.filter((function(t){return t!==e}))).length&&i.readable&&i.end()}var n=[],i=new e({objectMode:!0});return i.setMaxListeners(0),i.add=t,i.isEmpty=function(){return 0==n.length},i.on("unpipe",r),[].slice.call(arguments).forEach(t),i}}()),jc=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Uc=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Mc=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Lc(e,{encoding:t,maxBuffer:n}):Lc.buffer(e,{maxBuffer:n})},Gc=(async()=>{})().constructor.prototype,Bc=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Gc,e)])),Hc=(e,t)=>{for(const[r,n]of Bc){const i="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}},Vc=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],qc=/^[\w.-]+$/,zc=/"/g,Wc=(e,t)=>Vc(e,t).join(" "),Xc=(e,t)=>Vc(e,t).map((e=>(e=>"string"!=typeof e||qc.test(e)?e:`"${e.replace(zc,'\\"')}"`)(e))).join(" "),Yc=/ +/g,Kc=e=>{const t=[];for(const r of e.trim().split(Yc)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},Jc=xi("execa").enabled,Qc=(e,t)=>(e+"").padStart(t,"0"),Zc=(e,{verbose:t})=>{t&&vi.stderr.write(`[${(()=>{const e=new Date;return`${Qc(e.getHours(),2)}:${Qc(e.getMinutes(),2)}:${Qc(e.getSeconds(),2)}.${Qc(e.getMilliseconds(),3)}`})()}] ${e}\n`)},eu=(e,t,r={})=>{const n=Za._parse(e,t,r);return e=n.command,t=n.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=n.options).cwd||vi.cwd(),execPath:vi.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Jc,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{const o=t?{...vi.env,...e}:e;return r?ec({env:o,cwd:n,execPath:i}):o})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return vc.map((t=>e[t]));if((e=>vc.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+vc.map((e=>`\`${e}\``)).join(", "));if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);return Array.from({length:Math.max(t.length,vc.length)},((e,r)=>t[r]))})(r),"win32"===vi.platform&&"cmd"===hi.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},tu=(e,t,r)=>"string"==typeof t||di.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\r":13;return e[e.length-1]===("string"==typeof e?"\n":10)&&(e=e.slice(0,-1)),e[e.length-1]===t&&(e=e.slice(0,-1)),e}(t):t:void 0===r?void 0:"";var ru,nu,iu,ou,su,au,cu={},uu={},lu={},fu={};const pu=r(function(){if(au)return su;au=1;const{isexe:e,sync:t}=W(),{join:r,delimiter:n,sep:i,posix:o}=Fn,s="win32"===process.platform,a=RegExp(`[${o.sep}${i===o.sep?"":i}]`.replace(/(\\)/g,"\\$1")),c=RegExp("^\\."+a.source),u=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),l=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:i=n})=>{const o=e.match(a)?[""]:[...s?[process.cwd()]:[],...(t||"").split(i)];if(s){const t=r||[".EXE",".CMD",".BAT",".COM"].join(i),n=t.split(i).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==n[0]&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},f=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&c.test(t)?t.slice(0,2):"")+r(n,t)},p=async(t,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(t,r),s=[];for(const a of n){const n=f(a,t);for(const t of i){const i=n+t;if(await e(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(t)};return su=p,p.sync=(e,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(e,r),s=[];for(const a of n){const n=f(a,e);for(const e of i){const i=n+e;if(t(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(e)},su}());let du;var hu,mu={};Y(mu,"hasSudo",(()=>K)),Y(mu,"isRoot",(()=>J)),Y(mu,"isSudo",(()=>Q)),Y(mu,"prependSudo",(()=>Z)),Y(mu,"defaultExecOptions",(()=>yu)),Y(mu,"execRootSync",(()=>ee)),Y(mu,"execRoot",(()=>te));let yu={stdio:"inherit",shell:!0};Y(hu={},"isAdminWindows",(()=>vu)),Y(hu,"isAdminPosix",(()=>wu)),Y(hu,"isAdmin",(()=>ie));let vu=async function(){if("win32"!==process.platform)return!1;try{return await q("fsutil",["dirty","query",process.env.systemdrive??""]),!0}catch(e){return"ENOENT"===e.code&&async function(){try{return await q("fltmc"),!0}catch{return!1}}()}},wu=J;var gu,Eu,_u,bu,Su,Ou,Ru,Iu,Pu,xu,Tu,Nu,$u,Cu,Au,Lu,ku,Du,Fu,ju,Uu,Mu,Gu,Bu,Hu,Vu;Y({},"grantUserWriteAccess",(()=>oe));var qu,zu,Wu,Xu,Yu,Ku,Ju,Qu,Zu,el,tl,rl,nl,il,ol,sl,al,cl,ul,ll,fl,pl,dl,hl,ml,yl,vl,wl,gl,El,_l,bl,Sl,Ol,Rl,Il,Pl,xl,Tl,Nl,$l,Cl,Al,Ll,kl,Dl,Fl,jl,Ul,Ml,Gl,Bl,Hl,Vl,ql,zl,Wl,Xl,Yl,Kl,Jl,Ql,Zl,ef,tf,rf,nf,of,sf,af,cf,uf,lf,ff,pf,df,hf,mf,yf,vf,wf,gf,Ef,_f,bf,Sf,Of,Rf,If,Pf,xf,Tf,Nf,$f,Cf,Af,Lf,kf,Df,Ff,jf,Uf,Mf,Gf,Bf,Hf,Vf,qf,zf,Wf,Xf,Yf,Kf,Jf,Qf,Zf,ep,tp,rp,np,ip,op,sp,ap,cp,up,lp,fp,pp,dp,hp={},mp={exports:{}},yp={exports:{}},vp={exports:{}},wp={exports:{}},gp={},Ep={},_p={exports:{}},bp={},Sp={},Op={},Rp={};const Ip=r(function(){if(dp)return pp;dp=1;var e=ae(),t=ue(),r=function(){if(wf)return vf;wf=1;var e=le(),t=pe(),r=de(),n=Oe(),i=ue();return vf=function o(s){var a,c,u;if(e(s),(a=Object(arguments[1])).async&&a.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(s,"__memoized__")&&!a.force?s:(c=i(a.length,s.length,a.async&&r.async),u=n(s,c,a),t(r,(function(e,t){a[t]&&e(a[t],u,a)})),o.__profiler__&&o.__profiler__(u),u.updateEnv(),u.memoized)},vf}();return pp=function(n){var i,o=e(arguments[1]);return o.normalizer||0!==(i=o.length=t(o.length,n.length,o.async))&&(o.primitive?!1===i?o.normalizer=Ef?gf:(Ef=1,gf=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}):i>1&&(o.normalizer=(bf?_f:(bf=1,_f=function(e){return e?function(t){for(var r=t[0]+"",n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}))(i)):o.normalizer=!1===i?function(){if(Cf)return $f;Cf=1;var e=Re(),t=Object.create;return $f=function(){var r=0,n=[],i=t(null);return{get:function(t){var r,i=0,o=n,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(-1===(r=e.call(o[0],t[i])))return null;o=o[1][r],++i}return-1===(r=e.call(o[0],t[i]))?null:o[1][r]||null}return null},set:function(t){var o,s=0,a=n,c=t.length;if(0===c)a[c]=++r;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][o],++s;-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1),a[1][o]=++r}return i[r]=t,r},delete:function(t){var r,o=0,s=n,a=i[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(-1===(r=e.call(s[0],a[o])))return;u.push(s,r),s=s[1][r],++o}if(-1===(r=e.call(s[0],a[o])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&u.length;)r=u.pop(),(s=u.pop())[0].splice(r,1),s[1].splice(r,1)}delete i[t]},clear:function(){n=[],i=t(null)}}}}()():1===i?function(){if(Lf)return Af;Lf=1;var e=Re();return Af=function(){var t=0,r=[],n=[];return{get:function(t){var i=e.call(r,t[0]);return-1===i?null:n[i]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var i=e.call(n,t);-1!==i&&(r.splice(i,1),n.splice(i,1))},clear:function(){r=[],n=[]}}}}()():function(){if(Df)return kf;Df=1;var e=Re(),t=Object.create;return kf=function(r){var n=0,i=[[],[]],o=t(null);return{get:function(t){for(var n,o=0,s=i;r-1>o;){if(-1===(n=e.call(s[0],t[o])))return null;s=s[1][n],++o}return-1===(n=e.call(s[0],t[o]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=i;r-1>a;)-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1),c[1][s]=++n,o[n]=t,n},delete:function(t){for(var n,s=0,a=i,c=[],u=o[t];r-1>s;){if(-1===(n=e.call(a[0],u[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],u[s]))){for(t=a[1][n],a[0].splice(n,1),a[1].splice(n,1);!a[0].length&&c.length;)n=c.pop(),(a=c.pop())[0].splice(n,1),a[1].splice(n,1);delete o[t]}},clear:function(){i=[[],[]],o=t(null)}}}}()(i)),o.async&&function(){if(Gf)return gp;Gf=1;var e=Se(),t=Ie(),r=me(),n=ye(),i=Pe(),o=[].slice,s=function(){}.apply,a=Object.create;de().async=function(c,u){var l,f,p,d=a(null),h=a(null),m=u.memoized,y=u.original;u.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(l=r,t=o.call(t,0,-1)),m.apply(f=this,p=t)}),m);try{r(u.memoized,m)}catch(v){}u.on("get",(function(e){var t,r,n;if(l){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],l]:d[e].push(l),void(l=null);t=l,r=f,n=p,l=f=p=null,i((function(){var i;hasOwnProperty.call(h,e)?(i=h[e],u.emit("getasync",e,n,r),s.call(t,i.context,i.args)):(l=t,f=r,p=n,m.apply(r,n))}))}})),u.original=function(){var t,r,n,o;return l?(t=e(arguments),r=function t(r){var n,a,c=t.id;if(null!=c){if(delete t.id,n=d[c],delete d[c],n)return a=e(arguments),u.has(c)&&(r?u.delete(c):(h[c]={context:this,args:a},u.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?o=s.call(n,this,a):n.forEach((function(e){o=s.call(e,this,a)}),this),o}else i(s.bind(t,this,arguments))},n=l,l=f=p=null,t.push(r),o=s.call(y,this,t),r.cb=n,l=r,o):s.call(y,this,arguments)},u.on("set",(function(e){l?(d[e]?"function"==typeof d[e]?d[e]=[d[e],l.cb]:d[e].push(l.cb):d[e]=l.cb,delete l.cb,l.id=e,l=null):u.delete(e)})),u.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],u.emit("deleteasync",e,o.call(t.args,1)))})),u.on("clear",(function(){var e=h;h=a(null),u.emit("clearasync",t(e,(function(e){return o.call(e.args,1)})))}))}}(),o.promise&&Ne(),o.dispose&&function(){if(rp)return bp;rp=1;var e=le(),t=pe(),r=de(),n=function(){}.apply;r.dispose=function(i,o,s){var a;if(e(i),s.async&&r.async||s.promise&&r.promise)return o.on("deleteasync",a=function(e,t){n.call(i,null,t)}),void o.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));o.on("delete",a=function(e,t){i(t)}),o.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),o.maxAge&&function(){if(ap)return Sp;ap=1;var e=Se(),t=pe(),r=Pe(),n=Te(),i=function(){if(sp)return op;sp=1;var e=ce(),t=ip?np:(ip=1,np=2147483647);return op=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),o=de(),s=Function.prototype,a=Math.max,c=Math.min,u=Object.create;o.maxAge=function(l,f,p){var d,h,m,y;(l=i(l))&&(d=u(null),f.on("set"+(h=p.async&&o.async||p.promise&&o.promise?"async":""),(function(e){d[e]=setTimeout((function(){f.delete(e)}),l),"function"==typeof d[e].unref&&d[e].unref(),y&&(y[e]&&"nextTick"!==y[e]&&clearTimeout(y[e]),y[e]=setTimeout((function(){delete y[e]}),m),"function"==typeof y[e].unref&&y[e].unref())})),f.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],y&&("nextTick"!==y[e]&&clearTimeout(y[e]),delete y[e])})),p.preFetch&&(m=!0===p.preFetch||isNaN(p.preFetch)?.333:a(c(Number(p.preFetch),1),0))&&(y={},m=(1-m)*l,f.on("get"+h,(function(t,i,o){y[t]||(y[t]="nextTick",r((function(){var r;"nextTick"===y[t]&&(delete y[t],f.delete(t),p.async&&(i=e(i)).push(s),r=f.memoized.apply(o,i),p.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),f.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},y&&(t(y,(function(e){"nextTick"!==e&&clearTimeout(e)})),y={})})))}}(),o.max&&function(){if(lp)return Op;lp=1;var e=ce(),t=function(){if(up)return cp;up=1;var e=ce(),t=Object.create,r={}.hasOwnProperty;return cp=function(n){var i,o=0,s=1,a=t(null),c=t(null),u=0;return n=e(n),{hit:function(e){var t=c[e],l=++u;if(a[l]=e,c[e]=l,!t){if(++o,n>=o)return;return i(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:i=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--o,s===t)){if(!o)return u=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){o=0,s=1,a=t(null),c=t(null),u=0}}}}(),r=de();r.max=function(n,i,o){var s,a,c;(n=e(n))&&(a=t(n),i.on("set"+(s=o.async&&r.async||o.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&i.delete(e)}),i.on("get"+s,c),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))}}(),o.refCounter&&function(){if(fp)return Rp;fp=1;var e=ge(),t=de(),r=Object.create,n=Object.defineProperties;t.refCounter=function(i,o,s){var a,c;a=r(null),o.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),o.on("get"+c,(function(e){++a[e]})),o.on("delete"+c,(function(e){delete a[e]})),o.on("clear"+c,(function(){a={}})),n(o.memoized,{deleteRef:e((function(){var e=o.get(arguments);return null===e?null:a[e]?! --a[e]&&(o.delete(e),!0):null})),getRefCount:e((function(){var e=o.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),r(n,o)}}()),Pp=/^~(?=$|\/|\\)/,{appendFile:xp,readFile:Tp,writeFile:Np}=Yn,$p=Ce("~/.bashrc"),Cp=Ip((async function(e){const t=void 0===e.guard?`\nsource "${e.rcPath}"\n`:`\n# ${e.guard}\nif [[ "$SOURCE_${e.guard.toUpperCase()}RC" != 0 && -f "${e.rcPath}" ]]; then source "${e.rcPath}"; fi\n`;try{await Promise.all([Ae(e),Le(t,Ce("~/.bashrc")),Le(t,Ce("~/.profile"))])}catch(r){F(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0});var Ap,Lp;const kp=r(function(){if(Lp)return Ap;Lp=1;const e=Ln,t="win32"!==e.platform(),r=e.release(),n=/(\d+\.\d+)\.(\d+)/;return Ap=function(e){return t?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...n.exec(r).splice(1))?e:e.replace(/(\s+)/g,"%20")}}());var Dp,Fp,jp,Up,Mp,Gp={exports:{}};const Bp=r((jp||(jp=1,Up=function(){if(Fp)return Dp;Fp=1;var e=/[|\\{}()[\]^$+*?.]/g;return Dp=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Mp=function(e){return e.split("").reverse().join("")},Gp.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Up(t)+"])(?!"+Up(r)+")","g"),Mp(Mp(e).replace(n,"$1"+r)))}),Gp.exports)),{GITHUB_ACTIONS:Hp}=As,{appendFile:Vp}=Yn,{GITHUB_ACTIONS:qp}=As,{appendFile:zp}=Yn,Wp=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Xp,Yp,Kp,Jp={exports:{}};const Qp=r(Ge());var Zp;const ed=r((Zp||(Zp=1,Me().addLocale("en",(function(e){var t=Math.floor(Math.abs(e)),r=(""+e).replace(/^[^.]*\.?/,"").length;return"string"==typeof e&&(e=parseInt(e,10)),1===t&&0===r?"one":"other"}))),{}));var td,rd,nd,id,od,sd={exports:{}};const ad=r(od?id:(od=1,id=function(){function e(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;s[e]=r}}function t(e,t,n){const i=function(e){const t=s[e.locale];let r=e.unitTypeLookupOrder.slice();r.unshift(e.unitType),r=Array.from(new Set(r));let n=null;if(r.some((function(e){if(void 0!==t[e])return n=t[e],!0})),null===n)throw Error("Can not find any unit type data for locale: "+e.locale);return n}(n);return r.pluralize(n.locale,t,i[e]).replace("{0}",t)}if(nd)return rd;nd=1;const r=Ge(),n=td?sd.exports:(td=1,sd.exports=!("undefined"==typeof process||!process.versions||!process.versions.node)),i=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],o={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},s={};return rd={create:function(r){return r=Object.assign({},o,r||{}),{format:function(o,a,c){return function(r,o,a){if(function(t,r){const{autoload:i}=r;if(!s[t]){if(!n||!i)throw Error(`Missing locale: ${t}, you must load it manually before using it`);!function(t){try{e(Ue(`../locales/${t}.js`))}catch(r){throw Error(`Failed to load locale: ${t} from ../locales/${t}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${r}`)}}(t)}}(a.locale,{autoload:a.autoloadLocales}),!r)throw Error("Missing first date argument");if(!o)throw Error("Missing second date argument");const c=function(e,t){let r=t-e;const n=[];return i.some((function(e){const t=e[0],i=e[1],o=Math.floor(r/i);if(r-=o*i,n.push([t,o]),0>=r)return!0})),n}(r,o),u=[];for(const e of c){const[r,n]=e;if(n>0&&u.push(t(r,n,a)),u.length>=a.span)break}return u.join(a.delimiter)}(o,a,c=Object.assign({},r,c||{}))}}},addLocale:e,defaultConfig:o}}()));var cd,ud;const ld=r(ud?cd:(ud=1,cd={id:"en",data:{long:{years:{one:"{0} year",other:"{0} years"},months:{one:"{0} month",other:"{0} months"},weeks:{one:"{0} week",other:"{0} weeks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hour",other:"{0} hours"},minutes:{one:"{0} minute",other:"{0} minutes"},seconds:{one:"{0} second",other:"{0} seconds"}},narrow:{years:{one:"{0}y",other:"{0}y"},months:{one:"{0}m",other:"{0}m"},weeks:{one:"{0}w",other:"{0}w"},days:{one:"{0}d",other:"{0}d"},hours:{one:"{0}h",other:"{0}h"},minutes:{one:"{0}m",other:"{0}m"},seconds:{one:"{0}s",other:"{0}s"}},short:{years:{one:"{0} yr",other:"{0} yrs"},months:{one:"{0} mth",other:"{0} mths"},weeks:{one:"{0} wk",other:"{0} wks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hr",other:"{0} hr"},minutes:{one:"{0} min",other:"{0} min"},seconds:{one:"{0} sec",other:"{0} sec"}}}})),fd=r(f());var pd,dd;const hd=r(function(){if(dd)return pd;dd=1;var e=Fn;return pd=function(t,r){if("string"!=typeof t)return t;if(0===t.length)return t;var n,i=e.basename(t,e.extname(t))+r,o=e.join(e.dirname(t),i);return(n=t.slice(0,2))==="."+e.sep||"./"===n?"."+e.sep+o:o}}());var md={},yd={};Ve(yd,"name",(()=>qe));var vd={};Ve(vd,"normalizeTrim",(()=>ze));var wd={};Ve(wd,"addExeExt",(()=>We));var gd={};Ve(gd,"addNamePrefix",(()=>Xe));var Ed={};Ve(Ed,"addNameSuffix",(()=>Ye));var _d={};Ve(_d,"addShExt",(()=>Ke));var bd={};Ve(bd,"addShRelativePrefix",(()=>Je));var Sd={};Ve(Sd,"removeExt",(()=>Qe));var Od={};Ve(Od,"replaceExt",(()=>Ze));var Rd={};Ve(Rd,"isPathInside",(()=>et)),He(md,yd),He(md,vd),He(md,wd),He(md,gd),He(md,Ed),He(md,_d),He(md,bd),He(md,Sd),He(md,Od),He(md,Rd);const Id=r(p()),Pd=Ip((async function(){if(!tt())return!1;try{return await pu("apk"),!0}catch{return!1}}),{promise:!0}),xd=Ip((async function(){await q("apk",["update"],{stdio:"inherit"})}),{promise:!0}),Td=Ip((async function(){const e=await nt([{name:"bash"}]);0!==e.length&&ee("apk",["add",...e],{...yu})}),{promise:!0}),{GITHUB_ACTIONS:Nd}=As,{appendFile:$d}=Yn;var Cd,Ad={},Ld=(Cd||(Cd=1,function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r,n=0;t.length>n;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=t(Xn),s=Di,a=t(Fn),c=t(oi),u=t(ri),l=ai,f=e.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"};e.DownloaderHelper=function(e){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return o.__validate(e,n)?(o.url=o.requestURL=e.trim(),o.state=f.IDLE,o.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},o.__opts=Object.assign({},o.__defaultOpts),o.__pipes=[],o.__total=0,o.__downloaded=0,o.__progress=0,o.__retryCount=0,o.__retryTimeout=null,o.__resumeRetryCount=0,o.__states=f,o.__promise=null,o.__request=null,o.__response=null,o.__isAborted=!1,o.__isResumed=!1,o.__isResumable=!1,o.__isRedirected=!1,o.__destFolder=n,o.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},o.__fileName="",o.__filePath="",o.updateOptions(i),o):r(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(){var e=this,t=function(){return new Promise((function(t,r){e.__promise={resolve:t,reject:r},e.__start()}))};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then((function(r){var n=r.name,i=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&o.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===i?t():e.resumeFromFile(e.__filePath,{total:i,fileName:n}):t()})):t()}},{key:"pause",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return e.__setState(e.__states.PAUSED),e.emit("pause"),!0})))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__requestAbort(),this.__closeFileStream().then((function(){return e.__opts.removeOnStop?new Promise((function(t,r){o.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void o.unlink(e.__filePath,(function(n){return n?(e.__setState(e.__states.FAILED),e.emit("error",n),r(n)):(e.__emitStop(),void t(!0))}))}))})):(e.__emitStop(),Promise.resolve(!0))})))}},{key:"pipe",value:function(e){return this.__pipes.push({stream:e,options:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null}),e}},{key:"unpipe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=function(t){return e.__response?e.__response.unpipe(t):t.unpipe()};t?this.__pipes.find((function(e){return e.stream===t}))&&(r(t),this.__pipes=this.__pipes.filter((function(e){return e.stream!==t}))):(this.__pipes.forEach((function(e){return r(e.stream)})),this.__pipes=[])}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.__opts=Object.assign({},this.__opts,e),this.__headers=this.__opts.headers,this.__opts.timeout>-1&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),("number"!=typeof this.__opts.progressThrottle||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=t||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var e=this;return new Promise((function(t,r){var n=function(t){e.__initProtocol(t);var r=Object.assign({},e.__headers);r.hasOwnProperty("range")&&delete r.range;var n=e.__getReqOptions("HEAD",t,r);return Object.assign({},e.__reqOptions,n)},i=function(o,a){var c=e.__protocol.request(a,(function(a){if(e.__isRequireRedirect(a)){var c=/^https?:\/\//.test(a.headers.location)?a.headers.location:new s.URL(a.headers.location,o).href;return e.emit("redirected",c,o),i(c,n(c))}return 200===a.statusCode?void t({name:e.__getFileNameFromHeaders(a.headers,a),total:parseInt(a.headers["content-length"])||null}):r(Error("Response status was "+a.statusCode))}));c.on("error",(function(e){return r(e)})),c.on("timeout",(function(){return r(Error("timeout"))})),c.on("uncaughtException",(function(e){return r(e)})),c.end()};i(e.url,n(e.url))}))}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=e,(r.total&&r.fileName?Promise.resolve({name:r.fileName,total:r.total}):this.getTotalSize()).then((function(e){var n=e.name;return t.__total=r.total||e.total,t.__fileName=r.fileName||n,t.__downloaded=r.downloaded||t.__getFilesizeInBytes(t.__filePath),t.__reqOptions.headers.range="bytes="+t.__downloaded+"-",t.__isResumed=!0,t.__isResumable=!0,t.__setState(t.__states.RESUMED),t.emit("resume",t.__isResumed),new Promise((function(e,r){t.__promise={resolve:e,reject:r},t.__start()}))}))}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var e=this.__promise.resolve;return this.__promise=null,e(!0)}}},{key:"__downloadRequest",value:function(e,t){var r=this;return this.__protocol.request(this.__reqOptions,(function(n){if(r.__response=n,r.__isResumed||(r.__total=parseInt(n.headers["content-length"])||null,r.__resetStats()),r.__isRequireRedirect(n)){var i=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(i),r.emit("redirected",i,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var o=Error("Response status was "+n.statusCode);return o.status=n.statusCode||0,o.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",o),t(o)}(r.__opts.forceResume||n.headers.hasOwnProperty("accept-ranges")&&"none"!==n.headers["accept-ranges"])&&(r.__isResumable=!0),r.__startDownload(n,e,t)}))}},{key:"__startDownload",value:function(e,t,r){var i=this,s=e;if(this.__isResumed)this.__fileStream=o.createWriteStream(this.__filePath,{flags:"a"});else{var c=this.__getFileNameFromHeaders(e.headers);if(this.__filePath=this.__getFilePath(c),this.__fileName=this.__filePath.split(a.sep).pop(),o.existsSync(this.__filePath)){var u=this.__getFilesizeInBytes(this.__filePath),l=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||u>=l))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:u}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=o.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",(function(e){return i.__calculateStats(e.length)})),this.__pipes.forEach((function(e){s.pipe(e.stream,e.options),s=e.stream})),s.pipe(this.__fileStream),s.on("error",this.__onError(t,r)),this.__fileStream.on("finish",this.__onFinished(t,r)),this.__fileStream.on("error",this.__onError(t,r))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&-1===[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)}},{key:"__isRequireRedirect",value:function(e){return e.statusCode>300&&400>e.statusCode&&e.headers.hasOwnProperty("location")&&e.headers.location}},{key:"__onFinished",value:function(e,t){var r=this;return function(){r.__fileStream.close((function(n){if(n)return t(n);if(r.__hasFinished()){var i=!!r.__total&&r.__downloaded!==r.__total;if(i&&r.__isResumable&&r.__opts.resumeOnIncomplete&&r.__opts.resumeOnIncompleteMaxRetry>=r.__resumeRetryCount)return r.__resumeRetryCount++,r.emit("warning",Error("uncomplete download, retrying")),r.resume();r.__setState(r.__states.FINISHED),r.__pipes=[],r.emit("end",{fileName:r.__fileName,filePath:r.__filePath,totalSize:r.__total,incomplete:i,onDiskSize:r.__getFilesizeInBytes(r.__filePath),downloadedSize:r.__downloaded})}return e(r.__downloaded===r.__total)}))}}},{key:"__closeFileStream",value:function(){var e=this;return this.__fileStream?new Promise((function(t,r){e.__fileStream.close((function(e){return e?r(e):t(!0)}))})):Promise.resolve(!0)}},{key:"__onError",value:function(e,t){var r=this,n=!(2>=arguments.length||void 0===arguments[2])&&arguments[2];return function(e){return r.__pipes=[],n&&r.__requestAbort(),r.state===r.__states.STOPPED||r.state===r.__states.FAILED?void 0:r.__opts.retry?r.__retry(e).catch((function(n){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",n||e),t(n||e)}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",e),t(e)}))}}},{key:"__retry",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.__opts.retry||"object"!==n(this.__opts.retry))return Promise.reject(t||Error("wrong retry options"));var r=this.__opts.retry,i=r.delay,o=void 0===i?0:i,s=r.maxRetries;return(void 0===s?999:s)>this.__retryCount?(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,t),this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return new Promise((function(t){return e.__retryTimeout=setTimeout((function(){return t(e.__downloaded>0?e.resume():e.__start())}),o)}))}))):Promise.reject(t||Error("reached the maximum retries"))}},{key:"__onTimeout",value:function(e,t){var r=this;return function(){return r.__requestAbort(),r.__opts.retry?r.__retry(Error("timeout")).catch((function(e){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),e?t(e):(r.emit("timeout"),t(Error("timeout")))}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("timeout"),t(Error("timeout"))}))}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(e,t){var r="",n=e.hasOwnProperty("content-disposition"),i=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,o=!n||i?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||i||o?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(i||o||c)?(r=(r=e["content-disposition"]).trim(),i?r=i[1]:o?r=o[1]:c&&(r=c[1]),r=r.replace(/[/\\]/g,"")):r=a.basename(new s.URL(this.requestURL).pathname).length>0?a.basename(new s.URL(this.requestURL).pathname):new s.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(r,t):r.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(e){var t=a.join(this.__destFolder,e),r=t;return this.__opts.override||this.state===this.__states.RESUMED||t!==(r=this.__uniqFileNameSync(r))&&this.emit("renamed",{path:r,fileName:r.split(a.sep).pop(),prevPath:t,prevFileName:t.split(a.sep).pop()}),r}},{key:"__getFileNameFromOpts",value:function(e,t){if(!this.__opts.fileName)return e;if("string"==typeof this.__opts.fileName)return this.__opts.fileName;if("function"==typeof this.__opts.fileName){var r=a.join(this.__destFolder,e);return t&&t.headers||this.__response&&this.__response.headers?this.__opts.fileName(e,r,(t||this.__response).headers["content-type"]):this.__opts.fileName(e,r)}if("object"===n(this.__opts.fileName)){var i=this.__opts.fileName,o=i.name,s=!!i.hasOwnProperty("ext")&&i.ext;if("string"==typeof s)return o+"."+s;if("boolean"==typeof s){if(s)return o;var c=e.includes(".")?e.split(".").pop():"";return""===c?o:o+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,i=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===i?0:this.__downloaded/i*100,(this.__downloaded===i||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===i||n>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=t,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(e){this.state=e,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new s.URL(t),i={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(i.headers=r),i}},{key:"__getFilesizeInBytes",value:function(e){try{return o.statSync(e,{throwIfNoEntry:!1}).size||0}catch(t){this.emit("warning",t)}return 0}},{key:"__validate",value:function(e,t){if("string"!=typeof e)throw Error("URL should be an string");if(""===e.trim())throw Error("URL couldn't be empty");if("string"!=typeof t)throw Error("Destination Folder should be an string");if(""===t.trim())throw Error("Destination Folder couldn't be empty");if(!o.existsSync(t))throw Error("Destination Folder must exist");if(!o.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{o.accessSync(t,o.constants.W_OK)}catch(r){throw Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(e){var t=this.__getReqOptions(this.__opts.method,e,this.__headers);this.requestURL=e,e.indexOf("https://")>-1?(this.__protocol=u,t.agent=new u.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpsRequestOptions)):(this.__protocol=c,t.agent=new c.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(e){if("string"!=typeof e||""===e)return e;try{o.accessSync(e,o.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,i=e.split(".").pop();return i!==e&&i.length>0?r=r.replace(i="."+i,""):i="",this.__uniqFileNameSync(r+" ("+ ++n+")"+i)}catch(s){return e}}},{key:"__removeFile",value:function(){var e=this;return new Promise((function(t){return e.__fileStream?void e.__fileStream.close((function(r){return r&&e.emit("warning",r),e.__opts.removeOnFail?o.access(e.__filePath,(function(n){return n?t():void o.unlink(e.__filePath,(function(n){n&&e.emit("warning",r),t()}))})):void t()})):t()}))}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(l.EventEmitter)}(Ad)),Ad);const kd="Dpkg::Lock::Timeout=300";let Dd=!1;const Fd=Ip((function(e=ut()){ee(e,["update","-o",kd],{...yu,env:at(e)}),Dd=!0}));var jd,Ud;(Ud=jd||(jd={}))[Ud.NameDashVersion=0]="NameDashVersion",Ud[Ud.NameEqualsVersion=1]="NameEqualsVersion",Ud[Ud.Name=2]="Name",Ud[Ud.None=3]="None";const Md=Ip((async function(e){Fd(e);const t=await ft([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&ee(e,["install","-y","--fix-broken","-o",kd,...t],{...yu,env:at(e)})}),{promise:!0}),Gd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Bd="/etc/apt/trusted.gpg.d",Hd="keyserver.ubuntu.com";let Vd,qd=!1;var zd=L();const Wd={rcPath:Ce("~/.cpprc"),guard:"cpp"};let Xd,Yd,Kd,Jd=!1,Qd=!1;const Zd=/Version\s*:\s*(.*)/g;let eh=!1;const th=r(b()),rh=r(d()),nh=r(R()),ih=/v?(\d\S*)/;var oh,sh,ah,ch,uh,lh,fh,ph,dh,hh,mh,yh,vh,wh,gh,Eh,_h,bh,Sh,Oh,Rh,Ih,Ph,xh,Th,Nh,$h,Ch,Ah,Lh,kh,Dh,Fh,jh,Uh,Mh,Gh,Bh,Hh,Vh,qh,zh,Wh,Xh,Yh,Kh,Jh,Qh,Zh,em,tm,rm,nm,im,om,sm,am,cm,um,lm,fm,pm,dm,hm,mm={},ym={},vm={},wm={},gm=vr();let Em,_m=!1;var bm,Sm,Om,Rm,Im={},Pm={exports:{}},xm={exports:{}},Tm=Pm.exports,Nm={},$m=function(){function e(e,t){const r=[];t=t||w.arch();const n=g.join(s(),e);if(y.existsSync(n)){const e=y.readdirSync(n);for(const o of e)if(i(o)){const e=g.join(n,o,t||"");y.existsSync(e)&&y.existsSync(e+".complete")&&r.push(o)}}return r}function t(e){return p(this,void 0,void 0,(function*(){return e||(e=g.join(a(),m.randomUUID())),yield h.mkdirP(e),e}))}function r(e,t,r){return p(this,void 0,void 0,(function*(){const n=g.join(s(),e,_.clean(t)||t,r||"");d.debug("destination "+n);const i=n+".complete";return yield h.rmRF(n),yield h.rmRF(i),yield h.mkdirP(n),n}))}function n(e,t,r){const n=g.join(s(),e,_.clean(t)||t,r||"");y.writeFileSync(n+".complete",""),d.debug("finished caching tool")}function i(e){const t=_.clean(e)||"";d.debug("isExplicit: "+t);const r=null!=_.valid(t);return d.debug("explicit? "+r),r}function o(e,t){let r="";d.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>_.gt(e,t)?1:-1))).length-1;n>=0;n--){const i=e[n];if(_.satisfies(i,t)){r=i;break}}return d.debug(r?"matched: "+r:"match not found"),r}function s(){const e=process.env.RUNNER_TOOL_CACHE||"";return(0,O.ok)(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function a(){const e=process.env.RUNNER_TEMP||"";return(0,O.ok)(e,"Expected RUNNER_TEMP to be defined"),e}function c(e,t){const r=Rs[e];return void 0!==r?r:t}if(Rm)return Im;Rm=1;var u=Im&&Im.__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]}),l=Im&&Im.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=Im&&Im.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&u(t,e,r);return l(t,e),t},p=Im&&Im.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Im,"__esModule",{value:!0}),Im.evaluateVersions=Im.isExplicitVersion=Im.findFromManifest=Im.getManifestFromRepo=Im.findAllVersions=Im.find=Im.cacheFile=Im.cacheDir=Im.extractZip=Im.extractXar=Im.extractTar=Im.extract7z=Im.downloadTool=Im.HTTPError=void 0;const d=f(k()),h=f(A()),m=f(ni),y=f(Xn),v=f((Sm||(Sm=1,function(e,t){var r=Tm&&Tm.__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=Tm&&Tm.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Tm&&Tm.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t},o=Tm&&Tm.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=i(_r()),a=k(),c=Ln,u=li,l=Xn;t._findMatch=function(t,r,n,i){return o(this,void 0,void 0,(function*(){const o=c.platform();let u,l,f;for(const c of n){const n=c.version;if((0,a.debug)(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(f=c.files.find((t=>{(0,a.debug)(`${t.arch}===${i} && ${t.platform}===${o}`);let r=t.arch===i&&t.platform===o;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),f)){(0,a.debug)("matched "+c.version),l=c;break}}return l&&f&&(u=Object.assign({},l),u.files=[f]),u}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+u.execSync("sw_vers -productVersion");else if("linux"===t){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(2===e.length&&("VERSION_ID"===e[0].trim()||"DISTRIB_RELEASE"===e[0].trim())){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let r="";return l.existsSync(e)?r=""+l.readFileSync(e):l.existsSync(t)&&(r=""+l.readFileSync(t)),r}}(Pm,Pm.exports)),Pm.exports)),w=f(Ln),g=f(Fn),E=f(sa),_=f(_r()),b=f(Pi),S=f(ci),O=fi,R=L(),I=function(){if(Om)return Nm;Om=1;var e=Nm&&Nm.__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]}),t=Nm&&Nm.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Nm&&Nm.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=Nm&&Nm.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.RetryHelper=void 0;const i=r(k());return Nm.RetryHelper=class{constructor(e,t,r){if(1>e)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return n(this,void 0,void 0,(function*(){let r=1;for(;this.maxAttempts>r;){try{return yield e()}catch(n){if(t&&!t(n))throw n;i.info(n.message)}const o=this.getSleepAmount();i.info(`Waiting ${o} seconds before trying again`),yield this.sleep(o),r++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}},Nm}();class P extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Im.HTTPError=P;const x="win32"===process.platform,T="darwin"===process.platform;return Im.downloadTool=function(e,t,r,n){return p(this,void 0,void 0,(function*(){t=t||g.join(a(),m.randomUUID()),yield h.mkdirP(g.dirname(t)),d.debug("Downloading "+e),d.debug("Destination "+t);const i=c("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=c("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new I.RetryHelper(3,i,o);return yield s.execute((()=>p(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return p(this,void 0,void 0,(function*(){if(y.existsSync(t))throw Error(`Destination file path ${t} already exists`);const i=new E.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(d.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const o=yield i.get(e,n);if(200!==o.message.statusCode){const t=new P(o.message.statusCode);throw d.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`),t}const s=S.promisify(b.pipeline),a=c("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message))();let u=!1;try{return yield s(a,y.createWriteStream(t)),d.debug("download complete"),u=!0,t}finally{if(!u){d.debug("download failed");try{yield h.rmRF(t)}catch(l){d.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof P&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},Im.extract7z=function(e,r,n){return p(this,void 0,void 0,(function*(){(0,O.ok)(x,"extract7z() not supported on current OS"),(0,O.ok)(e,'parameter "file" is required'),r=yield t(r);const i=process.cwd();if(process.chdir(r),n)try{const t=["x",d.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],r={silent:!0};yield(0,R.exec)(`"${n}"`,t,r)}finally{process.chdir(i)}else{const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${g.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${r.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],n={silent:!0};try{const e=yield h.which("powershell",!0);yield(0,R.exec)(`"${e}"`,t,n)}finally{process.chdir(i)}}return r}))},Im.extractTar=function(e,r,n="xz"){return p(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");r=yield t(r),d.debug("Checking tar --version");let i="";yield(0,R.exec)("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>i+=""+e,stderr:e=>i+=""+e}}),d.debug(i.trim());const o=i.toUpperCase().includes("GNU TAR");let s;s=n instanceof Array?n:[n],d.isDebug()&&!n.includes("v")&&s.push("-v");let a=r,c=e;return x&&o&&(s.push("--force-local"),a=r.replace(/\\/g,"/"),c=e.replace(/\\/g,"/")),o&&(s.push("--warning=no-unknown-keyword"),s.push("--overwrite")),s.push("-C",a,"-f",c),yield(0,R.exec)("tar",s),r}))},Im.extractXar=function(e,r,n=[]){return p(this,void 0,void 0,(function*(){let i;(0,O.ok)(T,"extractXar() not supported on current OS"),(0,O.ok)(e,'parameter "file" is required'),r=yield t(r),i=n instanceof Array?n:[n],i.push("-x","-C",r,"-f",e),d.isDebug()&&i.push("-v");const o=yield h.which("xar",!0);var s;return yield(0,R.exec)(`"${o}"`,(s=i,Array.from(new Set(s)))),r}))},Im.extractZip=function(e,r){return p(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return r=yield t(r),x?yield function(e,t){return p(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=yield h.which("pwsh",!1);if(i){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];d.debug("Using pwsh at path: "+i),yield(0,R.exec)(`"${i}"`,e)}else{const e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],t=yield h.which("powershell",!0);d.debug("Using powershell at path: "+t),yield(0,R.exec)(`"${t}"`,e)}}))}(e,r):yield function(e,t){return p(this,void 0,void 0,(function*(){const r=yield h.which("unzip",!0),n=[e];d.isDebug()||n.unshift("-q"),n.unshift("-o"),yield(0,R.exec)(`"${r}"`,n,{cwd:t})}))}(e,r),r}))},Im.cacheDir=function(e,t,i,o){return p(this,void 0,void 0,(function*(){if(i=_.clean(i)||i,o=o||w.arch(),d.debug(`Caching tool ${t} ${i} ${o}`),d.debug("source dir: "+e),!y.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const s=yield r(t,i,o);for(const t of y.readdirSync(e)){const r=g.join(e,t);yield h.cp(r,s,{recursive:!0})}return n(t,i,o),s}))},Im.cacheFile=function(e,t,i,o,s){return p(this,void 0,void 0,(function*(){if(o=_.clean(o)||o,s=s||w.arch(),d.debug(`Caching tool ${i} ${o} ${s}`),d.debug("source file: "+e),!y.statSync(e).isFile())throw Error("sourceFile is not a file");const a=yield r(i,o,s),c=g.join(a,t);return d.debug("destination file "+c),yield h.cp(e,c),n(i,o,s),a}))},Im.find=function(t,r,n){if(!t)throw Error("toolName parameter is required");if(!r)throw Error("versionSpec parameter is required");n=n||w.arch(),i(r)||(r=o(e(t,n),r));let a="";if(r){r=_.clean(r)||"";const e=g.join(s(),t,r,n);d.debug("checking cache: "+e),y.existsSync(e)&&y.existsSync(e+".complete")?(d.debug(`Found tool in cache ${t} ${r} ${n}`),a=e):d.debug("not found")}return a},Im.findAllVersions=e,Im.getManifestFromRepo=function(e,t,r,n="master"){return p(this,void 0,void 0,(function*(){let i=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new E.HttpClient("tool-cache"),a={};r&&(d.debug("set auth"),a.authorization=r);const c=yield s.getJson(o,a);if(!c.result)return i;let u="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){u=e.url;break}a.accept="application/vnd.github.VERSION.raw";let l=yield(yield s.get(u,a)).readBody();if(l){l=l.replace(/^\uFEFF/,"");try{i=JSON.parse(l)}catch(f){d.debug("Invalid json")}}return i}))},Im.findFromManifest=function(e,t,r,n=w.arch()){return p(this,void 0,void 0,(function*(){return yield v._findMatch(e,t,r,n)}))},Im.isExplicitVersion=i,Im.evaluateVersions=o,Im}();let Cm;var Am,Lm={};const km=r(function(){function e(e,t){const r=e+Math.random()*t*(Math.random()>.5?1:-1);return Math.max(0,r)}function t(n,i){if(!n||!i)throw Error("retry-as-promised must be passed a callback and a options set");const o={$current:"$current"in(i="number"==typeof i?{max:i}:i)?i.$current:1,max:i.max,timeout:i.timeout||void 0,match:i.match?Array.isArray(i.match)?i.match:[i.match]:[],backoffBase:void 0===i.backoffBase?100:i.backoffBase,backoffExponent:i.backoffExponent||1.1,backoffJitter:i.backoffJitter||0,report:i.report,name:i.name||n.name||"unknown"};return o.match&&!Array.isArray(o.match)&&(o.match=[o.match]),o.report&&o.report("Trying "+o.name+" #"+o.$current+" at "+(new Date).toLocaleTimeString(),o),new Promise((function(i,s){let a,c,u;o.timeout&&(a=setTimeout((function(){c&&clearTimeout(c),s(new r(o.name+" timed out",u))}),o.timeout)),Promise.resolve(n({current:o.$current})).then(i).then((function(){a&&clearTimeout(a),c&&clearTimeout(c)})).catch((function(r){a&&clearTimeout(a),c&&clearTimeout(c),u=r,o.report&&o.report(r&&""+r||r,o,r);var l=o.max>o.$current;if(!l)return s(r);if(l=0===o.match.length||o.match.some((function(e){return function(e,t){if("function"==typeof e)try{if(t instanceof e)return!0}catch(r){return!!e(t)}return e===""+t||e===t.message||e instanceof RegExp&&(e.test(t.message)||e.test(""+t))}(e,r)})),!l)return s(r);var f=o.backoffBase*Math.pow(o.backoffExponent,o.$current-1);const p=o.backoffJitter;void 0!==p&&(f=e(f,p)),o.$current++,o.report&&o.report(`Retrying ${o.name} (${o.$current})`,o),f?(o.report&&o.report(`Delaying retry of ${o.name} by ${f}`,o),c=setTimeout((function(){t(n,o).then(i).catch(s)}),f)):t(n,o).then(i).catch(s)}))}))}if(Am)return Lm;Am=1,Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.retryAsPromised=Lm.applyJitter=Lm.TimeoutError=void 0;class r extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}}return Lm.TimeoutError=r,Lm.applyJitter=e,Lm.retryAsPromised=t,Lm.default=t,Lm}()),{GITHUB_ACTIONS:Dm}=As,{GITHUB_ACTIONS:Fm}=As,jm="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),{GITHUB_ACTIONS:Um}=As,Mm="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),Gm=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,r=e.fs||{};return e.mkdir=e.mkdir||r.mkdir||Jn,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,i)=>t.mkdir(e,r,((e,t)=>e?i(e):n(t))))),e.stat=e.stat||r.stat||Qn,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((r,n)=>t.stat(e,((e,t)=>e?n(e):r(t))))),e.statSync=e.statSync||r.statSync||Zn,e.mkdirSync=e.mkdirSync||r.mkdirSync||ei,t},Bm=(e,t,r)=>{const n=Vn(e),i={...Gm(t),recursive:!1};if(n===e)try{return i.mkdirSync(e,i)}catch(o){if(o&&"EISDIR"!==o.code)throw o;return}try{return i.mkdirSync(e,i),r||e}catch(o){const t=o;if(t&&"ENOENT"===t.code)return Bm(e,i,Bm(n,i,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw o;try{if(!i.statSync(e).isDirectory())throw o}catch(s){throw o}}},Hm=Object.assign((async(e,t,r)=>{const n=Gm(t);n.recursive=!1;const i=Vn(e);return i===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const o=t;if(o&&"ENOENT"===o.code)return Hm(i,n).then((t=>Hm(e,n,t)));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:Bm}),Vm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?Vm(e,Vn(t),t):void 0))},qm=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?qm(e,Vn(t),t):void 0}},zm=(e,t)=>{const r=Gm(t);if(r.recursive=!0,Vn(e)===e)return r.mkdirSync(e,r);const n=qm(r,e);try{return r.mkdirSync(e,r),n}catch(i){if(i&&"ENOENT"===i.code)return Bm(e,r);throw i}},Wm=Object.assign((async(e,t)=>{const r={...Gm(t),recursive:!0};return Vn(e)===e?await r.mkdirAsync(e,r):Vm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Hm(e,r);throw t}))))}),{sync:zm}),Xm=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Ym=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=zn(e),"win32"===Xm){const t=/[*|"<>?:]/,{root:r}=Wn(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},Km=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Jm=+Km[0]>10||10==+Km[0]&&+Km[1]>=12,Qm=Jm?e=>Gm(e).mkdirSync===ei:()=>!1,Zm=Object.assign(Jm?e=>Gm(e).mkdir===Jn:()=>!1,{sync:Qm}),ey=(e,t)=>{e=Ym(e);const r=Gm(t);return Qm(r)?zm(e,r):Bm(e,r)},ty=Object.assign((async(e,t)=>{e=Ym(e);const r=Gm(t);return Zm(r)?Wm(e,r):Hm(e,r)}),{mkdirpSync:ey,mkdirpNative:Wm,mkdirpNativeSync:zm,mkdirpManual:Hm,mkdirpManualSync:Bm,sync:ey,native:Wm,nativeSync:zm,manual:Hm,manualSync:Bm,useNative:Zm,useNativeSync:Qm}),ry=Ip((function(){const e="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),t=Fn.join(e,"versions.json");return JSON.parse(Xn.readFileSync(t,"utf-8"))})),{GITHUB_ACTIONS:ny}=As;var iy,oy={},sy=function(){if(iy)return oy;iy=1,Object.defineProperty(oy,"__esModule",{value:!0}),oy.getUbuntuVersion=void 0;const e=li;return oy.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const t=await(r="lsb_release",n=["-a"],new Promise(((t,i)=>{e.execFile(r,n,{encoding:"utf8",shell:!1},((e,o,s)=>{if(e)return"errno"in e&&"ENOENT"===e.code?void t(null):void i(Error(`Could not execute \`${r} ${n.join(" ")}\`: ${e} (stderr=${s})`));t(o)}))})));var r,n;if(null===t)return[];const i=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,s=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let a=null,c=null,u=!1;for(const e of t.split("\n")){const t=e.match(i);if(null!==t){if("Ubuntu"!==t[1])return[];u=!0}const r=e.match(o);r&&(a=r);const n=e.match(s);if(n&&(c=n),u&&a&&c)break}if(!u)return[];for(const e of[a,c])if(e){const t=[e[1],e[2]];return e[3]&&t.push(e[3]),t.map((e=>parseInt(e,10)))}return[]},oy}();const ay=Ip((async function(){try{if(Ct()){try{null===pu.sync("lsb_release",{nothrow:!0})&&await yt([{name:"lsb-release"}])}catch{return zr()}const e=await sy.getUbuntuVersion();return 0===e.length?zr():e}return null}catch(e){return F(""+e),null}}),{promise:!0}),cy=Ip((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=Ce("~/.local/pipx");if(await $e(t))return t;switch(process.platform){case"win32":e=Ce("~/AppData/Local/pipx");break;case"darwin":e=Ce("~/Library/Application Support/pipx");break;default:e=Ce("~/.local/share/pipx")}return await ty(e),await ty(jn(e,"trash")),await ty(jn(e,"shared")),await ty(jn(e,"venv")),e}),{promise:!0}),uy=Ip((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=Ce("~/.local/bin");return await Fe(e,Wd),await ty(e),e}),{promise:!0});let ly;const fy=Ip((async function(e){const t=[];"linux"===process.platform?t.push("/home/runner/.local/bin/"):"darwin"===process.platform&&t.push("/usr/local/bin/");const r=await py(e);return t.push(jn(r,"Scripts"),jn(r,"Scripts","bin"),jn(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0}),py=Ip((async function(e){return(await zd.getExecOutput(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim()}),{promise:!0}),dy=Ip((async function(e){try{const t=await py(e),r=await kt(e);return void 0===r?(F("Failed to get the version of "+e),!1):$e(jn(t,"lib",`python${r.major}.${r.minor}`,"EXTERNALLY-MANAGED"))}catch(t){return F(`Failed to check if ${e} is externally managed: ${t}`),!1}}),{promise:!0}),hy=Ip((function(e){const t=Ft(e);return Number.parseInt(t.split(".")[0],10)})),my=["x64","amd64","x86_64","win64","64","amd64_x86","amd64_arm64"],yy=["x86","i386","ia32","win32","32","x32"],vy=["aarch64","arm64","woa64","arm"],wy=["armv7","armv7a"],gy=["powerpc64le","ppc64le"],Ey=["sparc64"],_y=["sparcv9"],by=r(E()),Sy=new Map([[24,["Sequoia","15"]],[23,["Sonoma","14"]],[22,["Ventura","13"]],[21,["Monterey","12"]],[20,["Big Sur","11"]],[19,["Catalina","10.15"]],[18,["Mojave","10.14"]],[17,["High Sierra","10.13"]],[16,["Sierra","10.12"]],[15,["El Capitan","10.11"]],[14,["Yosemite","10.10"]],[13,["Mavericks","10.9"]],[12,["Mountain Lion","10.8"]],[11,["Lion","10.7"]],[10,["Snow Leopard","10.6"]],[9,["Leopard","10.5"]],[8,["Tiger","10.4"]],[7,["Panther","10.3"]],[6,["Jaguar","10.2"]],[5,["Puma","10.1"]]]),Oy=Ip((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||gi.release()).split(".")[0]);const[t,r]=Sy.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Ry="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),Iy="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url));var Py,xy={},Ty=function(){function e(e){return Object.values(h).includes(e)?e:e in h?h[e]:e}function t(e){if(Object.keys(h).includes(e))return e;for(const[t,r]of Object.entries(h))if(r===e)return t;return e}function r(e,t){try{return(""+s.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\"+e}catch(r){o.warning("vswhere failed: "+r)}return null}function n(n){const i=e(n);let s;if(i){const e=i.split(".")[0]+".9";s=`-version "${i},${e}"`}else s="-latest";let c=r("VC\\Auxiliary\\Build\\vcvarsall.bat",s);if(c&&a.existsSync(c))return o.info("Found with vswhere: "+c),c;o.info("Not found with vswhere");const u=n?[t(n)]:d;for(const e of f)for(const t of u)for(const r of p)if(c=`${e}\\Microsoft Visual Studio\\${t}\\${r}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,o.info("Trying standard location: "+c),a.existsSync(c))return o.info("Found standard location: "+c),c;if(o.info("Not found in standard locations"),c=l+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",a.existsSync(c))return o.info("Found VS 2015: "+c),c;throw o.info("Not found in VS 2015 location: "+c),Error("Microsoft Visual Studio not found")}function i(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}if(Py)return xy;Py=1;const o=k(),s=li,a=Xn,c=Fn,u=An,l=u.env["ProgramFiles(x86)"],f=[u.env["ProgramFiles(x86)"],u.env.ProgramFiles],p=["Enterprise","Professional","Community","BuildTools"],d=["2022","2019","2017"],h={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};xy.vsversion_to_versionnumber=e,xy.vsversion_to_year=t;const m=l+"\\Microsoft Visual Studio\\Installer";return xy.findWithVswhere=r,xy.findVcvarsall=n,xy.setupMSVCDevCmd=function(e,t,r,a,l,f){if("win32"!=u.platform)return void o.info("This is not a Windows virtual environment, bye!");u.env.PATH+=c.delimiter+m;let p={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in p&&(e=p[e.toLowerCase()]);var d=[e];a&&!0===JSON.parse(a)&&d.push("uwp"),t&&d.push(t),r&&d.push("-vcvars_ver="+r),l&&!0===JSON.parse(l)&&d.push("-vcvars_spectre_libs=spectre");const h=`"${n(f)}" ${d.join(" ")}`;o.debug("vcvars command-line: "+h);const y=(""+s.execSync(`set && cls && ${h} && cls && set`,{shell:"cmd"})).split("\f"),v=y[0].split("\r\n"),w=y[1].split("\r\n"),g=y[2].split("\r\n"),E=w.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(E.length>0)throw Error("invalid parameters\r\n"+E.join("\r\n"));let _={};for(let n of v){const[e,t]=n.split("=");_[e]=t}o.startGroup("Environment variables");for(let n of g){if(!n.includes("="))continue;let[e,t]=n.split("=");t!==_[e]&&(o.info("Setting "+e),i(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),o.exportVariable(e,t))}o.endGroup(),o.info("Configured Developer Command Prompt")},xy}();const{GITHUB_ACTIONS:Ny}=As,$y="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url));let Cy,Ay=!1;const Ly={llvm:Pn,clang:Pn,"clang++":Pn},ky={gcc:Lr,"g++":Lr},Dy={mingw:Tr},Fy={msvc:wn,cl:wn,msbuild:wn,visualstudio:wn},jy={appleclang:tn,applellvm:tn,"apple-clang":tn,"apple-llvm":tn},Uy={cmakelang:sn,"cmake-lint":sn,"cmake-format":sn,cmakelint:sn,cmakeformat:sn},My=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],Gy={git:ln,nala:async function(e,t,r){if(!Ct())return;if("string"==typeof Cy)return{binDir:Cy};const n=pu.sync("nala",{nothrow:!0});if(null!==n)return Cy=Vn(n),{binDir:Cy};await yt([{name:"python3-apt"}]),Cy="/usr/bin";try{const t=await pt({name:"nala",version:e});if(void 0!==t)return await yt([{name:t}]),{binDir:Cy}}catch(i){U("Failed to install nala: "+i)}try{const e=await pt({name:"nala-legacy"});if(void 0!==e)return await yt([{name:e}],!0),{binDir:Cy}}catch(i){U("Failed to install nala-legacy: "+i)}return await async function(){const e=new Ld.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",Dn(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=jn(Dn(),"install-nala.sh"),r=await Ni(t,"utf8");await ki(t,r.replace(/sudo/g,"")),await yt([{name:"wget"}]);try{ee("bash",[t])}catch(i){D("Failed to install nala via installer: "+i),ee("apt",["install","-y","-t","nala","nala"])}}(),{binDir:Cy}},brew:Et,choco:wr,python:Mr,powershell:bn,pwsh:bn,...Ly,...ky,...Dy,...Fy,...jy,...Uy,cmake:on,ninja:dn,vcpkg:async function(e,t,r){const n=await pu("vcpkg",{nothrow:!0});if(Ay&&null!==n)return{binDir:Vn(n)};if(await ln(""),"linux"===process.platform)if($t())await Promise.all([Lt("curl"),Lt("zip"),Lt("unzip"),Lt("tar"),Lt("pkg-config")]);else if(Nt())await At([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}]);else if(Ct())await yt([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}]);else if(await Pd()){const e=[{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkgconf"}];vy.includes(r)&&e.push({name:"build-base"}),await ot(e)}return await $e(jn(t,Ke("bootstrap-vcpkg",".bat")))?j(`Vcpkg folder already exists at ${t}. Skipping the clone`):await q("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Vn(t),stdio:"inherit"}),""!==e&&"true"!==e&&(U("Checking out vcpkg version "+e),await q("git",["checkout",e],{cwd:t,stdio:"inherit"})),"linux"===process.platform&&vy.includes(r)&&await ke("VCPKG_FORCE_SYSTEM_BINARIES","1"),await q(Ke(Je("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await oe(t),await Fe(t,Wd),Ay=!0,{binDir:t}},bazel:async function(e,t,r){switch(process.platform){case"win32":return gr("bazelisk",e);case"darwin":return It("bazelisk",e);case"linux":if($t())throw Error("installing bazel on Arch linux is not supported yet");if(Nt())return await At([{name:"dnf-plugins-core"}]),await te("dnf",["copr","enable","vbatts/bazel"]),At([{name:"bazel4"}]);if(Ct()){const t=await vt({fileName:"bazel-archive-keyring.gpg",keyUrl:"https://bazel.build/bazel-release.pub.gpg"});return await te("bash",["-c",`echo "deb [arch=${rn(process.arch)} signed-by=${t}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`]),yt([{name:"bazel",version:e}],!0)}if(await Pd())return ot([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Xr("conan",e)},meson:function(e,t,r){return Xr("meson",e)},gcovr:function(e,t,r){return Xr("gcovr",e)},opencppcoverage:gn,OpenCppCoverage:gn,ccache:async function(e,t,r){switch(process.platform){case"win32":return gr("ccache",e);case"darwin":return It("ccache",e);case"linux":if($t())return Lt("ccache",e);if(Nt())return At([{name:"ccache",version:e}]);if(Ct())return yt([{name:"ccache",version:e}]);if(await Pd())return ot([{name:"ccache",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},sccache:async function(e,t,r){switch(process.platform){case"win32":return gr("sccache",e);case"linux":if(Ct()){if((await sy.getUbuntuVersion())[0]>=24)return yt([{name:"sccache",version:e}])}else if(await Pd())return ot([{name:"sccache",version:e}]);return It("sccache",e);case"darwin":return It("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await km((()=>gr("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>U(e)});const t={binDir:await async function(){if("win32"===process.platform){for(const e of["C:/ProgramData/chocolatey/bin","C:/Program Files/doxygen/bin","C:/Program Files (x86)/doxygen"])if(await $e(jn(e,"doxygen.exe")))return await Fe(e,Wd),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await an(Fr("graphviz",void 0)),t}case"darwin":{const e=await It("doxygen",void 0,{formula:!0});return Oy()[0]>11&&await an(Fr("graphviz",void 0)),e}case"linux":{const n=await async function(e,t,r){try{if($t())return await Lt("doxygen",e);if(Nt())return At([{name:"doxygen",version:e}]);if(Ct())return await yt([{name:"doxygen",version:e,fallBackToLatest:vy.includes(r)}]);if(await Pd())return ot([{name:"doxygen"}]);throw Error("Unsupported linux distributions")}catch{try{const i=await xr("doxygen",e,un,t,r);if(Ct())try{await yt([{name:"libclang-cpp-dev"}])}catch(n){U("Failed to download libclang-cpp-dev that might be needed for running doxygen. "+n)}return i}catch(n){return j(`Failed to download doxygen binary. ${n}. Falling back to installing the latest version from apt-get.`),yt([{name:"doxygen"}])}}}(e,t,r);return await an(Fr("graphviz",void 0,await ay())),n}default:throw Error("Unsupported platform")}},graphviz:an,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await gr("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await Fe(e,Wd),e}()};case"darwin":return It("cppcheck",e);case"linux":if($t())return Lt("cppcheck",e);if(Nt())return At([{name:"ccache",version:e}]);if(Ct())return yt([{name:"cppcheck",version:e}]);if(await Pd())return ot([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Xr("cpplint",e,{pythonVersion:">=3.8.0"})},flawfinder:function(e,t,r){return Xr("flawfinder",e)},lizard:function(e,t,r){return Xr("lizard",e)},infer:function(e,t,r){return xr("infer",e,fn,t,r)},"clang-tidy":Nn,clangtidy:Nn,"clang-format":Tn,clangformat:Tn,vcvarsall:vn,kcov:async function(e,t,r){if("linux"!==process.platform)return void U("Kcov is not supported on non-linux");const n=e.split("-");let i=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const o=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(i);let a;return 38===s&&(i="v38"),"binary"!==o||39>s?(a=await xr("kcov",i,mn,t,r),a):(a=await xr("kcov",i,hn,t,r),$t()?await Lt("binutils"):Nt()?await At([{name:"binutils"}]):Ct()&&await yt([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return gr("make",e);case"darwin":{await It("make",e);const t=jn(St(),"opt/make/libexec/gnubin");return await Fe(t,Wd),{binDir:t}}case"linux":if($t())return Lt("make",e);if(Nt())return At([{name:"make",version:e}]);if(Ct())return yt([{name:"make",version:e}]);if(await Pd())return ot([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return xr("task",e,On,t,r)},sevenzip:Er,"7zip":Er,"7z":Er},By=Object.keys(Gy),Hy=["compiler","architecture","timeout",...By],Vy=36e5,qy="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url));var zy=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(zy||{});const Wy="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),Xy=Ip((async function(e,t){if(Ct())for(const i of["libtinfo5","libtinfo6"])try{await yt([{name:i}])}catch(r){try{if("libtinfo5"===i){U(`Failed to install ${i}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${rn(t)}.deb`,r="https://launchpad.net/ubuntu/+archive/primary/+files/"+e,n=new Ld.DownloaderHelper(r,Dn(),{fileName:e});n.on("error",(async e=>{U(`Failed to download ${r}: ${e}`),await n.stop()})),await n.start(),ee("dpkg",["-i",jn(Dn(),e)])}}catch(n){U(`Failed to install ${i}. Ignoring`)}}else $t()?await Lt("ncurses5-compat-libs",void 0,"yay"):Nt()&&await At([{name:"ncurses-compat-libs"}])}),{promise:!0}),{GITHUB_ACTIONS:Yy}=As,Ky="string"==typeof __dirname?__dirname:Fn.dirname(Fi(import.meta.url)),Jy=Ip((async function(e){"linux"===process.platform&&await Lr(Fr("gcc",void 0,await ay()),"",e,40)}),{promise:!0}),Qy=/[.-]((?:\d{4}|\d+(?:\.\d+)*(?:-[\w.-]+)?(?:\+[\w.-]+)?)$)/;"true"!==process.env.SETUP_CPP_SKIP_MAIN&&async function(e){const t=Cs.GITHUB_ACTIONS?Promise.resolve():async function(){try{await Ps({pkg:xs})}catch(e){F("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),r=Cn(e);if(r.help)return U('\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\t the <compiler> to install.\n \t You can specify the version instead of specifying just the name e.g: --compiler \'llvm-13.0.0\'\n--tool_name\t pass "true" or pass the <version> you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n--nodePackageManager\t the node package manager to use (npm/yarn/pnpm) when installing setup-cpp globally\n--help\t show this help message\n--version\t show the version of setup-cpp\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala, --git, --setup-cpp"},"analyzer/linter":{tools:"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]),0;if(r.version)return U(""+xs.version),0;const{successMessages:n,errorMessages:i}=await $n(r);for(const o of n)console.log(`[32m${o}[0m`);for(const o of i)D(o);if((0!==n.length||0!==i.length)&&(U("setup-cpp finished"),!Cs.GITHUB_ACTIONS))switch(process.platform){case"win32":F("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":F("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await t,0===i.length?0:1}(process.argv).then((e=>{process.exitCode=e})).catch((e=>{D("main() panicked!"),D(e),process.exitCode=1}));export{ia as H,Ra as a,As as b,Rs as c,zd as e,r as g,U as i,$e as p,Cn as parseArgs,P as r,$m as t,F as w};
|
||
//# sourceMappingURL=setup-cpp.mjs.map
|