/
index.js
2 lines (2 loc) · 59.5 KB
/
index.js
1
2
require('./sourcemap-register.js');(()=>{var e={351:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=s(n(37));const a=n(278);function issueCommand(e,t,n){const r=new Command(e,t,n);process.stdout.write(r.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const r=this.properties[n];if(r){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(r)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);o(t,e);return t};var i=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=n(351);const l=n(717);const c=n(278);const u=s(n(37));const d=s(n(17));const f=n(41);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const r=process.env["GITHUB_ENV"]||"";if(r){const t="_GitHubActionsFileCommandDelimeter_";const r=`${e}<<${t}${u.EOL}${n}${u.EOL}${t}`;l.issueCommand("ENV",r)}else{a.issueCommand("set-env",{name:e},n)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return n}return n.trim()}t.getInput=getInput;function getMultilineInput(e,t){const n=getInput(e,t).split("\n").filter((e=>e!==""));return n}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const n=["true","True","TRUE"];const r=["false","False","FALSE"];const o=getInput(e,t);if(n.includes(o))return true;if(r.includes(o))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(u.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},717:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))r(t,e,n);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const i=s(n(147));const a=s(n(37));const l=n(278);function issueCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}i.appendFileSync(n,`${l.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},41:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const o=n(925);const s=n(702);const i=n(186);class OidcClient{static createHttpClient(e=true,t=10){const n={allowRetries:e,maxRetries:t};return new o.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],n)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new 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 new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return r(this,void 0,void 0,(function*(){const n=OidcClient.createHttpClient();const r=yield n.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const o=(t=r.result)===null||t===void 0?void 0:t.value;if(!o){throw new Error("Response json body do not have ID Token field")}return o}))}static getIDToken(e){return r(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const n=encodeURIComponent(e);t=`${t}&audience=${n}`}i.debug(`ID token url is ${t}`);const n=yield OidcClient.getCall(t);i.setSecret(n);return n}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,n){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,n){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,n){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=n(685);const o=n(687);const s=n(443);let i;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=s.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const u=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const d=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const f=["OPTIONS","GET","DELETE","HEAD"];const p=10;const h=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let n=Buffer.alloc(0);this.message.on("data",(e=>{n=Buffer.concat([n,e])}));this.message.on("end",(()=>{e(n.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,n){return this.request("POST",e,t,n||{})}patch(e,t,n){return this.request("PATCH",e,t,n||{})}put(e,t,n){return this.request("PUT",e,t,n||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,n,r){return this.request(e,t,n,r)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);let n=await this.get(e,t);return this._processResponse(n,this.requestOptions)}async postJson(e,t,n={}){let r=JSON.stringify(t,null,2);n[l.Accept]=this._getExistingOrDefaultHeader(n,l.Accept,c.ApplicationJson);n[l.ContentType]=this._getExistingOrDefaultHeader(n,l.ContentType,c.ApplicationJson);let o=await this.post(e,r,n);return this._processResponse(o,this.requestOptions)}async putJson(e,t,n={}){let r=JSON.stringify(t,null,2);n[l.Accept]=this._getExistingOrDefaultHeader(n,l.Accept,c.ApplicationJson);n[l.ContentType]=this._getExistingOrDefaultHeader(n,l.ContentType,c.ApplicationJson);let o=await this.put(e,r,n);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,n={}){let r=JSON.stringify(t,null,2);n[l.Accept]=this._getExistingOrDefaultHeader(n,l.Accept,c.ApplicationJson);n[l.ContentType]=this._getExistingOrDefaultHeader(n,l.ContentType,c.ApplicationJson);let o=await this.patch(e,r,n);return this._processResponse(o,this.requestOptions)}async request(e,t,n,r){if(this._disposed){throw new Error("Client has already been disposed.")}let o=new URL(t);let s=this._prepareRequest(e,o,r);let i=this._allowRetries&&f.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l<i){c=await this.requestRaw(s,n);if(c&&c.message&&c.message.statusCode===a.Unauthorized){let e;for(let t=0;t<this.handlers.length;t++){if(this.handlers[t].canHandleAuthentication(c)){e=this.handlers[t];break}}if(e){return e.handleAuthentication(this,s,n)}else{return c}}let t=this._maxRedirects;while(u.indexOf(c.message.statusCode)!=-1&&this._allowRedirects&&t>0){const i=c.message.headers["location"];if(!i){break}let a=new URL(i);if(o.protocol=="https:"&&o.protocol!=a.protocol&&!this._allowRedirectDowngrade){throw new 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.")}await c.readBody();if(a.hostname!==o.hostname){for(let e in r){if(e.toLowerCase()==="authorization"){delete r[e]}}}s=this._prepareRequest(e,a,r);c=await this.requestRaw(s,n);t--}if(d.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l<i){await c.readBody();await this._performExponentialBackoff(l)}}return c}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(e,t){return new Promise(((n,r)=>{let callbackForResult=function(e,t){if(e){r(e)}n(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,n){let r;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let o=false;let handleResult=(e,t)=>{if(!o){o=true;n(e,t)}};let s=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));s.on("socket",(e=>{r=e}));s.setTimeout(this._socketTimeout||3*6e4,(()=>{if(r){r.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));s.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){s.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){s.end()}));t.pipe(s)}else{s.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,n){const s={};s.parsedUrl=t;const i=s.parsedUrl.protocol==="https:";s.httpModule=i?o:r;const a=i?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(s.options)}))}return s}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{});let r;if(this.requestOptions&&this.requestOptions.headers){r=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||r||n}_getAgent(e){let t;let a=s.getProxyUrl(e);let l=a&&a.hostname;if(this._keepAlive&&l){t=this._proxyAgent}if(this._keepAlive&&!l){t=this._agent}if(!!t){return t}const c=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||r.globalAgent.maxSockets}if(l){if(!i){i=n(294)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let r;const o=a.protocol==="https:";if(c){r=o?i.httpsOverHttps:i.httpsOverHttp}else{r=o?i.httpOverHttps:i.httpOverHttp}t=r(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=c?new o.Agent(e):new r.Agent(e);this._agent=t}if(!t){t=c?o.globalAgent:r.globalAgent}if(c&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=h*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(n,r)=>{const o=e.message.statusCode;const s={statusCode:o,result:null,headers:{}};if(o==a.NotFound){n(s)}let i;let l;try{l=await e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){i=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(l)}s.result=i}s.headers=e.message.headers}catch(e){}if(o>299){let e;if(i&&i.message){e=i.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+o+")"}let t=new HttpClientError(e,o);t.result=s.result;r(t)}else{n(s)}}))}}t.HttpClient=HttpClient},443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let n;if(checkBypass(e)){return n}let r;if(t){r=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{r=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(r){n=new URL(r)}return n}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}let r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(r.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},68:(e,t,n)=>{"use strict";e=n.nmd(e);const wrapAnsi16=(e,t)=>(...n)=>{const r=e(...n);return`[${r+t}m`};const wrapAnsi256=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`};const wrapAnsi16m=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`};const ansi2ansi=e=>e;const rgb2rgb=(e,t,n)=>[e,t,n];const setLazyProperty=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true});return r},enumerable:true,configurable:true})};let r;const makeDynamicStyles=(e,t,o,s)=>{if(r===undefined){r=n(931)}const i=s?10:0;const a={};for(const[n,s]of Object.entries(r)){const r=n==="ansi16"?"ansi":n;if(n===t){a[r]=e(o,i)}else if(typeof s==="object"){a[r]=e(s[t],i)}}return a};function assembleStyles(){const e=new Map;const t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright;t.bgColor.bgGray=t.bgColor.bgBlackBright;t.color.grey=t.color.blackBright;t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[n,r]of Object.entries(t)){for(const[n,o]of Object.entries(r)){t[n]={open:`[${o[0]}m`,close:`[${o[1]}m`};r[n]=t[n];e.set(o[0],o[1])}Object.defineProperty(t,n,{value:r,enumerable:false})}Object.defineProperty(t,"codes",{value:e,enumerable:false});t.color.close="[39m";t.bgColor.close="[49m";setLazyProperty(t.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(t.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(t.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(t.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return t}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},818:(e,t,n)=>{"use strict";const r=n(68);const{stdout:o,stderr:s}=n(318);const{stringReplaceAll:i,stringEncaseCRLFWithFirstIndex:a}=n(415);const{isArray:l}=Array;const c=["ansi","ansi","ansi256","ansi16m"];const u=Object.create(null);const applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const n=o?o.level:0;e.level=t.level===undefined?n:t.level};class ChalkClass{constructor(e){return chalkFactory(e)}}const chalkFactory=e=>{const t={};applyOptions(t,e);t.template=(...e)=>chalkTag(t.template,...e);Object.setPrototypeOf(t,Chalk.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};t.template.Instance=ChalkClass;return t.template};function Chalk(e){return chalkFactory(e)}for(const[e,t]of Object.entries(r)){u[e]={get(){const n=createBuilder(this,createStyler(t.open,t.close,this._styler),this._isEmpty);Object.defineProperty(this,e,{value:n});return n}}}u.visible={get(){const e=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:e});return e}};const d=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of d){u[e]={get(){const{level:t}=this;return function(...n){const o=createStyler(r.color[c[t]][e](...n),r.color.close,this._styler);return createBuilder(this,o,this._isEmpty)}}}}for(const e of d){const t="bg"+e[0].toUpperCase()+e.slice(1);u[t]={get(){const{level:t}=this;return function(...n){const o=createStyler(r.bgColor[c[t]][e](...n),r.bgColor.close,this._styler);return createBuilder(this,o,this._isEmpty)}}}}const f=Object.defineProperties((()=>{}),{...u,level:{enumerable:true,get(){return this._generator.level},set(e){this._generator.level=e}}});const createStyler=(e,t,n)=>{let r;let o;if(n===undefined){r=e;o=t}else{r=n.openAll+e;o=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:o,parent:n}};const createBuilder=(e,t,n)=>{const builder=(...e)=>{if(l(e[0])&&l(e[0].raw)){return applyStyle(builder,chalkTag(builder,...e))}return applyStyle(builder,e.length===1?""+e[0]:e.join(" "))};Object.setPrototypeOf(builder,f);builder._generator=e;builder._styler=t;builder._isEmpty=n;return builder};const applyStyle=(e,t)=>{if(e.level<=0||!t){return e._isEmpty?"":t}let n=e._styler;if(n===undefined){return t}const{openAll:r,closeAll:o}=n;if(t.indexOf("")!==-1){while(n!==undefined){t=i(t,n.close,n.open);n=n.parent}}const s=t.indexOf("\n");if(s!==-1){t=a(t,o,r,s)}return r+t+o};let p;const chalkTag=(e,...t)=>{const[r]=t;if(!l(r)||!l(r.raw)){return t.join(" ")}const o=t.slice(1);const s=[r.raw[0]];for(let e=1;e<r.length;e++){s.push(String(o[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]))}if(p===undefined){p=n(500)}return p(e,s.join(""))};Object.defineProperties(Chalk.prototype,u);const h=Chalk();h.supportsColor=o;h.stderr=Chalk({level:s?s.level:0});h.stderr.supportsColor=s;e.exports=h},500:e=>{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const o=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(e){const t=e[0]==="u";const n=e[1]==="{";if(t&&!n&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}if(t&&n){return String.fromCodePoint(parseInt(e.slice(2,-1),16))}return s.get(e)||e}function parseArguments(e,t){const n=[];const s=t.trim().split(/\s*,\s*/g);let i;for(const t of s){const s=Number(t);if(!Number.isNaN(s)){n.push(s)}else if(i=t.match(r)){n.push(i[2].replace(o,((e,t,n)=>t?unescape(t):n)))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return n}function parseStyle(e){n.lastIndex=0;const t=[];let r;while((r=n.exec(e))!==null){const e=r[1];if(r[2]){const n=parseArguments(e,r[2]);t.push([e].concat(n))}else{t.push([e])}}return t}function buildStyle(e,t){const n={};for(const e of t){for(const t of e.styles){n[t[0]]=e.inverse?null:t.slice(1)}}let r=e;for(const[e,t]of Object.entries(n)){if(!Array.isArray(t)){continue}if(!(e in r)){throw new Error(`Unknown Chalk style: ${e}`)}r=t.length>0?r[e](...t):r[e]}return r}e.exports=(e,n)=>{const r=[];const o=[];let s=[];n.replace(t,((t,n,i,a,l,c)=>{if(n){s.push(unescape(n))}else if(a){const t=s.join("");s=[];o.push(r.length===0?t:buildStyle(e,r)(t));r.push({inverse:i,styles:parseStyle(a)})}else if(l){if(r.length===0){throw new Error("Found extraneous } in Chalk template literal")}o.push(buildStyle(e,r)(s.join("")));s=[];r.pop()}else{s.push(c)}}));o.push(s.join(""));if(r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")}},415:e=>{"use strict";const stringReplaceAll=(e,t,n)=>{let r=e.indexOf(t);if(r===-1){return e}const o=t.length;let s=0;let i="";do{i+=e.substr(s,r-s)+t+n;s=r+o;r=e.indexOf(t,s)}while(r!==-1);i+=e.substr(s);return i};const stringEncaseCRLFWithFirstIndex=(e,t,n,r)=>{let o=0;let s="";do{const i=e[r-1]==="\r";s+=e.substr(o,(i?r-1:r)-o)+t+(i?"\r\n":"\n")+n;o=r+1;r=e.indexOf("\n",o)}while(r!==-1);s+=e.substr(o);return s};e.exports={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}},391:(e,t,n)=>{const r=n(510);const o={};for(const e of Object.keys(r)){o[r[e]]=e}const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e])){throw new Error("missing channels property: "+e)}if(!("labels"in s[e])){throw new Error("missing channel labels property: "+e)}if(s[e].labels.length!==s[e].channels){throw new Error("channel and label counts mismatch: "+e)}const{channels:t,labels:n}=s[e];delete s[e].channels;delete s[e].labels;Object.defineProperty(s[e],"channels",{value:t});Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.min(t,n,r);const s=Math.max(t,n,r);const i=s-o;let a;let l;if(s===o){a=0}else if(t===s){a=(n-r)/i}else if(n===s){a=2+(r-t)/i}else if(r===s){a=4+(t-n)/i}a=Math.min(a*60,360);if(a<0){a+=360}const c=(o+s)/2;if(s===o){l=0}else if(c<=.5){l=i/(s+o)}else{l=i/(2-s-o)}return[a,l*100,c*100]};s.rgb.hsv=function(e){let t;let n;let r;let o;let s;const i=e[0]/255;const a=e[1]/255;const l=e[2]/255;const c=Math.max(i,a,l);const u=c-Math.min(i,a,l);const diffc=function(e){return(c-e)/6/u+1/2};if(u===0){o=0;s=0}else{s=u/c;t=diffc(i);n=diffc(a);r=diffc(l);if(i===c){o=r-n}else if(a===c){o=1/3+t-r}else if(l===c){o=2/3+n-t}if(o<0){o+=1}else if(o>1){o-=1}}return[o*360,s*100,c*100]};s.rgb.hwb=function(e){const t=e[0];const n=e[1];let r=e[2];const o=s.rgb.hsl(e)[0];const i=1/255*Math.min(t,Math.min(n,r));r=1-1/255*Math.max(t,Math.max(n,r));return[o,i*100,r*100]};s.rgb.cmyk=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.min(1-t,1-n,1-r);const s=(1-t-o)/(1-o)||0;const i=(1-n-o)/(1-o)||0;const a=(1-r-o)/(1-o)||0;return[s*100,i*100,a*100,o*100]};function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}s.rgb.keyword=function(e){const t=o[e];if(t){return t}let n=Infinity;let s;for(const t of Object.keys(r)){const o=r[t];const i=comparativeDistance(e,o);if(i<n){n=i;s=t}}return s};s.keyword.rgb=function(e){return r[e]};s.rgb.xyz=function(e){let t=e[0]/255;let n=e[1]/255;let r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805;const s=t*.2126+n*.7152+r*.0722;const i=t*.0193+n*.1192+r*.9505;return[o*100,s*100,i*100]};s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0];let r=t[1];let o=t[2];n/=95.047;r/=100;o/=108.883;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*r-16;const a=500*(n-r);const l=200*(r-o);return[i,a,l]};s.hsl.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;let o;let s;let i;if(n===0){i=r*255;return[i,i,i]}if(r<.5){o=r*(1+n)}else{o=r+n-r*n}const a=2*r-o;const l=[0,0,0];for(let e=0;e<3;e++){s=t+1/3*-(e-1);if(s<0){s++}if(s>1){s--}if(6*s<1){i=a+(o-a)*6*s}else if(2*s<1){i=o}else if(3*s<2){i=a+(o-a)*(2/3-s)*6}else{i=a}l[e]=i*255}return l};s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100;let r=e[2]/100;let o=n;const s=Math.max(r,.01);r*=2;n*=r<=1?r:2-r;o*=s<=1?s:2-s;const i=(r+n)/2;const a=r===0?2*o/(s+o):2*n/(r+n);return[t,a*100,i*100]};s.hsv.rgb=function(e){const t=e[0]/60;const n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6;const s=t-Math.floor(t);const i=255*r*(1-n);const a=255*r*(1-n*s);const l=255*r*(1-n*(1-s));r*=255;switch(o){case 0:return[r,l,i];case 1:return[a,r,i];case 2:return[i,r,l];case 3:return[i,a,r];case 4:return[l,i,r];case 5:return[r,i,a]}};s.hsv.hsl=function(e){const t=e[0];const n=e[1]/100;const r=e[2]/100;const o=Math.max(r,.01);let s;let i;i=(2-n)*r;const a=(2-n)*o;s=n*o;s/=a<=1?a:2-a;s=s||0;i/=2;return[t,s*100,i*100]};s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100;let r=e[2]/100;const o=n+r;let s;if(o>1){n/=o;r/=o}const i=Math.floor(6*t);const a=1-r;s=6*t-i;if((i&1)!==0){s=1-s}const l=n+s*(a-n);let c;let u;let d;switch(i){default:case 6:case 0:c=a;u=l;d=n;break;case 1:c=l;u=a;d=n;break;case 2:c=n;u=a;d=l;break;case 3:c=n;u=l;d=a;break;case 4:c=l;u=n;d=a;break;case 5:c=a;u=n;d=l;break}return[c*255,u*255,d*255]};s.cmyk.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;const o=e[3]/100;const s=1-Math.min(1,t*(1-o)+o);const i=1-Math.min(1,n*(1-o)+o);const a=1-Math.min(1,r*(1-o)+o);return[s*255,i*255,a*255]};s.xyz.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;let o;let s;let i;o=t*3.2406+n*-1.5372+r*-.4986;s=t*-.9689+n*1.8758+r*.0415;i=t*.0557+n*-.204+r*1.057;o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92;s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92;i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92;o=Math.min(Math.max(0,o),1);s=Math.min(Math.max(0,s),1);i=Math.min(Math.max(0,i),1);return[o*255,s*255,i*255]};s.xyz.lab=function(e){let t=e[0];let n=e[1];let r=e[2];t/=95.047;n/=100;r/=108.883;t=t>.008856?t**(1/3):7.787*t+16/116;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16;const s=500*(t-n);const i=200*(n-r);return[o,s,i]};s.lab.xyz=function(e){const t=e[0];const n=e[1];const r=e[2];let o;let s;let i;s=(t+16)/116;o=n/500+s;i=s-r/200;const a=s**3;const l=o**3;const c=i**3;s=a>.008856?a:(s-16/116)/7.787;o=l>.008856?l:(o-16/116)/7.787;i=c>.008856?c:(i-16/116)/7.787;o*=95.047;s*=100;i*=108.883;return[o,s,i]};s.lab.lch=function(e){const t=e[0];const n=e[1];const r=e[2];let o;const s=Math.atan2(r,n);o=s*360/2/Math.PI;if(o<0){o+=360}const i=Math.sqrt(n*n+r*r);return[t,i,o]};s.lch.lab=function(e){const t=e[0];const n=e[1];const r=e[2];const o=r/360*2*Math.PI;const s=n*Math.cos(o);const i=n*Math.sin(o);return[t,s,i]};s.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let i=t===null?s.rgb.hsv(e)[2]:t;i=Math.round(i/50);if(i===0){return 30}let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));if(i===2){a+=60}return a};s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])};s.rgb.ansi256=function(e){const t=e[0];const n=e[1];const r=e[2];if(t===n&&n===r){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}const o=16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return o};s.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}const n=(~~(e>50)+1)*.5;const r=(t&1)*n*255;const o=(t>>1&1)*n*255;const s=(t>>2&1)*n*255;return[r,o,s]};s.ansi256.rgb=function(e){if(e>=232){const t=(e-232)*10+8;return[t,t,t]}e-=16;let t;const n=Math.floor(e/36)/5*255;const r=Math.floor((t=e%36)/6)/5*255;const o=t%6/5*255;return[n,r,o]};s.rgb.hex=function(e){const t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);const n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}let n=t[0];if(t[0].length===3){n=n.split("").map((e=>e+e)).join("")}const r=parseInt(n,16);const o=r>>16&255;const s=r>>8&255;const i=r&255;return[o,s,i]};s.rgb.hcg=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.max(Math.max(t,n),r);const s=Math.min(Math.min(t,n),r);const i=o-s;let a;let l;if(i<1){a=s/(1-i)}else{a=0}if(i<=0){l=0}else if(o===t){l=(n-r)/i%6}else if(o===n){l=2+(r-t)/i}else{l=4+(t-n)/i}l/=6;l%=1;return[l*360,i*100,a*100]};s.hsl.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=n<.5?2*t*n:2*t*(1-n);let o=0;if(r<1){o=(n-.5*r)/(1-r)}return[e[0],r*100,o*100]};s.hsv.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=t*n;let o=0;if(r<1){o=(n-r)/(1-r)}return[e[0],r*100,o*100]};s.hcg.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;if(n===0){return[r*255,r*255,r*255]}const o=[0,0,0];const s=t%1*6;const i=s%1;const a=1-i;let l=0;switch(Math.floor(s)){case 0:o[0]=1;o[1]=i;o[2]=0;break;case 1:o[0]=a;o[1]=1;o[2]=0;break;case 2:o[0]=0;o[1]=1;o[2]=i;break;case 3:o[0]=0;o[1]=a;o[2]=1;break;case 4:o[0]=i;o[1]=0;o[2]=1;break;default:o[0]=1;o[1]=0;o[2]=a}l=(1-n)*r;return[(n*o[0]+l)*255,(n*o[1]+l)*255,(n*o[2]+l)*255]};s.hcg.hsv=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);let o=0;if(r>0){o=t/r}return[e[0],o*100,r*100]};s.hcg.hsl=function(e){const t=e[1]/100;const n=e[2]/100;const r=n*(1-t)+.5*t;let o=0;if(r>0&&r<.5){o=t/(2*r)}else if(r>=.5&&r<1){o=t/(2*(1-r))}return[e[0],o*100,r*100]};s.hcg.hwb=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};s.hwb.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=1-n;const o=r-t;let s=0;if(o<1){s=(r-o)/(1-o)}return[e[0],o*100,s*100]};s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};s.gray.hsl=function(e){return[0,0,e[0]]};s.gray.hsv=s.gray.hsl;s.gray.hwb=function(e){return[0,100,e[0]]};s.gray.cmyk=function(e){return[0,0,0,e[0]]};s.gray.lab=function(e){return[e[0],0,0]};s.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255;const n=(t<<16)+(t<<8)+t;const r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};s.rgb.gray=function(e){const t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},931:(e,t,n)=>{const r=n(391);const o=n(880);const s={};const i=Object.keys(r);function wrapRaw(e){const wrappedFn=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}return e(t)};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}function wrapRounded(e){const wrappedFn=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}const r=e(t);if(typeof r==="object"){for(let e=r.length,t=0;t<e;t++){r[t]=Math.round(r[t])}}return r};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}i.forEach((e=>{s[e]={};Object.defineProperty(s[e],"channels",{value:r[e].channels});Object.defineProperty(s[e],"labels",{value:r[e].labels});const t=o(e);const n=Object.keys(t);n.forEach((n=>{const r=t[n];s[e][n]=wrapRounded(r);s[e][n].raw=wrapRaw(r)}))}));e.exports=s},880:(e,t,n)=>{const r=n(391);function buildGraph(){const e={};const t=Object.keys(r);for(let n=t.length,r=0;r<n;r++){e[t[r]]={distance:-1,parent:null}}return e}function deriveBFS(e){const t=buildGraph();const n=[e];t[e].distance=0;while(n.length){const e=n.pop();const o=Object.keys(r[e]);for(let r=o.length,s=0;s<r;s++){const r=o[s];const i=t[r];if(i.distance===-1){i.distance=t[e].distance+1;i.parent=e;n.unshift(r)}}}return t}function link(e,t){return function(n){return t(e(n))}}function wrapConversion(e,t){const n=[t[e].parent,e];let o=r[t[e].parent][e];let s=t[e].parent;while(t[s].parent){n.unshift(t[s].parent);o=link(r[t[s].parent][s],o);s=t[s].parent}o.conversion=n;return o}e.exports=function(e){const t=deriveBFS(e);const n={};const r=Object.keys(t);for(let e=r.length,o=0;o<e;o++){const e=r[o];const s=t[e];if(s.parent===null){continue}n[e]=wrapConversion(e,t)}return n}},510:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},621:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}},318:(e,t,n)=>{"use strict";const r=n(37);const o=n(224);const s=n(621);const{env:i}=process;let a;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){a=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){a=1}if("FORCE_COLOR"in i){if(i.FORCE_COLOR==="true"){a=1}else if(i.FORCE_COLOR==="false"){a=0}else{a=i.FORCE_COLOR.length===0?1:Math.min(parseInt(i.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(a===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(e&&!t&&a===undefined){return 0}const n=a||0;if(i.TERM==="dumb"){return n}if(process.platform==="win32"){const e=r.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in i))||i.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if(i.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}return n}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,o.isatty(1))),stderr:translateLevel(supportsColor(true,o.isatty(2)))}},294:(e,t,n)=>{e.exports=n(219)},219:(e,t,n)=>{"use strict";var r=n(808);var o=n(404);var s=n(685);var i=n(687);var a=n(361);var l=n(491);var c=n(837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(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 onFree(e,n,r,o){var s=toOptions(n,r,o);for(var i=0,a=t.requests.length;i<a;++i){var l=t.requests[i];if(l.host===s.host&&l.port===s.port){t.requests.splice(i,1);l.request.onSocket(e);return}}e.destroy();t.removeSocket(e)}))}c.inherits(TunnelingAgent,a.EventEmitter);TunnelingAgent.prototype.addRequest=function addRequest(e,t,n,r){var o=this;var s=mergeOptions({request:e},o.options,toOptions(t,n,r));if(o.sockets.length>=this.maxSockets){o.requests.push(s);return}o.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){o.emit("free",t,s)}function onCloseOrRemove(e){o.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var n=this;var r={};n.sockets.push(r);var o=mergeOptions({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){o.localAddress=e.localAddress}if(o.proxyAuth){o.headers=o.headers||{};o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")}u("making CONNECT request");var s=n.request(o);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,n){process.nextTick((function(){onConnect(e,t,n)}))}function onConnect(o,i,a){s.removeAllListeners();i.removeAllListeners();if(o.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",o.statusCode);i.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+o.statusCode);l.code="ECONNRESET";e.request.emit("error",l);n.removeSocket(r);return}if(a.length>0){u("got illegal response body from proxy");i.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);n.removeSocket(r);return}u("tunneling connection has established");n.sockets[n.sockets.indexOf(r)]=i;return t(i)}function onError(t){s.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, "+"cause="+t.message);o.code="ECONNRESET";e.request.emit("error",o);n.removeSocket(r)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var n=this.requests.shift();if(n){this.createSocket(n,(function(e){n.request.onSocket(e)}))}};function createSecureSocket(e,t){var n=this;TunnelingAgent.prototype.createSocket.call(n,e,(function(r){var s=e.request.getHeader("host");var i=mergeOptions({},n.options,{socket:r,servername:s?s.replace(/:.*$/,""):e.host});var a=o.connect(0,i);n.sockets[n.sockets.indexOf(r)]=a;t(a)}))}function toOptions(e,t,n){if(typeof e==="string"){return{host:e,port:t,localAddress:n}}return e}function mergeOptions(e){for(var t=1,n=arguments.length;t<n;++t){var r=arguments[t];if(typeof r==="object"){var o=Object.keys(r);for(var s=0,i=o.length;s<i;++s){var a=o[s];if(r[a]!==undefined){e[a]=r[a]}}}}return e}var u;if(process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)){u=function(){var e=Array.prototype.slice.call(arguments);if(typeof e[0]==="string"){e[0]="TUNNEL: "+e[0]}else{e.unshift("TUNNEL:")}console.error.apply(console,e)}}else{u=function(){}}t.debug=u},406:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,o)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))r(t,e,n);o(t,e);return t};var i=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};var a=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n);function verb(t){n[t]=e[t]&&function(n){return new Promise((function(r,o){n=e[t](n),settle(r,o,n.done,n.value)}))}}function settle(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.status=t.getComponentStatusName=t.getOverallStatusName=t.ComponentsStatusName=t.OverallStatusName=t.Component=t.ComponentStatus=t.OverallStatus=void 0;const l=s(n(925));var c;(function(e){e[e["Minor"]=0]="Minor";e[e["Major"]=1]="Major";e[e["Critical"]=2]="Critical";e[e["Maintenance"]=3]="Maintenance"})(c=t.OverallStatus||(t.OverallStatus={}));var u;(function(e){e[e["Operational"]=0]="Operational";e[e["DegradedPerformance"]=1]="DegradedPerformance";e[e["PartialOutage"]=2]="PartialOutage";e[e["MajorOutage"]=3]="MajorOutage";e[e["UnderMaintenance"]=4]="UnderMaintenance"})(u=t.ComponentStatus||(t.ComponentStatus={}));var d;(function(e){e["Git"]="Git Operations";e["Api"]="API Requests";e["Webhooks"]="Webhooks";e["Issues"]="Issues";e["PullRequests"]="Pull Requests";e["Actions"]="GitHub Actions";e["Packages"]="GitHub Packages";e["Pages"]="GitHub Pages";e["Codespaces"]="Codespaces";e["Other"]="Other"})(d=t.Component||(t.Component={}));t.OverallStatusName=new Map([["minor",c.Minor],["major",c.Major],["critical",c.Critical],["maintenance",c.Maintenance]]);t.ComponentsStatusName=new Map([["operational",u.Operational],["degraded_performance",u.DegradedPerformance],["partial_outage",u.PartialOutage],["major_outage",u.MajorOutage],["under_maintenance",u.UnderMaintenance]]);const getOverallStatusName=e=>i(void 0,void 0,void 0,(function*(){var n,r;try{for(var o=a(t.OverallStatusName),s;s=yield o.next(),!s.done;){const[t,n]=s.value;if(n==e)return t}}catch(e){n={error:e}}finally{try{if(s&&!s.done&&(r=o.return))yield r.call(o)}finally{if(n)throw n.error}}}));t.getOverallStatusName=getOverallStatusName;const getComponentStatusName=e=>i(void 0,void 0,void 0,(function*(){var n,r;try{for(var o=a(t.ComponentsStatusName),s;s=yield o.next(),!s.done;){const[t,n]=s.value;if(n==e)return t}}catch(e){n={error:e}}finally{try{if(s&&!s.done&&(r=o.return))yield r.call(o)}finally{if(n)throw n.error}}}));t.getComponentStatusName=getComponentStatusName;const status=()=>i(void 0,void 0,void 0,(function*(){const e=new l.HttpClient("ghaction-github-status");return(yield e.getJson(`https://www.githubstatus.com/api/v2/status.json`)).result}));t.status=status;const summary=()=>i(void 0,void 0,void 0,(function*(){const e=new l.HttpClient("ghaction-github-status");return(yield e.getJson(`https://www.githubstatus.com/api/v2/summary.json`)).result}));t.summary=summary},399:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,o)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))r(t,e,n);o(t,e);return t};var i=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});process.env.FORCE_COLOR="2";const l=a(n(818));const c=s(n(186));const u=s(n(406));const d=n(406);const f=s(n(629));const p=[];function run(){var e,t;return i(this,void 0,void 0,(function*(){try{const n=yield u.summary();if(n==null){c.setFailed(`Unable to contact GitHub Status API at this time.`);return}const r=yield getOverallStatus("overall_threshold");const o=new Map([[d.Component.Git,yield getComponentStatus("git_threshold")],[d.Component.Api,yield getComponentStatus("api_threshold")],[d.Component.Webhooks,yield getComponentStatus("webhooks_threshold")],[d.Component.Issues,yield getComponentStatus("issues_threshold")],[d.Component.PullRequests,yield getComponentStatus("prs_threshold")],[d.Component.Actions,yield getComponentStatus("actions_threshold")],[d.Component.Packages,yield getComponentStatus("packages_threshold")],[d.Component.Pages,yield getComponentStatus("pages_threshold")],[d.Component.Codespaces,yield getComponentStatus("codespaces_threshold")]]);const s=d.OverallStatusName.get(n.status.indicator);if(s!==undefined&&r!==undefined&&s>=r){p.push(`Overall (${yield(0,d.getOverallStatusName)(s)} >= ${yield(0,d.getOverallStatusName)(r)})`)}switch(n.status.indicator){case"minor":{c.warning(`GitHub Status: ${n.status.description}`);break}case"major":{c.error(`GitHub Status: ${n.status.description}`);break}case"critical":{c.error(`GitHub Status: ${n.status.description}`);break}case"maintenance":{c.warning(`GitHub Status: ${n.status.description}`);break}default:{c.info(`GitHub Status: ${n.status.description}`);break}}if(n.components!=undefined&&((e=n.components)===null||e===void 0?void 0:e.length)>0){c.info(`\n• ${l.default.bold(`Components status`)}`);yield f.asyncForEach(n.components,(e=>i(this,void 0,void 0,(function*(){if(e.name.startsWith("Visit ")){return}if(!Object.values(d.Component).includes(e.name)){c.info(l.default.cyan(`• ${e.name} is not implemented.`))}const t=d.ComponentsStatusName.get(e.status);if(t===undefined){c.warning(`Cannot resolve status ${e.status} for ${e.name}`);return}const n=o.get(e.name);if(n!==undefined&&t>=n){p.push(`${e.name} (${yield(0,d.getComponentStatusName)(t)} >= ${yield(0,d.getComponentStatusName)(n)})`)}let r;switch(e.status){case"operational":{r=l.default.green("Operational");break}case"degraded_performance":{r=l.default.magenta("Degraded performance");break}case"partial_outage":{r=l.default.yellow("Partial outage");break}case"major_outage":{r=l.default.red("Major outage");break}case"under_maintenance":{r=l.default.blue("Under maintenance");break}}c.info(` • ${r}${new Array(30-r.length).join(" ")} ${e.name}`)}))));if(n.incidents!=undefined&&((t=n.incidents)===null||t===void 0?void 0:t.length)>0){yield f.asyncForEach(n.incidents,(e=>i(this,void 0,void 0,(function*(){let t;switch(e.impact){case"minor":{t=l.default.magenta;break}case"major":{t=l.default.yellow;break}case"critical":{t=l.default.red;break}default:{t=l.default.white;break}}c.info(`\n• ${t.bold(`${e.name} (${e.shortlink})`)}`);yield f.asyncForEach(e.incident_updates,(e=>i(this,void 0,void 0,(function*(){const t=new Date(e.updated_at).toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:false});c.info(` • ${l.default.gray(t)} - ${e.body}`)}))))}))));if(p.length>0){c.info(`\n• ${l.default.bgRed(`Unhealthy`)}`);yield f.asyncForEach(p,(e=>i(this,void 0,void 0,(function*(){c.info(` • ${e}`)}))));c.setFailed(`GitHub is unhealthy. Following your criteria, the job has been marked as failed.`);return}}}}catch(e){c.setFailed(e.message)}}))}function getOverallStatus(e){return i(this,void 0,void 0,(function*(){const t=c.getInput(e);const n=d.OverallStatusName.get(t);if(t!=""&&n===undefined){throw new Error(`Overall status ${t} does not exist`)}return n}))}function getComponentStatus(e){return i(this,void 0,void 0,(function*(){const t=c.getInput(e);const n=d.ComponentsStatusName.get(t);if(t!=""&&n===undefined){throw new Error(`Component status ${t} does not exist for ${e}`)}return n}))}run()},629:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function fulfilled(e){try{step(r.next(e))}catch(e){o(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){o(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.asyncForEach=void 0;const asyncForEach=(e,t)=>n(void 0,void 0,void 0,(function*(){for(let n=0;n<e.length;n++){yield t(e[n],n,e)}}));t.asyncForEach=asyncForEach},491:e=>{"use strict";e.exports=require("assert")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},808:e=>{"use strict";e.exports=require("net")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},404:e=>{"use strict";e.exports=require("tls")},224:e=>{"use strict";e.exports=require("tty")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var o=t[n]={id:n,loaded:false,exports:{}};var s=true;try{e[n].call(o.exports,o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}o.loaded=true;return o.exports}(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(399);module.exports=n})();
//# sourceMappingURL=index.js.map