From b5dfd058e8705dc013564b8e3517530d476aee76 Mon Sep 17 00:00:00 2001 From: Tam Mach Date: Fri, 8 Apr 2022 11:07:20 +1000 Subject: [PATCH 1/2] Add network-plugin option This commit is to add network-plugin option for the use case of testing CNI implementation with minikube in CI. As the coredns pod will not be ready withouth CNI, wait flag should be able to adjust accordingly. Signed-off-by: Tam Mach --- README.md | 22 ++++++++++ action.yml | 8 ++++ dist/index.js | 2 +- src/inputs.ts | 1 + src/minikube.ts | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ src/start.ts | 2 +- 6 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 src/minikube.ts diff --git a/README.md b/README.md index 9c9d90e..9e94743 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,15 @@ By default setup-minikube caches the ISO, kicbase, and preload using GitHub Acti +
+ network-plugin (optional) +
+    - default: auto
+    - options:
+      - cni
+  
+
+
cni (optional)
@@ -116,6 +125,19 @@ By default setup-minikube caches the ISO, kicbase, and preload using GitHub Acti
   
+
+ wait (optional) +
+    - default: all
+    - options:
+      - comma separated list of Kubernetes components (e.g. apiserver,system_pods,default_sa,apps_running,node_ready,kubelet)
+      - all
+      - none
+      - true
+      - false
+  
+
+
addons (optional)
diff --git a/action.yml b/action.yml
index c521515..e886677 100644
--- a/action.yml
+++ b/action.yml
@@ -33,6 +33,10 @@ inputs:
     description: 'Amount of RAM to allocate to Kubernetes (format: [], where unit = b, k, m or g). Use "max" to use the maximum amount of memory.'
     required: false
     default: ''
+  network-plugin:
+    description: 'Kubelet network plug-in to use (default: auto). Valid options: cni'
+    required: false
+    default: ''
   cni:
     description: 'CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest'
     required: false
@@ -53,6 +57,10 @@ inputs:
     description: 'Mount the source directory from your host into the target directory inside the cluster (format: :)'
     required: false
     default: ''
+  wait:
+    description: 'comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to "apiserver,system_pods", available options: "apiserver,system_pods,default_sa,apps_running,node_ready,kubelet". Other acceptable values are "all" or "none", "true" and "false"'
+    required: false
+    default: 'all'
 runs:
   using: 'node16'
   main: 'dist/index.js'
diff --git a/dist/index.js b/dist/index.js
index 040a1ab..28ea243 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-(()=>{var __webpack_modules__={3782:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCaches=t.restoreCaches=void 0;const n=a(7799);const o=a(2186);const r=a(1514);const s=a(2037);const p=a(1017);const restoreCaches=()=>i(void 0,void 0,void 0,(function*(){const e={iso:true,kic:true,preload:true};if(!useCache()){return e}const t=yield getMinikubeVersion();const a=restoreCache("iso",t);const i=restoreCache("kic",t);const n=restoreCache("preloaded-tarball",t);e.iso=typeof(yield a)!=="undefined";e.kic=typeof(yield i)!=="undefined";e.preload=typeof(yield n)!=="undefined";return e}));t.restoreCaches=restoreCaches;const getMinikubeVersion=()=>i(void 0,void 0,void 0,(function*(){let e="";const t={};t.listeners={stdout:t=>{e+=t.toString()}};yield(0,r.exec)("minikube",["version","--short"],t);return e.trim()}));const saveCaches=e=>i(void 0,void 0,void 0,(function*(){if(!useCache()){return}const t=yield getMinikubeVersion();const a=saveCache("iso",e.iso,t);const i=saveCache("kic",e.kic,t);yield saveCache("preloaded-tarball",e.preload,t);yield a;yield i}));t.saveCaches=saveCaches;const restoreCache=(e,t)=>i(void 0,void 0,void 0,(function*(){return(0,n.restoreCache)(getCachePaths(e),getCacheKey(e,t))}));const saveCache=(e,t,a)=>i(void 0,void 0,void 0,(function*(){if(t){return}try{yield(0,n.saveCache)(getCachePaths(e),getCacheKey(e,a))}catch(t){console.log(e+t)}}));const getCachePaths=e=>[(0,p.join)((0,s.homedir)(),".minikube","cache",e)];const getCacheKey=(e,t)=>{let a=`${e}-${t}-${(0,s.arch)()}`;if(e==="preloaded-tarball"){const e=getInput("kubernetes-version","stable");const t=getInput("container-runtime","docker");a+=`-${e}-${t}`}return a};const getInput=(e,t)=>{const a=(0,o.getInput)(e).toLowerCase();return a!==""?a:t};const useCache=()=>(0,o.getInput)("cache").toLowerCase()==="true"},5933:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadMinikube=t.getDownloadURL=void 0;const n=a(2186);const o=a(1514);const r=a(7436);const s=a(7784);const p=a(2037);const l=a(1017);const getDownloadURL=e=>{const t=(0,p.platform)();const a=t==="win32"?"windows":t;const i=t==="win32"?".exe":"";switch(e){case"latest":return`https://github.com/kubernetes/minikube/releases/latest/download/minikube-${a}-amd64${i}`;case"head":return`https://storage.googleapis.com/minikube-builds/master/minikube-${a}-amd64${i}`;default:return`https://github.com/kubernetes/minikube/releases/download/v${e}/minikube-${a}-amd64${i}`}};t.getDownloadURL=getDownloadURL;const downloadMinikube=e=>i(void 0,void 0,void 0,(function*(){const a=(0,t.getDownloadURL)(e);const i=yield(0,s.downloadTool)(a);const d=(0,p.platform)()==="darwin"?"/Users/runner/bin":"/home/runner/bin";yield(0,r.mkdirP)(d);yield(0,o.exec)("chmod",["+x",i]);yield(0,r.mv)(i,(0,l.join)(d,"minikube"));(0,n.addPath)(d)}));t.downloadMinikube=downloadMinikube},6180:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setArgs=void 0;const i=a(2186);const setArgs=e=>{const t=[{key:"addons",flag:"--addons"},{key:"cni",flag:"--cni"},{key:"container-runtime",flag:"--container-runtime"},{key:"cpus",flag:"--cpus"},{key:"driver",flag:"--driver"},{key:"extra-config",flag:"--extra-config"},{key:"kubernetes-version",flag:"--kubernetes-version"},{key:"listen-address",flag:"--listen-address"},{key:"memory",flag:"--memory"},{key:"mount-path",flag:"--mount-string"}];t.forEach((t=>{const a=(0,i.getInput)(t.key).toLowerCase();if(a!==""){e.push(t.flag,a)}}));if((0,i.getInput)("mount-path")!==""){e.push("--mount")}};t.setArgs=setArgs},3109:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});const n=a(2186);const o=a(5933);const r=a(5125);const run=()=>i(void 0,void 0,void 0,(function*(){try{let e=(0,n.getInput)("minikube-version").toLowerCase();e=e==="stable"?"latest":e;yield(0,o.downloadMinikube)(e);yield(0,r.startMinikube)()}catch(e){if(e instanceof Error){(0,n.setFailed)(e.message)}}}));run()},5516:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.installNoneDriverDeps=void 0;const n=a(2186);const o=a(1514);const r=a(7784);const installCriDocker=()=>i(void 0,void 0,void 0,(function*(){const e="https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/";const t=(0,r.downloadTool)(e+"cri-dockerd");const a=(0,r.downloadTool)(e+"cri-docker.service");const i=(0,r.downloadTool)(e+"cri-docker.socket");yield(0,o.exec)("chmod",["+x",yield t]);yield(0,o.exec)("sudo",["mv",yield t,"/usr/bin/cri-dockerd"]);yield(0,o.exec)("sudo",["mv",yield a,"/usr/lib/systemd/system/cri-docker.service"]);yield(0,o.exec)("sudo",["mv",yield i,"/usr/lib/systemd/system/cri-docker.socket"])}));const installConntrackSocat=()=>i(void 0,void 0,void 0,(function*(){yield(0,o.exec)("sudo",["apt-get","update","-qq"]);yield(0,o.exec)("sudo",["apt-get","-qq","-y","install","conntrack","socat"])}));const installCrictl=()=>i(void 0,void 0,void 0,(function*(){const e="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz";const t=(0,r.downloadTool)(e);yield(0,o.exec)("sudo",["tar","zxvf",yield t,"-C","/usr/local/bin"])}));const installNoneDriverDeps=()=>i(void 0,void 0,void 0,(function*(){const e=(0,n.getInput)("driver").toLowerCase();if(e!=="none"){return}yield Promise.all([installCriDocker(),installConntrackSocat(),installCrictl()])}));t.installNoneDriverDeps=installNoneDriverDeps},5125:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.startMinikube=void 0;const n=a(1514);const o=a(3782);const r=a(6180);const s=a(5516);const startMinikube=()=>i(void 0,void 0,void 0,(function*(){const e=["start","--wait","all"];(0,r.setArgs)(e);const t=yield(0,o.restoreCaches)();yield(0,s.installNoneDriverDeps)();yield(0,n.exec)("minikube",e);yield(0,o.saveCaches)(t)}));t.startMinikube=startMinikube},7799:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=n(a(1017));const s=n(a(1518));const p=n(a(8245));const l=a(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,a,n){return i(this,void 0,void 0,(function*(){checkPaths(e);a=a||[];const i=[t,...a];o.debug("Resolved Keys:");o.debug(JSON.stringify(i));if(i.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of i){checkKey(e)}const d=yield s.getCompressionMethod();let c="";try{const t=yield p.getCacheEntry(i,e,{compressionMethod:d});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}c=r.join(yield s.createTempDirectory(),s.getCacheFileName(d));o.debug(`Archive Path: ${c}`);yield p.downloadCache(t.archiveLocation,c,n);if(o.isDebug()){yield l.listTar(c,d)}const a=s.getArchiveFileSizeInBytes(c);o.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield l.extractTar(c,d);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield s.unlinkFile(c)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,a){var n,d,c,m,u;return i(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const i=yield s.getCompressionMethod();let f=-1;const h=yield s.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const g=yield s.createTempDirectory();const y=r.join(g,s.getCacheFileName(i));o.debug(`Archive Path: ${y}`);try{yield l.createTar(g,h,i);if(o.isDebug()){yield l.listTar(y,i)}const r=10*1024*1024*1024;const v=s.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${v}`);if(v>r&&!s.isGhes()){throw new Error(`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:i,cacheSize:v});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){f=(d=b===null||b===void 0?void 0:b.result)===null||d===void 0?void 0:d.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((m=(c=b===null||b===void 0?void 0:b.error)===null||c===void 0?void 0:c.message)!==null&&m!==void 0?m:`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message}`)}o.debug(`Saving Cache (ID: ${f})`);yield p.saveCache(f,y,a)}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else if(t.name===ReserveCacheError.name){o.info(`Failed to save: ${t.message}`)}else{o.warning(`Failed to save: ${t.message}`)}}finally{try{yield s.unlinkFile(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return f}))}t.saveCache=saveCache},8245:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(5526);const p=n(a(6113));const l=n(a(7147));const d=a(7310);const c=n(a(1518));const m=a(8840);const u=a(5500);const f=a(6215);const h=a(3981);const g="1.0";function getCacheApiUrl(e){const t=process.env["ACTIONS_CACHE_URL"]||"";if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new s.BearerCredentialHandler(e);return new r.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t){const a=e.concat(!t||t===m.CompressionMethod.Gzip?[]:[t]);a.push(g);return p.createHash("sha256").update(a.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const r=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${r}`;const p=yield h.retryTypedResponse("getCacheEntry",(()=>i(this,void 0,void 0,(function*(){return n.getJson(getCacheApiUrl(s))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],n,r)}return null}if(!h.isSuccessStatusCode(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const l=p.result;const d=l===null||l===void 0?void 0:l.archiveLocation;if(!d){throw new Error("Cache not found.")}o.setSecret(d);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,a){return i(this,void 0,void 0,(function*(){const n=`caches?key=${encodeURIComponent(e)}`;const r=yield h.retryTypedResponse("listCache",(()=>i(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(n))}))));if(r.statusCode===200){const t=r.result;const i=t===null||t===void 0?void 0:t.totalCount;if(i&&i>0){o.debug(`No matching cache found for cache key '${e}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=new d.URL(e);const n=f.getDownloadOptions(a);if(n.useAzureSdk&&i.hostname.endsWith(".blob.core.windows.net")){yield u.downloadCacheStorageSDK(e,t,n)}else{yield u.downloadCacheHttpClient(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const o=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const r={key:e,version:o,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const s=yield h.retryTypedResponse("reserveCache",(()=>i(this,void 0,void 0,(function*(){return n.postJson(getCacheApiUrl("caches"),r)}))));return s}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,a,n,r){return i(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${r-n+1} bytes at offset ${n} with content range: ${getContentRange(n,r)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(n,r)};const p=yield h.retryHttpClientResponse(`uploadChunk (start: ${n}, end: ${r})`,(()=>i(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,a(),s)}))));if(!h.isSuccessStatusCode(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,a,n){return i(this,void 0,void 0,(function*(){const r=c.getArchiveFileSizeInBytes(a);const s=getCacheApiUrl(`caches/${t.toString()}`);const p=l.openSync(a,"r");const d=f.getUploadOptions(n);const m=c.assertDefined("uploadConcurrency",d.uploadConcurrency);const u=c.assertDefined("uploadChunkSize",d.uploadChunkSize);const h=[...new Array(m).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(h.map((()=>i(this,void 0,void 0,(function*(){while(gl.createReadStream(a,{fd:p,start:i,end:n,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,n)}})))))}finally{l.closeSync(p)}return}))}function commitCache(e,t,a){return i(this,void 0,void 0,(function*(){const n={size:a};return yield h.retryTypedResponse("commitCache",(()=>i(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),n)}))))}))}function saveCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,a);o.debug("Commiting cache");const n=c.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const r=yield commitCache(i,e,n);if(!h.isSuccessStatusCode(r.statusCode)){throw new Error(`Cache service responded with ${r.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=o(a(2186));const s=o(a(1514));const p=o(a(8090));const l=o(a(7436));const d=o(a(7147));const c=o(a(1017));const m=o(a(5911));const u=o(a(3837));const f=a(2155);const h=a(8840);function createTempDirectory(){return i(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let a;if(e){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}t=c.join(a,"actions","temp")}const a=c.join(t,f.v4());yield l.mkdirP(a);return a}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return d.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,a;var o;return i(this,void 0,void 0,(function*(){const i=[];const s=(o=process.env["GITHUB_WORKSPACE"])!==null&&o!==void 0?o:process.cwd();const l=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var d=n(l.globGenerator()),m;m=yield d.next(),!m.done;){const e=m.value;const t=c.relative(s,e).replace(new RegExp(`\\${c.sep}`,"g"),"/");r.debug(`Matched: ${t}`);if(t===""){i.push(".")}else{i.push(`${t}`)}}}catch(e){t={error:e}}finally{try{if(m&&!m.done&&(a=d.return))yield a.call(d)}finally{if(t)throw t.error}}return i}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return i(this,void 0,void 0,(function*(){return u.promisify(d.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e){return i(this,void 0,void 0,(function*(){r.debug(`Checking ${e} --version`);let t="";try{yield s.exec(`${e} --version`,[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>t+=e.toString(),stderr:e=>t+=e.toString()}})}catch(e){r.debug(e.message)}t=t.trim();r.debug(t);return t}))}function getCompressionMethod(){return i(this,void 0,void 0,(function*(){if(process.platform==="win32"&&!(yield isGnuTarInstalled())){return h.CompressionMethod.Gzip}const e=yield getVersion("zstd");const t=m.clean(e);if(!e.toLowerCase().includes("zstd command line interface")){return h.CompressionMethod.Gzip}else if(!t||m.lt(t,"v1.3.2")){return h.CompressionMethod.ZstdWithoutLong}else{return h.CompressionMethod.Zstd}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===h.CompressionMethod.Gzip?h.CacheFilename.Gzip:h.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function isGnuTarInstalled(){return i(this,void 0,void 0,(function*(){const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")}))}t.isGnuTarInstalled=isGnuTarInstalled;function assertDefined(e,t){if(t===undefined){throw Error(`Expected ${e} but value was undefiend`)}return t}t.assertDefined=assertDefined;function isGhes(){const e=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return e.hostname.toUpperCase()!=="GITHUB.COM"}t.isGhes=isGhes},8840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(a=t.CacheFilename||(t.CacheFilename={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i=t.CompressionMethod||(t.CompressionMethod={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3},5500:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(4100);const p=n(a(4300));const l=n(a(7147));const d=n(a(2781));const c=n(a(3837));const m=n(a(1518));const u=a(8840);const f=a(3981);const h=a(2557);function pipeResponseToStream(e,t){return i(this,void 0,void 0,(function*(){const a=c.promisify(d.pipeline);yield a(e.message,t)}))}class DownloadProgress{constructor(e){this.contentLength=e;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=e;this.receivedBytes=0;o.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const e=this.segmentOffset+this.receivedBytes;const t=(100*(e/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const i=(e/(1024*1024)/(a/1e3)).toFixed(1);o.info(`Received ${e} of ${this.contentLength} (${t}%), ${i} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,e)}};this.timeoutHandle=setTimeout(displayCallback,e)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}t.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(e,t){return i(this,void 0,void 0,(function*(){const a=l.createWriteStream(t);const n=new r.HttpClient("actions/cache");const s=yield f.retryHttpClientResponse("downloadCache",(()=>i(this,void 0,void 0,(function*(){return n.get(e)}))));s.message.socket.setTimeout(u.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${u.SocketTimeout} ms`)}));yield pipeResponseToStream(s,a);const p=s.message.headers["content-length"];if(p){const e=parseInt(p);const a=m.getArchiveFileSizeInBytes(t);if(a!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${a}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheStorageSDK(e,t,a){var n;return i(this,void 0,void 0,(function*(){const i=new s.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const r=yield i.getProperties();const d=(n=r.contentLength)!==null&&n!==void 0?n:-1;if(d<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(2147483647,p.constants.MAX_LENGTH);const n=new DownloadProgress(d);const o=l.openSync(t,"w");try{n.startDisplayTimer();const t=new h.AbortController;const r=t.signal;while(!n.isDone()){const s=n.segmentOffset+n.segmentSize;const p=Math.min(e,d-s);n.nextSegment(p);const c=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,i.downloadToBuffer(s,p,{abortSignal:r,concurrency:a.downloadConcurrency,onProgress:n.onProgress()}));if(c==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(c)){l.writeFileSync(o,c)}}}finally{n.stopDisplayTimer();l.closeSync(o)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>i(void 0,void 0,void 0,(function*(){let a;const i=new Promise((t=>{a=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(a);return e}))}))},3981:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[r.HttpCodes.BadGateway,r.HttpCodes.ServiceUnavailable,r.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return i(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,a,n=s.DefaultRetryAttempts,r=s.DefaultRetryDelay,p=undefined){return i(this,void 0,void 0,(function*(){let i="";let s=1;while(s<=n){let l=undefined;let d=undefined;let c=false;try{l=yield t()}catch(e){if(p){l=p(e)}c=true;i=e.message}if(l){d=a(l);if(!isServerErrorStatusCode(d)){return l}}if(d){c=isRetryableStatusCode(d);i=`Cache service responded with ${d}`}o.debug(`${e} - Attempt ${s} of ${n} failed with error: ${i}`);if(!c){o.debug(`${e} - Error is not retryable`);break}yield sleep(r);s++}throw Error(`${e} failed: ${i}`)}))}t.retry=retry;function retryTypedResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),a,n,(e=>{if(e instanceof r.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),a,n)}))}t.retryHttpClientResponse=retryHttpClientResponse},6490:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=a(1514);const r=n(a(7436));const s=a(7147);const p=n(a(1017));const l=n(a(1518));const d=a(8840);const c=process.platform==="win32";function getTarPath(e,t){return i(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const a=`${process.env["windir"]}\\System32\\tar.exe`;if(t!==d.CompressionMethod.Gzip){e.push("--force-local")}else if(s.existsSync(a)){return a}else if(yield l.isGnuTarInstalled()){e.push("--force-local")}break}case"darwin":{const t=yield r.which("gtar",false);if(t){e.push("--delay-directory-restore");return t}break}default:break}return yield r.which("tar",true)}))}function execTar(e,t,a){return i(this,void 0,void 0,(function*(){try{yield o.exec(`"${yield getTarPath(e,t)}"`,e,{cwd:a})}catch(e){throw new Error(`Tar failed with error: ${e===null||e===void 0?void 0:e.message}`)}}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getCompressionProgram(e){switch(e){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -d --long=30":"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -d":"unzstd"];default:return["-z"]}}function listTar(e,t){return i(this,void 0,void 0,(function*(){const a=[...getCompressionProgram(t),"-tf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P"];yield execTar(a,t)}))}t.listTar=listTar;function extractTar(e,t){return i(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield r.mkdirP(a);const i=[...getCompressionProgram(t),"-xf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",a.replace(new RegExp(`\\${p.sep}`,"g"),"/")];yield execTar(i,t)}))}t.extractTar=extractTar;function createTar(e,t,a){return i(this,void 0,void 0,(function*(){const i="manifest.txt";const n=l.getCacheFileName(a);s.writeFileSync(p.join(e,i),t.join("\n"));const o=getWorkingDirectory();function getCompressionProgram(){switch(a){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -T0 --long=30":"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -T0":"zstdmt"];default:return["-z"]}}const r=["--posix",...getCompressionProgram(),"-cf",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",i];yield execTar(r,a,e)}))}t.createTar=createTar},6215:function(e,t,a){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=i(a(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}n.debug(`Upload concurrency: ${t.uploadConcurrency}`);n.debug(`Upload chunk size: ${t.uploadChunkSize}`);return t}t.getUploadOptions=getUploadOptions;function getDownloadOptions(e){const t={useAzureSdk:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:36e5};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.downloadConcurrency==="number"){t.downloadConcurrency=e.downloadConcurrency}if(typeof e.timeoutInMs==="number"){t.timeoutInMs=e.timeoutInMs}if(typeof e.segmentTimeoutInMs==="number"){t.segmentTimeoutInMs=e.segmentTimeoutInMs}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){t.segmentTimeoutInMs=Number(a)*60*1e3}n.debug(`Use Azure SDK: ${t.useAzureSdk}`);n.debug(`Download concurrency: ${t.downloadConcurrency}`);n.debug(`Request timeout (ms): ${t.timeoutInMs}`);n.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);n.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);return t}t.getDownloadOptions=getDownloadOptions},7351:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const r=o(a(2037));const s=a(5278);function issueCommand(e,t,a){const i=new Command(e,t,a);process.stdout.write(i.toString()+r.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const p="::";class Command{constructor(e,t,a){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=a}toString(){let e=p+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const i=this.properties[a];if(i){if(t){t=false}else{e+=","}e+=`${a}=${escapeProperty(i)}`}}}}e+=`${p}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.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 s=a(7351);const p=a(717);const l=a(5278);const d=o(a(2037));const c=o(a(1017));const m=a(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const a=l.toCommandValue(t);process.env[e]=a;const i=process.env["GITHUB_ENV"]||"";if(i){return p.issueFileCommand("ENV",p.prepareKeyValueMessage(e,t))}s.issueCommand("set-env",{name:e},a)}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){p.issueFileCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return a}return a.trim()}t.getInput=getInput;function getMultilineInput(e,t){const a=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return a}return a.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const a=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(a.includes(n))return true;if(i.includes(n))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){const a=process.env["GITHUB_OUTPUT"]||"";if(a){return p.issueFileCommand("OUTPUT",p.prepareKeyValueMessage(e,t))}process.stdout.write(d.EOL);s.issueCommand("set-output",{name:e},l.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){s.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){s.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){s.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+d.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return r(this,void 0,void 0,(function*(){startGroup(e);let a;try{a=yield t()}finally{endGroup()}return a}))}t.group=group;function saveState(e,t){const a=process.env["GITHUB_STATE"]||"";if(a){return p.issueFileCommand("STATE",p.prepareKeyValueMessage(e,t))}s.issueCommand("save-state",{name:e},l.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return r(this,void 0,void 0,(function*(){return yield m.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var f=a(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return f.summary}});var h=a(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var g=a(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const r=o(a(7147));const s=o(a(2037));const p=a(8974);const l=a(5278);function issueFileCommand(e,t){const a=process.env[`GITHUB_${e}`];if(!a){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!r.existsSync(a)){throw new Error(`Missing file at path: ${a}`)}r.appendFileSync(a,`${l.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const a=`ghadelimiter_${p.v4()}`;const i=l.toCommandValue(t);if(e.includes(a)){throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`)}if(i.includes(a)){throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`)}return`${e}<<${a}${s.EOL}${i}${s.EOL}${a}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=a(6255);const o=a(5526);const r=a(2186);class OidcClient{static createHttpClient(e=true,t=10){const a={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],a)}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 i(this,void 0,void 0,(function*(){const a=OidcClient.createHttpClient();const i=yield a.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 n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const a=encodeURIComponent(e);t=`${t}&audience=${a}`}r.debug(`ID token url is ${t}`);const a=yield OidcClient.getCall(t);r.setSecret(a);return a}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const r=o(a(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,r.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=a(2037);const o=a(7147);const{access:r,appendFile:s,writeFile:p}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield r(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,a={}){const i=Object.entries(a).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const a=yield this.filePath();const i=t?p:s;yield i(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const a=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),a);return this.addRaw(i).addEOL()}addList(e,t=false){const a=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(a,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:a,colspan:i,rowspan:n}=e;const o=t?"th":"td";const r=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(o,a,r)})).join("");return this.wrap("tr",t)})).join("");const a=this.wrap("table",t);return this.addRaw(a).addEOL()}addDetails(e,t){const a=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(a).addEOL()}addImage(e,t,a){const{width:i,height:n}=a||{};const o=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const r=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(r).addEOL()}addHeading(e,t){const a=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const n=this.wrap(i,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 a=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,a);return this.addRaw(i).addEOL()}addLink(e,t){const a=this.wrap("a",e,{href:t});return this.addRaw(a).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},5278:(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},8974:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return c.default}});var i=_interopRequireDefault(a(1595));var n=_interopRequireDefault(a(6993));var o=_interopRequireDefault(a(1472));var r=_interopRequireDefault(a(6217));var s=_interopRequireDefault(a(2381));var p=_interopRequireDefault(a(427));var l=_interopRequireDefault(a(2609));var d=_interopRequireDefault(a(1458));var c=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";t["default"]=a},6385:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const a=new Uint8Array(16);a[0]=(t=parseInt(e.slice(0,8),16))>>>24;a[1]=t>>>16&255;a[2]=t>>>8&255;a[3]=t&255;a[4]=(t=parseInt(e.slice(9,13),16))>>>8;a[5]=t&255;a[6]=(t=parseInt(e.slice(14,18),16))>>>8;a[7]=t&255;a[8]=(t=parseInt(e.slice(19,23),16))>>>8;a[9]=t&255;a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;a[11]=t/4294967296&255;a[12]=t>>>24&255;a[13]=t>>>16&255;a[14]=t>>>8&255;a[15]=t&255;return a}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=a},9784:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){i.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},8844:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const a=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var o=stringify;t["default"]=o},1595:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let r;let s=0;let p=0;function v1(e,t,a){let l=t&&a||0;const d=t||new Array(16);e=e||{};let c=e.node||o;let m=e.clockseq!==undefined?e.clockseq:r;if(c==null||m==null){const t=e.random||(e.rng||i.default)();if(c==null){c=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(m==null){m=r=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let f=e.nsecs!==undefined?e.nsecs:p+1;const h=u-s+(f-p)/1e4;if(h<0&&e.clockseq===undefined){m=m+1&16383}if((h<0||u>s)&&e.nsecs===undefined){f=0}if(f>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}s=u;p=f;r=m;u+=122192928e5;const g=((u&268435455)*1e4+f)%4294967296;d[l++]=g>>>24&255;d[l++]=g>>>16&255;d[l++]=g>>>8&255;d[l++]=g&255;const y=u/4294967296*1e4&268435455;d[l++]=y>>>8&255;d[l++]=y&255;d[l++]=y>>>24&15|16;d[l++]=y>>>16&255;d[l++]=m>>>8|128;d[l++]=m&255;for(let e=0;e<6;++e){d[l+e]=c[e]}return t||(0,n.default)(d)}var l=v1;t["default"]=l},6993:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v3",48,n.default);var r=o;t["default"]=r},5920:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(a(1458));var n=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,a){e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){a=a||0;for(let e=0;e<16;++e){t[a+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},6217:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v5",80,n.default);var r=o;t["default"]=r},2609:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const s=a(1576);const p=o(a(8159));function exec(e,t,a){return r(this,void 0,void 0,(function*(){const i=p.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const o=new p.ToolRunner(n,t,a);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,a){var i,n;return r(this,void 0,void 0,(function*(){let o="";let r="";const p=new s.StringDecoder("utf8");const l=new s.StringDecoder("utf8");const d=(i=a===null||a===void 0?void 0:a.listeners)===null||i===void 0?void 0:i.stdout;const c=(n=a===null||a===void 0?void 0:a.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{r+=l.write(e);if(c){c(e)}};const stdOutListener=e=>{o+=p.write(e);if(d){d(e)}};const m=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:m}));o+=p.end();r+=l.end();return{exitCode:u,stdout:o,stderr:r}}))}t.getExecOutput=getExecOutput},8159:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const s=o(a(2037));const p=o(a(2361));const l=o(a(2081));const d=o(a(1017));const c=o(a(7436));const m=o(a(1962));const u=a(9512);const f=process.platform==="win32";class ToolRunner extends p.EventEmitter{constructor(e,t,a){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=a||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const a=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(f){if(this._isCmdFile()){n+=a;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${a}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(a);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=a;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,a){try{let i=t+e.toString();let n=i.indexOf(s.EOL);while(n>-1){const e=i.substring(0,n);a(e);i=i.substring(n+s.EOL.length);n=i.indexOf(s.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const i of e){if(t.some((e=>e===i))){a=true;break}}if(!a){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.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='"';let a=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(a&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return r(this,void 0,void 0,(function*(){if(!m.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=d.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise(((e,t)=>r(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+s.EOL)}const i=new ExecState(a,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield m.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const o=l.spawn(n,this._getSpawnArgs(a),this._getSpawnOptions(this.options,n));let r="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}r=this._processLineBuffer(e,r,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let p="";if(o.stderr){o.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}p=this._processLineBuffer(e,p,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));o.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));o.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((a,i)=>{if(r.length>0){this.emit("stdline",r)}if(p.length>0){this.emit("errline",p)}o.removeAllListeners();if(a){t(a)}else{e(i)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let o=0;o0){t.push(n);n=""}continue}append(r)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends p.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},8090:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=a(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const r=o(a(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;r.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;r.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;r.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var p=this&&this.__await||function(e){return this instanceof p?(this.v=e,this):new p(e)};var l=this&&this.__asyncGenerator||function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(e,t||[]),n,o=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(a,i){o.push([e,t,a,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof p?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const d=o(a(2186));const c=o(a(7147));const m=o(a(1026));const u=o(a(1017));const f=o(a(9005));const h=a(1063);const g=a(4536);const y=a(9117);const v=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=m.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return r(this,void 0,void 0,(function*(){const a=[];try{for(var i=s(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;a.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return a}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=m.getOptions(this.options);const t=[];for(const a of this.patterns){t.push(a);if(e.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")){t.push(new g.Pattern(a.negate,true,a.segments.concat("**")))}}const a=[];for(const e of f.getSearchPaths(t)){d.debug(`Search path '${e}'`);try{yield p(c.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}a.unshift(new y.SearchState(e,1))}const i=[];while(a.length){const n=a.pop();const o=f.match(t,n.path);const r=!!o||f.partialMatch(t,n.path);if(!o&&!r){continue}const s=yield p(DefaultGlobber.stat(n,e,i));if(!s){continue}if(s.isDirectory()){if(o&h.MatchKind.Directory){yield yield p(n.path)}else if(!r){continue}const e=n.level+1;const t=(yield p(c.promises.readdir(n.path))).map((t=>new y.SearchState(u.join(n.path,t),e)));a.push(...t.reverse())}else if(o&h.MatchKind.File){yield yield p(n.path)}}}))}static create(e,t){return r(this,void 0,void 0,(function*(){const a=new DefaultGlobber(t);if(v){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{a.patterns.push(new g.Pattern(e))}}a.searchPaths.push(...f.getSearchPaths(a.patterns));return a}))}static stat(e,t,a){return r(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield c.promises.stat(e.path)}catch(a){if(a.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){d.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw a}}else{i=yield c.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield c.promises.realpath(e.path);while(a.length>=e.level){a.pop()}if(a.some((e=>e===t))){d.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}a.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var a;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(a=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const s=o(a(1017));const p=r(a(9491));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=s.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){p.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);p.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(l){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}p.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=s.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){p.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){p.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(s.sep)){return e}if(e===s.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const s=o(a(1017));const p=o(a(1849));const l=r(a(9491));const d=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=p.safeTrimTrailingSeparator(e);if(!p.hasRoot(e)){this.segments=e.split(s.sep)}else{let t=e;let a=p.dirname(t);while(a!==t){const e=s.basename(t);this.segments.unshift(e);t=a;a=p.dirname(t)}this.segments.unshift(t)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const a of e){const e=p?a.searchPath.toUpperCase():a.searchPath;t[e]="candidate"}const a=[];for(const i of e){const e=p?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let o=e;let s=r.dirname(o);while(s!==o){if(t[s]){n=true;break}o=s;s=r.dirname(o)}if(!n){a.push(i.searchPath);t[e]="included"}}return a}t.getSearchPaths=getSearchPaths;function match(e,t){let a=s.MatchKind.None;for(const i of e){if(i.negate){a&=~i.match(t)}else{a|=i.match(t)}}return a}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const s=o(a(2037));const p=o(a(1017));const l=o(a(1849));const d=r(a(9491));const c=a(3973);const m=a(1063);const u=a(6836);const f=process.platform==="win32";class Pattern{constructor(e,t=false,a,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{a=a||[];d.default(a.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(a[0]);d.default(t&&l.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(a).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(p.sep);n=l.safeTrimTrailingSeparator(n);let o=false;const r=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!o&&!(o=e==="")));this.searchPath=new u.Path(r).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(r[0]),f?"i":"");this.isImplicitPattern=t;const s={dot:true,nobrace:true,nocase:f,nocomment:true,noext:true,nonegate:true};n=f?n.replace(/\\/g,"/"):n;this.minimatch=new c.Minimatch(n,s)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(p.sep)&&this.isImplicitPattern===false){e=`${e}${p.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?m.MatchKind.Directory:m.MatchKind.All}return m.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(f?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(f?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){d.default(e,"pattern cannot be empty");const a=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));d.default(a.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);d.default(!l.hasRoot(e)||a[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${p.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${p.sep}`)){t=t||s.homedir();d.default(t,"Unable to determine HOME directory");d.default(l.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(f&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(f&&(e==="\\"||e.match(/^\\[^\\]/))){let t=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let t="";for(let a=0;a=0){if(i.length>1){return""}if(i){t+=i;a=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var a=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const s=o(a(3685));const p=o(a(5687));const l=o(a(9835));const d=o(a(4294));var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var m;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(m=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const h=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const y=10;const v=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 r(this,void 0,void 0,(function*(){return new Promise((e=>r(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,a){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=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,t){return r(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return r(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return r(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("POST",e,t,a||{})}))}patch(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,a||{})}))}put(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PUT",e,t,a||{})}))}head(e,t){return r(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,a,i){return r(this,void 0,void 0,(function*(){return this.request(e,t,a,i)}))}getJson(e,t={}){return r(this,void 0,void 0,(function*(){t[m.Accept]=this._getExistingOrDefaultHeader(t,m.Accept,u.ApplicationJson);const a=yield this.get(e,t);return this._processResponse(a,this.requestOptions)}))}postJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.post(e,i,a);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.put(e,i,a);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.patch(e,i,a);return this._processResponse(n,this.requestOptions)}))}request(e,t,a,i){return r(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,i);const r=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let s=0;let p;do{p=yield this.requestRaw(o,a);if(p&&p.message&&p.message.statusCode===c.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(p)){e=t;break}}if(e){return e.handleAuthentication(this,o,a)}else{return p}}let t=this._maxRedirects;while(p.message.statusCode&&f.includes(p.message.statusCode)&&this._allowRedirects&&t>0){const r=p.message.headers["location"];if(!r){break}const s=new URL(r);if(n.protocol==="https:"&&n.protocol!==s.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.")}yield p.readBody();if(s.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}o=this._prepareRequest(e,s,i);p=yield this.requestRaw(o,a);t--}if(!p.message.statusCode||!h.includes(p.message.statusCode)){return p}s+=1;if(s{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{a(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,a){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;a(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,a){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?p:s;const o=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,a){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||a}_getAgent(e){let t;const a=l.getProxyUrl(e);const i=a&&a.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(a&&a.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`}),{host:a.hostname,port:a.port})};let i;const r=a.protocol==="https:";if(n){i=r?d.httpsOverHttps:d.httpsOverHttp}else{i=r?d.httpOverHttps:d.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new p.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=n?p.globalAgent:s.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return r(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return r(this,void 0,void 0,(function*(){return new Promise(((a,i)=>r(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===c.NotFound){a(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let r;let s;try{s=yield e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){r=JSON.parse(s,dateTimeDeserializer)}else{r=JSON.parse(s)}o.result=r}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(r&&r.message){e=r.message}else if(s&&s.length>0){e=s}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;i(t)}else{a(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,a)=>(t[a.toLowerCase()]=e[a],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const a=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(a){return new URL(a)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const i=[e.hostname.toUpperCase()];if(typeof a==="number"){i.push(`${i[0]}:${a}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},1962:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const p=o(a(7147));const l=o(a(1017));s=p.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return r(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,a=false){return r(this,void 0,void 0,(function*(){const i=a?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,a){return r(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(a.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const o of a){e=n+o;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const a=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield t.readdir(a)){if(i===n.toUpperCase()){e=l.join(a,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const s=a(9491);const p=o(a(2081));const l=o(a(1017));const d=a(3837);const c=o(a(1962));const m=d.promisify(p.exec);const u=d.promisify(p.execFile);function cp(e,t,a={}){return r(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:o}=readCopyOptions(a);const r=(yield c.exists(t))?yield c.stat(t):null;if(r&&r.isFile()&&!i){return}const s=r&&r.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,i)}}else{if(l.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,i)}}))}t.cp=cp;function mv(e,t,a={}){return r(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(a.force==null||a.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return r(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=c.getCmdPath();if(yield c.isDirectory(e,true)){yield m(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield m(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield c.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield c.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm`,[`-rf`,`${e}`])}else{yield c.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return r(this,void 0,void 0,(function*(){s.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}t.which=which;function findInPath(e){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const a=yield c.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(l.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){a.push(e)}}}const i=[];for(const n of a){const a=yield c.tryGetExecutablePath(l.join(n,e),t);if(a){i.push(a)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:i}}function cpDirRecursive(e,t,a,i){return r(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const n=yield c.readdir(e);for(const o of n){const n=`${e}/${o}`;const r=`${t}/${o}`;const s=yield c.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,r,a,i)}else{yield copyFile(n,r,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,a){return r(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const a=yield c.readlink(e);yield c.symlink(a,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||a){yield c.copyFile(e,t)}}))}},2473:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(a(5911));const p=a(2186);const l=a(2037);const d=a(2081);const c=a(7147);function _findMatch(t,a,i,n){return r(this,void 0,void 0,(function*(){const o=l.platform();let r;let d;let c;for(const r of i){const i=r.version;p.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!a||r.stable===a)){c=r.files.find((t=>{p.debug(`${t.arch}===${n} && ${t.platform}===${o}`);let a=t.arch===n&&t.platform===o;if(a&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){a=true}else{a=s.satisfies(i,t.platform_version)}}return a}));if(c){p.debug(`matched ${r.version}`);d=r;break}}}if(d&&c){r=Object.assign({},d);r.files=[c]}return r}))}t._findMatch=_findMatch;function _getOsVersion(){const t=l.platform();let a="";if(t==="darwin"){a=d.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){a=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return a}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let a="";if(c.existsSync(e)){a=c.readFileSync(e).toString()}else if(c.existsSync(t)){a=c.readFileSync(t).toString()}return a}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const s=o(a(2186));class RetryHelper{constructor(e,t,a){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(a);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return r(this,void 0,void 0,(function*(){let a=1;while(asetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const p=o(a(2186));const l=o(a(7436));const d=o(a(7147));const c=o(a(2473));const m=o(a(2037));const u=o(a(1017));const f=o(a(6255));const h=o(a(5911));const g=o(a(2781));const y=o(a(3837));const v=a(9491);const b=s(a(824));const x=a(1514);const w=a(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const S=process.platform==="win32";const N=process.platform==="darwin";const k="actions/tool-cache";function downloadTool(e,t,a,i){return r(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),b.default());yield l.mkdirP(u.dirname(t));p.debug(`Downloading ${e}`);p.debug(`Destination ${t}`);const n=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const d=new w.RetryHelper(n,o,s);return yield d.execute((()=>r(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",a,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,a,i){return r(this,void 0,void 0,(function*(){if(d.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new f.HttpClient(k,[],{allowRetries:false});if(a){p.debug("set auth");if(i===undefined){i={}}i.authorization=a}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);p.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const r=y.promisify(g.pipeline);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const c=s();let m=false;try{yield r(c,d.createWriteStream(t));p.debug("download complete");m=true;return t}finally{if(!m){p.debug("download failed");try{yield l.rmRF(t)}catch(e){p.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,a){return r(this,void 0,void 0,(function*(){v.ok(S,"extract7z() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(a){try{const t=p.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield x.exec(`"${a}"`,n,o)}finally{process.chdir(i)}}else{const a=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const r=`& '${a}' -Source '${n}' -Target '${o}'`;const s=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",r];const p={silent:true};try{const e=yield l.which("powershell",true);yield x.exec(`"${e}"`,s,p)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,a="xz"){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);p.debug("Checking tar --version");let i="";yield x.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});p.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let o;if(a instanceof Array){o=a}else{o=[a]}if(p.isDebug()&&!a.includes("v")){o.push("-v")}let r=t;let s=e;if(S&&n){o.push("--force-local");r=t.replace(/\\/g,"/");s=e.replace(/\\/g,"/")}if(n){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",r,"-f",s);yield x.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,a=[]){return r(this,void 0,void 0,(function*(){v.ok(N,"extractXar() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(a instanceof Array){i=a}else{i=[a]}i.push("-x","-C",t,"-f",e);if(p.isDebug()){i.push("-v")}const n=yield l.which("xar",true);yield x.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(S){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return r(this,void 0,void 0,(function*(){const a=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield l.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${a}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];p.debug(`Using pwsh at path: ${n}`);yield x.exec(`"${n}"`,t)}else{const e=[`$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 '${a}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield l.which("powershell",true);p.debug(`Using powershell at path: ${n}`);yield x.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return r(this,void 0,void 0,(function*(){const a=yield l.which("unzip",true);const i=[e];if(!p.isDebug()){i.unshift("-q")}i.unshift("-o");yield x.exec(`"${a}"`,i,{cwd:t})}))}function cacheDir(e,t,a,i){return r(this,void 0,void 0,(function*(){a=h.clean(a)||a;i=i||m.arch();p.debug(`Caching tool ${t} ${a} ${i}`);p.debug(`source dir: ${e}`);if(!d.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,a,i);for(const t of d.readdirSync(e)){const a=u.join(e,t);yield l.cp(a,n,{recursive:true})}_completeToolPath(t,a,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,a,i,n){return r(this,void 0,void 0,(function*(){i=h.clean(i)||i;n=n||m.arch();p.debug(`Caching tool ${a} ${i} ${n}`);p.debug(`source file: ${e}`);if(!d.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(a,i,n);const r=u.join(o,t);p.debug(`destination file ${r}`);yield l.cp(e,r);_completeToolPath(a,i,n);return o}))}t.cacheFile=cacheFile;function find(e,t,a){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}a=a||m.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,a);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=h.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,a);p.debug(`checking cache: ${n}`);if(d.existsSync(n)&&d.existsSync(`${n}.complete`)){p.debug(`Found tool in cache ${e} ${t} ${a}`);i=n}else{p.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const a=[];t=t||m.arch();const i=u.join(_getCacheDirectory(),e);if(d.existsSync(i)){const e=d.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(d.existsSync(e)&&d.existsSync(`${e}.complete`)){a.push(n)}}}}return a}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,a,i="master"){return r(this,void 0,void 0,(function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const r=new f.HttpClient("tool-cache");const s={};if(a){p.debug("set auth");s.authorization=a}const l=yield r.getJson(o,s);if(!l.result){return n}let d="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){d=e.url;break}}s["accept"]="application/vnd.github.VERSION.raw";let c=yield(yield r.get(d,s)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{n=JSON.parse(c)}catch(e){p.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,a,i=m.arch()){return r(this,void 0,void 0,(function*(){const n=yield c._findMatch(e,t,a,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return r(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),b.default())}yield l.mkdirP(e);return e}))}function _createToolPath(e,t,a){return r(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");p.debug(`destination ${i}`);const n=`${i}.complete`;yield l.rmRF(i);yield l.rmRF(n);yield l.mkdirP(i);return i}))}function _completeToolPath(e,t,a){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");const n=`${i}.complete`;d.writeFileSync(n,"");p.debug("finished caching tool")}function isExplicitVersion(e){const t=h.clean(e)||"";p.debug(`isExplicit: ${t}`);const a=h.valid(t)!=null;p.debug(`explicit? ${a}`);return a}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let a="";p.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(h.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const o=h.satisfies(n,t);if(o){a=n;break}}if(a){p.debug(`matched: ${a}`)}else{p.debug("match not found")}return a}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";v.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";v.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const a=global[e];return a!==undefined?a:t}function _unique(e){return Array.from(new Set(e))}},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const a=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;a.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);i.push(t)}removeEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used.  It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=a.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const a=setTimeout(abortSignal,e,t);if(typeof a.unref==="function"){a.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const a of t){if(!objectHasProperty(e,a)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=a(3415);var n=a(3837);var o=a(2107);var r=a(6189);var s=a(1333);var p=a(3233);var l=a(9645);var d=a(2037);var c=a(3685);var m=a(5687);var u=a(8165);var f=a(2557);var h=a(4294);var g=a(2781);var y=a(6279);var v=a(467);var b=a(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(a){if(a!=="default"){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:true,get:function(){return e[a]}})}}))}t["default"]=e;return Object.freeze(t)}var x=_interopNamespace(r);var w=_interopNamespace(d);var S=_interopNamespace(c);var N=_interopNamespace(m);var k=_interopNamespace(u);var C=_interopNamespace(h);var j=_interopDefaultLegacy(y);var P=_interopDefaultLegacy(v);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let a=0;a{a=a.then(e)}));return a}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,a,i){if(!Array.isArray(e)){e=[e]}if(!a||!i){return{[t]:e}}const n={[t]:e};n[T]={[a]:i};return n}function applyMixins(e,t){const a=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{a.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,a){return!e||!t?e:e.split(t).join(a||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,a){const failValidation=(e,i)=>{throw new Error(`"${a}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const a=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:o,InclusiveMinimum:r,MaxItems:s,MaxLength:p,MinItems:l,MinLength:d,MultipleOf:c,Pattern:m,UniqueItems:u}=e.constraints;if(i!=undefined&&a>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&a<=n){failValidation("ExclusiveMinimum",n)}if(o!=undefined&&a>o){failValidation("InclusiveMaximum",o)}if(r!=undefined&&as){failValidation("MaxItems",s)}if(p!=undefined&&f.length>p){failValidation("MaxLength",p)}if(l!=undefined&&f.lengtha.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};let p={};const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Sequence$/i)!==null){p=[]}if(e.isConstant){t=e.defaultValue}const{required:d,nullable:c}=e;if(d&&c&&t===undefined){throw new Error(`${a} cannot be undefined.`)}if(d&&!c&&t==undefined){throw new Error(`${a} cannot be null or undefined.`)}if(!d&&c===false&&t===null){throw new Error(`${a} cannot be null.`)}if(t==undefined){p=t}else{if(l.match(/^any$/i)!==null){p=t}else if(l.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){p=serializeBasicTypes(l,a,t)}else if(l.match(/^Enum$/i)!==null){const i=e;p=serializeEnumType(a,i.type.allowedValues,t)}else if(l.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){p=serializeDateTypes(l,t,a)}else if(l.match(/^ByteArray$/i)!==null){p=serializeByteArrayType(a,t)}else if(l.match(/^Base64Url$/i)!==null){p=serializeBase64UrlType(a,t)}else if(l.match(/^Sequence$/i)!==null){p=serializeSequenceType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Dictionary$/i)!==null){p=serializeDictionaryType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Composite$/i)!==null){p=serializeCompositeType(this,e,t,a,Boolean(this.isXML),s)}}return p}deserialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let p;const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Composite$/i)!==null){p=deserializeCompositeType(this,e,t,a,s)}else{if(this.isXML){const e=s.xmlCharKey;const a=t;if(a[T]!=undefined&&a[e]!=undefined){t=a[e]}}if(l.match(/^Number$/i)!==null){p=parseFloat(t);if(isNaN(p)){p=t}}else if(l.match(/^Boolean$/i)!==null){if(t==="true"){p=true}else if(t==="false"){p=false}else{p=t}}else if(l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){p=t}else if(l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){p=new Date(t)}else if(l.match(/^UnixTime$/i)!==null){p=unixTimeToDate(t)}else if(l.match(/^ByteArray$/i)!==null){p=decodeString(t)}else if(l.match(/^Base64Url$/i)!==null){p=base64UrlToByteArray(t)}else if(l.match(/^Sequence$/i)!==null){p=deserializeSequenceType(this,e,t,a,s)}else if(l.match(/^Dictionary$/i)!==null){p=deserializeDictionaryType(this,e,t,a,s)}}if(e.isConstant){p=e.defaultValue}return p}}function trimEnd(e,t){let a=e.length;while(a-1>=0&&e[a-1]===t){--a}return e.substr(0,a)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let a="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){a+=e.substr(0,e.length-1)+"."}else{a+=e;t.push(a);a=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,a){if(a!==null&&a!==undefined){if(e.match(/^Number$/i)!==null){if(typeof a!=="number"){throw new Error(`${t} with value ${a} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof a.valueOf()!=="string"){throw new Error(`${t} with value "${a}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof a.valueOf()==="string"&&isValidUuid(a))){throw new Error(`${t} with value "${a}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof a!=="boolean"){throw new Error(`${t} with value ${a} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof a;if(e!=="string"&&e!=="function"&&!(a instanceof ArrayBuffer)&&!ArrayBuffer.isView(a)&&!((typeof Blob==="function"||typeof Blob==="object")&&a instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return a}function serializeEnumType(e,t,a){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===a.toLowerCase()}return e===a}));if(!i){throw new Error(`${a} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return a}function serializeByteArrayType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=encodeByteArray(t)}return a}function serializeBase64UrlType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=bufferToBase64Url(t)||""}return a}function serializeDateTypes(e,t,a){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${a} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,a,i,n,o){if(!Array.isArray(a)){throw new Error(`${i} must be of type Array.`)}const r=t.type.element;if(!r||typeof r!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const s=[];for(let t=0;te!==n));if(s){r[n]=e.serialize(p,a[n],i+'["'+n+'"]',o)}}}return r}return a}function getXmlObjectValue(e,t,a,i){if(!a||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const o={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[T]){return t}else{const e=Object.assign({},t);e[T]=o;return e}}const r={};r[i.xmlCharKey]=t;r[T]=o;return r}function isSpecialXmlProperty(e,t){return[T,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,a,i,n){var o,r;const s=(o=n.xmlCharKey)!==null&&o!==void 0?o:O;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,a,"serializedName")}const p=resolveModelProperties(e,t,i);let l={};const d=[];for(const o of Object.keys(p)){const c=p[o];const m=splitSerializeName(p[o].serializedName);d.push(m[0]);const{serializedName:u,xmlName:f,xmlElementName:h}=c;let g=i;if(u!==""&&u!==undefined){g=i+"."+u}const y=c.headerCollectionPrefix;if(y){const t={};for(const i of Object.keys(a)){if(i.startsWith(y)){t[i.substring(y.length)]=e.deserialize(c.type.value,a[i],g,n)}d.push(i)}l[o]=t}else if(e.isXML){if(c.xmlIsAttribute&&a[T]){l[o]=e.deserialize(c,a[T][f],g,n)}else if(c.xmlIsMsText){if(a[s]!==undefined){l[o]=a[s]}else if(typeof a==="string"){l[o]=a}}else{const t=h||f||u;if(c.xmlIsWrapped){const t=a[f];const i=(r=t===null||t===void 0?void 0:t[h])!==null&&r!==void 0?r:[];l[o]=e.deserialize(c,i,g,n)}else{const i=a[t];l[o]=e.deserialize(c,i,g,n)}}}else{let i;let r=a;for(const e of m){if(!r)break;r=r[e]}i=r;const s=t.type.polymorphicDiscriminator;if(s&&o===s.clientName&&i==undefined){i=t.serializedName}let d;if(Array.isArray(a[o])&&p[o].serializedName===""){i=a[o];const t=e.deserialize(c,i,g,n);for(const[e,a]of Object.entries(l)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=a}}l=t}else if(i!==undefined||c.defaultValue!==undefined){d=e.deserialize(c,i,g,n);l[o]=d}}}const c=t.type.additionalProperties;if(c){const isAdditionalProperty=e=>{for(const t in p){const a=splitSerializeName(p[t].serializedName);if(a[0]===e){return false}}return true};for(const t in a){if(isAdditionalProperty(t)){l[t]=e.deserialize(c,a[t],i+'["'+t+'"]',n)}}}else if(a){for(const e of Object.keys(a)){if(l[e]===undefined&&!d.includes(e)&&!isSpecialXmlProperty(e,n)){l[e]=a[e]}}}return l}function deserializeDictionaryType(e,t,a,i,n){const o=t.type.value;if(!o||typeof o!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){const t={};for(const r of Object.keys(a)){t[r]=e.deserialize(o,a[r],i,n)}return t}return a}function deserializeSequenceType(e,t,a,i,n){const o=t.type.element;if(!o||typeof o!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){if(!Array.isArray(a)){a=[a]}const t=[];for(let r=0;r0}keys(){return Object.keys(this._rawQuery)}set(e,t){const a=t;if(e){if(a!==undefined&&a!==null){const t=Array.isArray(a)?a:a.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const a=this._rawQuery[t];if(Array.isArray(a)){const i=[];for(const e of a){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${a}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let a="ParameterName";let i="";let n="";for(let o=0;oisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,a){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:a&&a.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const o=isUrlHttps(e);const r=isUrlHttps(t.host);const s={isHttps:o,agent:createTunnel(o,r,n)};return s}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,a){if(e&&t){return C.httpsOverHttps(a)}else if(e&&!t){return C.httpsOverHttp(a)}else if(!e&&t){return C.httpOverHttps(a)}else{return C.httpOverHttp(a)}}function isValidPort(e){return 0<=e&&e<=65535}const A="REDACTED";const I=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const M=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?I.concat(e):I;t=Array.isArray(t)?M.concat(t):M;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,a)=>{if(a instanceof Error){return Object.assign(Object.assign({},a),{name:a.name,message:a.message})}if(e==="_headersMap"){return this.sanitizeHeaders(a)}else if(e==="url"){return this.sanitizeUrl(a)}else if(e==="query"){return this.sanitizeQuery(a)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(a)||isObject(a)){if(t.has(a)){return"[Circular]"}t.add(a)}return a}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,a){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=a(e,n)}else{i[n]=A}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const a=t.getQuery();if(!a){return e}const i=URLQuery.parse(a);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,A)}}t.setQuery(i.toString());return t.toString()}}const B=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,a,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=a;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[B](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const q=p.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,a){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});a(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((a=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();a()}));e.once("end",a);e.once("error",a)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,a)=>{t.set(a,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={};this.cookieJar=new k.CookieJar(undefined,{looseMode:true})}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const a=new f.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new f.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){a.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{a.abort()}),e.timeout)}if(e.formData){const t=e.formData;const a=new j["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){a.append(e,t.value,t.options)}else{a.append(e,t)}};for(const e of Object.keys(t)){const a=t[e];if(Array.isArray(a)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{q.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const a=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:o,password:r}=e.proxySettings;const s=`${i}:${n}:${o}:${r}`;const p=(t=this.proxyAgentMap.get(s))!==null&&t!==void 0?t:{};let l=getCachedAgent(a,p);if(l){return l}const d=createProxyAgent(e.url,e.proxySettings,e.headers);l=d.agent;if(d.isHttps){p.httpsAgent=d.agent}else{p.httpAgent=d.agent}this.proxyAgentMap.set(s,p);return l}else if(e.keepAlive){let t=getCachedAgent(a,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(a){t=this.keepAliveAgents.httpsAgent=new N.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new S.Agent(i)}return t}else{return a?N.globalAgent:S.globalAgent}}async fetch(e,t){return P["default"](e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,a)=>{this.cookieJar.getCookieString(e.url,((e,i)=>{if(e){a(e)}else{t(i)}}))}));e.headers.set("Cookie",t)}t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");if(t!==undefined){await new Promise(((a,i)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:true},(e=>{if(e){i(e)}else{a()}}))}))}}}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:a}=e,i=o.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(a){n.tracingContext=a.tracingContext;n.spanOptions=a===null||a===void 0?void 0:a.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:T,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:"  ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const V=Object.assign({},U);V.explicitArray=false;V.renderOpts={pretty:false};function stringifyXML(e,t={}){var a;V.rootName=t.rootName;V.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Builder(V);return i.buildObject(e)}function parseXML(e,t={}){var a;H.explicitRoot=!!t.includeRoot;H.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Parser(H);return new Promise(((t,a)=>{if(!e){a(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){a(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(a,i)=>new DeserializationPolicy(a,i,e,t)}}const $=["application/json","text/json"];const X=["application/xml","application/atom+xml"];const G={expectedContentTypes:{json:$,xml:X}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,a,i={}){var n;super(e,t);this.jsonContentTypes=a&&a.json||$;this.xmlContentTypes=a&&a.xml||X;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:O}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const a=e.request;const i=a.operationSpec;if(i){const n=a.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let a;if(t===undefined){a=true}else if(typeof t==="boolean"){a=t}else{a=t(e)}return a}function deserializeResponseBody(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};return parse(e,t,a,s).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:o,shouldReturnResponse:r}=handleErrorResponse(e,t,n);if(o){throw o}else if(r){return e}if(n){if(n.bodyMapper){let a=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===z.Sequence){a=typeof a==="object"?a[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,a,"operationRes.parsedBody",i)}catch(t){const a=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw a}}else if(t.httpMethod==="HEAD"){e.parsedBody=a.status>=200&&a.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,a){var i;const n=200<=e.status&&e.status<300;const o=isOperationSpecEmpty(t)?n:!!a;if(o){if(a){if(!a.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const r=a!==null&&a!==void 0?a:t.responses.default;const s=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const p=s?`Unexpected status code: ${e.status}`:e.bodyAsText;const l=new RestError(p,undefined,e.status,e.request,e);if(!r){throw l}const d=r.bodyMapper;const c=r.headersMapper;try{if(e.parsedBody){const a=e.parsedBody;let i;if(d){let e=a;if(t.isXML&&d.type.name===z.Sequence){e=typeof a==="object"?a[d.xmlElementName]:[]}i=t.serializer.deserialize(d,e,"error.response.parsedBody")}const n=a.error||i||a;l.code=n.code;if(n.message){l.message=n.message}if(d){l.response.parsedBody=i}}if(e.headers&&c){l.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){l.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:false}}function parse(e,t,a,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${a.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,a.status,a.request,a);return Promise.reject(n)};const o=((n=a.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(a.status))||a.request.streamResponseBody;if(!o&&a.bodyAsText){const n=a.bodyAsText;const o=a.headers.get("Content-Type")||"";const r=!o?[]:o.split(";").map((e=>e.toLowerCase()));if(r.length===0||r.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{a.parsedBody=JSON.parse(n);e(a)})).catch(errorHandler)}else if(r.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{a.parsedBody=e;return a})).catch(errorHandler)}}return Promise.resolve(a)}const K={enable:true};function keepAlivePolicy(e){return{create:(t,a)=>new KeepAlivePolicy(t,a,e||K)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.keepAliveOptions=a}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const W=["GET","HEAD"];const Q={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,a)=>new RedirectPolicy(t,a,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,a=20){super(e,t);this.maxRetries=a}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,a){const{request:i,status:n}=t;const o=t.headers.get("location");if(o&&(n===300||n===301&&W.includes(i.method)||n===302&&W.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||ahandleRedirect(e,t,a+1)))}return Promise.resolve(t)}const J=3;const Y=1e3*30;const Z=1e3*90;const ee=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,a,i,n){if(!t(i,n)){return false}return a.retryCountnew ExponentialRetryPolicy(i,n,e,t,a)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const te={maxRetries:J,retryDelayInMs:Y,maxRetryDelayInMs:Z};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.maxRetryInterval=isNumber(n)?n:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,a,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(a===null||a===void 0?void 0:a.headers.get(_.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const o=t.abortSignal&&t.abortSignal.aborted;if(!o&&shouldRetry(e.retryCount,shouldPolicyRetry,i,a)){q.info(`Retrying request in ${i.retryInterval}`);try{await s.delay(i.retryInterval);const a=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,a,i)}catch(n){return retry$1(e,t,a,i,n)}}else if(o||n||!a){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,a&&a.status,a&&a.request,a);throw e}else{return a}}function logPolicy(e={}){return{create:(t,a)=>new LogPolicy(t,a,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:a=q.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=a;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let a;if(typeof e==="string"){a=e}else if(Array.isArray(e)){a=e.join(".")}else{a=t.serializedName}return a}function getStreamResponseStatusCodes(e){const t=new Set;for(const a in e.responses){const i=e.responses[a];if(i.bodyMapper&&i.bodyMapper.type.name===z.Stream){t.add(Number(a))}}return t}function getDefaultUserAgentKey(){return _.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${w.arch()}-${w.type()}-${w.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:_.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",a="/"){return e.map((e=>{const t=e.value?`${a}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ae=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const a=getUserAgentString(e.concat(t));return a}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const a=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,a)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=a;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const ie={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,a){async function tryGetAccessToken(){if(Date.now()e.getToken(t,a);i=beginRefresh(tryGetAccessToken,o.retryIntervalInMs,(s=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&s!==void 0?s:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(r.mustRefresh)return refresh(e);if(r.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const a=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await a({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(_.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,a)=>new GenerateClientRequestIdPolicy(t,a,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this._requestIdHeaderName=a}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let ne;function getCachedDefaultHttpClient(){if(!ne){ne=new NodeFetchHttpClient}return ne}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const oe=[];let re=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(_.HTTPS_PROXY);const t=getEnvironmentValue(_.ALL_PROXY);const a=getEnvironmentValue(_.HTTP_PROXY);return e||t||a}function isBypassed(e,t,a){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(a===null||a===void 0?void 0:a.has(i)){return a.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}a===null||a===void 0?void 0:a.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(_.NO_PROXY);re=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:a,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const o=n.getScheme()?n.getScheme()+"://":"";return{host:o+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:a}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!re){oe.push(...loadNoProxy())}return{create:(a,i)=>new ProxyPolicy(a,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const a=e.indexOf("://");const i=a!==-1?a+3:0;const n=e.substring(i,t);const o=n.indexOf(":");const r=o!==-1;const s=r?n.substring(0,o):n;const p=r?n.substring(o+1):undefined;const l=e.substring(0,i)+e.substring(t+1);return{username:s,password:p,urlWithoutAuth:l}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this.proxySettings=a;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:oe,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,a)=>new RPRegistrationPolicy(t,a,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,a=30){super(e,t);this._retryTimeout=a}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,a){if(a.status===409){const i=checkRPNotRegisteredError(a.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return a}))}}return Promise.resolve(a)}function getRequestEssentials(e,t=false){const a=e.clone();if(t){a.url=e.url}a.headers.set("x-ms-client-request-id",generateUuid());a.headers.set("Content-Type","application/json; charset=utf-8");return a}function checkRPNotRegisteredError(e){let t,a;if(e){try{a=JSON.parse(e)}catch(e){}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){const e=a.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const a=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0]){t=a[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,a,i){const n=`${t}providers/${a}/register?api-version=2016-02-01`;const o=`${t}providers/${a}?api-version=2016-02-01`;const r=getRequestEssentials(i);r.method="POST";r.url=n;const s=await e._nextPolicy.sendRequest(r);if(s.status!==200){throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`)}return getRegistrationStatus(e,o,i)}async function getRegistrationStatus(e,t,a){const i=getRequestEssentials(a);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const o=n.parsedBody;if(n.parsedBody&&o.registrationState&&o.registrationState==="Registered"){return true}else{await s.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,a)}}function signingPolicy(e){return{create:(t,a)=>new SigningPolicy(t,a,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.authenticationProvider=a}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,a,i){return{create:(n,o)=>new SystemErrorRetryPolicy(n,o,e,t,a,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n,o){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.minRetryInterval=isNumber(n)?n:ee;this.maxRetryInterval=isNumber(o)?o:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,a,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,a,i)){try{await s.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,a,i,n)}}else{if(i){return Promise.reject(n.error)}return a}}const pe=3;const le=_.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const de="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.numberOfRetries=0;this._handleResponse=a||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==le.TooManyRequests&&t.status!==le.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var a;const i=t.headers.get(_.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await s.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:de});if((a=e.abortSignal)===null||a===void 0?void 0:a.aborted){throw new f.AbortError(de)}if(this.numberOfRetries{let a=undefined;const i=this;const n=t;return{create(t,o){const r=getCredentialScopes(n,i.baseUri);if(!r){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(a===undefined||a===null){a=bearerTokenAuthenticationPolicy(e,r)}return a.create(t,o)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){q.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}q.info("ServiceClient: using default request policies");a=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(a);if(e){a=e}}}this._requestPolicyFactories=a}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let a=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){a=this._requestPolicyFactories[e].create(a,this._requestPolicyOptions)}}return a.sendRequest(t)}async sendOperationRequest(e,a,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const o=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const r=new WebResource;let s;try{const i=a.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}r.method=a.httpMethod;r.operationSpec=a;const n=URLBuilder.parse(i);if(a.path){n.appendPath(a.path)}if(a.urlParameters&&a.urlParameters.length>0){for(const t of a.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(a.queryParameters&&a.queryParameters.length>0){for(const i of a.queryParameters){let r=getOperationArgumentValueFromParameter(this,e,i,a.serializer);if(r!==undefined&&r!==null){r=a.serializer.serialize(i.mapper,r,getPathStringFromParameter(i),o);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(r.length===0){continue}else{for(const e in r){const t=r[e];r[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(r)){for(const e in r){if(r[e]!==undefined&&r[e]!==null){r[e]=encodeURIComponent(r[e])}}}else{r=encodeURIComponent(r)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),r)}}}r.url=n.toString();const p=a.contentType||this.requestContentType;if(p&&a.requestBody){r.headers.set("Content-Type",p)}if(a.headerParameters){for(const t of a.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);if(i!==undefined&&i!==null){i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){r.headers.set(e+t,i[t])}}else{r.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const l=e.options;if(l){if(l.customHeaders){for(const e in l.customHeaders){r.headers.set(e,l.customHeaders[e])}}if(l.abortSignal){r.abortSignal=l.abortSignal}if(l.timeout){r.timeout=l.timeout}if(l.onUploadProgress){r.onUploadProgress=l.onUploadProgress}if(l.onDownloadProgress){r.onDownloadProgress=l.onDownloadProgress}if(l.spanOptions){r.spanOptions=l.spanOptions}if(l.tracingContext){r.tracingContext=l.tracingContext}if(l.shouldDeserialize!==undefined&&l.shouldDeserialize!==null){r.shouldDeserialize=l.shouldDeserialize}}r.withCredentials=this._withCredentials;serializeRequestBody(this,r,e,a);if(r.streamResponseStatusCodes===undefined){r.streamResponseStatusCodes=getStreamResponseStatusCodes(a)}let d;let c;try{d=await this.sendRequest(r)}catch(e){c=e}if(c){if(c.response){c.details=flattenResponse(c.response,a.responses[c.statusCode]||a.responses["default"])}s=Promise.reject(c)}else{s=Promise.resolve(flattenResponse(d,a.responses[d.status]))}}catch(e){s=Promise.reject(e)}const p=i;if(p){s.then((e=>p(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>p(e)))}return s}}function serializeRequestBody(e,t,a,i){var n,o,r,s,p,l;const d=(o=(n=a.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&o!==void 0?o:{};const c={rootName:(r=d.rootName)!==null&&r!==void 0?r:"",includeRoot:(s=d.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(p=d.xmlCharKey)!==null&&p!==void 0?p:O};const m=d.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,a,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:o,xmlName:r,xmlElementName:s,serializedName:p,xmlNamespace:d,xmlNamespacePrefix:u}=n;const f=n.type.name;try{if(t.body!==undefined&&t.body!==null||o){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,c);const a=f===z.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(d,e,f,t.body,c);if(f===z.Sequence){t.body=stringifyXML(prepareXMLRootList(i,s||r||p,e,d),{rootName:r||p,xmlCharKey:m})}else if(!a){t.body=stringifyXML(i,{rootName:r||p,xmlCharKey:m})}}else if(f===z.String&&(((l=i.contentType)===null||l===void 0?void 0:l.match("text/plain"))||i.mediaType==="text")){return}else if(!a){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(p,undefined,"  ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const o=getOperationArgumentValueFromParameter(e,a,n,i.serializer);if(o!==undefined&&o!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,o,getPathStringFromParameter(n),c)}}}}function getXmlValueWithNamespace(e,t,a,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(a)){const a={};a[n.xmlCharKey]=i;a[T]={[t]:e};return a}return i}function getValueOrFunctionResult(e,t){let a;if(typeof e==="string"){a=e}else{a=t();if(typeof e==="function"){a=e(a)}}return a}function createDefaultRequestPolicyFactories(e,t){const a=[];if(t.generateClientRequestIdHeader){a.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){a.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ae);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){a.push(userAgentPolicy({key:i,value:n}))}a.push(redirectPolicy());a.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){a.push(exponentialRetryPolicy());a.push(systemErrorRetryPolicy());a.push(throttlingRetryPolicy())}a.push(deserializationPolicy(t.deserializationContentTypes));if(E){a.push(proxyPolicy(t.proxySettings))}a.push(logPolicy({logger:q.info}));return a}function createPipelineFromOptions(e,t){const a=[];if(e.sendStreamingJson){a.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const a=getDefaultUserAgentValue();if(t.indexOf(a)===-1){t.push(a)}i=t.join(" ")}const n=Object.assign(Object.assign({},K),e.keepAliveOptions);const o=Object.assign(Object.assign({},te),e.retryOptions);const r=Object.assign(Object.assign({},Q),e.redirectOptions);if(E){a.push(proxyPolicy(e.proxyOptions))}const s=Object.assign(Object.assign({},G),e.deserializationOptions);const p=Object.assign({},e.loggingOptions);a.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(s.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(o.maxRetries,o.retryDelayInMs,o.maxRetryDelayInMs));if(r.handleRedirects){a.push(redirectPolicy(r.maxRetries))}if(t){a.push(t)}a.push(logPolicy(p));if(E&&e.decompressResponse===false){a.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:a}}function getOperationArgumentValueFromParameter(e,t,a,i){return getOperationArgumentValueFromParameterPath(e,t,a.parameterPath,a.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,a,i,n){var o;let r;if(typeof a==="string"){a=[a]}const s=(o=t.options)===null||o===void 0?void 0:o.serializerOptions;if(Array.isArray(a)){if(a.length>0){if(i.isConstant){r=i.defaultValue}else{let n=getPropertyFromParameterPath(t,a);if(!n.propertyFound){n=getPropertyFromParameterPath(e,a)}let o=false;if(!n.propertyFound){o=i.required||a[0]==="options"&&a.length===2}r=o?i.defaultValue:n.propertyValue}const o=getPathStringFromParameterPath(a,i);n.serialize(i,r,o,s)}}else{if(i.required){r={}}for(const o in a){const p=i.type.modelProperties[o];const l=a[o];const d=getOperationArgumentValueFromParameterPath(e,t,l,p,n);const c=getPathStringFromParameterPath(l,p);n.serialize(p,d,c,s);if(d!==undefined&&d!==null){if(!r){r={}}r[o]=d}}}return r}function getPropertyFromParameterPath(e,t){const a={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const o=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||o){const t=[...e.parsedBody||[]];for(const a of Object.keys(n)){if(n[a].serializedName){t[a]=e.parsedBody[a]}}if(a){for(const e of Object.keys(a)){t[e]=a[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},a),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return b.createSpanFunction(e)}const me=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=me){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,a=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=a;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const ue=_.HeaderConstants;const fe="Basic";class BasicAuthenticationCredentials{constructor(e,t,a=fe){this.authorizationScheme=fe;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=a}signRequest(e){const t=`${this.userName}:${this.password}`;const a=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(ue.AUTHORIZATION,a);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return s.delay}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return l.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=_;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=z;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=T;t.XML_CHARKEY=O;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isNode=E;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,a)=>{var i=a(5443);var n=a(3837);var o=a(1017);var r=a(3685);var s=a(5687);var p=a(7310).parse;var l=a(7147);var d=a(2781).Stream;var c=a(3583);var m=a(4812);var u=a(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a=="string"){a={filename:a}}var o=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();o(r);o(t);o(s);this._trackLength(r,t,a)};FormData.prototype._trackLength=function(e,t,a){var i=0;if(a.knownLength!=null){i+=+a.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof d)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{l.stat(e.path,(function(a,i){var n;if(a){t(a);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(a){e.pause();t(null,+a.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header=="string"){return a.header}var i=this._getContentDisposition(t,a);var n=this._getContentType(t,a);var o="";var r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof a.header=="object"){u(r,a.header)}var s;for(var p in r){if(!r.hasOwnProperty(p))continue;s=r[p];if(s==null){continue}if(!Array.isArray(s)){s=[s]}if(s.length){o+=p+": "+s.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a,i;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){a=o.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){i='filename="'+a+'"'}return i};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e.name){a=c.lookup(e.name)}if(!a&&e.path){a=c.lookup(e.path)}if(!a&&e.readable&&e.hasOwnProperty("httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=c.lookup(t.filepath||t.filename)}if(!a&&typeof e=="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,i=this._streams.length;a{e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},8165:(e,t,a)=>{"use strict";
+(()=>{var __webpack_modules__={3782:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCaches=t.getMinikubeVersion=t.restoreCaches=void 0;const n=a(7799);const o=a(2186);const r=a(1514);const s=a(2037);const p=a(1017);const restoreCaches=()=>i(void 0,void 0,void 0,(function*(){const e={iso:true,kic:true,preload:true};if(!useCache()){return e}const a=yield(0,t.getMinikubeVersion)();const i=restoreCache("iso",a);const n=restoreCache("kic",a);const o=restoreCache("preloaded-tarball",a);e.iso=typeof(yield i)!=="undefined";e.kic=typeof(yield n)!=="undefined";e.preload=typeof(yield o)!=="undefined";return e}));t.restoreCaches=restoreCaches;const getMinikubeVersion=()=>i(void 0,void 0,void 0,(function*(){let e="";const t={};t.listeners={stdout:t=>{e+=t.toString()}};yield(0,r.exec)("minikube",["version","--short"],t);return e.trim()}));t.getMinikubeVersion=getMinikubeVersion;const saveCaches=e=>i(void 0,void 0,void 0,(function*(){if(!useCache()){return}const a=yield(0,t.getMinikubeVersion)();const i=saveCache("iso",e.iso,a);const n=saveCache("kic",e.kic,a);yield saveCache("preloaded-tarball",e.preload,a);yield i;yield n}));t.saveCaches=saveCaches;const restoreCache=(e,t)=>i(void 0,void 0,void 0,(function*(){return(0,n.restoreCache)(getCachePaths(e),getCacheKey(e,t))}));const saveCache=(e,t,a)=>i(void 0,void 0,void 0,(function*(){if(t){return}try{yield(0,n.saveCache)(getCachePaths(e),getCacheKey(e,a))}catch(t){console.log(e+t)}}));const getCachePaths=e=>[(0,p.join)((0,s.homedir)(),".minikube","cache",e)];const getCacheKey=(e,t)=>{let a=`${e}-${t}-${(0,s.arch)()}`;if(e==="preloaded-tarball"){const e=getInput("kubernetes-version","stable");const t=getInput("container-runtime","docker");a+=`-${e}-${t}`}return a};const getInput=(e,t)=>{const a=(0,o.getInput)(e).toLowerCase();return a!==""?a:t};const useCache=()=>(0,o.getInput)("cache").toLowerCase()==="true"},5933:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadMinikube=t.getDownloadURL=void 0;const n=a(2186);const o=a(1514);const r=a(7436);const s=a(7784);const p=a(2037);const l=a(1017);const getDownloadURL=e=>{const t=(0,p.platform)();const a=t==="win32"?"windows":t;const i=t==="win32"?".exe":"";switch(e){case"latest":return`https://github.com/kubernetes/minikube/releases/latest/download/minikube-${a}-amd64${i}`;case"head":return`https://storage.googleapis.com/minikube-builds/master/minikube-${a}-amd64${i}`;default:return`https://github.com/kubernetes/minikube/releases/download/v${e}/minikube-${a}-amd64${i}`}};t.getDownloadURL=getDownloadURL;const downloadMinikube=e=>i(void 0,void 0,void 0,(function*(){const a=(0,t.getDownloadURL)(e);const i=yield(0,s.downloadTool)(a);const d=(0,p.platform)()==="darwin"?"/Users/runner/bin":"/home/runner/bin";yield(0,r.mkdirP)(d);yield(0,o.exec)("chmod",["+x",i]);yield(0,r.mv)(i,(0,l.join)(d,"minikube"));(0,n.addPath)(d)}));t.downloadMinikube=downloadMinikube},6180:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setArgs=void 0;const i=a(2186);const setArgs=e=>{const t=[{key:"addons",flag:"--addons"},{key:"cni",flag:"--cni"},{key:"container-runtime",flag:"--container-runtime"},{key:"cpus",flag:"--cpus"},{key:"driver",flag:"--driver"},{key:"extra-config",flag:"--extra-config"},{key:"kubernetes-version",flag:"--kubernetes-version"},{key:"listen-address",flag:"--listen-address"},{key:"memory",flag:"--memory"},{key:"mount-path",flag:"--mount-string"},{key:"network-plugin",flag:"--network-plugin"}];t.forEach((t=>{const a=(0,i.getInput)(t.key).toLowerCase();if(a!==""){e.push(t.flag,a)}}));if((0,i.getInput)("mount-path")!==""){e.push("--mount")}};t.setArgs=setArgs},3109:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});const n=a(2186);const o=a(5933);const r=a(5125);const run=()=>i(void 0,void 0,void 0,(function*(){try{let e=(0,n.getInput)("minikube-version").toLowerCase();e=e==="stable"?"latest":e;yield(0,o.downloadMinikube)(e);yield(0,r.startMinikube)()}catch(e){if(e instanceof Error){(0,n.setFailed)(e.message)}}}));run()},5516:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.installNoneDriverDeps=void 0;const n=a(2186);const o=a(1514);const r=a(7784);const installCriDocker=()=>i(void 0,void 0,void 0,(function*(){const e="https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/";const t=(0,r.downloadTool)(e+"cri-dockerd");const a=(0,r.downloadTool)(e+"cri-docker.service");const i=(0,r.downloadTool)(e+"cri-docker.socket");yield(0,o.exec)("chmod",["+x",yield t]);yield(0,o.exec)("sudo",["mv",yield t,"/usr/bin/cri-dockerd"]);yield(0,o.exec)("sudo",["mv",yield a,"/usr/lib/systemd/system/cri-docker.service"]);yield(0,o.exec)("sudo",["mv",yield i,"/usr/lib/systemd/system/cri-docker.socket"])}));const installConntrackSocat=()=>i(void 0,void 0,void 0,(function*(){yield(0,o.exec)("sudo",["apt-get","update","-qq"]);yield(0,o.exec)("sudo",["apt-get","-qq","-y","install","conntrack","socat"])}));const installCrictl=()=>i(void 0,void 0,void 0,(function*(){const e="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz";const t=(0,r.downloadTool)(e);yield(0,o.exec)("sudo",["tar","zxvf",yield t,"-C","/usr/local/bin"])}));const installNoneDriverDeps=()=>i(void 0,void 0,void 0,(function*(){const e=(0,n.getInput)("driver").toLowerCase();if(e!=="none"){return}yield Promise.all([installCriDocker(),installConntrackSocat(),installCrictl()])}));t.installNoneDriverDeps=installNoneDriverDeps},5125:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.startMinikube=void 0;const n=a(1514);const o=a(3782);const r=a(6180);const s=a(5516);const startMinikube=()=>i(void 0,void 0,void 0,(function*(){const e=["start"];(0,r.setArgs)(e);const t=yield(0,o.restoreCaches)();yield(0,s.installNoneDriverDeps)();yield(0,n.exec)("minikube",e);yield(0,o.saveCaches)(t)}));t.startMinikube=startMinikube},7799:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=n(a(1017));const s=n(a(1518));const p=n(a(8245));const l=a(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,a,n){return i(this,void 0,void 0,(function*(){checkPaths(e);a=a||[];const i=[t,...a];o.debug("Resolved Keys:");o.debug(JSON.stringify(i));if(i.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of i){checkKey(e)}const d=yield s.getCompressionMethod();let c="";try{const t=yield p.getCacheEntry(i,e,{compressionMethod:d});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}c=r.join(yield s.createTempDirectory(),s.getCacheFileName(d));o.debug(`Archive Path: ${c}`);yield p.downloadCache(t.archiveLocation,c,n);if(o.isDebug()){yield l.listTar(c,d)}const a=s.getArchiveFileSizeInBytes(c);o.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield l.extractTar(c,d);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield s.unlinkFile(c)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,a){var n,d,c,m,u;return i(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const i=yield s.getCompressionMethod();let f=-1;const h=yield s.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const g=yield s.createTempDirectory();const y=r.join(g,s.getCacheFileName(i));o.debug(`Archive Path: ${y}`);try{yield l.createTar(g,h,i);if(o.isDebug()){yield l.listTar(y,i)}const r=10*1024*1024*1024;const v=s.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${v}`);if(v>r&&!s.isGhes()){throw new Error(`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:i,cacheSize:v});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){f=(d=b===null||b===void 0?void 0:b.result)===null||d===void 0?void 0:d.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((m=(c=b===null||b===void 0?void 0:b.error)===null||c===void 0?void 0:c.message)!==null&&m!==void 0?m:`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message}`)}o.debug(`Saving Cache (ID: ${f})`);yield p.saveCache(f,y,a)}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else if(t.name===ReserveCacheError.name){o.info(`Failed to save: ${t.message}`)}else{o.warning(`Failed to save: ${t.message}`)}}finally{try{yield s.unlinkFile(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return f}))}t.saveCache=saveCache},8245:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(5526);const p=n(a(6113));const l=n(a(7147));const d=a(7310);const c=n(a(1518));const m=a(8840);const u=a(5500);const f=a(6215);const h=a(3981);const g="1.0";function getCacheApiUrl(e){const t=process.env["ACTIONS_CACHE_URL"]||"";if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new s.BearerCredentialHandler(e);return new r.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t){const a=e.concat(!t||t===m.CompressionMethod.Gzip?[]:[t]);a.push(g);return p.createHash("sha256").update(a.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const r=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${r}`;const p=yield h.retryTypedResponse("getCacheEntry",(()=>i(this,void 0,void 0,(function*(){return n.getJson(getCacheApiUrl(s))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],n,r)}return null}if(!h.isSuccessStatusCode(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const l=p.result;const d=l===null||l===void 0?void 0:l.archiveLocation;if(!d){throw new Error("Cache not found.")}o.setSecret(d);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,a){return i(this,void 0,void 0,(function*(){const n=`caches?key=${encodeURIComponent(e)}`;const r=yield h.retryTypedResponse("listCache",(()=>i(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(n))}))));if(r.statusCode===200){const t=r.result;const i=t===null||t===void 0?void 0:t.totalCount;if(i&&i>0){o.debug(`No matching cache found for cache key '${e}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=new d.URL(e);const n=f.getDownloadOptions(a);if(n.useAzureSdk&&i.hostname.endsWith(".blob.core.windows.net")){yield u.downloadCacheStorageSDK(e,t,n)}else{yield u.downloadCacheHttpClient(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const o=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const r={key:e,version:o,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const s=yield h.retryTypedResponse("reserveCache",(()=>i(this,void 0,void 0,(function*(){return n.postJson(getCacheApiUrl("caches"),r)}))));return s}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,a,n,r){return i(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${r-n+1} bytes at offset ${n} with content range: ${getContentRange(n,r)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(n,r)};const p=yield h.retryHttpClientResponse(`uploadChunk (start: ${n}, end: ${r})`,(()=>i(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,a(),s)}))));if(!h.isSuccessStatusCode(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,a,n){return i(this,void 0,void 0,(function*(){const r=c.getArchiveFileSizeInBytes(a);const s=getCacheApiUrl(`caches/${t.toString()}`);const p=l.openSync(a,"r");const d=f.getUploadOptions(n);const m=c.assertDefined("uploadConcurrency",d.uploadConcurrency);const u=c.assertDefined("uploadChunkSize",d.uploadChunkSize);const h=[...new Array(m).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(h.map((()=>i(this,void 0,void 0,(function*(){while(gl.createReadStream(a,{fd:p,start:i,end:n,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,n)}})))))}finally{l.closeSync(p)}return}))}function commitCache(e,t,a){return i(this,void 0,void 0,(function*(){const n={size:a};return yield h.retryTypedResponse("commitCache",(()=>i(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),n)}))))}))}function saveCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,a);o.debug("Commiting cache");const n=c.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const r=yield commitCache(i,e,n);if(!h.isSuccessStatusCode(r.statusCode)){throw new Error(`Cache service responded with ${r.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=o(a(2186));const s=o(a(1514));const p=o(a(8090));const l=o(a(7436));const d=o(a(7147));const c=o(a(1017));const m=o(a(5911));const u=o(a(3837));const f=a(2155);const h=a(8840);function createTempDirectory(){return i(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let a;if(e){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}t=c.join(a,"actions","temp")}const a=c.join(t,f.v4());yield l.mkdirP(a);return a}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return d.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,a;var o;return i(this,void 0,void 0,(function*(){const i=[];const s=(o=process.env["GITHUB_WORKSPACE"])!==null&&o!==void 0?o:process.cwd();const l=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var d=n(l.globGenerator()),m;m=yield d.next(),!m.done;){const e=m.value;const t=c.relative(s,e).replace(new RegExp(`\\${c.sep}`,"g"),"/");r.debug(`Matched: ${t}`);if(t===""){i.push(".")}else{i.push(`${t}`)}}}catch(e){t={error:e}}finally{try{if(m&&!m.done&&(a=d.return))yield a.call(d)}finally{if(t)throw t.error}}return i}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return i(this,void 0,void 0,(function*(){return u.promisify(d.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e){return i(this,void 0,void 0,(function*(){r.debug(`Checking ${e} --version`);let t="";try{yield s.exec(`${e} --version`,[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>t+=e.toString(),stderr:e=>t+=e.toString()}})}catch(e){r.debug(e.message)}t=t.trim();r.debug(t);return t}))}function getCompressionMethod(){return i(this,void 0,void 0,(function*(){if(process.platform==="win32"&&!(yield isGnuTarInstalled())){return h.CompressionMethod.Gzip}const e=yield getVersion("zstd");const t=m.clean(e);if(!e.toLowerCase().includes("zstd command line interface")){return h.CompressionMethod.Gzip}else if(!t||m.lt(t,"v1.3.2")){return h.CompressionMethod.ZstdWithoutLong}else{return h.CompressionMethod.Zstd}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===h.CompressionMethod.Gzip?h.CacheFilename.Gzip:h.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function isGnuTarInstalled(){return i(this,void 0,void 0,(function*(){const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")}))}t.isGnuTarInstalled=isGnuTarInstalled;function assertDefined(e,t){if(t===undefined){throw Error(`Expected ${e} but value was undefiend`)}return t}t.assertDefined=assertDefined;function isGhes(){const e=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return e.hostname.toUpperCase()!=="GITHUB.COM"}t.isGhes=isGhes},8840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(a=t.CacheFilename||(t.CacheFilename={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i=t.CompressionMethod||(t.CompressionMethod={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3},5500:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(4100);const p=n(a(4300));const l=n(a(7147));const d=n(a(2781));const c=n(a(3837));const m=n(a(1518));const u=a(8840);const f=a(3981);const h=a(2557);function pipeResponseToStream(e,t){return i(this,void 0,void 0,(function*(){const a=c.promisify(d.pipeline);yield a(e.message,t)}))}class DownloadProgress{constructor(e){this.contentLength=e;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=e;this.receivedBytes=0;o.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const e=this.segmentOffset+this.receivedBytes;const t=(100*(e/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const i=(e/(1024*1024)/(a/1e3)).toFixed(1);o.info(`Received ${e} of ${this.contentLength} (${t}%), ${i} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,e)}};this.timeoutHandle=setTimeout(displayCallback,e)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}t.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(e,t){return i(this,void 0,void 0,(function*(){const a=l.createWriteStream(t);const n=new r.HttpClient("actions/cache");const s=yield f.retryHttpClientResponse("downloadCache",(()=>i(this,void 0,void 0,(function*(){return n.get(e)}))));s.message.socket.setTimeout(u.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${u.SocketTimeout} ms`)}));yield pipeResponseToStream(s,a);const p=s.message.headers["content-length"];if(p){const e=parseInt(p);const a=m.getArchiveFileSizeInBytes(t);if(a!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${a}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheStorageSDK(e,t,a){var n;return i(this,void 0,void 0,(function*(){const i=new s.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const r=yield i.getProperties();const d=(n=r.contentLength)!==null&&n!==void 0?n:-1;if(d<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(2147483647,p.constants.MAX_LENGTH);const n=new DownloadProgress(d);const o=l.openSync(t,"w");try{n.startDisplayTimer();const t=new h.AbortController;const r=t.signal;while(!n.isDone()){const s=n.segmentOffset+n.segmentSize;const p=Math.min(e,d-s);n.nextSegment(p);const c=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,i.downloadToBuffer(s,p,{abortSignal:r,concurrency:a.downloadConcurrency,onProgress:n.onProgress()}));if(c==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(c)){l.writeFileSync(o,c)}}}finally{n.stopDisplayTimer();l.closeSync(o)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>i(void 0,void 0,void 0,(function*(){let a;const i=new Promise((t=>{a=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(a);return e}))}))},3981:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[r.HttpCodes.BadGateway,r.HttpCodes.ServiceUnavailable,r.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return i(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,a,n=s.DefaultRetryAttempts,r=s.DefaultRetryDelay,p=undefined){return i(this,void 0,void 0,(function*(){let i="";let s=1;while(s<=n){let l=undefined;let d=undefined;let c=false;try{l=yield t()}catch(e){if(p){l=p(e)}c=true;i=e.message}if(l){d=a(l);if(!isServerErrorStatusCode(d)){return l}}if(d){c=isRetryableStatusCode(d);i=`Cache service responded with ${d}`}o.debug(`${e} - Attempt ${s} of ${n} failed with error: ${i}`);if(!c){o.debug(`${e} - Error is not retryable`);break}yield sleep(r);s++}throw Error(`${e} failed: ${i}`)}))}t.retry=retry;function retryTypedResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),a,n,(e=>{if(e instanceof r.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),a,n)}))}t.retryHttpClientResponse=retryHttpClientResponse},6490:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=a(1514);const r=n(a(7436));const s=a(7147);const p=n(a(1017));const l=n(a(1518));const d=a(8840);const c=process.platform==="win32";function getTarPath(e,t){return i(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const a=`${process.env["windir"]}\\System32\\tar.exe`;if(t!==d.CompressionMethod.Gzip){e.push("--force-local")}else if(s.existsSync(a)){return a}else if(yield l.isGnuTarInstalled()){e.push("--force-local")}break}case"darwin":{const t=yield r.which("gtar",false);if(t){e.push("--delay-directory-restore");return t}break}default:break}return yield r.which("tar",true)}))}function execTar(e,t,a){return i(this,void 0,void 0,(function*(){try{yield o.exec(`"${yield getTarPath(e,t)}"`,e,{cwd:a})}catch(e){throw new Error(`Tar failed with error: ${e===null||e===void 0?void 0:e.message}`)}}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getCompressionProgram(e){switch(e){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -d --long=30":"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -d":"unzstd"];default:return["-z"]}}function listTar(e,t){return i(this,void 0,void 0,(function*(){const a=[...getCompressionProgram(t),"-tf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P"];yield execTar(a,t)}))}t.listTar=listTar;function extractTar(e,t){return i(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield r.mkdirP(a);const i=[...getCompressionProgram(t),"-xf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",a.replace(new RegExp(`\\${p.sep}`,"g"),"/")];yield execTar(i,t)}))}t.extractTar=extractTar;function createTar(e,t,a){return i(this,void 0,void 0,(function*(){const i="manifest.txt";const n=l.getCacheFileName(a);s.writeFileSync(p.join(e,i),t.join("\n"));const o=getWorkingDirectory();function getCompressionProgram(){switch(a){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -T0 --long=30":"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -T0":"zstdmt"];default:return["-z"]}}const r=["--posix",...getCompressionProgram(),"-cf",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",i];yield execTar(r,a,e)}))}t.createTar=createTar},6215:function(e,t,a){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=i(a(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}n.debug(`Upload concurrency: ${t.uploadConcurrency}`);n.debug(`Upload chunk size: ${t.uploadChunkSize}`);return t}t.getUploadOptions=getUploadOptions;function getDownloadOptions(e){const t={useAzureSdk:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:36e5};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.downloadConcurrency==="number"){t.downloadConcurrency=e.downloadConcurrency}if(typeof e.timeoutInMs==="number"){t.timeoutInMs=e.timeoutInMs}if(typeof e.segmentTimeoutInMs==="number"){t.segmentTimeoutInMs=e.segmentTimeoutInMs}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){t.segmentTimeoutInMs=Number(a)*60*1e3}n.debug(`Use Azure SDK: ${t.useAzureSdk}`);n.debug(`Download concurrency: ${t.downloadConcurrency}`);n.debug(`Request timeout (ms): ${t.timeoutInMs}`);n.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);n.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);return t}t.getDownloadOptions=getDownloadOptions},7351:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const r=o(a(2037));const s=a(5278);function issueCommand(e,t,a){const i=new Command(e,t,a);process.stdout.write(i.toString()+r.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const p="::";class Command{constructor(e,t,a){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=a}toString(){let e=p+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const i=this.properties[a];if(i){if(t){t=false}else{e+=","}e+=`${a}=${escapeProperty(i)}`}}}}e+=`${p}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.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 s=a(7351);const p=a(717);const l=a(5278);const d=o(a(2037));const c=o(a(1017));const m=a(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const a=l.toCommandValue(t);process.env[e]=a;const i=process.env["GITHUB_ENV"]||"";if(i){return p.issueFileCommand("ENV",p.prepareKeyValueMessage(e,t))}s.issueCommand("set-env",{name:e},a)}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){p.issueFileCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return a}return a.trim()}t.getInput=getInput;function getMultilineInput(e,t){const a=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return a}return a.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const a=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(a.includes(n))return true;if(i.includes(n))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){const a=process.env["GITHUB_OUTPUT"]||"";if(a){return p.issueFileCommand("OUTPUT",p.prepareKeyValueMessage(e,t))}process.stdout.write(d.EOL);s.issueCommand("set-output",{name:e},l.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){s.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){s.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){s.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+d.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return r(this,void 0,void 0,(function*(){startGroup(e);let a;try{a=yield t()}finally{endGroup()}return a}))}t.group=group;function saveState(e,t){const a=process.env["GITHUB_STATE"]||"";if(a){return p.issueFileCommand("STATE",p.prepareKeyValueMessage(e,t))}s.issueCommand("save-state",{name:e},l.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return r(this,void 0,void 0,(function*(){return yield m.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var f=a(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return f.summary}});var h=a(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var g=a(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const r=o(a(7147));const s=o(a(2037));const p=a(8974);const l=a(5278);function issueFileCommand(e,t){const a=process.env[`GITHUB_${e}`];if(!a){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!r.existsSync(a)){throw new Error(`Missing file at path: ${a}`)}r.appendFileSync(a,`${l.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const a=`ghadelimiter_${p.v4()}`;const i=l.toCommandValue(t);if(e.includes(a)){throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`)}if(i.includes(a)){throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`)}return`${e}<<${a}${s.EOL}${i}${s.EOL}${a}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=a(6255);const o=a(5526);const r=a(2186);class OidcClient{static createHttpClient(e=true,t=10){const a={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],a)}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 i(this,void 0,void 0,(function*(){const a=OidcClient.createHttpClient();const i=yield a.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 n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const a=encodeURIComponent(e);t=`${t}&audience=${a}`}r.debug(`ID token url is ${t}`);const a=yield OidcClient.getCall(t);r.setSecret(a);return a}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const r=o(a(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,r.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=a(2037);const o=a(7147);const{access:r,appendFile:s,writeFile:p}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield r(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,a={}){const i=Object.entries(a).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const a=yield this.filePath();const i=t?p:s;yield i(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const a=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),a);return this.addRaw(i).addEOL()}addList(e,t=false){const a=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(a,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:a,colspan:i,rowspan:n}=e;const o=t?"th":"td";const r=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(o,a,r)})).join("");return this.wrap("tr",t)})).join("");const a=this.wrap("table",t);return this.addRaw(a).addEOL()}addDetails(e,t){const a=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(a).addEOL()}addImage(e,t,a){const{width:i,height:n}=a||{};const o=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const r=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(r).addEOL()}addHeading(e,t){const a=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const n=this.wrap(i,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 a=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,a);return this.addRaw(i).addEOL()}addLink(e,t){const a=this.wrap("a",e,{href:t});return this.addRaw(a).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},5278:(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},8974:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return c.default}});var i=_interopRequireDefault(a(1595));var n=_interopRequireDefault(a(6993));var o=_interopRequireDefault(a(1472));var r=_interopRequireDefault(a(6217));var s=_interopRequireDefault(a(2381));var p=_interopRequireDefault(a(427));var l=_interopRequireDefault(a(2609));var d=_interopRequireDefault(a(1458));var c=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";t["default"]=a},6385:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const a=new Uint8Array(16);a[0]=(t=parseInt(e.slice(0,8),16))>>>24;a[1]=t>>>16&255;a[2]=t>>>8&255;a[3]=t&255;a[4]=(t=parseInt(e.slice(9,13),16))>>>8;a[5]=t&255;a[6]=(t=parseInt(e.slice(14,18),16))>>>8;a[7]=t&255;a[8]=(t=parseInt(e.slice(19,23),16))>>>8;a[9]=t&255;a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;a[11]=t/4294967296&255;a[12]=t>>>24&255;a[13]=t>>>16&255;a[14]=t>>>8&255;a[15]=t&255;return a}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=a},9784:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){i.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},8844:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const a=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var o=stringify;t["default"]=o},1595:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let r;let s=0;let p=0;function v1(e,t,a){let l=t&&a||0;const d=t||new Array(16);e=e||{};let c=e.node||o;let m=e.clockseq!==undefined?e.clockseq:r;if(c==null||m==null){const t=e.random||(e.rng||i.default)();if(c==null){c=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(m==null){m=r=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let f=e.nsecs!==undefined?e.nsecs:p+1;const h=u-s+(f-p)/1e4;if(h<0&&e.clockseq===undefined){m=m+1&16383}if((h<0||u>s)&&e.nsecs===undefined){f=0}if(f>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}s=u;p=f;r=m;u+=122192928e5;const g=((u&268435455)*1e4+f)%4294967296;d[l++]=g>>>24&255;d[l++]=g>>>16&255;d[l++]=g>>>8&255;d[l++]=g&255;const y=u/4294967296*1e4&268435455;d[l++]=y>>>8&255;d[l++]=y&255;d[l++]=y>>>24&15|16;d[l++]=y>>>16&255;d[l++]=m>>>8|128;d[l++]=m&255;for(let e=0;e<6;++e){d[l+e]=c[e]}return t||(0,n.default)(d)}var l=v1;t["default"]=l},6993:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v3",48,n.default);var r=o;t["default"]=r},5920:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(a(1458));var n=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,a){e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){a=a||0;for(let e=0;e<16;++e){t[a+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},6217:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v5",80,n.default);var r=o;t["default"]=r},2609:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const s=a(1576);const p=o(a(8159));function exec(e,t,a){return r(this,void 0,void 0,(function*(){const i=p.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const o=new p.ToolRunner(n,t,a);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,a){var i,n;return r(this,void 0,void 0,(function*(){let o="";let r="";const p=new s.StringDecoder("utf8");const l=new s.StringDecoder("utf8");const d=(i=a===null||a===void 0?void 0:a.listeners)===null||i===void 0?void 0:i.stdout;const c=(n=a===null||a===void 0?void 0:a.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{r+=l.write(e);if(c){c(e)}};const stdOutListener=e=>{o+=p.write(e);if(d){d(e)}};const m=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:m}));o+=p.end();r+=l.end();return{exitCode:u,stdout:o,stderr:r}}))}t.getExecOutput=getExecOutput},8159:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const s=o(a(2037));const p=o(a(2361));const l=o(a(2081));const d=o(a(1017));const c=o(a(7436));const m=o(a(1962));const u=a(9512);const f=process.platform==="win32";class ToolRunner extends p.EventEmitter{constructor(e,t,a){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=a||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const a=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(f){if(this._isCmdFile()){n+=a;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${a}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(a);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=a;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,a){try{let i=t+e.toString();let n=i.indexOf(s.EOL);while(n>-1){const e=i.substring(0,n);a(e);i=i.substring(n+s.EOL.length);n=i.indexOf(s.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const i of e){if(t.some((e=>e===i))){a=true;break}}if(!a){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.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='"';let a=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(a&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return r(this,void 0,void 0,(function*(){if(!m.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=d.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise(((e,t)=>r(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+s.EOL)}const i=new ExecState(a,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield m.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const o=l.spawn(n,this._getSpawnArgs(a),this._getSpawnOptions(this.options,n));let r="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}r=this._processLineBuffer(e,r,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let p="";if(o.stderr){o.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}p=this._processLineBuffer(e,p,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));o.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));o.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((a,i)=>{if(r.length>0){this.emit("stdline",r)}if(p.length>0){this.emit("errline",p)}o.removeAllListeners();if(a){t(a)}else{e(i)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let o=0;o0){t.push(n);n=""}continue}append(r)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends p.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},8090:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=a(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const r=o(a(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;r.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;r.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;r.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var p=this&&this.__await||function(e){return this instanceof p?(this.v=e,this):new p(e)};var l=this&&this.__asyncGenerator||function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(e,t||[]),n,o=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(a,i){o.push([e,t,a,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof p?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const d=o(a(2186));const c=o(a(7147));const m=o(a(1026));const u=o(a(1017));const f=o(a(9005));const h=a(1063);const g=a(4536);const y=a(9117);const v=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=m.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return r(this,void 0,void 0,(function*(){const a=[];try{for(var i=s(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;a.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return a}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=m.getOptions(this.options);const t=[];for(const a of this.patterns){t.push(a);if(e.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")){t.push(new g.Pattern(a.negate,true,a.segments.concat("**")))}}const a=[];for(const e of f.getSearchPaths(t)){d.debug(`Search path '${e}'`);try{yield p(c.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}a.unshift(new y.SearchState(e,1))}const i=[];while(a.length){const n=a.pop();const o=f.match(t,n.path);const r=!!o||f.partialMatch(t,n.path);if(!o&&!r){continue}const s=yield p(DefaultGlobber.stat(n,e,i));if(!s){continue}if(s.isDirectory()){if(o&h.MatchKind.Directory){yield yield p(n.path)}else if(!r){continue}const e=n.level+1;const t=(yield p(c.promises.readdir(n.path))).map((t=>new y.SearchState(u.join(n.path,t),e)));a.push(...t.reverse())}else if(o&h.MatchKind.File){yield yield p(n.path)}}}))}static create(e,t){return r(this,void 0,void 0,(function*(){const a=new DefaultGlobber(t);if(v){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{a.patterns.push(new g.Pattern(e))}}a.searchPaths.push(...f.getSearchPaths(a.patterns));return a}))}static stat(e,t,a){return r(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield c.promises.stat(e.path)}catch(a){if(a.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){d.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw a}}else{i=yield c.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield c.promises.realpath(e.path);while(a.length>=e.level){a.pop()}if(a.some((e=>e===t))){d.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}a.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var a;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(a=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const s=o(a(1017));const p=r(a(9491));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=s.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){p.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);p.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(l){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}p.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=s.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){p.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){p.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(s.sep)){return e}if(e===s.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const s=o(a(1017));const p=o(a(1849));const l=r(a(9491));const d=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=p.safeTrimTrailingSeparator(e);if(!p.hasRoot(e)){this.segments=e.split(s.sep)}else{let t=e;let a=p.dirname(t);while(a!==t){const e=s.basename(t);this.segments.unshift(e);t=a;a=p.dirname(t)}this.segments.unshift(t)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const a of e){const e=p?a.searchPath.toUpperCase():a.searchPath;t[e]="candidate"}const a=[];for(const i of e){const e=p?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let o=e;let s=r.dirname(o);while(s!==o){if(t[s]){n=true;break}o=s;s=r.dirname(o)}if(!n){a.push(i.searchPath);t[e]="included"}}return a}t.getSearchPaths=getSearchPaths;function match(e,t){let a=s.MatchKind.None;for(const i of e){if(i.negate){a&=~i.match(t)}else{a|=i.match(t)}}return a}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const s=o(a(2037));const p=o(a(1017));const l=o(a(1849));const d=r(a(9491));const c=a(3973);const m=a(1063);const u=a(6836);const f=process.platform==="win32";class Pattern{constructor(e,t=false,a,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{a=a||[];d.default(a.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(a[0]);d.default(t&&l.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(a).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(p.sep);n=l.safeTrimTrailingSeparator(n);let o=false;const r=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!o&&!(o=e==="")));this.searchPath=new u.Path(r).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(r[0]),f?"i":"");this.isImplicitPattern=t;const s={dot:true,nobrace:true,nocase:f,nocomment:true,noext:true,nonegate:true};n=f?n.replace(/\\/g,"/"):n;this.minimatch=new c.Minimatch(n,s)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(p.sep)&&this.isImplicitPattern===false){e=`${e}${p.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?m.MatchKind.Directory:m.MatchKind.All}return m.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(f?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(f?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){d.default(e,"pattern cannot be empty");const a=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));d.default(a.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);d.default(!l.hasRoot(e)||a[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${p.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${p.sep}`)){t=t||s.homedir();d.default(t,"Unable to determine HOME directory");d.default(l.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(f&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(f&&(e==="\\"||e.match(/^\\[^\\]/))){let t=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let t="";for(let a=0;a=0){if(i.length>1){return""}if(i){t+=i;a=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var a=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const s=o(a(3685));const p=o(a(5687));const l=o(a(9835));const d=o(a(4294));var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var m;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(m=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const h=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const y=10;const v=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 r(this,void 0,void 0,(function*(){return new Promise((e=>r(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,a){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=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,t){return r(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return r(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return r(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("POST",e,t,a||{})}))}patch(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,a||{})}))}put(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PUT",e,t,a||{})}))}head(e,t){return r(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,a,i){return r(this,void 0,void 0,(function*(){return this.request(e,t,a,i)}))}getJson(e,t={}){return r(this,void 0,void 0,(function*(){t[m.Accept]=this._getExistingOrDefaultHeader(t,m.Accept,u.ApplicationJson);const a=yield this.get(e,t);return this._processResponse(a,this.requestOptions)}))}postJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.post(e,i,a);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.put(e,i,a);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.patch(e,i,a);return this._processResponse(n,this.requestOptions)}))}request(e,t,a,i){return r(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,i);const r=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let s=0;let p;do{p=yield this.requestRaw(o,a);if(p&&p.message&&p.message.statusCode===c.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(p)){e=t;break}}if(e){return e.handleAuthentication(this,o,a)}else{return p}}let t=this._maxRedirects;while(p.message.statusCode&&f.includes(p.message.statusCode)&&this._allowRedirects&&t>0){const r=p.message.headers["location"];if(!r){break}const s=new URL(r);if(n.protocol==="https:"&&n.protocol!==s.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.")}yield p.readBody();if(s.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}o=this._prepareRequest(e,s,i);p=yield this.requestRaw(o,a);t--}if(!p.message.statusCode||!h.includes(p.message.statusCode)){return p}s+=1;if(s{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{a(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,a){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;a(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,a){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?p:s;const o=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,a){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||a}_getAgent(e){let t;const a=l.getProxyUrl(e);const i=a&&a.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(a&&a.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`}),{host:a.hostname,port:a.port})};let i;const r=a.protocol==="https:";if(n){i=r?d.httpsOverHttps:d.httpsOverHttp}else{i=r?d.httpOverHttps:d.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new p.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=n?p.globalAgent:s.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return r(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return r(this,void 0,void 0,(function*(){return new Promise(((a,i)=>r(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===c.NotFound){a(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let r;let s;try{s=yield e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){r=JSON.parse(s,dateTimeDeserializer)}else{r=JSON.parse(s)}o.result=r}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(r&&r.message){e=r.message}else if(s&&s.length>0){e=s}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;i(t)}else{a(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,a)=>(t[a.toLowerCase()]=e[a],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const a=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(a){return new URL(a)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const i=[e.hostname.toUpperCase()];if(typeof a==="number"){i.push(`${i[0]}:${a}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},1962:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const p=o(a(7147));const l=o(a(1017));s=p.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return r(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,a=false){return r(this,void 0,void 0,(function*(){const i=a?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,a){return r(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(a.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const o of a){e=n+o;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const a=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield t.readdir(a)){if(i===n.toUpperCase()){e=l.join(a,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const s=a(9491);const p=o(a(2081));const l=o(a(1017));const d=a(3837);const c=o(a(1962));const m=d.promisify(p.exec);const u=d.promisify(p.execFile);function cp(e,t,a={}){return r(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:o}=readCopyOptions(a);const r=(yield c.exists(t))?yield c.stat(t):null;if(r&&r.isFile()&&!i){return}const s=r&&r.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,i)}}else{if(l.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,i)}}))}t.cp=cp;function mv(e,t,a={}){return r(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(a.force==null||a.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return r(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=c.getCmdPath();if(yield c.isDirectory(e,true)){yield m(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield m(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield c.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield c.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm`,[`-rf`,`${e}`])}else{yield c.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return r(this,void 0,void 0,(function*(){s.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}t.which=which;function findInPath(e){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const a=yield c.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(l.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){a.push(e)}}}const i=[];for(const n of a){const a=yield c.tryGetExecutablePath(l.join(n,e),t);if(a){i.push(a)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:i}}function cpDirRecursive(e,t,a,i){return r(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const n=yield c.readdir(e);for(const o of n){const n=`${e}/${o}`;const r=`${t}/${o}`;const s=yield c.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,r,a,i)}else{yield copyFile(n,r,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,a){return r(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const a=yield c.readlink(e);yield c.symlink(a,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||a){yield c.copyFile(e,t)}}))}},2473:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(a(5911));const p=a(2186);const l=a(2037);const d=a(2081);const c=a(7147);function _findMatch(t,a,i,n){return r(this,void 0,void 0,(function*(){const o=l.platform();let r;let d;let c;for(const r of i){const i=r.version;p.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!a||r.stable===a)){c=r.files.find((t=>{p.debug(`${t.arch}===${n} && ${t.platform}===${o}`);let a=t.arch===n&&t.platform===o;if(a&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){a=true}else{a=s.satisfies(i,t.platform_version)}}return a}));if(c){p.debug(`matched ${r.version}`);d=r;break}}}if(d&&c){r=Object.assign({},d);r.files=[c]}return r}))}t._findMatch=_findMatch;function _getOsVersion(){const t=l.platform();let a="";if(t==="darwin"){a=d.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){a=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return a}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let a="";if(c.existsSync(e)){a=c.readFileSync(e).toString()}else if(c.existsSync(t)){a=c.readFileSync(t).toString()}return a}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const s=o(a(2186));class RetryHelper{constructor(e,t,a){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(a);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return r(this,void 0,void 0,(function*(){let a=1;while(asetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const p=o(a(2186));const l=o(a(7436));const d=o(a(7147));const c=o(a(2473));const m=o(a(2037));const u=o(a(1017));const f=o(a(6255));const h=o(a(5911));const g=o(a(2781));const y=o(a(3837));const v=a(9491);const b=s(a(824));const x=a(1514);const w=a(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const S=process.platform==="win32";const N=process.platform==="darwin";const k="actions/tool-cache";function downloadTool(e,t,a,i){return r(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),b.default());yield l.mkdirP(u.dirname(t));p.debug(`Downloading ${e}`);p.debug(`Destination ${t}`);const n=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const d=new w.RetryHelper(n,o,s);return yield d.execute((()=>r(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",a,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,a,i){return r(this,void 0,void 0,(function*(){if(d.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new f.HttpClient(k,[],{allowRetries:false});if(a){p.debug("set auth");if(i===undefined){i={}}i.authorization=a}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);p.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const r=y.promisify(g.pipeline);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const c=s();let m=false;try{yield r(c,d.createWriteStream(t));p.debug("download complete");m=true;return t}finally{if(!m){p.debug("download failed");try{yield l.rmRF(t)}catch(e){p.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,a){return r(this,void 0,void 0,(function*(){v.ok(S,"extract7z() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(a){try{const t=p.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield x.exec(`"${a}"`,n,o)}finally{process.chdir(i)}}else{const a=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const r=`& '${a}' -Source '${n}' -Target '${o}'`;const s=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",r];const p={silent:true};try{const e=yield l.which("powershell",true);yield x.exec(`"${e}"`,s,p)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,a="xz"){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);p.debug("Checking tar --version");let i="";yield x.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});p.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let o;if(a instanceof Array){o=a}else{o=[a]}if(p.isDebug()&&!a.includes("v")){o.push("-v")}let r=t;let s=e;if(S&&n){o.push("--force-local");r=t.replace(/\\/g,"/");s=e.replace(/\\/g,"/")}if(n){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",r,"-f",s);yield x.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,a=[]){return r(this,void 0,void 0,(function*(){v.ok(N,"extractXar() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(a instanceof Array){i=a}else{i=[a]}i.push("-x","-C",t,"-f",e);if(p.isDebug()){i.push("-v")}const n=yield l.which("xar",true);yield x.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(S){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return r(this,void 0,void 0,(function*(){const a=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield l.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${a}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];p.debug(`Using pwsh at path: ${n}`);yield x.exec(`"${n}"`,t)}else{const e=[`$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 '${a}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield l.which("powershell",true);p.debug(`Using powershell at path: ${n}`);yield x.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return r(this,void 0,void 0,(function*(){const a=yield l.which("unzip",true);const i=[e];if(!p.isDebug()){i.unshift("-q")}i.unshift("-o");yield x.exec(`"${a}"`,i,{cwd:t})}))}function cacheDir(e,t,a,i){return r(this,void 0,void 0,(function*(){a=h.clean(a)||a;i=i||m.arch();p.debug(`Caching tool ${t} ${a} ${i}`);p.debug(`source dir: ${e}`);if(!d.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,a,i);for(const t of d.readdirSync(e)){const a=u.join(e,t);yield l.cp(a,n,{recursive:true})}_completeToolPath(t,a,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,a,i,n){return r(this,void 0,void 0,(function*(){i=h.clean(i)||i;n=n||m.arch();p.debug(`Caching tool ${a} ${i} ${n}`);p.debug(`source file: ${e}`);if(!d.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(a,i,n);const r=u.join(o,t);p.debug(`destination file ${r}`);yield l.cp(e,r);_completeToolPath(a,i,n);return o}))}t.cacheFile=cacheFile;function find(e,t,a){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}a=a||m.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,a);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=h.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,a);p.debug(`checking cache: ${n}`);if(d.existsSync(n)&&d.existsSync(`${n}.complete`)){p.debug(`Found tool in cache ${e} ${t} ${a}`);i=n}else{p.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const a=[];t=t||m.arch();const i=u.join(_getCacheDirectory(),e);if(d.existsSync(i)){const e=d.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(d.existsSync(e)&&d.existsSync(`${e}.complete`)){a.push(n)}}}}return a}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,a,i="master"){return r(this,void 0,void 0,(function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const r=new f.HttpClient("tool-cache");const s={};if(a){p.debug("set auth");s.authorization=a}const l=yield r.getJson(o,s);if(!l.result){return n}let d="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){d=e.url;break}}s["accept"]="application/vnd.github.VERSION.raw";let c=yield(yield r.get(d,s)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{n=JSON.parse(c)}catch(e){p.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,a,i=m.arch()){return r(this,void 0,void 0,(function*(){const n=yield c._findMatch(e,t,a,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return r(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),b.default())}yield l.mkdirP(e);return e}))}function _createToolPath(e,t,a){return r(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");p.debug(`destination ${i}`);const n=`${i}.complete`;yield l.rmRF(i);yield l.rmRF(n);yield l.mkdirP(i);return i}))}function _completeToolPath(e,t,a){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");const n=`${i}.complete`;d.writeFileSync(n,"");p.debug("finished caching tool")}function isExplicitVersion(e){const t=h.clean(e)||"";p.debug(`isExplicit: ${t}`);const a=h.valid(t)!=null;p.debug(`explicit? ${a}`);return a}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let a="";p.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(h.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const o=h.satisfies(n,t);if(o){a=n;break}}if(a){p.debug(`matched: ${a}`)}else{p.debug("match not found")}return a}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";v.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";v.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const a=global[e];return a!==undefined?a:t}function _unique(e){return Array.from(new Set(e))}},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const a=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;a.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);i.push(t)}removeEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used.  It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=a.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const a=setTimeout(abortSignal,e,t);if(typeof a.unref==="function"){a.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const a of t){if(!objectHasProperty(e,a)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=a(3415);var n=a(3837);var o=a(2107);var r=a(6189);var s=a(1333);var p=a(3233);var l=a(9645);var d=a(2037);var c=a(3685);var m=a(5687);var u=a(8165);var f=a(2557);var h=a(4294);var g=a(2781);var y=a(6279);var v=a(467);var b=a(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(a){if(a!=="default"){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:true,get:function(){return e[a]}})}}))}t["default"]=e;return Object.freeze(t)}var x=_interopNamespace(r);var w=_interopNamespace(d);var S=_interopNamespace(c);var N=_interopNamespace(m);var k=_interopNamespace(u);var C=_interopNamespace(h);var j=_interopDefaultLegacy(y);var P=_interopDefaultLegacy(v);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let a=0;a{a=a.then(e)}));return a}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,a,i){if(!Array.isArray(e)){e=[e]}if(!a||!i){return{[t]:e}}const n={[t]:e};n[T]={[a]:i};return n}function applyMixins(e,t){const a=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{a.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,a){return!e||!t?e:e.split(t).join(a||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,a){const failValidation=(e,i)=>{throw new Error(`"${a}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const a=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:o,InclusiveMinimum:r,MaxItems:s,MaxLength:p,MinItems:l,MinLength:d,MultipleOf:c,Pattern:m,UniqueItems:u}=e.constraints;if(i!=undefined&&a>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&a<=n){failValidation("ExclusiveMinimum",n)}if(o!=undefined&&a>o){failValidation("InclusiveMaximum",o)}if(r!=undefined&&as){failValidation("MaxItems",s)}if(p!=undefined&&f.length>p){failValidation("MaxLength",p)}if(l!=undefined&&f.lengtha.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};let p={};const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Sequence$/i)!==null){p=[]}if(e.isConstant){t=e.defaultValue}const{required:d,nullable:c}=e;if(d&&c&&t===undefined){throw new Error(`${a} cannot be undefined.`)}if(d&&!c&&t==undefined){throw new Error(`${a} cannot be null or undefined.`)}if(!d&&c===false&&t===null){throw new Error(`${a} cannot be null.`)}if(t==undefined){p=t}else{if(l.match(/^any$/i)!==null){p=t}else if(l.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){p=serializeBasicTypes(l,a,t)}else if(l.match(/^Enum$/i)!==null){const i=e;p=serializeEnumType(a,i.type.allowedValues,t)}else if(l.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){p=serializeDateTypes(l,t,a)}else if(l.match(/^ByteArray$/i)!==null){p=serializeByteArrayType(a,t)}else if(l.match(/^Base64Url$/i)!==null){p=serializeBase64UrlType(a,t)}else if(l.match(/^Sequence$/i)!==null){p=serializeSequenceType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Dictionary$/i)!==null){p=serializeDictionaryType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Composite$/i)!==null){p=serializeCompositeType(this,e,t,a,Boolean(this.isXML),s)}}return p}deserialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let p;const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Composite$/i)!==null){p=deserializeCompositeType(this,e,t,a,s)}else{if(this.isXML){const e=s.xmlCharKey;const a=t;if(a[T]!=undefined&&a[e]!=undefined){t=a[e]}}if(l.match(/^Number$/i)!==null){p=parseFloat(t);if(isNaN(p)){p=t}}else if(l.match(/^Boolean$/i)!==null){if(t==="true"){p=true}else if(t==="false"){p=false}else{p=t}}else if(l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){p=t}else if(l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){p=new Date(t)}else if(l.match(/^UnixTime$/i)!==null){p=unixTimeToDate(t)}else if(l.match(/^ByteArray$/i)!==null){p=decodeString(t)}else if(l.match(/^Base64Url$/i)!==null){p=base64UrlToByteArray(t)}else if(l.match(/^Sequence$/i)!==null){p=deserializeSequenceType(this,e,t,a,s)}else if(l.match(/^Dictionary$/i)!==null){p=deserializeDictionaryType(this,e,t,a,s)}}if(e.isConstant){p=e.defaultValue}return p}}function trimEnd(e,t){let a=e.length;while(a-1>=0&&e[a-1]===t){--a}return e.substr(0,a)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let a="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){a+=e.substr(0,e.length-1)+"."}else{a+=e;t.push(a);a=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,a){if(a!==null&&a!==undefined){if(e.match(/^Number$/i)!==null){if(typeof a!=="number"){throw new Error(`${t} with value ${a} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof a.valueOf()!=="string"){throw new Error(`${t} with value "${a}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof a.valueOf()==="string"&&isValidUuid(a))){throw new Error(`${t} with value "${a}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof a!=="boolean"){throw new Error(`${t} with value ${a} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof a;if(e!=="string"&&e!=="function"&&!(a instanceof ArrayBuffer)&&!ArrayBuffer.isView(a)&&!((typeof Blob==="function"||typeof Blob==="object")&&a instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return a}function serializeEnumType(e,t,a){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===a.toLowerCase()}return e===a}));if(!i){throw new Error(`${a} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return a}function serializeByteArrayType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=encodeByteArray(t)}return a}function serializeBase64UrlType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=bufferToBase64Url(t)||""}return a}function serializeDateTypes(e,t,a){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${a} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,a,i,n,o){if(!Array.isArray(a)){throw new Error(`${i} must be of type Array.`)}const r=t.type.element;if(!r||typeof r!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const s=[];for(let t=0;te!==n));if(s){r[n]=e.serialize(p,a[n],i+'["'+n+'"]',o)}}}return r}return a}function getXmlObjectValue(e,t,a,i){if(!a||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const o={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[T]){return t}else{const e=Object.assign({},t);e[T]=o;return e}}const r={};r[i.xmlCharKey]=t;r[T]=o;return r}function isSpecialXmlProperty(e,t){return[T,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,a,i,n){var o,r;const s=(o=n.xmlCharKey)!==null&&o!==void 0?o:O;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,a,"serializedName")}const p=resolveModelProperties(e,t,i);let l={};const d=[];for(const o of Object.keys(p)){const c=p[o];const m=splitSerializeName(p[o].serializedName);d.push(m[0]);const{serializedName:u,xmlName:f,xmlElementName:h}=c;let g=i;if(u!==""&&u!==undefined){g=i+"."+u}const y=c.headerCollectionPrefix;if(y){const t={};for(const i of Object.keys(a)){if(i.startsWith(y)){t[i.substring(y.length)]=e.deserialize(c.type.value,a[i],g,n)}d.push(i)}l[o]=t}else if(e.isXML){if(c.xmlIsAttribute&&a[T]){l[o]=e.deserialize(c,a[T][f],g,n)}else if(c.xmlIsMsText){if(a[s]!==undefined){l[o]=a[s]}else if(typeof a==="string"){l[o]=a}}else{const t=h||f||u;if(c.xmlIsWrapped){const t=a[f];const i=(r=t===null||t===void 0?void 0:t[h])!==null&&r!==void 0?r:[];l[o]=e.deserialize(c,i,g,n)}else{const i=a[t];l[o]=e.deserialize(c,i,g,n)}}}else{let i;let r=a;for(const e of m){if(!r)break;r=r[e]}i=r;const s=t.type.polymorphicDiscriminator;if(s&&o===s.clientName&&i==undefined){i=t.serializedName}let d;if(Array.isArray(a[o])&&p[o].serializedName===""){i=a[o];const t=e.deserialize(c,i,g,n);for(const[e,a]of Object.entries(l)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=a}}l=t}else if(i!==undefined||c.defaultValue!==undefined){d=e.deserialize(c,i,g,n);l[o]=d}}}const c=t.type.additionalProperties;if(c){const isAdditionalProperty=e=>{for(const t in p){const a=splitSerializeName(p[t].serializedName);if(a[0]===e){return false}}return true};for(const t in a){if(isAdditionalProperty(t)){l[t]=e.deserialize(c,a[t],i+'["'+t+'"]',n)}}}else if(a){for(const e of Object.keys(a)){if(l[e]===undefined&&!d.includes(e)&&!isSpecialXmlProperty(e,n)){l[e]=a[e]}}}return l}function deserializeDictionaryType(e,t,a,i,n){const o=t.type.value;if(!o||typeof o!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){const t={};for(const r of Object.keys(a)){t[r]=e.deserialize(o,a[r],i,n)}return t}return a}function deserializeSequenceType(e,t,a,i,n){const o=t.type.element;if(!o||typeof o!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){if(!Array.isArray(a)){a=[a]}const t=[];for(let r=0;r0}keys(){return Object.keys(this._rawQuery)}set(e,t){const a=t;if(e){if(a!==undefined&&a!==null){const t=Array.isArray(a)?a:a.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const a=this._rawQuery[t];if(Array.isArray(a)){const i=[];for(const e of a){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${a}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let a="ParameterName";let i="";let n="";for(let o=0;oisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,a){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:a&&a.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const o=isUrlHttps(e);const r=isUrlHttps(t.host);const s={isHttps:o,agent:createTunnel(o,r,n)};return s}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,a){if(e&&t){return C.httpsOverHttps(a)}else if(e&&!t){return C.httpsOverHttp(a)}else if(!e&&t){return C.httpOverHttps(a)}else{return C.httpOverHttp(a)}}function isValidPort(e){return 0<=e&&e<=65535}const A="REDACTED";const I=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const M=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?I.concat(e):I;t=Array.isArray(t)?M.concat(t):M;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,a)=>{if(a instanceof Error){return Object.assign(Object.assign({},a),{name:a.name,message:a.message})}if(e==="_headersMap"){return this.sanitizeHeaders(a)}else if(e==="url"){return this.sanitizeUrl(a)}else if(e==="query"){return this.sanitizeQuery(a)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(a)||isObject(a)){if(t.has(a)){return"[Circular]"}t.add(a)}return a}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,a){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=a(e,n)}else{i[n]=A}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const a=t.getQuery();if(!a){return e}const i=URLQuery.parse(a);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,A)}}t.setQuery(i.toString());return t.toString()}}const B=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,a,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=a;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[B](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const q=p.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,a){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});a(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((a=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();a()}));e.once("end",a);e.once("error",a)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,a)=>{t.set(a,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={};this.cookieJar=new k.CookieJar(undefined,{looseMode:true})}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const a=new f.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new f.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){a.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{a.abort()}),e.timeout)}if(e.formData){const t=e.formData;const a=new j["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){a.append(e,t.value,t.options)}else{a.append(e,t)}};for(const e of Object.keys(t)){const a=t[e];if(Array.isArray(a)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{q.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const a=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:o,password:r}=e.proxySettings;const s=`${i}:${n}:${o}:${r}`;const p=(t=this.proxyAgentMap.get(s))!==null&&t!==void 0?t:{};let l=getCachedAgent(a,p);if(l){return l}const d=createProxyAgent(e.url,e.proxySettings,e.headers);l=d.agent;if(d.isHttps){p.httpsAgent=d.agent}else{p.httpAgent=d.agent}this.proxyAgentMap.set(s,p);return l}else if(e.keepAlive){let t=getCachedAgent(a,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(a){t=this.keepAliveAgents.httpsAgent=new N.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new S.Agent(i)}return t}else{return a?N.globalAgent:S.globalAgent}}async fetch(e,t){return P["default"](e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,a)=>{this.cookieJar.getCookieString(e.url,((e,i)=>{if(e){a(e)}else{t(i)}}))}));e.headers.set("Cookie",t)}t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");if(t!==undefined){await new Promise(((a,i)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:true},(e=>{if(e){i(e)}else{a()}}))}))}}}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:a}=e,i=o.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(a){n.tracingContext=a.tracingContext;n.spanOptions=a===null||a===void 0?void 0:a.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:T,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:"  ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const V=Object.assign({},U);V.explicitArray=false;V.renderOpts={pretty:false};function stringifyXML(e,t={}){var a;V.rootName=t.rootName;V.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Builder(V);return i.buildObject(e)}function parseXML(e,t={}){var a;H.explicitRoot=!!t.includeRoot;H.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Parser(H);return new Promise(((t,a)=>{if(!e){a(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){a(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(a,i)=>new DeserializationPolicy(a,i,e,t)}}const $=["application/json","text/json"];const X=["application/xml","application/atom+xml"];const G={expectedContentTypes:{json:$,xml:X}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,a,i={}){var n;super(e,t);this.jsonContentTypes=a&&a.json||$;this.xmlContentTypes=a&&a.xml||X;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:O}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const a=e.request;const i=a.operationSpec;if(i){const n=a.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let a;if(t===undefined){a=true}else if(typeof t==="boolean"){a=t}else{a=t(e)}return a}function deserializeResponseBody(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};return parse(e,t,a,s).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:o,shouldReturnResponse:r}=handleErrorResponse(e,t,n);if(o){throw o}else if(r){return e}if(n){if(n.bodyMapper){let a=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===z.Sequence){a=typeof a==="object"?a[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,a,"operationRes.parsedBody",i)}catch(t){const a=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw a}}else if(t.httpMethod==="HEAD"){e.parsedBody=a.status>=200&&a.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,a){var i;const n=200<=e.status&&e.status<300;const o=isOperationSpecEmpty(t)?n:!!a;if(o){if(a){if(!a.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const r=a!==null&&a!==void 0?a:t.responses.default;const s=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const p=s?`Unexpected status code: ${e.status}`:e.bodyAsText;const l=new RestError(p,undefined,e.status,e.request,e);if(!r){throw l}const d=r.bodyMapper;const c=r.headersMapper;try{if(e.parsedBody){const a=e.parsedBody;let i;if(d){let e=a;if(t.isXML&&d.type.name===z.Sequence){e=typeof a==="object"?a[d.xmlElementName]:[]}i=t.serializer.deserialize(d,e,"error.response.parsedBody")}const n=a.error||i||a;l.code=n.code;if(n.message){l.message=n.message}if(d){l.response.parsedBody=i}}if(e.headers&&c){l.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){l.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:false}}function parse(e,t,a,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${a.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,a.status,a.request,a);return Promise.reject(n)};const o=((n=a.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(a.status))||a.request.streamResponseBody;if(!o&&a.bodyAsText){const n=a.bodyAsText;const o=a.headers.get("Content-Type")||"";const r=!o?[]:o.split(";").map((e=>e.toLowerCase()));if(r.length===0||r.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{a.parsedBody=JSON.parse(n);e(a)})).catch(errorHandler)}else if(r.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{a.parsedBody=e;return a})).catch(errorHandler)}}return Promise.resolve(a)}const K={enable:true};function keepAlivePolicy(e){return{create:(t,a)=>new KeepAlivePolicy(t,a,e||K)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.keepAliveOptions=a}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const W=["GET","HEAD"];const Q={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,a)=>new RedirectPolicy(t,a,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,a=20){super(e,t);this.maxRetries=a}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,a){const{request:i,status:n}=t;const o=t.headers.get("location");if(o&&(n===300||n===301&&W.includes(i.method)||n===302&&W.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||ahandleRedirect(e,t,a+1)))}return Promise.resolve(t)}const J=3;const Y=1e3*30;const Z=1e3*90;const ee=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,a,i,n){if(!t(i,n)){return false}return a.retryCountnew ExponentialRetryPolicy(i,n,e,t,a)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const te={maxRetries:J,retryDelayInMs:Y,maxRetryDelayInMs:Z};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.maxRetryInterval=isNumber(n)?n:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,a,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(a===null||a===void 0?void 0:a.headers.get(_.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const o=t.abortSignal&&t.abortSignal.aborted;if(!o&&shouldRetry(e.retryCount,shouldPolicyRetry,i,a)){q.info(`Retrying request in ${i.retryInterval}`);try{await s.delay(i.retryInterval);const a=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,a,i)}catch(n){return retry$1(e,t,a,i,n)}}else if(o||n||!a){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,a&&a.status,a&&a.request,a);throw e}else{return a}}function logPolicy(e={}){return{create:(t,a)=>new LogPolicy(t,a,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:a=q.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=a;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let a;if(typeof e==="string"){a=e}else if(Array.isArray(e)){a=e.join(".")}else{a=t.serializedName}return a}function getStreamResponseStatusCodes(e){const t=new Set;for(const a in e.responses){const i=e.responses[a];if(i.bodyMapper&&i.bodyMapper.type.name===z.Stream){t.add(Number(a))}}return t}function getDefaultUserAgentKey(){return _.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${w.arch()}-${w.type()}-${w.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:_.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",a="/"){return e.map((e=>{const t=e.value?`${a}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ae=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const a=getUserAgentString(e.concat(t));return a}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const a=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,a)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=a;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const ie={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,a){async function tryGetAccessToken(){if(Date.now()e.getToken(t,a);i=beginRefresh(tryGetAccessToken,o.retryIntervalInMs,(s=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&s!==void 0?s:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(r.mustRefresh)return refresh(e);if(r.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const a=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await a({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(_.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,a)=>new GenerateClientRequestIdPolicy(t,a,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this._requestIdHeaderName=a}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let ne;function getCachedDefaultHttpClient(){if(!ne){ne=new NodeFetchHttpClient}return ne}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const oe=[];let re=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(_.HTTPS_PROXY);const t=getEnvironmentValue(_.ALL_PROXY);const a=getEnvironmentValue(_.HTTP_PROXY);return e||t||a}function isBypassed(e,t,a){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(a===null||a===void 0?void 0:a.has(i)){return a.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}a===null||a===void 0?void 0:a.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(_.NO_PROXY);re=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:a,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const o=n.getScheme()?n.getScheme()+"://":"";return{host:o+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:a}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!re){oe.push(...loadNoProxy())}return{create:(a,i)=>new ProxyPolicy(a,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const a=e.indexOf("://");const i=a!==-1?a+3:0;const n=e.substring(i,t);const o=n.indexOf(":");const r=o!==-1;const s=r?n.substring(0,o):n;const p=r?n.substring(o+1):undefined;const l=e.substring(0,i)+e.substring(t+1);return{username:s,password:p,urlWithoutAuth:l}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this.proxySettings=a;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:oe,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,a)=>new RPRegistrationPolicy(t,a,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,a=30){super(e,t);this._retryTimeout=a}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,a){if(a.status===409){const i=checkRPNotRegisteredError(a.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return a}))}}return Promise.resolve(a)}function getRequestEssentials(e,t=false){const a=e.clone();if(t){a.url=e.url}a.headers.set("x-ms-client-request-id",generateUuid());a.headers.set("Content-Type","application/json; charset=utf-8");return a}function checkRPNotRegisteredError(e){let t,a;if(e){try{a=JSON.parse(e)}catch(e){}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){const e=a.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const a=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0]){t=a[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,a,i){const n=`${t}providers/${a}/register?api-version=2016-02-01`;const o=`${t}providers/${a}?api-version=2016-02-01`;const r=getRequestEssentials(i);r.method="POST";r.url=n;const s=await e._nextPolicy.sendRequest(r);if(s.status!==200){throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`)}return getRegistrationStatus(e,o,i)}async function getRegistrationStatus(e,t,a){const i=getRequestEssentials(a);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const o=n.parsedBody;if(n.parsedBody&&o.registrationState&&o.registrationState==="Registered"){return true}else{await s.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,a)}}function signingPolicy(e){return{create:(t,a)=>new SigningPolicy(t,a,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.authenticationProvider=a}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,a,i){return{create:(n,o)=>new SystemErrorRetryPolicy(n,o,e,t,a,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n,o){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.minRetryInterval=isNumber(n)?n:ee;this.maxRetryInterval=isNumber(o)?o:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,a,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,a,i)){try{await s.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,a,i,n)}}else{if(i){return Promise.reject(n.error)}return a}}const pe=3;const le=_.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const de="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.numberOfRetries=0;this._handleResponse=a||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==le.TooManyRequests&&t.status!==le.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var a;const i=t.headers.get(_.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await s.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:de});if((a=e.abortSignal)===null||a===void 0?void 0:a.aborted){throw new f.AbortError(de)}if(this.numberOfRetries{let a=undefined;const i=this;const n=t;return{create(t,o){const r=getCredentialScopes(n,i.baseUri);if(!r){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(a===undefined||a===null){a=bearerTokenAuthenticationPolicy(e,r)}return a.create(t,o)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){q.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}q.info("ServiceClient: using default request policies");a=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(a);if(e){a=e}}}this._requestPolicyFactories=a}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let a=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){a=this._requestPolicyFactories[e].create(a,this._requestPolicyOptions)}}return a.sendRequest(t)}async sendOperationRequest(e,a,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const o=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const r=new WebResource;let s;try{const i=a.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}r.method=a.httpMethod;r.operationSpec=a;const n=URLBuilder.parse(i);if(a.path){n.appendPath(a.path)}if(a.urlParameters&&a.urlParameters.length>0){for(const t of a.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(a.queryParameters&&a.queryParameters.length>0){for(const i of a.queryParameters){let r=getOperationArgumentValueFromParameter(this,e,i,a.serializer);if(r!==undefined&&r!==null){r=a.serializer.serialize(i.mapper,r,getPathStringFromParameter(i),o);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(r.length===0){continue}else{for(const e in r){const t=r[e];r[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(r)){for(const e in r){if(r[e]!==undefined&&r[e]!==null){r[e]=encodeURIComponent(r[e])}}}else{r=encodeURIComponent(r)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),r)}}}r.url=n.toString();const p=a.contentType||this.requestContentType;if(p&&a.requestBody){r.headers.set("Content-Type",p)}if(a.headerParameters){for(const t of a.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);if(i!==undefined&&i!==null){i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){r.headers.set(e+t,i[t])}}else{r.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const l=e.options;if(l){if(l.customHeaders){for(const e in l.customHeaders){r.headers.set(e,l.customHeaders[e])}}if(l.abortSignal){r.abortSignal=l.abortSignal}if(l.timeout){r.timeout=l.timeout}if(l.onUploadProgress){r.onUploadProgress=l.onUploadProgress}if(l.onDownloadProgress){r.onDownloadProgress=l.onDownloadProgress}if(l.spanOptions){r.spanOptions=l.spanOptions}if(l.tracingContext){r.tracingContext=l.tracingContext}if(l.shouldDeserialize!==undefined&&l.shouldDeserialize!==null){r.shouldDeserialize=l.shouldDeserialize}}r.withCredentials=this._withCredentials;serializeRequestBody(this,r,e,a);if(r.streamResponseStatusCodes===undefined){r.streamResponseStatusCodes=getStreamResponseStatusCodes(a)}let d;let c;try{d=await this.sendRequest(r)}catch(e){c=e}if(c){if(c.response){c.details=flattenResponse(c.response,a.responses[c.statusCode]||a.responses["default"])}s=Promise.reject(c)}else{s=Promise.resolve(flattenResponse(d,a.responses[d.status]))}}catch(e){s=Promise.reject(e)}const p=i;if(p){s.then((e=>p(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>p(e)))}return s}}function serializeRequestBody(e,t,a,i){var n,o,r,s,p,l;const d=(o=(n=a.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&o!==void 0?o:{};const c={rootName:(r=d.rootName)!==null&&r!==void 0?r:"",includeRoot:(s=d.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(p=d.xmlCharKey)!==null&&p!==void 0?p:O};const m=d.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,a,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:o,xmlName:r,xmlElementName:s,serializedName:p,xmlNamespace:d,xmlNamespacePrefix:u}=n;const f=n.type.name;try{if(t.body!==undefined&&t.body!==null||o){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,c);const a=f===z.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(d,e,f,t.body,c);if(f===z.Sequence){t.body=stringifyXML(prepareXMLRootList(i,s||r||p,e,d),{rootName:r||p,xmlCharKey:m})}else if(!a){t.body=stringifyXML(i,{rootName:r||p,xmlCharKey:m})}}else if(f===z.String&&(((l=i.contentType)===null||l===void 0?void 0:l.match("text/plain"))||i.mediaType==="text")){return}else if(!a){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(p,undefined,"  ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const o=getOperationArgumentValueFromParameter(e,a,n,i.serializer);if(o!==undefined&&o!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,o,getPathStringFromParameter(n),c)}}}}function getXmlValueWithNamespace(e,t,a,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(a)){const a={};a[n.xmlCharKey]=i;a[T]={[t]:e};return a}return i}function getValueOrFunctionResult(e,t){let a;if(typeof e==="string"){a=e}else{a=t();if(typeof e==="function"){a=e(a)}}return a}function createDefaultRequestPolicyFactories(e,t){const a=[];if(t.generateClientRequestIdHeader){a.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){a.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ae);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){a.push(userAgentPolicy({key:i,value:n}))}a.push(redirectPolicy());a.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){a.push(exponentialRetryPolicy());a.push(systemErrorRetryPolicy());a.push(throttlingRetryPolicy())}a.push(deserializationPolicy(t.deserializationContentTypes));if(E){a.push(proxyPolicy(t.proxySettings))}a.push(logPolicy({logger:q.info}));return a}function createPipelineFromOptions(e,t){const a=[];if(e.sendStreamingJson){a.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const a=getDefaultUserAgentValue();if(t.indexOf(a)===-1){t.push(a)}i=t.join(" ")}const n=Object.assign(Object.assign({},K),e.keepAliveOptions);const o=Object.assign(Object.assign({},te),e.retryOptions);const r=Object.assign(Object.assign({},Q),e.redirectOptions);if(E){a.push(proxyPolicy(e.proxyOptions))}const s=Object.assign(Object.assign({},G),e.deserializationOptions);const p=Object.assign({},e.loggingOptions);a.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(s.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(o.maxRetries,o.retryDelayInMs,o.maxRetryDelayInMs));if(r.handleRedirects){a.push(redirectPolicy(r.maxRetries))}if(t){a.push(t)}a.push(logPolicy(p));if(E&&e.decompressResponse===false){a.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:a}}function getOperationArgumentValueFromParameter(e,t,a,i){return getOperationArgumentValueFromParameterPath(e,t,a.parameterPath,a.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,a,i,n){var o;let r;if(typeof a==="string"){a=[a]}const s=(o=t.options)===null||o===void 0?void 0:o.serializerOptions;if(Array.isArray(a)){if(a.length>0){if(i.isConstant){r=i.defaultValue}else{let n=getPropertyFromParameterPath(t,a);if(!n.propertyFound){n=getPropertyFromParameterPath(e,a)}let o=false;if(!n.propertyFound){o=i.required||a[0]==="options"&&a.length===2}r=o?i.defaultValue:n.propertyValue}const o=getPathStringFromParameterPath(a,i);n.serialize(i,r,o,s)}}else{if(i.required){r={}}for(const o in a){const p=i.type.modelProperties[o];const l=a[o];const d=getOperationArgumentValueFromParameterPath(e,t,l,p,n);const c=getPathStringFromParameterPath(l,p);n.serialize(p,d,c,s);if(d!==undefined&&d!==null){if(!r){r={}}r[o]=d}}}return r}function getPropertyFromParameterPath(e,t){const a={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const o=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||o){const t=[...e.parsedBody||[]];for(const a of Object.keys(n)){if(n[a].serializedName){t[a]=e.parsedBody[a]}}if(a){for(const e of Object.keys(a)){t[e]=a[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},a),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return b.createSpanFunction(e)}const me=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=me){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,a=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=a;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const ue=_.HeaderConstants;const fe="Basic";class BasicAuthenticationCredentials{constructor(e,t,a=fe){this.authorizationScheme=fe;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=a}signRequest(e){const t=`${this.userName}:${this.password}`;const a=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(ue.AUTHORIZATION,a);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return s.delay}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return l.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=_;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=z;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=T;t.XML_CHARKEY=O;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isNode=E;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,a)=>{var i=a(5443);var n=a(3837);var o=a(1017);var r=a(3685);var s=a(5687);var p=a(7310).parse;var l=a(7147);var d=a(2781).Stream;var c=a(3583);var m=a(4812);var u=a(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a=="string"){a={filename:a}}var o=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();o(r);o(t);o(s);this._trackLength(r,t,a)};FormData.prototype._trackLength=function(e,t,a){var i=0;if(a.knownLength!=null){i+=+a.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof d)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{l.stat(e.path,(function(a,i){var n;if(a){t(a);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(a){e.pause();t(null,+a.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header=="string"){return a.header}var i=this._getContentDisposition(t,a);var n=this._getContentType(t,a);var o="";var r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof a.header=="object"){u(r,a.header)}var s;for(var p in r){if(!r.hasOwnProperty(p))continue;s=r[p];if(s==null){continue}if(!Array.isArray(s)){s=[s]}if(s.length){o+=p+": "+s.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a,i;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){a=o.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){i='filename="'+a+'"'}return i};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e.name){a=c.lookup(e.name)}if(!a&&e.path){a=c.lookup(e.path)}if(!a&&e.readable&&e.hasOwnProperty("httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=c.lookup(t.filepath||t.filename)}if(!a&&typeof e=="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,i=this._streams.length;a{e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},8165:(e,t,a)=>{"use strict";
 /*!
  * Copyright (c) 2015-2020, Salesforce.com, Inc.
  * All rights reserved.
diff --git a/src/inputs.ts b/src/inputs.ts
index ed4ab93..cbfc08d 100644
--- a/src/inputs.ts
+++ b/src/inputs.ts
@@ -12,6 +12,7 @@ export const setArgs = (args: string[]) => {
     {key: 'listen-address', flag: '--listen-address'},
     {key: 'memory', flag: '--memory'},
     {key: 'mount-path', flag: '--mount-string'},
+    {key: 'network-plugin', flag: '--network-plugin'},
   ]
   inputs.forEach((input) => {
     const value = getInput(input.key).toLowerCase()
diff --git a/src/minikube.ts b/src/minikube.ts
new file mode 100644
index 0000000..387a66d
--- /dev/null
+++ b/src/minikube.ts
@@ -0,0 +1,110 @@
+import {addPath, getInput} from '@actions/core'
+import {exec} from '@actions/exec'
+import {downloadTool} from '@actions/tool-cache'
+import {mkdirP, mv} from '@actions/io'
+import {platform as getPlatform} from 'os'
+import {join} from 'path'
+
+import {restoreCaches, saveCaches} from './cache'
+
+function setArgs(args: string[]) {
+  const inputs: {key: string; flag: string}[] = [
+    {key: 'driver', flag: '--driver'},
+    {key: 'container-runtime', flag: '--container-runtime'},
+    {key: 'kubernetes-version', flag: '--kubernetes-version'},
+    {key: 'cpus', flag: '--cpus'},
+    {key: 'memory', flag: '--memory'},
+    {key: 'network-plugin', flag: '--network-plugin'},
+    {key: 'cni', flag: '--cni'},
+  ]
+  inputs.forEach((input) => {
+    const value = getInput(input.key).toLowerCase()
+    if (value !== '') {
+      args.push(input.flag, value)
+    }
+  })
+}
+
+async function installCriDocker(): Promise {
+  const urlBase =
+    'https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/'
+  const binaryDownload = downloadTool(urlBase + 'cri-dockerd')
+  const serviceDownload = downloadTool(urlBase + 'cri-docker.service')
+  const socketDownload = downloadTool(urlBase + 'cri-docker.socket')
+  await exec('chmod', ['+x', await binaryDownload])
+  await exec('sudo', ['mv', await binaryDownload, '/usr/bin/cri-dockerd'])
+  await exec('sudo', [
+    'mv',
+    await serviceDownload,
+    '/usr/lib/systemd/system/cri-docker.service',
+  ])
+  await exec('sudo', [
+    'mv',
+    await socketDownload,
+    '/usr/lib/systemd/system/cri-docker.socket',
+  ])
+}
+
+async function installConntrackSocat(): Promise {
+  await exec('sudo', ['apt-get', 'update', '-qq'])
+  await exec('sudo', ['apt-get', '-qq', '-y', 'install', 'conntrack', 'socat'])
+}
+
+async function installCrictl(): Promise {
+  const crictlURL =
+    'https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz'
+  const crictlDownload = downloadTool(crictlURL)
+  await exec('sudo', [
+    'tar',
+    'zxvf',
+    await crictlDownload,
+    '-C',
+    '/usr/local/bin',
+  ])
+}
+
+async function installNoneDriverDeps(): Promise {
+  const driver = getInput('driver').toLowerCase()
+  if (driver !== 'none') {
+    return
+  }
+  await Promise.all([
+    installCriDocker(),
+    installConntrackSocat(),
+    installCrictl(),
+  ])
+}
+
+export async function startMinikube(): Promise {
+  const args = ['start']
+  setArgs(args)
+  const cacheHits = await restoreCaches()
+  await installNoneDriverDeps()
+  await exec('minikube', args)
+  await saveCaches(cacheHits)
+}
+
+export function getDownloadUrl(version: string): string {
+  const osPlat = getPlatform()
+  const platform = osPlat === 'win32' ? 'windows' : osPlat
+  const suffix = osPlat === 'win32' ? '.exe' : ''
+  switch (version) {
+    case 'latest':
+      return `https://github.com/kubernetes/minikube/releases/latest/download/minikube-${platform}-amd64${suffix}`
+    case 'head':
+      return `https://storage.googleapis.com/minikube-builds/master/minikube-${platform}-amd64${suffix}`
+    default:
+      return `https://github.com/kubernetes/minikube/releases/download/v${version}/minikube-${platform}-amd64${suffix}`
+  }
+}
+
+export async function downloadMinikube(version: string): Promise {
+  const url = getDownloadUrl(version)
+  const downloadPath = await downloadTool(url)
+  const binPath =
+    getPlatform() === 'darwin' ? '/Users/runner/bin' : '/home/runner/bin'
+  await mkdirP(binPath)
+  await exec('chmod', ['+x', downloadPath])
+  await mv(downloadPath, join(binPath, 'minikube'))
+  addPath(binPath)
+}
diff --git a/src/start.ts b/src/start.ts
index 8dfbb8e..50efd14 100644
--- a/src/start.ts
+++ b/src/start.ts
@@ -5,7 +5,7 @@ import {setArgs} from './inputs'
 import {installNoneDriverDeps} from './none-driver'
 
 export const startMinikube = async (): Promise => {
-  const args = ['start', '--wait', 'all']
+  const args = ['start']
   setArgs(args)
   const cacheHits = await restoreCaches()
   await installNoneDriverDeps()

From 6baee8579cd3356d1b1e278f60ad4644416d807c Mon Sep 17 00:00:00 2001
From: Steven Powell 
Date: Thu, 12 Jan 2023 10:28:25 -0800
Subject: [PATCH 2/2] fix merge conflict

---
 dist/index.js   |   2 +-
 src/inputs.ts   |   1 +
 src/minikube.ts | 110 ------------------------------------------------
 3 files changed, 2 insertions(+), 111 deletions(-)
 delete mode 100644 src/minikube.ts

diff --git a/dist/index.js b/dist/index.js
index 28ea243..d201da3 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-(()=>{var __webpack_modules__={3782:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCaches=t.getMinikubeVersion=t.restoreCaches=void 0;const n=a(7799);const o=a(2186);const r=a(1514);const s=a(2037);const p=a(1017);const restoreCaches=()=>i(void 0,void 0,void 0,(function*(){const e={iso:true,kic:true,preload:true};if(!useCache()){return e}const a=yield(0,t.getMinikubeVersion)();const i=restoreCache("iso",a);const n=restoreCache("kic",a);const o=restoreCache("preloaded-tarball",a);e.iso=typeof(yield i)!=="undefined";e.kic=typeof(yield n)!=="undefined";e.preload=typeof(yield o)!=="undefined";return e}));t.restoreCaches=restoreCaches;const getMinikubeVersion=()=>i(void 0,void 0,void 0,(function*(){let e="";const t={};t.listeners={stdout:t=>{e+=t.toString()}};yield(0,r.exec)("minikube",["version","--short"],t);return e.trim()}));t.getMinikubeVersion=getMinikubeVersion;const saveCaches=e=>i(void 0,void 0,void 0,(function*(){if(!useCache()){return}const a=yield(0,t.getMinikubeVersion)();const i=saveCache("iso",e.iso,a);const n=saveCache("kic",e.kic,a);yield saveCache("preloaded-tarball",e.preload,a);yield i;yield n}));t.saveCaches=saveCaches;const restoreCache=(e,t)=>i(void 0,void 0,void 0,(function*(){return(0,n.restoreCache)(getCachePaths(e),getCacheKey(e,t))}));const saveCache=(e,t,a)=>i(void 0,void 0,void 0,(function*(){if(t){return}try{yield(0,n.saveCache)(getCachePaths(e),getCacheKey(e,a))}catch(t){console.log(e+t)}}));const getCachePaths=e=>[(0,p.join)((0,s.homedir)(),".minikube","cache",e)];const getCacheKey=(e,t)=>{let a=`${e}-${t}-${(0,s.arch)()}`;if(e==="preloaded-tarball"){const e=getInput("kubernetes-version","stable");const t=getInput("container-runtime","docker");a+=`-${e}-${t}`}return a};const getInput=(e,t)=>{const a=(0,o.getInput)(e).toLowerCase();return a!==""?a:t};const useCache=()=>(0,o.getInput)("cache").toLowerCase()==="true"},5933:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadMinikube=t.getDownloadURL=void 0;const n=a(2186);const o=a(1514);const r=a(7436);const s=a(7784);const p=a(2037);const l=a(1017);const getDownloadURL=e=>{const t=(0,p.platform)();const a=t==="win32"?"windows":t;const i=t==="win32"?".exe":"";switch(e){case"latest":return`https://github.com/kubernetes/minikube/releases/latest/download/minikube-${a}-amd64${i}`;case"head":return`https://storage.googleapis.com/minikube-builds/master/minikube-${a}-amd64${i}`;default:return`https://github.com/kubernetes/minikube/releases/download/v${e}/minikube-${a}-amd64${i}`}};t.getDownloadURL=getDownloadURL;const downloadMinikube=e=>i(void 0,void 0,void 0,(function*(){const a=(0,t.getDownloadURL)(e);const i=yield(0,s.downloadTool)(a);const d=(0,p.platform)()==="darwin"?"/Users/runner/bin":"/home/runner/bin";yield(0,r.mkdirP)(d);yield(0,o.exec)("chmod",["+x",i]);yield(0,r.mv)(i,(0,l.join)(d,"minikube"));(0,n.addPath)(d)}));t.downloadMinikube=downloadMinikube},6180:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setArgs=void 0;const i=a(2186);const setArgs=e=>{const t=[{key:"addons",flag:"--addons"},{key:"cni",flag:"--cni"},{key:"container-runtime",flag:"--container-runtime"},{key:"cpus",flag:"--cpus"},{key:"driver",flag:"--driver"},{key:"extra-config",flag:"--extra-config"},{key:"kubernetes-version",flag:"--kubernetes-version"},{key:"listen-address",flag:"--listen-address"},{key:"memory",flag:"--memory"},{key:"mount-path",flag:"--mount-string"},{key:"network-plugin",flag:"--network-plugin"}];t.forEach((t=>{const a=(0,i.getInput)(t.key).toLowerCase();if(a!==""){e.push(t.flag,a)}}));if((0,i.getInput)("mount-path")!==""){e.push("--mount")}};t.setArgs=setArgs},3109:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});const n=a(2186);const o=a(5933);const r=a(5125);const run=()=>i(void 0,void 0,void 0,(function*(){try{let e=(0,n.getInput)("minikube-version").toLowerCase();e=e==="stable"?"latest":e;yield(0,o.downloadMinikube)(e);yield(0,r.startMinikube)()}catch(e){if(e instanceof Error){(0,n.setFailed)(e.message)}}}));run()},5516:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.installNoneDriverDeps=void 0;const n=a(2186);const o=a(1514);const r=a(7784);const installCriDocker=()=>i(void 0,void 0,void 0,(function*(){const e="https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/";const t=(0,r.downloadTool)(e+"cri-dockerd");const a=(0,r.downloadTool)(e+"cri-docker.service");const i=(0,r.downloadTool)(e+"cri-docker.socket");yield(0,o.exec)("chmod",["+x",yield t]);yield(0,o.exec)("sudo",["mv",yield t,"/usr/bin/cri-dockerd"]);yield(0,o.exec)("sudo",["mv",yield a,"/usr/lib/systemd/system/cri-docker.service"]);yield(0,o.exec)("sudo",["mv",yield i,"/usr/lib/systemd/system/cri-docker.socket"])}));const installConntrackSocat=()=>i(void 0,void 0,void 0,(function*(){yield(0,o.exec)("sudo",["apt-get","update","-qq"]);yield(0,o.exec)("sudo",["apt-get","-qq","-y","install","conntrack","socat"])}));const installCrictl=()=>i(void 0,void 0,void 0,(function*(){const e="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz";const t=(0,r.downloadTool)(e);yield(0,o.exec)("sudo",["tar","zxvf",yield t,"-C","/usr/local/bin"])}));const installNoneDriverDeps=()=>i(void 0,void 0,void 0,(function*(){const e=(0,n.getInput)("driver").toLowerCase();if(e!=="none"){return}yield Promise.all([installCriDocker(),installConntrackSocat(),installCrictl()])}));t.installNoneDriverDeps=installNoneDriverDeps},5125:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.startMinikube=void 0;const n=a(1514);const o=a(3782);const r=a(6180);const s=a(5516);const startMinikube=()=>i(void 0,void 0,void 0,(function*(){const e=["start"];(0,r.setArgs)(e);const t=yield(0,o.restoreCaches)();yield(0,s.installNoneDriverDeps)();yield(0,n.exec)("minikube",e);yield(0,o.saveCaches)(t)}));t.startMinikube=startMinikube},7799:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=n(a(1017));const s=n(a(1518));const p=n(a(8245));const l=a(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,a,n){return i(this,void 0,void 0,(function*(){checkPaths(e);a=a||[];const i=[t,...a];o.debug("Resolved Keys:");o.debug(JSON.stringify(i));if(i.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of i){checkKey(e)}const d=yield s.getCompressionMethod();let c="";try{const t=yield p.getCacheEntry(i,e,{compressionMethod:d});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}c=r.join(yield s.createTempDirectory(),s.getCacheFileName(d));o.debug(`Archive Path: ${c}`);yield p.downloadCache(t.archiveLocation,c,n);if(o.isDebug()){yield l.listTar(c,d)}const a=s.getArchiveFileSizeInBytes(c);o.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield l.extractTar(c,d);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield s.unlinkFile(c)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,a){var n,d,c,m,u;return i(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const i=yield s.getCompressionMethod();let f=-1;const h=yield s.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const g=yield s.createTempDirectory();const y=r.join(g,s.getCacheFileName(i));o.debug(`Archive Path: ${y}`);try{yield l.createTar(g,h,i);if(o.isDebug()){yield l.listTar(y,i)}const r=10*1024*1024*1024;const v=s.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${v}`);if(v>r&&!s.isGhes()){throw new Error(`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:i,cacheSize:v});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){f=(d=b===null||b===void 0?void 0:b.result)===null||d===void 0?void 0:d.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((m=(c=b===null||b===void 0?void 0:b.error)===null||c===void 0?void 0:c.message)!==null&&m!==void 0?m:`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message}`)}o.debug(`Saving Cache (ID: ${f})`);yield p.saveCache(f,y,a)}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else if(t.name===ReserveCacheError.name){o.info(`Failed to save: ${t.message}`)}else{o.warning(`Failed to save: ${t.message}`)}}finally{try{yield s.unlinkFile(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return f}))}t.saveCache=saveCache},8245:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(5526);const p=n(a(6113));const l=n(a(7147));const d=a(7310);const c=n(a(1518));const m=a(8840);const u=a(5500);const f=a(6215);const h=a(3981);const g="1.0";function getCacheApiUrl(e){const t=process.env["ACTIONS_CACHE_URL"]||"";if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new s.BearerCredentialHandler(e);return new r.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t){const a=e.concat(!t||t===m.CompressionMethod.Gzip?[]:[t]);a.push(g);return p.createHash("sha256").update(a.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const r=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${r}`;const p=yield h.retryTypedResponse("getCacheEntry",(()=>i(this,void 0,void 0,(function*(){return n.getJson(getCacheApiUrl(s))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],n,r)}return null}if(!h.isSuccessStatusCode(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const l=p.result;const d=l===null||l===void 0?void 0:l.archiveLocation;if(!d){throw new Error("Cache not found.")}o.setSecret(d);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,a){return i(this,void 0,void 0,(function*(){const n=`caches?key=${encodeURIComponent(e)}`;const r=yield h.retryTypedResponse("listCache",(()=>i(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(n))}))));if(r.statusCode===200){const t=r.result;const i=t===null||t===void 0?void 0:t.totalCount;if(i&&i>0){o.debug(`No matching cache found for cache key '${e}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=new d.URL(e);const n=f.getDownloadOptions(a);if(n.useAzureSdk&&i.hostname.endsWith(".blob.core.windows.net")){yield u.downloadCacheStorageSDK(e,t,n)}else{yield u.downloadCacheHttpClient(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const o=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const r={key:e,version:o,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const s=yield h.retryTypedResponse("reserveCache",(()=>i(this,void 0,void 0,(function*(){return n.postJson(getCacheApiUrl("caches"),r)}))));return s}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,a,n,r){return i(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${r-n+1} bytes at offset ${n} with content range: ${getContentRange(n,r)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(n,r)};const p=yield h.retryHttpClientResponse(`uploadChunk (start: ${n}, end: ${r})`,(()=>i(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,a(),s)}))));if(!h.isSuccessStatusCode(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,a,n){return i(this,void 0,void 0,(function*(){const r=c.getArchiveFileSizeInBytes(a);const s=getCacheApiUrl(`caches/${t.toString()}`);const p=l.openSync(a,"r");const d=f.getUploadOptions(n);const m=c.assertDefined("uploadConcurrency",d.uploadConcurrency);const u=c.assertDefined("uploadChunkSize",d.uploadChunkSize);const h=[...new Array(m).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(h.map((()=>i(this,void 0,void 0,(function*(){while(gl.createReadStream(a,{fd:p,start:i,end:n,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,n)}})))))}finally{l.closeSync(p)}return}))}function commitCache(e,t,a){return i(this,void 0,void 0,(function*(){const n={size:a};return yield h.retryTypedResponse("commitCache",(()=>i(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),n)}))))}))}function saveCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,a);o.debug("Commiting cache");const n=c.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const r=yield commitCache(i,e,n);if(!h.isSuccessStatusCode(r.statusCode)){throw new Error(`Cache service responded with ${r.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=o(a(2186));const s=o(a(1514));const p=o(a(8090));const l=o(a(7436));const d=o(a(7147));const c=o(a(1017));const m=o(a(5911));const u=o(a(3837));const f=a(2155);const h=a(8840);function createTempDirectory(){return i(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let a;if(e){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}t=c.join(a,"actions","temp")}const a=c.join(t,f.v4());yield l.mkdirP(a);return a}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return d.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,a;var o;return i(this,void 0,void 0,(function*(){const i=[];const s=(o=process.env["GITHUB_WORKSPACE"])!==null&&o!==void 0?o:process.cwd();const l=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var d=n(l.globGenerator()),m;m=yield d.next(),!m.done;){const e=m.value;const t=c.relative(s,e).replace(new RegExp(`\\${c.sep}`,"g"),"/");r.debug(`Matched: ${t}`);if(t===""){i.push(".")}else{i.push(`${t}`)}}}catch(e){t={error:e}}finally{try{if(m&&!m.done&&(a=d.return))yield a.call(d)}finally{if(t)throw t.error}}return i}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return i(this,void 0,void 0,(function*(){return u.promisify(d.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e){return i(this,void 0,void 0,(function*(){r.debug(`Checking ${e} --version`);let t="";try{yield s.exec(`${e} --version`,[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>t+=e.toString(),stderr:e=>t+=e.toString()}})}catch(e){r.debug(e.message)}t=t.trim();r.debug(t);return t}))}function getCompressionMethod(){return i(this,void 0,void 0,(function*(){if(process.platform==="win32"&&!(yield isGnuTarInstalled())){return h.CompressionMethod.Gzip}const e=yield getVersion("zstd");const t=m.clean(e);if(!e.toLowerCase().includes("zstd command line interface")){return h.CompressionMethod.Gzip}else if(!t||m.lt(t,"v1.3.2")){return h.CompressionMethod.ZstdWithoutLong}else{return h.CompressionMethod.Zstd}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===h.CompressionMethod.Gzip?h.CacheFilename.Gzip:h.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function isGnuTarInstalled(){return i(this,void 0,void 0,(function*(){const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")}))}t.isGnuTarInstalled=isGnuTarInstalled;function assertDefined(e,t){if(t===undefined){throw Error(`Expected ${e} but value was undefiend`)}return t}t.assertDefined=assertDefined;function isGhes(){const e=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return e.hostname.toUpperCase()!=="GITHUB.COM"}t.isGhes=isGhes},8840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(a=t.CacheFilename||(t.CacheFilename={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i=t.CompressionMethod||(t.CompressionMethod={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3},5500:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(4100);const p=n(a(4300));const l=n(a(7147));const d=n(a(2781));const c=n(a(3837));const m=n(a(1518));const u=a(8840);const f=a(3981);const h=a(2557);function pipeResponseToStream(e,t){return i(this,void 0,void 0,(function*(){const a=c.promisify(d.pipeline);yield a(e.message,t)}))}class DownloadProgress{constructor(e){this.contentLength=e;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=e;this.receivedBytes=0;o.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const e=this.segmentOffset+this.receivedBytes;const t=(100*(e/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const i=(e/(1024*1024)/(a/1e3)).toFixed(1);o.info(`Received ${e} of ${this.contentLength} (${t}%), ${i} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,e)}};this.timeoutHandle=setTimeout(displayCallback,e)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}t.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(e,t){return i(this,void 0,void 0,(function*(){const a=l.createWriteStream(t);const n=new r.HttpClient("actions/cache");const s=yield f.retryHttpClientResponse("downloadCache",(()=>i(this,void 0,void 0,(function*(){return n.get(e)}))));s.message.socket.setTimeout(u.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${u.SocketTimeout} ms`)}));yield pipeResponseToStream(s,a);const p=s.message.headers["content-length"];if(p){const e=parseInt(p);const a=m.getArchiveFileSizeInBytes(t);if(a!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${a}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheStorageSDK(e,t,a){var n;return i(this,void 0,void 0,(function*(){const i=new s.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const r=yield i.getProperties();const d=(n=r.contentLength)!==null&&n!==void 0?n:-1;if(d<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(2147483647,p.constants.MAX_LENGTH);const n=new DownloadProgress(d);const o=l.openSync(t,"w");try{n.startDisplayTimer();const t=new h.AbortController;const r=t.signal;while(!n.isDone()){const s=n.segmentOffset+n.segmentSize;const p=Math.min(e,d-s);n.nextSegment(p);const c=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,i.downloadToBuffer(s,p,{abortSignal:r,concurrency:a.downloadConcurrency,onProgress:n.onProgress()}));if(c==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(c)){l.writeFileSync(o,c)}}}finally{n.stopDisplayTimer();l.closeSync(o)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>i(void 0,void 0,void 0,(function*(){let a;const i=new Promise((t=>{a=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(a);return e}))}))},3981:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[r.HttpCodes.BadGateway,r.HttpCodes.ServiceUnavailable,r.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return i(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,a,n=s.DefaultRetryAttempts,r=s.DefaultRetryDelay,p=undefined){return i(this,void 0,void 0,(function*(){let i="";let s=1;while(s<=n){let l=undefined;let d=undefined;let c=false;try{l=yield t()}catch(e){if(p){l=p(e)}c=true;i=e.message}if(l){d=a(l);if(!isServerErrorStatusCode(d)){return l}}if(d){c=isRetryableStatusCode(d);i=`Cache service responded with ${d}`}o.debug(`${e} - Attempt ${s} of ${n} failed with error: ${i}`);if(!c){o.debug(`${e} - Error is not retryable`);break}yield sleep(r);s++}throw Error(`${e} failed: ${i}`)}))}t.retry=retry;function retryTypedResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),a,n,(e=>{if(e instanceof r.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),a,n)}))}t.retryHttpClientResponse=retryHttpClientResponse},6490:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=a(1514);const r=n(a(7436));const s=a(7147);const p=n(a(1017));const l=n(a(1518));const d=a(8840);const c=process.platform==="win32";function getTarPath(e,t){return i(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const a=`${process.env["windir"]}\\System32\\tar.exe`;if(t!==d.CompressionMethod.Gzip){e.push("--force-local")}else if(s.existsSync(a)){return a}else if(yield l.isGnuTarInstalled()){e.push("--force-local")}break}case"darwin":{const t=yield r.which("gtar",false);if(t){e.push("--delay-directory-restore");return t}break}default:break}return yield r.which("tar",true)}))}function execTar(e,t,a){return i(this,void 0,void 0,(function*(){try{yield o.exec(`"${yield getTarPath(e,t)}"`,e,{cwd:a})}catch(e){throw new Error(`Tar failed with error: ${e===null||e===void 0?void 0:e.message}`)}}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getCompressionProgram(e){switch(e){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -d --long=30":"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -d":"unzstd"];default:return["-z"]}}function listTar(e,t){return i(this,void 0,void 0,(function*(){const a=[...getCompressionProgram(t),"-tf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P"];yield execTar(a,t)}))}t.listTar=listTar;function extractTar(e,t){return i(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield r.mkdirP(a);const i=[...getCompressionProgram(t),"-xf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",a.replace(new RegExp(`\\${p.sep}`,"g"),"/")];yield execTar(i,t)}))}t.extractTar=extractTar;function createTar(e,t,a){return i(this,void 0,void 0,(function*(){const i="manifest.txt";const n=l.getCacheFileName(a);s.writeFileSync(p.join(e,i),t.join("\n"));const o=getWorkingDirectory();function getCompressionProgram(){switch(a){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -T0 --long=30":"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -T0":"zstdmt"];default:return["-z"]}}const r=["--posix",...getCompressionProgram(),"-cf",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",i];yield execTar(r,a,e)}))}t.createTar=createTar},6215:function(e,t,a){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=i(a(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}n.debug(`Upload concurrency: ${t.uploadConcurrency}`);n.debug(`Upload chunk size: ${t.uploadChunkSize}`);return t}t.getUploadOptions=getUploadOptions;function getDownloadOptions(e){const t={useAzureSdk:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:36e5};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.downloadConcurrency==="number"){t.downloadConcurrency=e.downloadConcurrency}if(typeof e.timeoutInMs==="number"){t.timeoutInMs=e.timeoutInMs}if(typeof e.segmentTimeoutInMs==="number"){t.segmentTimeoutInMs=e.segmentTimeoutInMs}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){t.segmentTimeoutInMs=Number(a)*60*1e3}n.debug(`Use Azure SDK: ${t.useAzureSdk}`);n.debug(`Download concurrency: ${t.downloadConcurrency}`);n.debug(`Request timeout (ms): ${t.timeoutInMs}`);n.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);n.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);return t}t.getDownloadOptions=getDownloadOptions},7351:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const r=o(a(2037));const s=a(5278);function issueCommand(e,t,a){const i=new Command(e,t,a);process.stdout.write(i.toString()+r.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const p="::";class Command{constructor(e,t,a){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=a}toString(){let e=p+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const i=this.properties[a];if(i){if(t){t=false}else{e+=","}e+=`${a}=${escapeProperty(i)}`}}}}e+=`${p}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.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 s=a(7351);const p=a(717);const l=a(5278);const d=o(a(2037));const c=o(a(1017));const m=a(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const a=l.toCommandValue(t);process.env[e]=a;const i=process.env["GITHUB_ENV"]||"";if(i){return p.issueFileCommand("ENV",p.prepareKeyValueMessage(e,t))}s.issueCommand("set-env",{name:e},a)}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){p.issueFileCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return a}return a.trim()}t.getInput=getInput;function getMultilineInput(e,t){const a=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return a}return a.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const a=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(a.includes(n))return true;if(i.includes(n))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){const a=process.env["GITHUB_OUTPUT"]||"";if(a){return p.issueFileCommand("OUTPUT",p.prepareKeyValueMessage(e,t))}process.stdout.write(d.EOL);s.issueCommand("set-output",{name:e},l.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){s.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){s.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){s.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+d.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return r(this,void 0,void 0,(function*(){startGroup(e);let a;try{a=yield t()}finally{endGroup()}return a}))}t.group=group;function saveState(e,t){const a=process.env["GITHUB_STATE"]||"";if(a){return p.issueFileCommand("STATE",p.prepareKeyValueMessage(e,t))}s.issueCommand("save-state",{name:e},l.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return r(this,void 0,void 0,(function*(){return yield m.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var f=a(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return f.summary}});var h=a(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var g=a(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const r=o(a(7147));const s=o(a(2037));const p=a(8974);const l=a(5278);function issueFileCommand(e,t){const a=process.env[`GITHUB_${e}`];if(!a){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!r.existsSync(a)){throw new Error(`Missing file at path: ${a}`)}r.appendFileSync(a,`${l.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const a=`ghadelimiter_${p.v4()}`;const i=l.toCommandValue(t);if(e.includes(a)){throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`)}if(i.includes(a)){throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`)}return`${e}<<${a}${s.EOL}${i}${s.EOL}${a}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=a(6255);const o=a(5526);const r=a(2186);class OidcClient{static createHttpClient(e=true,t=10){const a={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],a)}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 i(this,void 0,void 0,(function*(){const a=OidcClient.createHttpClient();const i=yield a.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 n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const a=encodeURIComponent(e);t=`${t}&audience=${a}`}r.debug(`ID token url is ${t}`);const a=yield OidcClient.getCall(t);r.setSecret(a);return a}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const r=o(a(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,r.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=a(2037);const o=a(7147);const{access:r,appendFile:s,writeFile:p}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield r(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,a={}){const i=Object.entries(a).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const a=yield this.filePath();const i=t?p:s;yield i(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const a=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),a);return this.addRaw(i).addEOL()}addList(e,t=false){const a=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(a,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:a,colspan:i,rowspan:n}=e;const o=t?"th":"td";const r=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(o,a,r)})).join("");return this.wrap("tr",t)})).join("");const a=this.wrap("table",t);return this.addRaw(a).addEOL()}addDetails(e,t){const a=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(a).addEOL()}addImage(e,t,a){const{width:i,height:n}=a||{};const o=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const r=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(r).addEOL()}addHeading(e,t){const a=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const n=this.wrap(i,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 a=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,a);return this.addRaw(i).addEOL()}addLink(e,t){const a=this.wrap("a",e,{href:t});return this.addRaw(a).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},5278:(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},8974:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return c.default}});var i=_interopRequireDefault(a(1595));var n=_interopRequireDefault(a(6993));var o=_interopRequireDefault(a(1472));var r=_interopRequireDefault(a(6217));var s=_interopRequireDefault(a(2381));var p=_interopRequireDefault(a(427));var l=_interopRequireDefault(a(2609));var d=_interopRequireDefault(a(1458));var c=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";t["default"]=a},6385:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const a=new Uint8Array(16);a[0]=(t=parseInt(e.slice(0,8),16))>>>24;a[1]=t>>>16&255;a[2]=t>>>8&255;a[3]=t&255;a[4]=(t=parseInt(e.slice(9,13),16))>>>8;a[5]=t&255;a[6]=(t=parseInt(e.slice(14,18),16))>>>8;a[7]=t&255;a[8]=(t=parseInt(e.slice(19,23),16))>>>8;a[9]=t&255;a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;a[11]=t/4294967296&255;a[12]=t>>>24&255;a[13]=t>>>16&255;a[14]=t>>>8&255;a[15]=t&255;return a}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=a},9784:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){i.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},8844:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const a=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var o=stringify;t["default"]=o},1595:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let r;let s=0;let p=0;function v1(e,t,a){let l=t&&a||0;const d=t||new Array(16);e=e||{};let c=e.node||o;let m=e.clockseq!==undefined?e.clockseq:r;if(c==null||m==null){const t=e.random||(e.rng||i.default)();if(c==null){c=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(m==null){m=r=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let f=e.nsecs!==undefined?e.nsecs:p+1;const h=u-s+(f-p)/1e4;if(h<0&&e.clockseq===undefined){m=m+1&16383}if((h<0||u>s)&&e.nsecs===undefined){f=0}if(f>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}s=u;p=f;r=m;u+=122192928e5;const g=((u&268435455)*1e4+f)%4294967296;d[l++]=g>>>24&255;d[l++]=g>>>16&255;d[l++]=g>>>8&255;d[l++]=g&255;const y=u/4294967296*1e4&268435455;d[l++]=y>>>8&255;d[l++]=y&255;d[l++]=y>>>24&15|16;d[l++]=y>>>16&255;d[l++]=m>>>8|128;d[l++]=m&255;for(let e=0;e<6;++e){d[l+e]=c[e]}return t||(0,n.default)(d)}var l=v1;t["default"]=l},6993:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v3",48,n.default);var r=o;t["default"]=r},5920:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(a(1458));var n=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,a){e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){a=a||0;for(let e=0;e<16;++e){t[a+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},6217:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v5",80,n.default);var r=o;t["default"]=r},2609:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const s=a(1576);const p=o(a(8159));function exec(e,t,a){return r(this,void 0,void 0,(function*(){const i=p.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const o=new p.ToolRunner(n,t,a);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,a){var i,n;return r(this,void 0,void 0,(function*(){let o="";let r="";const p=new s.StringDecoder("utf8");const l=new s.StringDecoder("utf8");const d=(i=a===null||a===void 0?void 0:a.listeners)===null||i===void 0?void 0:i.stdout;const c=(n=a===null||a===void 0?void 0:a.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{r+=l.write(e);if(c){c(e)}};const stdOutListener=e=>{o+=p.write(e);if(d){d(e)}};const m=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:m}));o+=p.end();r+=l.end();return{exitCode:u,stdout:o,stderr:r}}))}t.getExecOutput=getExecOutput},8159:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const s=o(a(2037));const p=o(a(2361));const l=o(a(2081));const d=o(a(1017));const c=o(a(7436));const m=o(a(1962));const u=a(9512);const f=process.platform==="win32";class ToolRunner extends p.EventEmitter{constructor(e,t,a){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=a||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const a=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(f){if(this._isCmdFile()){n+=a;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${a}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(a);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=a;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,a){try{let i=t+e.toString();let n=i.indexOf(s.EOL);while(n>-1){const e=i.substring(0,n);a(e);i=i.substring(n+s.EOL.length);n=i.indexOf(s.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const i of e){if(t.some((e=>e===i))){a=true;break}}if(!a){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.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='"';let a=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(a&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return r(this,void 0,void 0,(function*(){if(!m.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=d.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise(((e,t)=>r(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+s.EOL)}const i=new ExecState(a,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield m.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const o=l.spawn(n,this._getSpawnArgs(a),this._getSpawnOptions(this.options,n));let r="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}r=this._processLineBuffer(e,r,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let p="";if(o.stderr){o.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}p=this._processLineBuffer(e,p,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));o.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));o.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((a,i)=>{if(r.length>0){this.emit("stdline",r)}if(p.length>0){this.emit("errline",p)}o.removeAllListeners();if(a){t(a)}else{e(i)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let o=0;o0){t.push(n);n=""}continue}append(r)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends p.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},8090:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=a(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const r=o(a(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;r.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;r.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;r.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var p=this&&this.__await||function(e){return this instanceof p?(this.v=e,this):new p(e)};var l=this&&this.__asyncGenerator||function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(e,t||[]),n,o=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(a,i){o.push([e,t,a,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof p?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const d=o(a(2186));const c=o(a(7147));const m=o(a(1026));const u=o(a(1017));const f=o(a(9005));const h=a(1063);const g=a(4536);const y=a(9117);const v=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=m.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return r(this,void 0,void 0,(function*(){const a=[];try{for(var i=s(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;a.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return a}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=m.getOptions(this.options);const t=[];for(const a of this.patterns){t.push(a);if(e.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")){t.push(new g.Pattern(a.negate,true,a.segments.concat("**")))}}const a=[];for(const e of f.getSearchPaths(t)){d.debug(`Search path '${e}'`);try{yield p(c.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}a.unshift(new y.SearchState(e,1))}const i=[];while(a.length){const n=a.pop();const o=f.match(t,n.path);const r=!!o||f.partialMatch(t,n.path);if(!o&&!r){continue}const s=yield p(DefaultGlobber.stat(n,e,i));if(!s){continue}if(s.isDirectory()){if(o&h.MatchKind.Directory){yield yield p(n.path)}else if(!r){continue}const e=n.level+1;const t=(yield p(c.promises.readdir(n.path))).map((t=>new y.SearchState(u.join(n.path,t),e)));a.push(...t.reverse())}else if(o&h.MatchKind.File){yield yield p(n.path)}}}))}static create(e,t){return r(this,void 0,void 0,(function*(){const a=new DefaultGlobber(t);if(v){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{a.patterns.push(new g.Pattern(e))}}a.searchPaths.push(...f.getSearchPaths(a.patterns));return a}))}static stat(e,t,a){return r(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield c.promises.stat(e.path)}catch(a){if(a.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){d.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw a}}else{i=yield c.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield c.promises.realpath(e.path);while(a.length>=e.level){a.pop()}if(a.some((e=>e===t))){d.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}a.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var a;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(a=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const s=o(a(1017));const p=r(a(9491));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=s.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){p.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);p.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(l){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}p.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=s.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){p.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){p.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(s.sep)){return e}if(e===s.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const s=o(a(1017));const p=o(a(1849));const l=r(a(9491));const d=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=p.safeTrimTrailingSeparator(e);if(!p.hasRoot(e)){this.segments=e.split(s.sep)}else{let t=e;let a=p.dirname(t);while(a!==t){const e=s.basename(t);this.segments.unshift(e);t=a;a=p.dirname(t)}this.segments.unshift(t)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const a of e){const e=p?a.searchPath.toUpperCase():a.searchPath;t[e]="candidate"}const a=[];for(const i of e){const e=p?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let o=e;let s=r.dirname(o);while(s!==o){if(t[s]){n=true;break}o=s;s=r.dirname(o)}if(!n){a.push(i.searchPath);t[e]="included"}}return a}t.getSearchPaths=getSearchPaths;function match(e,t){let a=s.MatchKind.None;for(const i of e){if(i.negate){a&=~i.match(t)}else{a|=i.match(t)}}return a}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const s=o(a(2037));const p=o(a(1017));const l=o(a(1849));const d=r(a(9491));const c=a(3973);const m=a(1063);const u=a(6836);const f=process.platform==="win32";class Pattern{constructor(e,t=false,a,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{a=a||[];d.default(a.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(a[0]);d.default(t&&l.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(a).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(p.sep);n=l.safeTrimTrailingSeparator(n);let o=false;const r=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!o&&!(o=e==="")));this.searchPath=new u.Path(r).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(r[0]),f?"i":"");this.isImplicitPattern=t;const s={dot:true,nobrace:true,nocase:f,nocomment:true,noext:true,nonegate:true};n=f?n.replace(/\\/g,"/"):n;this.minimatch=new c.Minimatch(n,s)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(p.sep)&&this.isImplicitPattern===false){e=`${e}${p.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?m.MatchKind.Directory:m.MatchKind.All}return m.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(f?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(f?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){d.default(e,"pattern cannot be empty");const a=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));d.default(a.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);d.default(!l.hasRoot(e)||a[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${p.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${p.sep}`)){t=t||s.homedir();d.default(t,"Unable to determine HOME directory");d.default(l.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(f&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(f&&(e==="\\"||e.match(/^\\[^\\]/))){let t=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let t="";for(let a=0;a=0){if(i.length>1){return""}if(i){t+=i;a=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var a=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const s=o(a(3685));const p=o(a(5687));const l=o(a(9835));const d=o(a(4294));var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var m;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(m=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const h=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const y=10;const v=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 r(this,void 0,void 0,(function*(){return new Promise((e=>r(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,a){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=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,t){return r(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return r(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return r(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("POST",e,t,a||{})}))}patch(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,a||{})}))}put(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PUT",e,t,a||{})}))}head(e,t){return r(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,a,i){return r(this,void 0,void 0,(function*(){return this.request(e,t,a,i)}))}getJson(e,t={}){return r(this,void 0,void 0,(function*(){t[m.Accept]=this._getExistingOrDefaultHeader(t,m.Accept,u.ApplicationJson);const a=yield this.get(e,t);return this._processResponse(a,this.requestOptions)}))}postJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.post(e,i,a);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.put(e,i,a);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.patch(e,i,a);return this._processResponse(n,this.requestOptions)}))}request(e,t,a,i){return r(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,i);const r=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let s=0;let p;do{p=yield this.requestRaw(o,a);if(p&&p.message&&p.message.statusCode===c.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(p)){e=t;break}}if(e){return e.handleAuthentication(this,o,a)}else{return p}}let t=this._maxRedirects;while(p.message.statusCode&&f.includes(p.message.statusCode)&&this._allowRedirects&&t>0){const r=p.message.headers["location"];if(!r){break}const s=new URL(r);if(n.protocol==="https:"&&n.protocol!==s.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.")}yield p.readBody();if(s.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}o=this._prepareRequest(e,s,i);p=yield this.requestRaw(o,a);t--}if(!p.message.statusCode||!h.includes(p.message.statusCode)){return p}s+=1;if(s{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{a(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,a){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;a(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,a){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?p:s;const o=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,a){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||a}_getAgent(e){let t;const a=l.getProxyUrl(e);const i=a&&a.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(a&&a.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`}),{host:a.hostname,port:a.port})};let i;const r=a.protocol==="https:";if(n){i=r?d.httpsOverHttps:d.httpsOverHttp}else{i=r?d.httpOverHttps:d.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new p.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=n?p.globalAgent:s.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return r(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return r(this,void 0,void 0,(function*(){return new Promise(((a,i)=>r(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===c.NotFound){a(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let r;let s;try{s=yield e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){r=JSON.parse(s,dateTimeDeserializer)}else{r=JSON.parse(s)}o.result=r}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(r&&r.message){e=r.message}else if(s&&s.length>0){e=s}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;i(t)}else{a(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,a)=>(t[a.toLowerCase()]=e[a],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const a=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(a){return new URL(a)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const i=[e.hostname.toUpperCase()];if(typeof a==="number"){i.push(`${i[0]}:${a}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},1962:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const p=o(a(7147));const l=o(a(1017));s=p.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return r(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,a=false){return r(this,void 0,void 0,(function*(){const i=a?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,a){return r(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(a.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const o of a){e=n+o;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const a=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield t.readdir(a)){if(i===n.toUpperCase()){e=l.join(a,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const s=a(9491);const p=o(a(2081));const l=o(a(1017));const d=a(3837);const c=o(a(1962));const m=d.promisify(p.exec);const u=d.promisify(p.execFile);function cp(e,t,a={}){return r(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:o}=readCopyOptions(a);const r=(yield c.exists(t))?yield c.stat(t):null;if(r&&r.isFile()&&!i){return}const s=r&&r.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,i)}}else{if(l.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,i)}}))}t.cp=cp;function mv(e,t,a={}){return r(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(a.force==null||a.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return r(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=c.getCmdPath();if(yield c.isDirectory(e,true)){yield m(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield m(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield c.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield c.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm`,[`-rf`,`${e}`])}else{yield c.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return r(this,void 0,void 0,(function*(){s.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}t.which=which;function findInPath(e){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const a=yield c.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(l.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){a.push(e)}}}const i=[];for(const n of a){const a=yield c.tryGetExecutablePath(l.join(n,e),t);if(a){i.push(a)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:i}}function cpDirRecursive(e,t,a,i){return r(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const n=yield c.readdir(e);for(const o of n){const n=`${e}/${o}`;const r=`${t}/${o}`;const s=yield c.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,r,a,i)}else{yield copyFile(n,r,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,a){return r(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const a=yield c.readlink(e);yield c.symlink(a,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||a){yield c.copyFile(e,t)}}))}},2473:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(a(5911));const p=a(2186);const l=a(2037);const d=a(2081);const c=a(7147);function _findMatch(t,a,i,n){return r(this,void 0,void 0,(function*(){const o=l.platform();let r;let d;let c;for(const r of i){const i=r.version;p.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!a||r.stable===a)){c=r.files.find((t=>{p.debug(`${t.arch}===${n} && ${t.platform}===${o}`);let a=t.arch===n&&t.platform===o;if(a&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){a=true}else{a=s.satisfies(i,t.platform_version)}}return a}));if(c){p.debug(`matched ${r.version}`);d=r;break}}}if(d&&c){r=Object.assign({},d);r.files=[c]}return r}))}t._findMatch=_findMatch;function _getOsVersion(){const t=l.platform();let a="";if(t==="darwin"){a=d.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){a=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return a}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let a="";if(c.existsSync(e)){a=c.readFileSync(e).toString()}else if(c.existsSync(t)){a=c.readFileSync(t).toString()}return a}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const s=o(a(2186));class RetryHelper{constructor(e,t,a){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(a);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return r(this,void 0,void 0,(function*(){let a=1;while(asetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const p=o(a(2186));const l=o(a(7436));const d=o(a(7147));const c=o(a(2473));const m=o(a(2037));const u=o(a(1017));const f=o(a(6255));const h=o(a(5911));const g=o(a(2781));const y=o(a(3837));const v=a(9491);const b=s(a(824));const x=a(1514);const w=a(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const S=process.platform==="win32";const N=process.platform==="darwin";const k="actions/tool-cache";function downloadTool(e,t,a,i){return r(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),b.default());yield l.mkdirP(u.dirname(t));p.debug(`Downloading ${e}`);p.debug(`Destination ${t}`);const n=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const d=new w.RetryHelper(n,o,s);return yield d.execute((()=>r(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",a,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,a,i){return r(this,void 0,void 0,(function*(){if(d.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new f.HttpClient(k,[],{allowRetries:false});if(a){p.debug("set auth");if(i===undefined){i={}}i.authorization=a}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);p.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const r=y.promisify(g.pipeline);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const c=s();let m=false;try{yield r(c,d.createWriteStream(t));p.debug("download complete");m=true;return t}finally{if(!m){p.debug("download failed");try{yield l.rmRF(t)}catch(e){p.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,a){return r(this,void 0,void 0,(function*(){v.ok(S,"extract7z() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(a){try{const t=p.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield x.exec(`"${a}"`,n,o)}finally{process.chdir(i)}}else{const a=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const r=`& '${a}' -Source '${n}' -Target '${o}'`;const s=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",r];const p={silent:true};try{const e=yield l.which("powershell",true);yield x.exec(`"${e}"`,s,p)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,a="xz"){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);p.debug("Checking tar --version");let i="";yield x.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});p.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let o;if(a instanceof Array){o=a}else{o=[a]}if(p.isDebug()&&!a.includes("v")){o.push("-v")}let r=t;let s=e;if(S&&n){o.push("--force-local");r=t.replace(/\\/g,"/");s=e.replace(/\\/g,"/")}if(n){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",r,"-f",s);yield x.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,a=[]){return r(this,void 0,void 0,(function*(){v.ok(N,"extractXar() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(a instanceof Array){i=a}else{i=[a]}i.push("-x","-C",t,"-f",e);if(p.isDebug()){i.push("-v")}const n=yield l.which("xar",true);yield x.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(S){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return r(this,void 0,void 0,(function*(){const a=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield l.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${a}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];p.debug(`Using pwsh at path: ${n}`);yield x.exec(`"${n}"`,t)}else{const e=[`$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 '${a}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield l.which("powershell",true);p.debug(`Using powershell at path: ${n}`);yield x.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return r(this,void 0,void 0,(function*(){const a=yield l.which("unzip",true);const i=[e];if(!p.isDebug()){i.unshift("-q")}i.unshift("-o");yield x.exec(`"${a}"`,i,{cwd:t})}))}function cacheDir(e,t,a,i){return r(this,void 0,void 0,(function*(){a=h.clean(a)||a;i=i||m.arch();p.debug(`Caching tool ${t} ${a} ${i}`);p.debug(`source dir: ${e}`);if(!d.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,a,i);for(const t of d.readdirSync(e)){const a=u.join(e,t);yield l.cp(a,n,{recursive:true})}_completeToolPath(t,a,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,a,i,n){return r(this,void 0,void 0,(function*(){i=h.clean(i)||i;n=n||m.arch();p.debug(`Caching tool ${a} ${i} ${n}`);p.debug(`source file: ${e}`);if(!d.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(a,i,n);const r=u.join(o,t);p.debug(`destination file ${r}`);yield l.cp(e,r);_completeToolPath(a,i,n);return o}))}t.cacheFile=cacheFile;function find(e,t,a){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}a=a||m.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,a);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=h.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,a);p.debug(`checking cache: ${n}`);if(d.existsSync(n)&&d.existsSync(`${n}.complete`)){p.debug(`Found tool in cache ${e} ${t} ${a}`);i=n}else{p.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const a=[];t=t||m.arch();const i=u.join(_getCacheDirectory(),e);if(d.existsSync(i)){const e=d.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(d.existsSync(e)&&d.existsSync(`${e}.complete`)){a.push(n)}}}}return a}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,a,i="master"){return r(this,void 0,void 0,(function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const r=new f.HttpClient("tool-cache");const s={};if(a){p.debug("set auth");s.authorization=a}const l=yield r.getJson(o,s);if(!l.result){return n}let d="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){d=e.url;break}}s["accept"]="application/vnd.github.VERSION.raw";let c=yield(yield r.get(d,s)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{n=JSON.parse(c)}catch(e){p.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,a,i=m.arch()){return r(this,void 0,void 0,(function*(){const n=yield c._findMatch(e,t,a,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return r(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),b.default())}yield l.mkdirP(e);return e}))}function _createToolPath(e,t,a){return r(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");p.debug(`destination ${i}`);const n=`${i}.complete`;yield l.rmRF(i);yield l.rmRF(n);yield l.mkdirP(i);return i}))}function _completeToolPath(e,t,a){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");const n=`${i}.complete`;d.writeFileSync(n,"");p.debug("finished caching tool")}function isExplicitVersion(e){const t=h.clean(e)||"";p.debug(`isExplicit: ${t}`);const a=h.valid(t)!=null;p.debug(`explicit? ${a}`);return a}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let a="";p.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(h.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const o=h.satisfies(n,t);if(o){a=n;break}}if(a){p.debug(`matched: ${a}`)}else{p.debug("match not found")}return a}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";v.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";v.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const a=global[e];return a!==undefined?a:t}function _unique(e){return Array.from(new Set(e))}},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const a=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;a.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);i.push(t)}removeEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used.  It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=a.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const a=setTimeout(abortSignal,e,t);if(typeof a.unref==="function"){a.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const a of t){if(!objectHasProperty(e,a)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=a(3415);var n=a(3837);var o=a(2107);var r=a(6189);var s=a(1333);var p=a(3233);var l=a(9645);var d=a(2037);var c=a(3685);var m=a(5687);var u=a(8165);var f=a(2557);var h=a(4294);var g=a(2781);var y=a(6279);var v=a(467);var b=a(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(a){if(a!=="default"){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:true,get:function(){return e[a]}})}}))}t["default"]=e;return Object.freeze(t)}var x=_interopNamespace(r);var w=_interopNamespace(d);var S=_interopNamespace(c);var N=_interopNamespace(m);var k=_interopNamespace(u);var C=_interopNamespace(h);var j=_interopDefaultLegacy(y);var P=_interopDefaultLegacy(v);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let a=0;a{a=a.then(e)}));return a}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,a,i){if(!Array.isArray(e)){e=[e]}if(!a||!i){return{[t]:e}}const n={[t]:e};n[T]={[a]:i};return n}function applyMixins(e,t){const a=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{a.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,a){return!e||!t?e:e.split(t).join(a||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,a){const failValidation=(e,i)=>{throw new Error(`"${a}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const a=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:o,InclusiveMinimum:r,MaxItems:s,MaxLength:p,MinItems:l,MinLength:d,MultipleOf:c,Pattern:m,UniqueItems:u}=e.constraints;if(i!=undefined&&a>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&a<=n){failValidation("ExclusiveMinimum",n)}if(o!=undefined&&a>o){failValidation("InclusiveMaximum",o)}if(r!=undefined&&as){failValidation("MaxItems",s)}if(p!=undefined&&f.length>p){failValidation("MaxLength",p)}if(l!=undefined&&f.lengtha.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};let p={};const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Sequence$/i)!==null){p=[]}if(e.isConstant){t=e.defaultValue}const{required:d,nullable:c}=e;if(d&&c&&t===undefined){throw new Error(`${a} cannot be undefined.`)}if(d&&!c&&t==undefined){throw new Error(`${a} cannot be null or undefined.`)}if(!d&&c===false&&t===null){throw new Error(`${a} cannot be null.`)}if(t==undefined){p=t}else{if(l.match(/^any$/i)!==null){p=t}else if(l.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){p=serializeBasicTypes(l,a,t)}else if(l.match(/^Enum$/i)!==null){const i=e;p=serializeEnumType(a,i.type.allowedValues,t)}else if(l.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){p=serializeDateTypes(l,t,a)}else if(l.match(/^ByteArray$/i)!==null){p=serializeByteArrayType(a,t)}else if(l.match(/^Base64Url$/i)!==null){p=serializeBase64UrlType(a,t)}else if(l.match(/^Sequence$/i)!==null){p=serializeSequenceType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Dictionary$/i)!==null){p=serializeDictionaryType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Composite$/i)!==null){p=serializeCompositeType(this,e,t,a,Boolean(this.isXML),s)}}return p}deserialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let p;const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Composite$/i)!==null){p=deserializeCompositeType(this,e,t,a,s)}else{if(this.isXML){const e=s.xmlCharKey;const a=t;if(a[T]!=undefined&&a[e]!=undefined){t=a[e]}}if(l.match(/^Number$/i)!==null){p=parseFloat(t);if(isNaN(p)){p=t}}else if(l.match(/^Boolean$/i)!==null){if(t==="true"){p=true}else if(t==="false"){p=false}else{p=t}}else if(l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){p=t}else if(l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){p=new Date(t)}else if(l.match(/^UnixTime$/i)!==null){p=unixTimeToDate(t)}else if(l.match(/^ByteArray$/i)!==null){p=decodeString(t)}else if(l.match(/^Base64Url$/i)!==null){p=base64UrlToByteArray(t)}else if(l.match(/^Sequence$/i)!==null){p=deserializeSequenceType(this,e,t,a,s)}else if(l.match(/^Dictionary$/i)!==null){p=deserializeDictionaryType(this,e,t,a,s)}}if(e.isConstant){p=e.defaultValue}return p}}function trimEnd(e,t){let a=e.length;while(a-1>=0&&e[a-1]===t){--a}return e.substr(0,a)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let a="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){a+=e.substr(0,e.length-1)+"."}else{a+=e;t.push(a);a=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,a){if(a!==null&&a!==undefined){if(e.match(/^Number$/i)!==null){if(typeof a!=="number"){throw new Error(`${t} with value ${a} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof a.valueOf()!=="string"){throw new Error(`${t} with value "${a}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof a.valueOf()==="string"&&isValidUuid(a))){throw new Error(`${t} with value "${a}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof a!=="boolean"){throw new Error(`${t} with value ${a} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof a;if(e!=="string"&&e!=="function"&&!(a instanceof ArrayBuffer)&&!ArrayBuffer.isView(a)&&!((typeof Blob==="function"||typeof Blob==="object")&&a instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return a}function serializeEnumType(e,t,a){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===a.toLowerCase()}return e===a}));if(!i){throw new Error(`${a} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return a}function serializeByteArrayType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=encodeByteArray(t)}return a}function serializeBase64UrlType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=bufferToBase64Url(t)||""}return a}function serializeDateTypes(e,t,a){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${a} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,a,i,n,o){if(!Array.isArray(a)){throw new Error(`${i} must be of type Array.`)}const r=t.type.element;if(!r||typeof r!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const s=[];for(let t=0;te!==n));if(s){r[n]=e.serialize(p,a[n],i+'["'+n+'"]',o)}}}return r}return a}function getXmlObjectValue(e,t,a,i){if(!a||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const o={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[T]){return t}else{const e=Object.assign({},t);e[T]=o;return e}}const r={};r[i.xmlCharKey]=t;r[T]=o;return r}function isSpecialXmlProperty(e,t){return[T,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,a,i,n){var o,r;const s=(o=n.xmlCharKey)!==null&&o!==void 0?o:O;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,a,"serializedName")}const p=resolveModelProperties(e,t,i);let l={};const d=[];for(const o of Object.keys(p)){const c=p[o];const m=splitSerializeName(p[o].serializedName);d.push(m[0]);const{serializedName:u,xmlName:f,xmlElementName:h}=c;let g=i;if(u!==""&&u!==undefined){g=i+"."+u}const y=c.headerCollectionPrefix;if(y){const t={};for(const i of Object.keys(a)){if(i.startsWith(y)){t[i.substring(y.length)]=e.deserialize(c.type.value,a[i],g,n)}d.push(i)}l[o]=t}else if(e.isXML){if(c.xmlIsAttribute&&a[T]){l[o]=e.deserialize(c,a[T][f],g,n)}else if(c.xmlIsMsText){if(a[s]!==undefined){l[o]=a[s]}else if(typeof a==="string"){l[o]=a}}else{const t=h||f||u;if(c.xmlIsWrapped){const t=a[f];const i=(r=t===null||t===void 0?void 0:t[h])!==null&&r!==void 0?r:[];l[o]=e.deserialize(c,i,g,n)}else{const i=a[t];l[o]=e.deserialize(c,i,g,n)}}}else{let i;let r=a;for(const e of m){if(!r)break;r=r[e]}i=r;const s=t.type.polymorphicDiscriminator;if(s&&o===s.clientName&&i==undefined){i=t.serializedName}let d;if(Array.isArray(a[o])&&p[o].serializedName===""){i=a[o];const t=e.deserialize(c,i,g,n);for(const[e,a]of Object.entries(l)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=a}}l=t}else if(i!==undefined||c.defaultValue!==undefined){d=e.deserialize(c,i,g,n);l[o]=d}}}const c=t.type.additionalProperties;if(c){const isAdditionalProperty=e=>{for(const t in p){const a=splitSerializeName(p[t].serializedName);if(a[0]===e){return false}}return true};for(const t in a){if(isAdditionalProperty(t)){l[t]=e.deserialize(c,a[t],i+'["'+t+'"]',n)}}}else if(a){for(const e of Object.keys(a)){if(l[e]===undefined&&!d.includes(e)&&!isSpecialXmlProperty(e,n)){l[e]=a[e]}}}return l}function deserializeDictionaryType(e,t,a,i,n){const o=t.type.value;if(!o||typeof o!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){const t={};for(const r of Object.keys(a)){t[r]=e.deserialize(o,a[r],i,n)}return t}return a}function deserializeSequenceType(e,t,a,i,n){const o=t.type.element;if(!o||typeof o!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){if(!Array.isArray(a)){a=[a]}const t=[];for(let r=0;r0}keys(){return Object.keys(this._rawQuery)}set(e,t){const a=t;if(e){if(a!==undefined&&a!==null){const t=Array.isArray(a)?a:a.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const a=this._rawQuery[t];if(Array.isArray(a)){const i=[];for(const e of a){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${a}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let a="ParameterName";let i="";let n="";for(let o=0;oisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,a){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:a&&a.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const o=isUrlHttps(e);const r=isUrlHttps(t.host);const s={isHttps:o,agent:createTunnel(o,r,n)};return s}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,a){if(e&&t){return C.httpsOverHttps(a)}else if(e&&!t){return C.httpsOverHttp(a)}else if(!e&&t){return C.httpOverHttps(a)}else{return C.httpOverHttp(a)}}function isValidPort(e){return 0<=e&&e<=65535}const A="REDACTED";const I=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const M=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?I.concat(e):I;t=Array.isArray(t)?M.concat(t):M;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,a)=>{if(a instanceof Error){return Object.assign(Object.assign({},a),{name:a.name,message:a.message})}if(e==="_headersMap"){return this.sanitizeHeaders(a)}else if(e==="url"){return this.sanitizeUrl(a)}else if(e==="query"){return this.sanitizeQuery(a)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(a)||isObject(a)){if(t.has(a)){return"[Circular]"}t.add(a)}return a}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,a){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=a(e,n)}else{i[n]=A}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const a=t.getQuery();if(!a){return e}const i=URLQuery.parse(a);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,A)}}t.setQuery(i.toString());return t.toString()}}const B=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,a,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=a;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[B](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const q=p.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,a){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});a(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((a=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();a()}));e.once("end",a);e.once("error",a)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,a)=>{t.set(a,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={};this.cookieJar=new k.CookieJar(undefined,{looseMode:true})}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const a=new f.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new f.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){a.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{a.abort()}),e.timeout)}if(e.formData){const t=e.formData;const a=new j["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){a.append(e,t.value,t.options)}else{a.append(e,t)}};for(const e of Object.keys(t)){const a=t[e];if(Array.isArray(a)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{q.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const a=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:o,password:r}=e.proxySettings;const s=`${i}:${n}:${o}:${r}`;const p=(t=this.proxyAgentMap.get(s))!==null&&t!==void 0?t:{};let l=getCachedAgent(a,p);if(l){return l}const d=createProxyAgent(e.url,e.proxySettings,e.headers);l=d.agent;if(d.isHttps){p.httpsAgent=d.agent}else{p.httpAgent=d.agent}this.proxyAgentMap.set(s,p);return l}else if(e.keepAlive){let t=getCachedAgent(a,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(a){t=this.keepAliveAgents.httpsAgent=new N.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new S.Agent(i)}return t}else{return a?N.globalAgent:S.globalAgent}}async fetch(e,t){return P["default"](e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,a)=>{this.cookieJar.getCookieString(e.url,((e,i)=>{if(e){a(e)}else{t(i)}}))}));e.headers.set("Cookie",t)}t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");if(t!==undefined){await new Promise(((a,i)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:true},(e=>{if(e){i(e)}else{a()}}))}))}}}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:a}=e,i=o.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(a){n.tracingContext=a.tracingContext;n.spanOptions=a===null||a===void 0?void 0:a.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:T,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:"  ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const V=Object.assign({},U);V.explicitArray=false;V.renderOpts={pretty:false};function stringifyXML(e,t={}){var a;V.rootName=t.rootName;V.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Builder(V);return i.buildObject(e)}function parseXML(e,t={}){var a;H.explicitRoot=!!t.includeRoot;H.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Parser(H);return new Promise(((t,a)=>{if(!e){a(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){a(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(a,i)=>new DeserializationPolicy(a,i,e,t)}}const $=["application/json","text/json"];const X=["application/xml","application/atom+xml"];const G={expectedContentTypes:{json:$,xml:X}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,a,i={}){var n;super(e,t);this.jsonContentTypes=a&&a.json||$;this.xmlContentTypes=a&&a.xml||X;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:O}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const a=e.request;const i=a.operationSpec;if(i){const n=a.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let a;if(t===undefined){a=true}else if(typeof t==="boolean"){a=t}else{a=t(e)}return a}function deserializeResponseBody(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};return parse(e,t,a,s).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:o,shouldReturnResponse:r}=handleErrorResponse(e,t,n);if(o){throw o}else if(r){return e}if(n){if(n.bodyMapper){let a=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===z.Sequence){a=typeof a==="object"?a[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,a,"operationRes.parsedBody",i)}catch(t){const a=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw a}}else if(t.httpMethod==="HEAD"){e.parsedBody=a.status>=200&&a.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,a){var i;const n=200<=e.status&&e.status<300;const o=isOperationSpecEmpty(t)?n:!!a;if(o){if(a){if(!a.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const r=a!==null&&a!==void 0?a:t.responses.default;const s=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const p=s?`Unexpected status code: ${e.status}`:e.bodyAsText;const l=new RestError(p,undefined,e.status,e.request,e);if(!r){throw l}const d=r.bodyMapper;const c=r.headersMapper;try{if(e.parsedBody){const a=e.parsedBody;let i;if(d){let e=a;if(t.isXML&&d.type.name===z.Sequence){e=typeof a==="object"?a[d.xmlElementName]:[]}i=t.serializer.deserialize(d,e,"error.response.parsedBody")}const n=a.error||i||a;l.code=n.code;if(n.message){l.message=n.message}if(d){l.response.parsedBody=i}}if(e.headers&&c){l.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){l.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:false}}function parse(e,t,a,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${a.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,a.status,a.request,a);return Promise.reject(n)};const o=((n=a.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(a.status))||a.request.streamResponseBody;if(!o&&a.bodyAsText){const n=a.bodyAsText;const o=a.headers.get("Content-Type")||"";const r=!o?[]:o.split(";").map((e=>e.toLowerCase()));if(r.length===0||r.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{a.parsedBody=JSON.parse(n);e(a)})).catch(errorHandler)}else if(r.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{a.parsedBody=e;return a})).catch(errorHandler)}}return Promise.resolve(a)}const K={enable:true};function keepAlivePolicy(e){return{create:(t,a)=>new KeepAlivePolicy(t,a,e||K)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.keepAliveOptions=a}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const W=["GET","HEAD"];const Q={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,a)=>new RedirectPolicy(t,a,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,a=20){super(e,t);this.maxRetries=a}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,a){const{request:i,status:n}=t;const o=t.headers.get("location");if(o&&(n===300||n===301&&W.includes(i.method)||n===302&&W.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||ahandleRedirect(e,t,a+1)))}return Promise.resolve(t)}const J=3;const Y=1e3*30;const Z=1e3*90;const ee=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,a,i,n){if(!t(i,n)){return false}return a.retryCountnew ExponentialRetryPolicy(i,n,e,t,a)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const te={maxRetries:J,retryDelayInMs:Y,maxRetryDelayInMs:Z};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.maxRetryInterval=isNumber(n)?n:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,a,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(a===null||a===void 0?void 0:a.headers.get(_.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const o=t.abortSignal&&t.abortSignal.aborted;if(!o&&shouldRetry(e.retryCount,shouldPolicyRetry,i,a)){q.info(`Retrying request in ${i.retryInterval}`);try{await s.delay(i.retryInterval);const a=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,a,i)}catch(n){return retry$1(e,t,a,i,n)}}else if(o||n||!a){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,a&&a.status,a&&a.request,a);throw e}else{return a}}function logPolicy(e={}){return{create:(t,a)=>new LogPolicy(t,a,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:a=q.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=a;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let a;if(typeof e==="string"){a=e}else if(Array.isArray(e)){a=e.join(".")}else{a=t.serializedName}return a}function getStreamResponseStatusCodes(e){const t=new Set;for(const a in e.responses){const i=e.responses[a];if(i.bodyMapper&&i.bodyMapper.type.name===z.Stream){t.add(Number(a))}}return t}function getDefaultUserAgentKey(){return _.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${w.arch()}-${w.type()}-${w.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:_.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",a="/"){return e.map((e=>{const t=e.value?`${a}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ae=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const a=getUserAgentString(e.concat(t));return a}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const a=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,a)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=a;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const ie={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,a){async function tryGetAccessToken(){if(Date.now()e.getToken(t,a);i=beginRefresh(tryGetAccessToken,o.retryIntervalInMs,(s=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&s!==void 0?s:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(r.mustRefresh)return refresh(e);if(r.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const a=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await a({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(_.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,a)=>new GenerateClientRequestIdPolicy(t,a,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this._requestIdHeaderName=a}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let ne;function getCachedDefaultHttpClient(){if(!ne){ne=new NodeFetchHttpClient}return ne}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const oe=[];let re=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(_.HTTPS_PROXY);const t=getEnvironmentValue(_.ALL_PROXY);const a=getEnvironmentValue(_.HTTP_PROXY);return e||t||a}function isBypassed(e,t,a){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(a===null||a===void 0?void 0:a.has(i)){return a.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}a===null||a===void 0?void 0:a.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(_.NO_PROXY);re=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:a,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const o=n.getScheme()?n.getScheme()+"://":"";return{host:o+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:a}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!re){oe.push(...loadNoProxy())}return{create:(a,i)=>new ProxyPolicy(a,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const a=e.indexOf("://");const i=a!==-1?a+3:0;const n=e.substring(i,t);const o=n.indexOf(":");const r=o!==-1;const s=r?n.substring(0,o):n;const p=r?n.substring(o+1):undefined;const l=e.substring(0,i)+e.substring(t+1);return{username:s,password:p,urlWithoutAuth:l}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this.proxySettings=a;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:oe,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,a)=>new RPRegistrationPolicy(t,a,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,a=30){super(e,t);this._retryTimeout=a}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,a){if(a.status===409){const i=checkRPNotRegisteredError(a.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return a}))}}return Promise.resolve(a)}function getRequestEssentials(e,t=false){const a=e.clone();if(t){a.url=e.url}a.headers.set("x-ms-client-request-id",generateUuid());a.headers.set("Content-Type","application/json; charset=utf-8");return a}function checkRPNotRegisteredError(e){let t,a;if(e){try{a=JSON.parse(e)}catch(e){}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){const e=a.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const a=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0]){t=a[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,a,i){const n=`${t}providers/${a}/register?api-version=2016-02-01`;const o=`${t}providers/${a}?api-version=2016-02-01`;const r=getRequestEssentials(i);r.method="POST";r.url=n;const s=await e._nextPolicy.sendRequest(r);if(s.status!==200){throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`)}return getRegistrationStatus(e,o,i)}async function getRegistrationStatus(e,t,a){const i=getRequestEssentials(a);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const o=n.parsedBody;if(n.parsedBody&&o.registrationState&&o.registrationState==="Registered"){return true}else{await s.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,a)}}function signingPolicy(e){return{create:(t,a)=>new SigningPolicy(t,a,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.authenticationProvider=a}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,a,i){return{create:(n,o)=>new SystemErrorRetryPolicy(n,o,e,t,a,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n,o){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.minRetryInterval=isNumber(n)?n:ee;this.maxRetryInterval=isNumber(o)?o:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,a,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,a,i)){try{await s.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,a,i,n)}}else{if(i){return Promise.reject(n.error)}return a}}const pe=3;const le=_.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const de="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.numberOfRetries=0;this._handleResponse=a||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==le.TooManyRequests&&t.status!==le.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var a;const i=t.headers.get(_.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await s.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:de});if((a=e.abortSignal)===null||a===void 0?void 0:a.aborted){throw new f.AbortError(de)}if(this.numberOfRetries{let a=undefined;const i=this;const n=t;return{create(t,o){const r=getCredentialScopes(n,i.baseUri);if(!r){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(a===undefined||a===null){a=bearerTokenAuthenticationPolicy(e,r)}return a.create(t,o)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){q.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}q.info("ServiceClient: using default request policies");a=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(a);if(e){a=e}}}this._requestPolicyFactories=a}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let a=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){a=this._requestPolicyFactories[e].create(a,this._requestPolicyOptions)}}return a.sendRequest(t)}async sendOperationRequest(e,a,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const o=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const r=new WebResource;let s;try{const i=a.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}r.method=a.httpMethod;r.operationSpec=a;const n=URLBuilder.parse(i);if(a.path){n.appendPath(a.path)}if(a.urlParameters&&a.urlParameters.length>0){for(const t of a.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(a.queryParameters&&a.queryParameters.length>0){for(const i of a.queryParameters){let r=getOperationArgumentValueFromParameter(this,e,i,a.serializer);if(r!==undefined&&r!==null){r=a.serializer.serialize(i.mapper,r,getPathStringFromParameter(i),o);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(r.length===0){continue}else{for(const e in r){const t=r[e];r[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(r)){for(const e in r){if(r[e]!==undefined&&r[e]!==null){r[e]=encodeURIComponent(r[e])}}}else{r=encodeURIComponent(r)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),r)}}}r.url=n.toString();const p=a.contentType||this.requestContentType;if(p&&a.requestBody){r.headers.set("Content-Type",p)}if(a.headerParameters){for(const t of a.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);if(i!==undefined&&i!==null){i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){r.headers.set(e+t,i[t])}}else{r.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const l=e.options;if(l){if(l.customHeaders){for(const e in l.customHeaders){r.headers.set(e,l.customHeaders[e])}}if(l.abortSignal){r.abortSignal=l.abortSignal}if(l.timeout){r.timeout=l.timeout}if(l.onUploadProgress){r.onUploadProgress=l.onUploadProgress}if(l.onDownloadProgress){r.onDownloadProgress=l.onDownloadProgress}if(l.spanOptions){r.spanOptions=l.spanOptions}if(l.tracingContext){r.tracingContext=l.tracingContext}if(l.shouldDeserialize!==undefined&&l.shouldDeserialize!==null){r.shouldDeserialize=l.shouldDeserialize}}r.withCredentials=this._withCredentials;serializeRequestBody(this,r,e,a);if(r.streamResponseStatusCodes===undefined){r.streamResponseStatusCodes=getStreamResponseStatusCodes(a)}let d;let c;try{d=await this.sendRequest(r)}catch(e){c=e}if(c){if(c.response){c.details=flattenResponse(c.response,a.responses[c.statusCode]||a.responses["default"])}s=Promise.reject(c)}else{s=Promise.resolve(flattenResponse(d,a.responses[d.status]))}}catch(e){s=Promise.reject(e)}const p=i;if(p){s.then((e=>p(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>p(e)))}return s}}function serializeRequestBody(e,t,a,i){var n,o,r,s,p,l;const d=(o=(n=a.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&o!==void 0?o:{};const c={rootName:(r=d.rootName)!==null&&r!==void 0?r:"",includeRoot:(s=d.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(p=d.xmlCharKey)!==null&&p!==void 0?p:O};const m=d.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,a,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:o,xmlName:r,xmlElementName:s,serializedName:p,xmlNamespace:d,xmlNamespacePrefix:u}=n;const f=n.type.name;try{if(t.body!==undefined&&t.body!==null||o){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,c);const a=f===z.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(d,e,f,t.body,c);if(f===z.Sequence){t.body=stringifyXML(prepareXMLRootList(i,s||r||p,e,d),{rootName:r||p,xmlCharKey:m})}else if(!a){t.body=stringifyXML(i,{rootName:r||p,xmlCharKey:m})}}else if(f===z.String&&(((l=i.contentType)===null||l===void 0?void 0:l.match("text/plain"))||i.mediaType==="text")){return}else if(!a){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(p,undefined,"  ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const o=getOperationArgumentValueFromParameter(e,a,n,i.serializer);if(o!==undefined&&o!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,o,getPathStringFromParameter(n),c)}}}}function getXmlValueWithNamespace(e,t,a,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(a)){const a={};a[n.xmlCharKey]=i;a[T]={[t]:e};return a}return i}function getValueOrFunctionResult(e,t){let a;if(typeof e==="string"){a=e}else{a=t();if(typeof e==="function"){a=e(a)}}return a}function createDefaultRequestPolicyFactories(e,t){const a=[];if(t.generateClientRequestIdHeader){a.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){a.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ae);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){a.push(userAgentPolicy({key:i,value:n}))}a.push(redirectPolicy());a.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){a.push(exponentialRetryPolicy());a.push(systemErrorRetryPolicy());a.push(throttlingRetryPolicy())}a.push(deserializationPolicy(t.deserializationContentTypes));if(E){a.push(proxyPolicy(t.proxySettings))}a.push(logPolicy({logger:q.info}));return a}function createPipelineFromOptions(e,t){const a=[];if(e.sendStreamingJson){a.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const a=getDefaultUserAgentValue();if(t.indexOf(a)===-1){t.push(a)}i=t.join(" ")}const n=Object.assign(Object.assign({},K),e.keepAliveOptions);const o=Object.assign(Object.assign({},te),e.retryOptions);const r=Object.assign(Object.assign({},Q),e.redirectOptions);if(E){a.push(proxyPolicy(e.proxyOptions))}const s=Object.assign(Object.assign({},G),e.deserializationOptions);const p=Object.assign({},e.loggingOptions);a.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(s.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(o.maxRetries,o.retryDelayInMs,o.maxRetryDelayInMs));if(r.handleRedirects){a.push(redirectPolicy(r.maxRetries))}if(t){a.push(t)}a.push(logPolicy(p));if(E&&e.decompressResponse===false){a.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:a}}function getOperationArgumentValueFromParameter(e,t,a,i){return getOperationArgumentValueFromParameterPath(e,t,a.parameterPath,a.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,a,i,n){var o;let r;if(typeof a==="string"){a=[a]}const s=(o=t.options)===null||o===void 0?void 0:o.serializerOptions;if(Array.isArray(a)){if(a.length>0){if(i.isConstant){r=i.defaultValue}else{let n=getPropertyFromParameterPath(t,a);if(!n.propertyFound){n=getPropertyFromParameterPath(e,a)}let o=false;if(!n.propertyFound){o=i.required||a[0]==="options"&&a.length===2}r=o?i.defaultValue:n.propertyValue}const o=getPathStringFromParameterPath(a,i);n.serialize(i,r,o,s)}}else{if(i.required){r={}}for(const o in a){const p=i.type.modelProperties[o];const l=a[o];const d=getOperationArgumentValueFromParameterPath(e,t,l,p,n);const c=getPathStringFromParameterPath(l,p);n.serialize(p,d,c,s);if(d!==undefined&&d!==null){if(!r){r={}}r[o]=d}}}return r}function getPropertyFromParameterPath(e,t){const a={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const o=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||o){const t=[...e.parsedBody||[]];for(const a of Object.keys(n)){if(n[a].serializedName){t[a]=e.parsedBody[a]}}if(a){for(const e of Object.keys(a)){t[e]=a[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},a),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return b.createSpanFunction(e)}const me=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=me){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,a=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=a;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const ue=_.HeaderConstants;const fe="Basic";class BasicAuthenticationCredentials{constructor(e,t,a=fe){this.authorizationScheme=fe;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=a}signRequest(e){const t=`${this.userName}:${this.password}`;const a=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(ue.AUTHORIZATION,a);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return s.delay}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return l.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=_;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=z;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=T;t.XML_CHARKEY=O;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isNode=E;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,a)=>{var i=a(5443);var n=a(3837);var o=a(1017);var r=a(3685);var s=a(5687);var p=a(7310).parse;var l=a(7147);var d=a(2781).Stream;var c=a(3583);var m=a(4812);var u=a(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a=="string"){a={filename:a}}var o=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();o(r);o(t);o(s);this._trackLength(r,t,a)};FormData.prototype._trackLength=function(e,t,a){var i=0;if(a.knownLength!=null){i+=+a.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof d)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{l.stat(e.path,(function(a,i){var n;if(a){t(a);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(a){e.pause();t(null,+a.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header=="string"){return a.header}var i=this._getContentDisposition(t,a);var n=this._getContentType(t,a);var o="";var r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof a.header=="object"){u(r,a.header)}var s;for(var p in r){if(!r.hasOwnProperty(p))continue;s=r[p];if(s==null){continue}if(!Array.isArray(s)){s=[s]}if(s.length){o+=p+": "+s.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a,i;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){a=o.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){i='filename="'+a+'"'}return i};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e.name){a=c.lookup(e.name)}if(!a&&e.path){a=c.lookup(e.path)}if(!a&&e.readable&&e.hasOwnProperty("httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=c.lookup(t.filepath||t.filename)}if(!a&&typeof e=="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,i=this._streams.length;a{e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},8165:(e,t,a)=>{"use strict";
+(()=>{var __webpack_modules__={3782:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCaches=t.getMinikubeVersion=t.restoreCaches=void 0;const n=a(7799);const o=a(2186);const r=a(1514);const s=a(2037);const p=a(1017);const restoreCaches=()=>i(void 0,void 0,void 0,(function*(){const e={iso:true,kic:true,preload:true};if(!useCache()){return e}const a=yield(0,t.getMinikubeVersion)();const i=restoreCache("iso",a);const n=restoreCache("kic",a);const o=restoreCache("preloaded-tarball",a);e.iso=typeof(yield i)!=="undefined";e.kic=typeof(yield n)!=="undefined";e.preload=typeof(yield o)!=="undefined";return e}));t.restoreCaches=restoreCaches;const getMinikubeVersion=()=>i(void 0,void 0,void 0,(function*(){let e="";const t={};t.listeners={stdout:t=>{e+=t.toString()}};yield(0,r.exec)("minikube",["version","--short"],t);return e.trim()}));t.getMinikubeVersion=getMinikubeVersion;const saveCaches=e=>i(void 0,void 0,void 0,(function*(){if(!useCache()){return}const a=yield(0,t.getMinikubeVersion)();const i=saveCache("iso",e.iso,a);const n=saveCache("kic",e.kic,a);yield saveCache("preloaded-tarball",e.preload,a);yield i;yield n}));t.saveCaches=saveCaches;const restoreCache=(e,t)=>i(void 0,void 0,void 0,(function*(){return(0,n.restoreCache)(getCachePaths(e),getCacheKey(e,t))}));const saveCache=(e,t,a)=>i(void 0,void 0,void 0,(function*(){if(t){return}try{yield(0,n.saveCache)(getCachePaths(e),getCacheKey(e,a))}catch(t){console.log(e+t)}}));const getCachePaths=e=>[(0,p.join)((0,s.homedir)(),".minikube","cache",e)];const getCacheKey=(e,t)=>{let a=`${e}-${t}-${(0,s.arch)()}`;if(e==="preloaded-tarball"){const e=getInput("kubernetes-version","stable");const t=getInput("container-runtime","docker");a+=`-${e}-${t}`}return a};const getInput=(e,t)=>{const a=(0,o.getInput)(e).toLowerCase();return a!==""?a:t};const useCache=()=>(0,o.getInput)("cache").toLowerCase()==="true"},5933:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadMinikube=t.getDownloadURL=void 0;const n=a(2186);const o=a(1514);const r=a(7436);const s=a(7784);const p=a(2037);const l=a(1017);const getDownloadURL=e=>{const t=(0,p.platform)();const a=t==="win32"?"windows":t;const i=t==="win32"?".exe":"";switch(e){case"latest":return`https://github.com/kubernetes/minikube/releases/latest/download/minikube-${a}-amd64${i}`;case"head":return`https://storage.googleapis.com/minikube-builds/master/minikube-${a}-amd64${i}`;default:return`https://github.com/kubernetes/minikube/releases/download/v${e}/minikube-${a}-amd64${i}`}};t.getDownloadURL=getDownloadURL;const downloadMinikube=e=>i(void 0,void 0,void 0,(function*(){const a=(0,t.getDownloadURL)(e);const i=yield(0,s.downloadTool)(a);const d=(0,p.platform)()==="darwin"?"/Users/runner/bin":"/home/runner/bin";yield(0,r.mkdirP)(d);yield(0,o.exec)("chmod",["+x",i]);yield(0,r.mv)(i,(0,l.join)(d,"minikube"));(0,n.addPath)(d)}));t.downloadMinikube=downloadMinikube},6180:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setArgs=void 0;const i=a(2186);const setArgs=e=>{const t=[{key:"addons",flag:"--addons"},{key:"cni",flag:"--cni"},{key:"container-runtime",flag:"--container-runtime"},{key:"cpus",flag:"--cpus"},{key:"driver",flag:"--driver"},{key:"extra-config",flag:"--extra-config"},{key:"kubernetes-version",flag:"--kubernetes-version"},{key:"listen-address",flag:"--listen-address"},{key:"memory",flag:"--memory"},{key:"mount-path",flag:"--mount-string"},{key:"network-plugin",flag:"--network-plugin"},{key:"wait",flag:"--wait"}];t.forEach((t=>{const a=(0,i.getInput)(t.key).toLowerCase();if(a!==""){e.push(t.flag,a)}}));if((0,i.getInput)("mount-path")!==""){e.push("--mount")}};t.setArgs=setArgs},3109:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});const n=a(2186);const o=a(5933);const r=a(5125);const run=()=>i(void 0,void 0,void 0,(function*(){try{let e=(0,n.getInput)("minikube-version").toLowerCase();e=e==="stable"?"latest":e;yield(0,o.downloadMinikube)(e);yield(0,r.startMinikube)()}catch(e){if(e instanceof Error){(0,n.setFailed)(e.message)}}}));run()},5516:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.installNoneDriverDeps=void 0;const n=a(2186);const o=a(1514);const r=a(7784);const installCriDocker=()=>i(void 0,void 0,void 0,(function*(){const e="https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/";const t=(0,r.downloadTool)(e+"cri-dockerd");const a=(0,r.downloadTool)(e+"cri-docker.service");const i=(0,r.downloadTool)(e+"cri-docker.socket");yield(0,o.exec)("chmod",["+x",yield t]);yield(0,o.exec)("sudo",["mv",yield t,"/usr/bin/cri-dockerd"]);yield(0,o.exec)("sudo",["mv",yield a,"/usr/lib/systemd/system/cri-docker.service"]);yield(0,o.exec)("sudo",["mv",yield i,"/usr/lib/systemd/system/cri-docker.socket"])}));const installConntrackSocat=()=>i(void 0,void 0,void 0,(function*(){yield(0,o.exec)("sudo",["apt-get","update","-qq"]);yield(0,o.exec)("sudo",["apt-get","-qq","-y","install","conntrack","socat"])}));const installCrictl=()=>i(void 0,void 0,void 0,(function*(){const e="https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz";const t=(0,r.downloadTool)(e);yield(0,o.exec)("sudo",["tar","zxvf",yield t,"-C","/usr/local/bin"])}));const installNoneDriverDeps=()=>i(void 0,void 0,void 0,(function*(){const e=(0,n.getInput)("driver").toLowerCase();if(e!=="none"){return}yield Promise.all([installCriDocker(),installConntrackSocat(),installCrictl()])}));t.installNoneDriverDeps=installNoneDriverDeps},5125:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.startMinikube=void 0;const n=a(1514);const o=a(3782);const r=a(6180);const s=a(5516);const startMinikube=()=>i(void 0,void 0,void 0,(function*(){const e=["start"];(0,r.setArgs)(e);const t=yield(0,o.restoreCaches)();yield(0,s.installNoneDriverDeps)();yield(0,n.exec)("minikube",e);yield(0,o.saveCaches)(t)}));t.startMinikube=startMinikube},7799:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=n(a(1017));const s=n(a(1518));const p=n(a(8245));const l=a(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,a,n){return i(this,void 0,void 0,(function*(){checkPaths(e);a=a||[];const i=[t,...a];o.debug("Resolved Keys:");o.debug(JSON.stringify(i));if(i.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of i){checkKey(e)}const d=yield s.getCompressionMethod();let c="";try{const t=yield p.getCacheEntry(i,e,{compressionMethod:d});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}c=r.join(yield s.createTempDirectory(),s.getCacheFileName(d));o.debug(`Archive Path: ${c}`);yield p.downloadCache(t.archiveLocation,c,n);if(o.isDebug()){yield l.listTar(c,d)}const a=s.getArchiveFileSizeInBytes(c);o.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield l.extractTar(c,d);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield s.unlinkFile(c)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,a){var n,d,c,m,u;return i(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const i=yield s.getCompressionMethod();let f=-1;const h=yield s.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const g=yield s.createTempDirectory();const y=r.join(g,s.getCacheFileName(i));o.debug(`Archive Path: ${y}`);try{yield l.createTar(g,h,i);if(o.isDebug()){yield l.listTar(y,i)}const r=10*1024*1024*1024;const v=s.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${v}`);if(v>r&&!s.isGhes()){throw new Error(`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:i,cacheSize:v});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){f=(d=b===null||b===void 0?void 0:b.result)===null||d===void 0?void 0:d.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((m=(c=b===null||b===void 0?void 0:b.error)===null||c===void 0?void 0:c.message)!==null&&m!==void 0?m:`Cache size of ~${Math.round(v/(1024*1024))} MB (${v} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message}`)}o.debug(`Saving Cache (ID: ${f})`);yield p.saveCache(f,y,a)}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else if(t.name===ReserveCacheError.name){o.info(`Failed to save: ${t.message}`)}else{o.warning(`Failed to save: ${t.message}`)}}finally{try{yield s.unlinkFile(y)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return f}))}t.saveCache=saveCache},8245:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(5526);const p=n(a(6113));const l=n(a(7147));const d=a(7310);const c=n(a(1518));const m=a(8840);const u=a(5500);const f=a(6215);const h=a(3981);const g="1.0";function getCacheApiUrl(e){const t=process.env["ACTIONS_CACHE_URL"]||"";if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new s.BearerCredentialHandler(e);return new r.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t){const a=e.concat(!t||t===m.CompressionMethod.Gzip?[]:[t]);a.push(g);return p.createHash("sha256").update(a.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const r=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const s=`cache?keys=${encodeURIComponent(e.join(","))}&version=${r}`;const p=yield h.retryTypedResponse("getCacheEntry",(()=>i(this,void 0,void 0,(function*(){return n.getJson(getCacheApiUrl(s))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],n,r)}return null}if(!h.isSuccessStatusCode(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const l=p.result;const d=l===null||l===void 0?void 0:l.archiveLocation;if(!d){throw new Error("Cache not found.")}o.setSecret(d);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,a){return i(this,void 0,void 0,(function*(){const n=`caches?key=${encodeURIComponent(e)}`;const r=yield h.retryTypedResponse("listCache",(()=>i(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(n))}))));if(r.statusCode===200){const t=r.result;const i=t===null||t===void 0?void 0:t.totalCount;if(i&&i>0){o.debug(`No matching cache found for cache key '${e}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=new d.URL(e);const n=f.getDownloadOptions(a);if(n.useAzureSdk&&i.hostname.endsWith(".blob.core.windows.net")){yield u.downloadCacheStorageSDK(e,t,n)}else{yield u.downloadCacheHttpClient(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,a){return i(this,void 0,void 0,(function*(){const n=createHttpClient();const o=getCacheVersion(t,a===null||a===void 0?void 0:a.compressionMethod);const r={key:e,version:o,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const s=yield h.retryTypedResponse("reserveCache",(()=>i(this,void 0,void 0,(function*(){return n.postJson(getCacheApiUrl("caches"),r)}))));return s}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,a,n,r){return i(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${r-n+1} bytes at offset ${n} with content range: ${getContentRange(n,r)}`);const s={"Content-Type":"application/octet-stream","Content-Range":getContentRange(n,r)};const p=yield h.retryHttpClientResponse(`uploadChunk (start: ${n}, end: ${r})`,(()=>i(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,a(),s)}))));if(!h.isSuccessStatusCode(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,a,n){return i(this,void 0,void 0,(function*(){const r=c.getArchiveFileSizeInBytes(a);const s=getCacheApiUrl(`caches/${t.toString()}`);const p=l.openSync(a,"r");const d=f.getUploadOptions(n);const m=c.assertDefined("uploadConcurrency",d.uploadConcurrency);const u=c.assertDefined("uploadChunkSize",d.uploadChunkSize);const h=[...new Array(m).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(h.map((()=>i(this,void 0,void 0,(function*(){while(gl.createReadStream(a,{fd:p,start:i,end:n,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),i,n)}})))))}finally{l.closeSync(p)}return}))}function commitCache(e,t,a){return i(this,void 0,void 0,(function*(){const n={size:a};return yield h.retryTypedResponse("commitCache",(()=>i(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),n)}))))}))}function saveCache(e,t,a){return i(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,a);o.debug("Commiting cache");const n=c.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`);const r=yield commitCache(i,e,n);if(!h.isSuccessStatusCode(r.statusCode)){throw new Error(`Cache service responded with ${r.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},1518:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=o(a(2186));const s=o(a(1514));const p=o(a(8090));const l=o(a(7436));const d=o(a(7147));const c=o(a(1017));const m=o(a(5911));const u=o(a(3837));const f=a(2155);const h=a(8840);function createTempDirectory(){return i(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let a;if(e){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}t=c.join(a,"actions","temp")}const a=c.join(t,f.v4());yield l.mkdirP(a);return a}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return d.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,a;var o;return i(this,void 0,void 0,(function*(){const i=[];const s=(o=process.env["GITHUB_WORKSPACE"])!==null&&o!==void 0?o:process.cwd();const l=yield p.create(e.join("\n"),{implicitDescendants:false});try{for(var d=n(l.globGenerator()),m;m=yield d.next(),!m.done;){const e=m.value;const t=c.relative(s,e).replace(new RegExp(`\\${c.sep}`,"g"),"/");r.debug(`Matched: ${t}`);if(t===""){i.push(".")}else{i.push(`${t}`)}}}catch(e){t={error:e}}finally{try{if(m&&!m.done&&(a=d.return))yield a.call(d)}finally{if(t)throw t.error}}return i}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return i(this,void 0,void 0,(function*(){return u.promisify(d.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e){return i(this,void 0,void 0,(function*(){r.debug(`Checking ${e} --version`);let t="";try{yield s.exec(`${e} --version`,[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>t+=e.toString(),stderr:e=>t+=e.toString()}})}catch(e){r.debug(e.message)}t=t.trim();r.debug(t);return t}))}function getCompressionMethod(){return i(this,void 0,void 0,(function*(){if(process.platform==="win32"&&!(yield isGnuTarInstalled())){return h.CompressionMethod.Gzip}const e=yield getVersion("zstd");const t=m.clean(e);if(!e.toLowerCase().includes("zstd command line interface")){return h.CompressionMethod.Gzip}else if(!t||m.lt(t,"v1.3.2")){return h.CompressionMethod.ZstdWithoutLong}else{return h.CompressionMethod.Zstd}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===h.CompressionMethod.Gzip?h.CacheFilename.Gzip:h.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function isGnuTarInstalled(){return i(this,void 0,void 0,(function*(){const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")}))}t.isGnuTarInstalled=isGnuTarInstalled;function assertDefined(e,t){if(t===undefined){throw Error(`Expected ${e} but value was undefiend`)}return t}t.assertDefined=assertDefined;function isGhes(){const e=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return e.hostname.toUpperCase()!=="GITHUB.COM"}t.isGhes=isGhes},8840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(a=t.CacheFilename||(t.CacheFilename={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i=t.CompressionMethod||(t.CompressionMethod={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3},5500:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(4100);const p=n(a(4300));const l=n(a(7147));const d=n(a(2781));const c=n(a(3837));const m=n(a(1518));const u=a(8840);const f=a(3981);const h=a(2557);function pipeResponseToStream(e,t){return i(this,void 0,void 0,(function*(){const a=c.promisify(d.pipeline);yield a(e.message,t)}))}class DownloadProgress{constructor(e){this.contentLength=e;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=e;this.receivedBytes=0;o.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const e=this.segmentOffset+this.receivedBytes;const t=(100*(e/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const i=(e/(1024*1024)/(a/1e3)).toFixed(1);o.info(`Received ${e} of ${this.contentLength} (${t}%), ${i} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,e)}};this.timeoutHandle=setTimeout(displayCallback,e)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}t.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(e,t){return i(this,void 0,void 0,(function*(){const a=l.createWriteStream(t);const n=new r.HttpClient("actions/cache");const s=yield f.retryHttpClientResponse("downloadCache",(()=>i(this,void 0,void 0,(function*(){return n.get(e)}))));s.message.socket.setTimeout(u.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${u.SocketTimeout} ms`)}));yield pipeResponseToStream(s,a);const p=s.message.headers["content-length"];if(p){const e=parseInt(p);const a=m.getArchiveFileSizeInBytes(t);if(a!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${a}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheStorageSDK(e,t,a){var n;return i(this,void 0,void 0,(function*(){const i=new s.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const r=yield i.getProperties();const d=(n=r.contentLength)!==null&&n!==void 0?n:-1;if(d<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(2147483647,p.constants.MAX_LENGTH);const n=new DownloadProgress(d);const o=l.openSync(t,"w");try{n.startDisplayTimer();const t=new h.AbortController;const r=t.signal;while(!n.isDone()){const s=n.segmentOffset+n.segmentSize;const p=Math.min(e,d-s);n.nextSegment(p);const c=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,i.downloadToBuffer(s,p,{abortSignal:r,concurrency:a.downloadConcurrency,onProgress:n.onProgress()}));if(c==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(c)){l.writeFileSync(o,c)}}}finally{n.stopDisplayTimer();l.closeSync(o)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>i(void 0,void 0,void 0,(function*(){let a;const i=new Promise((t=>{a=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(a);return e}))}))},3981:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=n(a(2186));const r=a(6255);const s=a(8840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[r.HttpCodes.BadGateway,r.HttpCodes.ServiceUnavailable,r.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return i(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,a,n=s.DefaultRetryAttempts,r=s.DefaultRetryDelay,p=undefined){return i(this,void 0,void 0,(function*(){let i="";let s=1;while(s<=n){let l=undefined;let d=undefined;let c=false;try{l=yield t()}catch(e){if(p){l=p(e)}c=true;i=e.message}if(l){d=a(l);if(!isServerErrorStatusCode(d)){return l}}if(d){c=isRetryableStatusCode(d);i=`Cache service responded with ${d}`}o.debug(`${e} - Attempt ${s} of ${n} failed with error: ${i}`);if(!c){o.debug(`${e} - Error is not retryable`);break}yield sleep(r);s++}throw Error(`${e} failed: ${i}`)}))}t.retry=retry;function retryTypedResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),a,n,(e=>{if(e instanceof r.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,a=s.DefaultRetryAttempts,n=s.DefaultRetryDelay){return i(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),a,n)}))}t.retryHttpClientResponse=retryHttpClientResponse},6490:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=a(1514);const r=n(a(7436));const s=a(7147);const p=n(a(1017));const l=n(a(1518));const d=a(8840);const c=process.platform==="win32";function getTarPath(e,t){return i(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const a=`${process.env["windir"]}\\System32\\tar.exe`;if(t!==d.CompressionMethod.Gzip){e.push("--force-local")}else if(s.existsSync(a)){return a}else if(yield l.isGnuTarInstalled()){e.push("--force-local")}break}case"darwin":{const t=yield r.which("gtar",false);if(t){e.push("--delay-directory-restore");return t}break}default:break}return yield r.which("tar",true)}))}function execTar(e,t,a){return i(this,void 0,void 0,(function*(){try{yield o.exec(`"${yield getTarPath(e,t)}"`,e,{cwd:a})}catch(e){throw new Error(`Tar failed with error: ${e===null||e===void 0?void 0:e.message}`)}}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getCompressionProgram(e){switch(e){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -d --long=30":"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -d":"unzstd"];default:return["-z"]}}function listTar(e,t){return i(this,void 0,void 0,(function*(){const a=[...getCompressionProgram(t),"-tf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P"];yield execTar(a,t)}))}t.listTar=listTar;function extractTar(e,t){return i(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield r.mkdirP(a);const i=[...getCompressionProgram(t),"-xf",e.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",a.replace(new RegExp(`\\${p.sep}`,"g"),"/")];yield execTar(i,t)}))}t.extractTar=extractTar;function createTar(e,t,a){return i(this,void 0,void 0,(function*(){const i="manifest.txt";const n=l.getCacheFileName(a);s.writeFileSync(p.join(e,i),t.join("\n"));const o=getWorkingDirectory();function getCompressionProgram(){switch(a){case d.CompressionMethod.Zstd:return["--use-compress-program",c?"zstd -T0 --long=30":"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return["--use-compress-program",c?"zstd -T0":"zstdmt"];default:return["-z"]}}const r=["--posix",...getCompressionProgram(),"-cf",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--exclude",n.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${p.sep}`,"g"),"/"),"--files-from",i];yield execTar(r,a,e)}))}t.createTar=createTar},6215:function(e,t,a){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(Object.hasOwnProperty.call(e,a))t[a]=e[a];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=i(a(2186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}n.debug(`Upload concurrency: ${t.uploadConcurrency}`);n.debug(`Upload chunk size: ${t.uploadChunkSize}`);return t}t.getUploadOptions=getUploadOptions;function getDownloadOptions(e){const t={useAzureSdk:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:36e5};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.downloadConcurrency==="number"){t.downloadConcurrency=e.downloadConcurrency}if(typeof e.timeoutInMs==="number"){t.timeoutInMs=e.timeoutInMs}if(typeof e.segmentTimeoutInMs==="number"){t.segmentTimeoutInMs=e.segmentTimeoutInMs}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){t.segmentTimeoutInMs=Number(a)*60*1e3}n.debug(`Use Azure SDK: ${t.useAzureSdk}`);n.debug(`Download concurrency: ${t.downloadConcurrency}`);n.debug(`Request timeout (ms): ${t.timeoutInMs}`);n.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);n.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);return t}t.getDownloadOptions=getDownloadOptions},7351:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const r=o(a(2037));const s=a(5278);function issueCommand(e,t,a){const i=new Command(e,t,a);process.stdout.write(i.toString()+r.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const p="::";class Command{constructor(e,t,a){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=a}toString(){let e=p+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const i=this.properties[a];if(i){if(t){t=false}else{e+=","}e+=`${a}=${escapeProperty(i)}`}}}}e+=`${p}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.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 s=a(7351);const p=a(717);const l=a(5278);const d=o(a(2037));const c=o(a(1017));const m=a(8041);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const a=l.toCommandValue(t);process.env[e]=a;const i=process.env["GITHUB_ENV"]||"";if(i){return p.issueFileCommand("ENV",p.prepareKeyValueMessage(e,t))}s.issueCommand("set-env",{name:e},a)}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){p.issueFileCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return a}return a.trim()}t.getInput=getInput;function getMultilineInput(e,t){const a=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return a}return a.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const a=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,t);if(a.includes(n))return true;if(i.includes(n))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){const a=process.env["GITHUB_OUTPUT"]||"";if(a){return p.issueFileCommand("OUTPUT",p.prepareKeyValueMessage(e,t))}process.stdout.write(d.EOL);s.issueCommand("set-output",{name:e},l.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){s.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){s.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){s.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+d.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return r(this,void 0,void 0,(function*(){startGroup(e);let a;try{a=yield t()}finally{endGroup()}return a}))}t.group=group;function saveState(e,t){const a=process.env["GITHUB_STATE"]||"";if(a){return p.issueFileCommand("STATE",p.prepareKeyValueMessage(e,t))}s.issueCommand("save-state",{name:e},l.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return r(this,void 0,void 0,(function*(){return yield m.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var f=a(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return f.summary}});var h=a(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return h.markdownSummary}});var g=a(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const r=o(a(7147));const s=o(a(2037));const p=a(8974);const l=a(5278);function issueFileCommand(e,t){const a=process.env[`GITHUB_${e}`];if(!a){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!r.existsSync(a)){throw new Error(`Missing file at path: ${a}`)}r.appendFileSync(a,`${l.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const a=`ghadelimiter_${p.v4()}`;const i=l.toCommandValue(t);if(e.includes(a)){throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`)}if(i.includes(a)){throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`)}return`${e}<<${a}${s.EOL}${i}${s.EOL}${a}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=a(6255);const o=a(5526);const r=a(2186);class OidcClient{static createHttpClient(e=true,t=10){const a={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],a)}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 i(this,void 0,void 0,(function*(){const a=OidcClient.createHttpClient();const i=yield a.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 n=(t=i.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const a=encodeURIComponent(e);t=`${t}&audience=${a}`}r.debug(`ID token url is ${t}`);const a=yield OidcClient.getCall(t);r.setSecret(a);return a}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const r=o(a(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,r.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=a(2037);const o=a(7147);const{access:r,appendFile:s,writeFile:p}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield r(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,a={}){const i=Object.entries(a).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${i}>`}return`<${e}${i}>${t}`}write(e){return i(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const a=yield this.filePath();const i=t?p:s;yield i(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const a=Object.assign({},t&&{lang:t});const i=this.wrap("pre",this.wrap("code",e),a);return this.addRaw(i).addEOL()}addList(e,t=false){const a=t?"ol":"ul";const i=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(a,i);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:a,colspan:i,rowspan:n}=e;const o=t?"th":"td";const r=Object.assign(Object.assign({},i&&{colspan:i}),n&&{rowspan:n});return this.wrap(o,a,r)})).join("");return this.wrap("tr",t)})).join("");const a=this.wrap("table",t);return this.addRaw(a).addEOL()}addDetails(e,t){const a=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(a).addEOL()}addImage(e,t,a){const{width:i,height:n}=a||{};const o=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n});const r=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(r).addEOL()}addHeading(e,t){const a=`h${t}`;const i=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const n=this.wrap(i,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 a=Object.assign({},t&&{cite:t});const i=this.wrap("blockquote",e,a);return this.addRaw(i).addEOL()}addLink(e,t){const a=this.wrap("a",e,{href:t});return this.addRaw(a).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},5278:(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},8974:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return r.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return d.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return c.default}});var i=_interopRequireDefault(a(1595));var n=_interopRequireDefault(a(6993));var o=_interopRequireDefault(a(1472));var r=_interopRequireDefault(a(6217));var s=_interopRequireDefault(a(2381));var p=_interopRequireDefault(a(427));var l=_interopRequireDefault(a(2609));var d=_interopRequireDefault(a(1458));var c=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},5842:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},2381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";t["default"]=a},6385:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}let t;const a=new Uint8Array(16);a[0]=(t=parseInt(e.slice(0,8),16))>>>24;a[1]=t>>>16&255;a[2]=t>>>8&255;a[3]=t&255;a[4]=(t=parseInt(e.slice(9,13),16))>>>8;a[5]=t&255;a[6]=(t=parseInt(e.slice(14,18),16))>>>8;a[7]=t&255;a[8]=(t=parseInt(e.slice(19,23),16))>>>8;a[9]=t&255;a[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;a[11]=t/4294967296&255;a[12]=t>>>24&255;a[13]=t>>>16&255;a[14]=t>>>8&255;a[15]=t&255;return a}var n=parse;t["default"]=n},6230:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=a},9784:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){i.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},8844:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return i.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},1458:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const a=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,i.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var o=stringify;t["default"]=o},1595:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let r;let s=0;let p=0;function v1(e,t,a){let l=t&&a||0;const d=t||new Array(16);e=e||{};let c=e.node||o;let m=e.clockseq!==undefined?e.clockseq:r;if(c==null||m==null){const t=e.random||(e.rng||i.default)();if(c==null){c=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(m==null){m=r=(t[6]<<8|t[7])&16383}}let u=e.msecs!==undefined?e.msecs:Date.now();let f=e.nsecs!==undefined?e.nsecs:p+1;const h=u-s+(f-p)/1e4;if(h<0&&e.clockseq===undefined){m=m+1&16383}if((h<0||u>s)&&e.nsecs===undefined){f=0}if(f>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}s=u;p=f;r=m;u+=122192928e5;const g=((u&268435455)*1e4+f)%4294967296;d[l++]=g>>>24&255;d[l++]=g>>>16&255;d[l++]=g>>>8&255;d[l++]=g&255;const y=u/4294967296*1e4&268435455;d[l++]=y>>>8&255;d[l++]=y&255;d[l++]=y>>>24&15|16;d[l++]=y>>>16&255;d[l++]=m>>>8|128;d[l++]=m&255;for(let e=0;e<6;++e){d[l+e]=c[e]}return t||(0,n.default)(d)}var l=v1;t["default"]=l},6993:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(5842));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v3",48,n.default);var r=o;t["default"]=r},5920:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var i=_interopRequireDefault(a(1458));var n=_interopRequireDefault(a(6385));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(9784));var n=_interopRequireDefault(a(1458));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,a){e=e||{};const o=e.random||(e.rng||i.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){a=a||0;for(let e=0;e<16;++e){t[a+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},6217:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(5920));var n=_interopRequireDefault(a(8844));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,i.default)("v5",80,n.default);var r=o;t["default"]=r},2609:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(6230));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&i.default.test(e)}var n=validate;t["default"]=n},427:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var i=_interopRequireDefault(a(2609));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,i.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},1514:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const s=a(1576);const p=o(a(8159));function exec(e,t,a){return r(this,void 0,void 0,(function*(){const i=p.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];t=i.slice(1).concat(t||[]);const o=new p.ToolRunner(n,t,a);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,a){var i,n;return r(this,void 0,void 0,(function*(){let o="";let r="";const p=new s.StringDecoder("utf8");const l=new s.StringDecoder("utf8");const d=(i=a===null||a===void 0?void 0:a.listeners)===null||i===void 0?void 0:i.stdout;const c=(n=a===null||a===void 0?void 0:a.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{r+=l.write(e);if(c){c(e)}};const stdOutListener=e=>{o+=p.write(e);if(d){d(e)}};const m=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const u=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:m}));o+=p.end();r+=l.end();return{exitCode:u,stdout:o,stderr:r}}))}t.getExecOutput=getExecOutput},8159:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const s=o(a(2037));const p=o(a(2361));const l=o(a(2081));const d=o(a(1017));const c=o(a(7436));const m=o(a(1962));const u=a(9512);const f=process.platform==="win32";class ToolRunner extends p.EventEmitter{constructor(e,t,a){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=a||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const a=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=t?"":"[command]";if(f){if(this._isCmdFile()){n+=a;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${a}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(a);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=a;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,t,a){try{let i=t+e.toString();let n=i.indexOf(s.EOL);while(n>-1){const e=i.substring(0,n);a(e);i=i.substring(n+s.EOL.length);n=i.indexOf(s.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const i of e){if(t.some((e=>e===i))){a=true;break}}if(!a){return e}let i='"';let n=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(n&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.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='"';let a=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(a&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return r(this,void 0,void 0,(function*(){if(!m.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=d.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise(((e,t)=>r(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+s.EOL)}const i=new ExecState(a,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield m.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const o=l.spawn(n,this._getSpawnArgs(a),this._getSpawnOptions(this.options,n));let r="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}r=this._processLineBuffer(e,r,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let p="";if(o.stderr){o.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}p=this._processLineBuffer(e,p,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));o.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));o.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((a,i)=>{if(r.length>0){this.emit("stdline",r)}if(p.length>0){this.emit("errline",p)}o.removeAllListeners();if(a){t(a)}else{e(i)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let o=0;o0){t.push(n);n=""}continue}append(r)}if(n.length>0){t.push(n.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends p.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=u.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},8090:function(e,t,a){"use strict";var i=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.create=void 0;const n=a(8298);function create(e,t){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,t)}))}t.create=create},1026:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOptions=void 0;const r=o(a(2186));function getOptions(e){const t={followSymbolicLinks:true,implicitDescendants:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){t.followSymbolicLinks=e.followSymbolicLinks;r.debug(`followSymbolicLinks '${t.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){t.implicitDescendants=e.implicitDescendants;r.debug(`implicitDescendants '${t.implicitDescendants}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;r.debug(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)}}return t}t.getOptions=getOptions},8298:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],a;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(t){a[t]=e[t]&&function(a){return new Promise((function(i,n){a=e[t](a),settle(i,n,a.done,a.value)}))}}function settle(e,t,a,i){Promise.resolve(i).then((function(t){e({value:t,done:a})}),t)}};var p=this&&this.__await||function(e){return this instanceof p?(this.v=e,this):new p(e)};var l=this&&this.__asyncGenerator||function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(e,t||[]),n,o=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(t){return new Promise((function(a,i){o.push([e,t,a,i])>1||resume(e,t)}))}}function resume(e,t){try{step(i[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof p?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:true});t.DefaultGlobber=void 0;const d=o(a(2186));const c=o(a(7147));const m=o(a(1026));const u=o(a(1017));const f=o(a(9005));const h=a(1063);const g=a(4536);const y=a(9117);const v=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=m.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,t;return r(this,void 0,void 0,(function*(){const a=[];try{for(var i=s(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;a.push(e)}}catch(t){e={error:t}}finally{try{if(n&&!n.done&&(t=i.return))yield t.call(i)}finally{if(e)throw e.error}}return a}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=m.getOptions(this.options);const t=[];for(const a of this.patterns){t.push(a);if(e.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")){t.push(new g.Pattern(a.negate,true,a.segments.concat("**")))}}const a=[];for(const e of f.getSearchPaths(t)){d.debug(`Search path '${e}'`);try{yield p(c.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}a.unshift(new y.SearchState(e,1))}const i=[];while(a.length){const n=a.pop();const o=f.match(t,n.path);const r=!!o||f.partialMatch(t,n.path);if(!o&&!r){continue}const s=yield p(DefaultGlobber.stat(n,e,i));if(!s){continue}if(s.isDirectory()){if(o&h.MatchKind.Directory){yield yield p(n.path)}else if(!r){continue}const e=n.level+1;const t=(yield p(c.promises.readdir(n.path))).map((t=>new y.SearchState(u.join(n.path,t),e)));a.push(...t.reverse())}else if(o&h.MatchKind.File){yield yield p(n.path)}}}))}static create(e,t){return r(this,void 0,void 0,(function*(){const a=new DefaultGlobber(t);if(v){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{a.patterns.push(new g.Pattern(e))}}a.searchPaths.push(...f.getSearchPaths(a.patterns));return a}))}static stat(e,t,a){return r(this,void 0,void 0,(function*(){let i;if(t.followSymbolicLinks){try{i=yield c.promises.stat(e.path)}catch(a){if(a.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){d.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw a}}else{i=yield c.promises.lstat(e.path)}if(i.isDirectory()&&t.followSymbolicLinks){const t=yield c.promises.realpath(e.path);while(a.length>=e.level){a.pop()}if(a.some((e=>e===t))){d.debug(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return undefined}a.push(t)}return i}))}}t.DefaultGlobber=DefaultGlobber},1063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MatchKind=void 0;var a;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(a=t.MatchKind||(t.MatchKind={}))},1849:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.safeTrimTrailingSeparator=t.normalizeSeparators=t.hasRoot=t.hasAbsoluteRoot=t.ensureAbsoluteRoot=t.dirname=void 0;const s=o(a(1017));const p=r(a(9491));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let t=s.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)){t=safeTrimTrailingSeparator(t)}return t}t.dirname=dirname;function ensureAbsoluteRoot(e,t){p.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);p.default(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(t)){return t}if(l){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(t[0].toUpperCase()===e[0].toUpperCase()){if(t.length===2){return`${t[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${t[0]}:\\${e.substr(3)}${t.substr(2)}`}}else{return`${t[0]}:\\${t.substr(2)}`}}else if(normalizeSeparators(t).match(/^\\$|^\\[^\\]/)){const e=process.cwd();p.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${t.substr(1)}`}}p.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=s.sep}return e+t}t.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){p.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}t.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){p.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const t=/^\\\\+[^\\]/.test(e);return(t?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}t.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(s.sep)){return e}if(e===s.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}t.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Path=void 0;const s=o(a(1017));const p=o(a(1849));const l=r(a(9491));const d=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=p.safeTrimTrailingSeparator(e);if(!p.hasRoot(e)){this.segments=e.split(s.sep)}else{let t=e;let a=p.dirname(t);while(a!==t){const e=s.basename(t);this.segments.unshift(e);t=a;a=p.dirname(t)}this.segments.unshift(t)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;t!e.negate));const t={};for(const a of e){const e=p?a.searchPath.toUpperCase():a.searchPath;t[e]="candidate"}const a=[];for(const i of e){const e=p?i.searchPath.toUpperCase():i.searchPath;if(t[e]==="included"){continue}let n=false;let o=e;let s=r.dirname(o);while(s!==o){if(t[s]){n=true;break}o=s;s=r.dirname(o)}if(!n){a.push(i.searchPath);t[e]="included"}}return a}t.getSearchPaths=getSearchPaths;function match(e,t){let a=s.MatchKind.None;for(const i of e){if(i.negate){a&=~i.match(t)}else{a|=i.match(t)}}return a}t.match=match;function partialMatch(e,t){return e.some((e=>!e.negate&&e.partialMatch(t)))}t.partialMatch=partialMatch},4536:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const s=o(a(2037));const p=o(a(1017));const l=o(a(1849));const d=r(a(9491));const c=a(3973);const m=a(1063);const u=a(6836);const f=process.platform==="win32";class Pattern{constructor(e,t=false,a,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{a=a||[];d.default(a.length,`Parameter 'segments' must not empty`);const t=Pattern.getLiteral(a[0]);d.default(t&&l.hasAbsoluteRoot(t),`Parameter 'segments' first element must be a root path`);n=new u.Path(a).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new u.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(p.sep);n=l.safeTrimTrailingSeparator(n);let o=false;const r=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!o&&!(o=e==="")));this.searchPath=new u.Path(r).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(r[0]),f?"i":"");this.isImplicitPattern=t;const s={dot:true,nobrace:true,nocase:f,nocomment:true,noext:true,nonegate:true};n=f?n.replace(/\\/g,"/"):n;this.minimatch=new c.Minimatch(n,s)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(p.sep)&&this.isImplicitPattern===false){e=`${e}${p.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?m.MatchKind.Directory:m.MatchKind.All}return m.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(f?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(f?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,t){d.default(e,"pattern cannot be empty");const a=new u.Path(e).segments.map((e=>Pattern.getLiteral(e)));d.default(a.every(((e,t)=>(e!=="."||t===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);d.default(!l.hasRoot(e)||a[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${p.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${p.sep}`)){t=t||s.homedir();d.default(t,"Unable to determine HOME directory");d.default(l.hasAbsoluteRoot(t),`Expected HOME directory to be a rooted path. Actual '${t}'`);e=Pattern.globEscape(t)+e.substr(1)}else if(f&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let t=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(2)}else if(f&&(e==="\\"||e.match(/^\\[^\\]/))){let t=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!t.endsWith("\\")){t+="\\"}e=Pattern.globEscape(t)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let t="";for(let a=0;a=0){if(i.length>1){return""}if(i){t+=i;a=n;continue}}}t+=i}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}t.Pattern=Pattern},9117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SearchState=void 0;class SearchState{constructor(e,t){this.path=e;this.level=t}}t.SearchState=SearchState},5526:function(e,t){"use strict";var a=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{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 false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const s=o(a(3685));const p=o(a(5687));const l=o(a(9835));const d=o(a(4294));var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var m;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(m=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const h=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const y=10;const v=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 r(this,void 0,void 0,(function*(){return new Promise((e=>r(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,a){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=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,t){return r(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return r(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return r(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("POST",e,t,a||{})}))}patch(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,a||{})}))}put(e,t,a){return r(this,void 0,void 0,(function*(){return this.request("PUT",e,t,a||{})}))}head(e,t){return r(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,a,i){return r(this,void 0,void 0,(function*(){return this.request(e,t,a,i)}))}getJson(e,t={}){return r(this,void 0,void 0,(function*(){t[m.Accept]=this._getExistingOrDefaultHeader(t,m.Accept,u.ApplicationJson);const a=yield this.get(e,t);return this._processResponse(a,this.requestOptions)}))}postJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.post(e,i,a);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.put(e,i,a);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,a={}){return r(this,void 0,void 0,(function*(){const i=JSON.stringify(t,null,2);a[m.Accept]=this._getExistingOrDefaultHeader(a,m.Accept,u.ApplicationJson);a[m.ContentType]=this._getExistingOrDefaultHeader(a,m.ContentType,u.ApplicationJson);const n=yield this.patch(e,i,a);return this._processResponse(n,this.requestOptions)}))}request(e,t,a,i){return r(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,i);const r=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let s=0;let p;do{p=yield this.requestRaw(o,a);if(p&&p.message&&p.message.statusCode===c.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(p)){e=t;break}}if(e){return e.handleAuthentication(this,o,a)}else{return p}}let t=this._maxRedirects;while(p.message.statusCode&&f.includes(p.message.statusCode)&&this._allowRedirects&&t>0){const r=p.message.headers["location"];if(!r){break}const s=new URL(r);if(n.protocol==="https:"&&n.protocol!==s.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.")}yield p.readBody();if(s.hostname!==n.hostname){for(const e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}o=this._prepareRequest(e,s,i);p=yield this.requestRaw(o,a);t--}if(!p.message.statusCode||!h.includes(p.message.statusCode)){return p}s+=1;if(s{function callbackForResult(e,t){if(e){i(e)}else if(!t){i(new Error("Unknown error"))}else{a(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,a){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;function handleResult(e,t){if(!i){i=true;a(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,a){const i={};i.parsedUrl=t;const n=i.parsedUrl.protocol==="https:";i.httpModule=n?p:s;const o=n?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(i.options)}}return i}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,a){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||i||a}_getAgent(e){let t;const a=l.getProxyUrl(e);const i=a&&a.hostname;if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(a&&a.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`}),{host:a.hostname,port:a.port})};let i;const r=a.protocol==="https:";if(n){i=r?d.httpsOverHttps:d.httpsOverHttp}else{i=r?d.httpOverHttps:d.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new p.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=n?p.globalAgent:s.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return r(this,void 0,void 0,(function*(){e=Math.min(y,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return r(this,void 0,void 0,(function*(){return new Promise(((a,i)=>r(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===c.NotFound){a(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let r;let s;try{s=yield e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){r=JSON.parse(s,dateTimeDeserializer)}else{r=JSON.parse(s)}o.result=r}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(r&&r.message){e=r.message}else if(s&&s.length>0){e=s}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;i(t)}else{a(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,a)=>(t[a.toLowerCase()]=e[a],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const a=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(a){return new URL(a)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const i=[e.hostname.toUpperCase()];if(typeof a==="number"){i.push(`${i[0]}:${a}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},1962:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const p=o(a(7147));const l=o(a(1017));s=p.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return r(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,a=false){return r(this,void 0,void 0,(function*(){const i=a?yield t.stat(e):yield t.lstat(e);return i.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,a){return r(this,void 0,void 0,(function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(a.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const o of a){e=n+o;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const a=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield t.readdir(a)){if(i===n.toUpperCase()){e=l.join(a,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const s=a(9491);const p=o(a(2081));const l=o(a(1017));const d=a(3837);const c=o(a(1962));const m=d.promisify(p.exec);const u=d.promisify(p.execFile);function cp(e,t,a={}){return r(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:o}=readCopyOptions(a);const r=(yield c.exists(t))?yield c.stat(t):null;if(r&&r.isFile()&&!i){return}const s=r&&r.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const p=yield c.stat(e);if(p.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,i)}}else{if(l.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,i)}}))}t.cp=cp;function mv(e,t,a={}){return r(this,void 0,void 0,(function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=l.join(t,l.basename(e));i=yield c.exists(t)}if(i){if(a.force==null||a.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return r(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=c.getCmdPath();if(yield c.isDirectory(e,true)){yield m(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield m(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield c.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield c.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm`,[`-rf`,`${e}`])}else{yield c.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return r(this,void 0,void 0,(function*(){s.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}t.which=which;function findInPath(e){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const a=yield c.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(l.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){a.push(e)}}}const i=[];for(const n of a){const a=yield c.tryGetExecutablePath(l.join(n,e),t);if(a){i.push(a)}}return i}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:i}}function cpDirRecursive(e,t,a,i){return r(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const n=yield c.readdir(e);for(const o of n){const n=`${e}/${o}`;const r=`${t}/${o}`;const s=yield c.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,r,a,i)}else{yield copyFile(n,r,i)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,a){return r(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const a=yield c.readlink(e);yield c.symlink(a,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||a){yield c.copyFile(e,t)}}))}},2473:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(a(5911));const p=a(2186);const l=a(2037);const d=a(2081);const c=a(7147);function _findMatch(t,a,i,n){return r(this,void 0,void 0,(function*(){const o=l.platform();let r;let d;let c;for(const r of i){const i=r.version;p.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!a||r.stable===a)){c=r.files.find((t=>{p.debug(`${t.arch}===${n} && ${t.platform}===${o}`);let a=t.arch===n&&t.platform===o;if(a&&t.platform_version){const i=e.exports._getOsVersion();if(i===t.platform_version){a=true}else{a=s.satisfies(i,t.platform_version)}}return a}));if(c){p.debug(`matched ${r.version}`);d=r;break}}}if(d&&c){r=Object.assign({},d);r.files=[c]}return r}))}t._findMatch=_findMatch;function _getOsVersion(){const t=l.platform();let a="";if(t==="darwin"){a=d.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){a=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return a}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let a="";if(c.existsSync(e)){a=c.readFileSync(e).toString()}else if(c.existsSync(t)){a=c.readFileSync(t).toString()}return a}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const s=o(a(2186));class RetryHelper{constructor(e,t,a){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(a);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return r(this,void 0,void 0,(function*(){let a=1;while(asetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,a,i){if(i===undefined)i=a;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,i){if(i===undefined)i=a;e[i]=t[a]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))i(t,e,a);n(t,e);return t};var r=this&&this.__awaiter||function(e,t,a,i){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const p=o(a(2186));const l=o(a(7436));const d=o(a(7147));const c=o(a(2473));const m=o(a(2037));const u=o(a(1017));const f=o(a(6255));const h=o(a(5911));const g=o(a(2781));const y=o(a(3837));const v=a(9491);const b=s(a(824));const x=a(1514);const w=a(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const S=process.platform==="win32";const N=process.platform==="darwin";const k="actions/tool-cache";function downloadTool(e,t,a,i){return r(this,void 0,void 0,(function*(){t=t||u.join(_getTempDirectory(),b.default());yield l.mkdirP(u.dirname(t));p.debug(`Downloading ${e}`);p.debug(`Destination ${t}`);const n=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const d=new w.RetryHelper(n,o,s);return yield d.execute((()=>r(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",a,i)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,a,i){return r(this,void 0,void 0,(function*(){if(d.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new f.HttpClient(k,[],{allowRetries:false});if(a){p.debug("set auth");if(i===undefined){i={}}i.authorization=a}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);p.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const r=y.promisify(g.pipeline);const s=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const c=s();let m=false;try{yield r(c,d.createWriteStream(t));p.debug("download complete");m=true;return t}finally{if(!m){p.debug("download failed");try{yield l.rmRF(t)}catch(e){p.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,a){return r(this,void 0,void 0,(function*(){v.ok(S,"extract7z() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const i=process.cwd();process.chdir(t);if(a){try{const t=p.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield x.exec(`"${a}"`,n,o)}finally{process.chdir(i)}}else{const a=u.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const r=`& '${a}' -Source '${n}' -Target '${o}'`;const s=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",r];const p={silent:true};try{const e=yield l.which("powershell",true);yield x.exec(`"${e}"`,s,p)}finally{process.chdir(i)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,a="xz"){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);p.debug("Checking tar --version");let i="";yield x.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>i+=e.toString(),stderr:e=>i+=e.toString()}});p.debug(i.trim());const n=i.toUpperCase().includes("GNU TAR");let o;if(a instanceof Array){o=a}else{o=[a]}if(p.isDebug()&&!a.includes("v")){o.push("-v")}let r=t;let s=e;if(S&&n){o.push("--force-local");r=t.replace(/\\/g,"/");s=e.replace(/\\/g,"/")}if(n){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",r,"-f",s);yield x.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,a=[]){return r(this,void 0,void 0,(function*(){v.ok(N,"extractXar() not supported on current OS");v.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let i;if(a instanceof Array){i=a}else{i=[a]}i.push("-x","-C",t,"-f",e);if(p.isDebug()){i.push("-v")}const n=yield l.which("xar",true);yield x.exec(`"${n}"`,_unique(i));return t}))}t.extractXar=extractXar;function extractZip(e,t){return r(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(S){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return r(this,void 0,void 0,(function*(){const a=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=yield l.which("pwsh",false);if(n){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${a}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];p.debug(`Using pwsh at path: ${n}`);yield x.exec(`"${n}"`,t)}else{const e=[`$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 '${a}' -DestinationPath '${i}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${a}', '${i}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const n=yield l.which("powershell",true);p.debug(`Using powershell at path: ${n}`);yield x.exec(`"${n}"`,t)}}))}function extractZipNix(e,t){return r(this,void 0,void 0,(function*(){const a=yield l.which("unzip",true);const i=[e];if(!p.isDebug()){i.unshift("-q")}i.unshift("-o");yield x.exec(`"${a}"`,i,{cwd:t})}))}function cacheDir(e,t,a,i){return r(this,void 0,void 0,(function*(){a=h.clean(a)||a;i=i||m.arch();p.debug(`Caching tool ${t} ${a} ${i}`);p.debug(`source dir: ${e}`);if(!d.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,a,i);for(const t of d.readdirSync(e)){const a=u.join(e,t);yield l.cp(a,n,{recursive:true})}_completeToolPath(t,a,i);return n}))}t.cacheDir=cacheDir;function cacheFile(e,t,a,i,n){return r(this,void 0,void 0,(function*(){i=h.clean(i)||i;n=n||m.arch();p.debug(`Caching tool ${a} ${i} ${n}`);p.debug(`source file: ${e}`);if(!d.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(a,i,n);const r=u.join(o,t);p.debug(`destination file ${r}`);yield l.cp(e,r);_completeToolPath(a,i,n);return o}))}t.cacheFile=cacheFile;function find(e,t,a){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}a=a||m.arch();if(!isExplicitVersion(t)){const i=findAllVersions(e,a);const n=evaluateVersions(i,t);t=n}let i="";if(t){t=h.clean(t)||"";const n=u.join(_getCacheDirectory(),e,t,a);p.debug(`checking cache: ${n}`);if(d.existsSync(n)&&d.existsSync(`${n}.complete`)){p.debug(`Found tool in cache ${e} ${t} ${a}`);i=n}else{p.debug("not found")}}return i}t.find=find;function findAllVersions(e,t){const a=[];t=t||m.arch();const i=u.join(_getCacheDirectory(),e);if(d.existsSync(i)){const e=d.readdirSync(i);for(const n of e){if(isExplicitVersion(n)){const e=u.join(i,n,t||"");if(d.existsSync(e)&&d.existsSync(`${e}.complete`)){a.push(n)}}}}return a}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,a,i="master"){return r(this,void 0,void 0,(function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const r=new f.HttpClient("tool-cache");const s={};if(a){p.debug("set auth");s.authorization=a}const l=yield r.getJson(o,s);if(!l.result){return n}let d="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){d=e.url;break}}s["accept"]="application/vnd.github.VERSION.raw";let c=yield(yield r.get(d,s)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{n=JSON.parse(c)}catch(e){p.debug("Invalid json")}}return n}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,a,i=m.arch()){return r(this,void 0,void 0,(function*(){const n=yield c._findMatch(e,t,a,i);return n}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return r(this,void 0,void 0,(function*(){if(!e){e=u.join(_getTempDirectory(),b.default())}yield l.mkdirP(e);return e}))}function _createToolPath(e,t,a){return r(this,void 0,void 0,(function*(){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");p.debug(`destination ${i}`);const n=`${i}.complete`;yield l.rmRF(i);yield l.rmRF(n);yield l.mkdirP(i);return i}))}function _completeToolPath(e,t,a){const i=u.join(_getCacheDirectory(),e,h.clean(t)||t,a||"");const n=`${i}.complete`;d.writeFileSync(n,"");p.debug("finished caching tool")}function isExplicitVersion(e){const t=h.clean(e)||"";p.debug(`isExplicit: ${t}`);const a=h.valid(t)!=null;p.debug(`explicit? ${a}`);return a}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let a="";p.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(h.gt(e,t)){return 1}return-1}));for(let i=e.length-1;i>=0;i--){const n=e[i];const o=h.satisfies(n,t);if(o){a=n;break}}if(a){p.debug(`matched: ${a}`)}else{p.debug("match not found")}return a}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";v.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";v.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const a=global[e];return a!==undefined?a:t}function _unique(e){return Array.from(new Set(e))}},2557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const a=new WeakMap;const i=new WeakMap;class AbortSignal{constructor(){this.onabort=null;a.set(this,[]);i.set(this,false)}get aborted(){if(!i.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return i.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);i.push(t)}removeEventListener(e,t){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const i=a.get(this);const n=i.indexOf(t);if(n>-1){i.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used.  It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=a.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}i.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const a=setTimeout(abortSignal,e,t);if(typeof a.unref==="function"){a.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},9645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class AzureKeyCredential{constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}get key(){return this._key}update(e){this._key=e}}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const a of t){if(!objectHasProperty(e,a)){return false}}return true}function objectHasProperty(e,t){return typeof e==="object"&&t in e}class AzureNamedKeyCredential{constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}get key(){return this._key}get name(){return this._name}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}get signature(){return this._signature}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},4607:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=a(3415);var n=a(3837);var o=a(2107);var r=a(6189);var s=a(1333);var p=a(3233);var l=a(9645);var d=a(2037);var c=a(3685);var m=a(5687);var u=a(8165);var f=a(2557);var h=a(4294);var g=a(2781);var y=a(6279);var v=a(467);var b=a(4175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(a){if(a!=="default"){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:true,get:function(){return e[a]}})}}))}t["default"]=e;return Object.freeze(t)}var x=_interopNamespace(r);var w=_interopNamespace(d);var S=_interopNamespace(c);var N=_interopNamespace(m);var k=_interopNamespace(u);var C=_interopNamespace(h);var j=_interopDefaultLegacy(y);var P=_interopDefaultLegacy(v);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let a=0;a{a=a.then(e)}));return a}function promiseToCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>t(undefined,e))).catch((e=>{t(e)}))}}function promiseToServiceCallback(e){if(typeof e.then!=="function"){throw new Error("The provided input is not a Promise.")}return t=>{e.then((e=>process.nextTick(t,undefined,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function prepareXMLRootList(e,t,a,i){if(!Array.isArray(e)){e=[e]}if(!a||!i){return{[t]:e}}const n={[t]:e};n[T]={[a]:i};return n}function applyMixins(e,t){const a=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{a.prototype[t]=e.prototype[t]}))}))}const D=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function isDuration(e){return D.test(e)}function replaceAll(e,t,a){return!e||!t?e:e.split(t).join(a||"")}function isPrimitiveType(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function getEnvironmentValue(e){if(process.env[e]){return process.env[e]}else if(process.env[e.toLowerCase()]){return process.env[e.toLowerCase()]}return undefined}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}class Serializer{constructor(e={},t){this.modelMappers=e;this.isXML=t}validateConstraints(e,t,a){const failValidation=(e,i)=>{throw new Error(`"${a}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&t!=undefined){const a=t;const{ExclusiveMaximum:i,ExclusiveMinimum:n,InclusiveMaximum:o,InclusiveMinimum:r,MaxItems:s,MaxLength:p,MinItems:l,MinLength:d,MultipleOf:c,Pattern:m,UniqueItems:u}=e.constraints;if(i!=undefined&&a>=i){failValidation("ExclusiveMaximum",i)}if(n!=undefined&&a<=n){failValidation("ExclusiveMinimum",n)}if(o!=undefined&&a>o){failValidation("InclusiveMaximum",o)}if(r!=undefined&&as){failValidation("MaxItems",s)}if(p!=undefined&&f.length>p){failValidation("MaxLength",p)}if(l!=undefined&&f.lengtha.indexOf(e)!==t))){failValidation("UniqueItems",u)}}}serialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};let p={};const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Sequence$/i)!==null){p=[]}if(e.isConstant){t=e.defaultValue}const{required:d,nullable:c}=e;if(d&&c&&t===undefined){throw new Error(`${a} cannot be undefined.`)}if(d&&!c&&t==undefined){throw new Error(`${a} cannot be null or undefined.`)}if(!d&&c===false&&t===null){throw new Error(`${a} cannot be null.`)}if(t==undefined){p=t}else{if(l.match(/^any$/i)!==null){p=t}else if(l.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){p=serializeBasicTypes(l,a,t)}else if(l.match(/^Enum$/i)!==null){const i=e;p=serializeEnumType(a,i.type.allowedValues,t)}else if(l.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){p=serializeDateTypes(l,t,a)}else if(l.match(/^ByteArray$/i)!==null){p=serializeByteArrayType(a,t)}else if(l.match(/^Base64Url$/i)!==null){p=serializeBase64UrlType(a,t)}else if(l.match(/^Sequence$/i)!==null){p=serializeSequenceType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Dictionary$/i)!==null){p=serializeDictionaryType(this,e,t,a,Boolean(this.isXML),s)}else if(l.match(/^Composite$/i)!==null){p=serializeCompositeType(this,e,t,a,Boolean(this.isXML),s)}}return p}deserialize(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}let p;const l=e.type.name;if(!a){a=e.serializedName}if(l.match(/^Composite$/i)!==null){p=deserializeCompositeType(this,e,t,a,s)}else{if(this.isXML){const e=s.xmlCharKey;const a=t;if(a[T]!=undefined&&a[e]!=undefined){t=a[e]}}if(l.match(/^Number$/i)!==null){p=parseFloat(t);if(isNaN(p)){p=t}}else if(l.match(/^Boolean$/i)!==null){if(t==="true"){p=true}else if(t==="false"){p=false}else{p=t}}else if(l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){p=t}else if(l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){p=new Date(t)}else if(l.match(/^UnixTime$/i)!==null){p=unixTimeToDate(t)}else if(l.match(/^ByteArray$/i)!==null){p=decodeString(t)}else if(l.match(/^Base64Url$/i)!==null){p=base64UrlToByteArray(t)}else if(l.match(/^Sequence$/i)!==null){p=deserializeSequenceType(this,e,t,a,s)}else if(l.match(/^Dictionary$/i)!==null){p=deserializeDictionaryType(this,e,t,a,s)}}if(e.isConstant){p=e.defaultValue}return p}}function trimEnd(e,t){let a=e.length;while(a-1>=0&&e[a-1]===t){--a}return e.substr(0,a)}function bufferToBase64Url(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`)}const t=encodeByteArray(e);return trimEnd(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function base64UrlToByteArray(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return decodeString(e)}function splitSerializeName(e){const t=[];let a="";if(e){const i=e.split(".");for(const e of i){if(e.charAt(e.length-1)==="\\"){a+=e.substr(0,e.length-1)+"."}else{a+=e;t.push(a);a=""}}}return t}function dateToUnixTime(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function unixTimeToDate(e){if(!e){return undefined}return new Date(e*1e3)}function serializeBasicTypes(e,t,a){if(a!==null&&a!==undefined){if(e.match(/^Number$/i)!==null){if(typeof a!=="number"){throw new Error(`${t} with value ${a} must be of type number.`)}}else if(e.match(/^String$/i)!==null){if(typeof a.valueOf()!=="string"){throw new Error(`${t} with value "${a}" must be of type string.`)}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof a.valueOf()==="string"&&isValidUuid(a))){throw new Error(`${t} with value "${a}" must be of type string and a valid uuid.`)}}else if(e.match(/^Boolean$/i)!==null){if(typeof a!=="boolean"){throw new Error(`${t} with value ${a} must be of type boolean.`)}}else if(e.match(/^Stream$/i)!==null){const e=typeof a;if(e!=="string"&&e!=="function"&&!(a instanceof ArrayBuffer)&&!ArrayBuffer.isView(a)&&!((typeof Blob==="function"||typeof Blob==="object")&&a instanceof Blob)){throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}}}return a}function serializeEnumType(e,t,a){if(!t){throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`)}const i=t.some((e=>{if(typeof e.valueOf()==="string"){return e.toLowerCase()===a.toLowerCase()}return e===a}));if(!i){throw new Error(`${a} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`)}return a}function serializeByteArrayType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=encodeByteArray(t)}return a}function serializeBase64UrlType(e,t){let a="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error(`${e} must be of type Uint8Array.`)}a=bufferToBase64Url(t)||""}return a}function serializeDateTypes(e,t,a){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`)}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123 format.`)}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error(`${a} must be an instanceof Date or a string in RFC-1123/ISO8601 format `+`for it to be serialized in UnixTime/Epoch format.`)}t=dateToUnixTime(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!isDuration(t)){throw new Error(`${a} must be a string in ISO 8601 format. Instead was "${t}".`)}}}return t}function serializeSequenceType(e,t,a,i,n,o){if(!Array.isArray(a)){throw new Error(`${i} must be of type Array.`)}const r=t.type.element;if(!r||typeof r!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}.`)}const s=[];for(let t=0;te!==n));if(s){r[n]=e.serialize(p,a[n],i+'["'+n+'"]',o)}}}return r}return a}function getXmlObjectValue(e,t,a,i){if(!a||!e.xmlNamespace){return t}const n=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns";const o={[n]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[T]){return t}else{const e=Object.assign({},t);e[T]=o;return e}}const r={};r[i.xmlCharKey]=t;r[T]=o;return r}function isSpecialXmlProperty(e,t){return[T,t.xmlCharKey].includes(e)}function deserializeCompositeType(e,t,a,i,n){var o,r;const s=(o=n.xmlCharKey)!==null&&o!==void 0?o:O;if(getPolymorphicDiscriminatorRecursively(e,t)){t=getPolymorphicMapper(e,t,a,"serializedName")}const p=resolveModelProperties(e,t,i);let l={};const d=[];for(const o of Object.keys(p)){const c=p[o];const m=splitSerializeName(p[o].serializedName);d.push(m[0]);const{serializedName:u,xmlName:f,xmlElementName:h}=c;let g=i;if(u!==""&&u!==undefined){g=i+"."+u}const y=c.headerCollectionPrefix;if(y){const t={};for(const i of Object.keys(a)){if(i.startsWith(y)){t[i.substring(y.length)]=e.deserialize(c.type.value,a[i],g,n)}d.push(i)}l[o]=t}else if(e.isXML){if(c.xmlIsAttribute&&a[T]){l[o]=e.deserialize(c,a[T][f],g,n)}else if(c.xmlIsMsText){if(a[s]!==undefined){l[o]=a[s]}else if(typeof a==="string"){l[o]=a}}else{const t=h||f||u;if(c.xmlIsWrapped){const t=a[f];const i=(r=t===null||t===void 0?void 0:t[h])!==null&&r!==void 0?r:[];l[o]=e.deserialize(c,i,g,n)}else{const i=a[t];l[o]=e.deserialize(c,i,g,n)}}}else{let i;let r=a;for(const e of m){if(!r)break;r=r[e]}i=r;const s=t.type.polymorphicDiscriminator;if(s&&o===s.clientName&&i==undefined){i=t.serializedName}let d;if(Array.isArray(a[o])&&p[o].serializedName===""){i=a[o];const t=e.deserialize(c,i,g,n);for(const[e,a]of Object.entries(l)){if(!Object.prototype.hasOwnProperty.call(t,e)){t[e]=a}}l=t}else if(i!==undefined||c.defaultValue!==undefined){d=e.deserialize(c,i,g,n);l[o]=d}}}const c=t.type.additionalProperties;if(c){const isAdditionalProperty=e=>{for(const t in p){const a=splitSerializeName(p[t].serializedName);if(a[0]===e){return false}}return true};for(const t in a){if(isAdditionalProperty(t)){l[t]=e.deserialize(c,a[t],i+'["'+t+'"]',n)}}}else if(a){for(const e of Object.keys(a)){if(l[e]===undefined&&!d.includes(e)&&!isSpecialXmlProperty(e,n)){l[e]=a[e]}}}return l}function deserializeDictionaryType(e,t,a,i,n){const o=t.type.value;if(!o||typeof o!=="object"){throw new Error(`"value" metadata for a Dictionary must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){const t={};for(const r of Object.keys(a)){t[r]=e.deserialize(o,a[r],i,n)}return t}return a}function deserializeSequenceType(e,t,a,i,n){const o=t.type.element;if(!o||typeof o!=="object"){throw new Error(`element" metadata for an Array must be defined in the `+`mapper and it must of type "object" in ${i}`)}if(a){if(!Array.isArray(a)){a=[a]}const t=[];for(let r=0;r0}keys(){return Object.keys(this._rawQuery)}set(e,t){const a=t;if(e){if(a!==undefined&&a!==null){const t=Array.isArray(a)?a:a.toString();this._rawQuery[e]=t}else{delete this._rawQuery[e]}}}get(e){return e?this._rawQuery[e]:undefined}toString(){let e="";for(const t in this._rawQuery){if(e){e+="&"}const a=this._rawQuery[t];if(Array.isArray(a)){const i=[];for(const e of a){i.push(`${t}=${e}`)}e+=i.join("&")}else{e+=`${t}=${a}`}}return e}static parse(e){const t=new URLQuery;if(e){if(e.startsWith("?")){e=e.substring(1)}let a="ParameterName";let i="";let n="";for(let o=0;oisAlphaNumericCharacter(e)))}function readUntilCharacter(e,...t){return readWhile(e,(e=>t.indexOf(e)===-1))}function nextScheme(e){const t=readWhileLetterOrDigit(e);e._currentToken=URLToken.scheme(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="HOST"}}function nextSchemeOrHost(e){const t=readUntilCharacter(e,":","/","?");if(!hasCurrentCharacter(e)){e._currentToken=URLToken.host(t);e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){if(peekCharacters(e,3)==="://"){e._currentToken=URLToken.scheme(t);e._currentState="HOST"}else{e._currentToken=URLToken.host(t);e._currentState="PORT"}}else{e._currentToken=URLToken.host(t);if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}}function nextHost(e){if(peekCharacters(e,3)==="://"){nextCharacter(e,3)}const t=readUntilCharacter(e,":","/","?");e._currentToken=URLToken.host(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)===":"){e._currentState="PORT"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPort(e){if(getCurrentCharacter(e)===":"){nextCharacter(e)}const t=readUntilCharacter(e,"/","?");e._currentToken=URLToken.port(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else if(getCurrentCharacter(e)==="/"){e._currentState="PATH"}else{e._currentState="QUERY"}}function nextPath(e){const t=readUntilCharacter(e,"?");e._currentToken=URLToken.path(t);if(!hasCurrentCharacter(e)){e._currentState="DONE"}else{e._currentState="QUERY"}}function nextQuery(e){if(getCurrentCharacter(e)==="?"){nextCharacter(e)}const t=readRemaining(e);e._currentToken=URLToken.query(t);e._currentState="DONE"}function createProxyAgent(e,t,a){const i=URLBuilder.parse(t.host).getHost();if(!i){throw new Error("Expecting a non-empty host in proxy settings.")}if(!isValidPort(t.port)){throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.")}const n={proxy:{host:i,port:t.port,headers:a&&a.rawHeaders()||{}}};if(t.username&&t.password){n.proxy.proxyAuth=`${t.username}:${t.password}`}else if(t.username){n.proxy.proxyAuth=`${t.username}`}const o=isUrlHttps(e);const r=isUrlHttps(t.host);const s={isHttps:o,agent:createTunnel(o,r,n)};return s}function isUrlHttps(e){const t=URLBuilder.parse(e).getScheme()||"";return t.toLowerCase()==="https"}function createTunnel(e,t,a){if(e&&t){return C.httpsOverHttps(a)}else if(e&&!t){return C.httpsOverHttp(a)}else if(!e&&t){return C.httpOverHttps(a)}else{return C.httpOverHttp(a)}}function isValidPort(e){return 0<=e&&e<=65535}const A="REDACTED";const I=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"];const M=["api-version"];class Sanitizer{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?I.concat(e):I;t=Array.isArray(t)?M.concat(t):M;this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase())));this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,a)=>{if(a instanceof Error){return Object.assign(Object.assign({},a),{name:a.name,message:a.message})}if(e==="_headersMap"){return this.sanitizeHeaders(a)}else if(e==="url"){return this.sanitizeUrl(a)}else if(e==="query"){return this.sanitizeQuery(a)}else if(e==="body"){return undefined}else if(e==="response"){return undefined}else if(e==="operationSpec"){return undefined}else if(Array.isArray(a)||isObject(a)){if(t.has(a)){return"[Circular]"}t.add(a)}return a}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,a){if(typeof e!=="object"||e===null){return e}const i={};for(const n of Object.keys(e)){if(t.has(n.toLowerCase())){i[n]=a(e,n)}else{i[n]=A}}return i}sanitizeUrl(e){if(typeof e!=="string"||e===null){return e}const t=URLBuilder.parse(e);const a=t.getQuery();if(!a){return e}const i=URLQuery.parse(a);for(const e of i.keys()){if(!this.allowedQueryParameters.has(e.toLowerCase())){i.set(e,A)}}t.setQuery(i.toString());return t.toString()}}const B=n.inspect.custom;const L=new Sanitizer;class RestError extends Error{constructor(e,t,a,i,n){super(e);this.name="RestError";this.code=t;this.statusCode=a;this.request=i;this.response=n;Object.setPrototypeOf(this,RestError.prototype)}[B](){return`RestError: ${this.message} \n ${L.sanitize(this)}`}}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";RestError.PARSE_ERROR="PARSE_ERROR";const q=p.createClientLogger("core-http");function getCachedAgent(e,t){return e?t.httpsAgent:t.httpAgent}class ReportTransform extends g.Transform{constructor(e){super();this.progressCallback=e;this.loadedBytes=0}_transform(e,t,a){this.push(e);this.loadedBytes+=e.length;this.progressCallback({loadedBytes:this.loadedBytes});a(undefined)}}function isReadableStream(e){return e&&typeof e.pipe==="function"}function isStreamComplete(e,t){return new Promise((a=>{e.once("close",(()=>{t===null||t===void 0?void 0:t.abort();a()}));e.once("end",a);e.once("error",a)}))}function parseHeaders(e){const t=new HttpHeaders;e.forEach(((e,a)=>{t.set(a,e)}));return t}class NodeFetchHttpClient{constructor(){this.proxyAgentMap=new Map;this.keepAliveAgents={};this.cookieJar=new k.CookieJar(undefined,{looseMode:true})}async sendRequest(e){var t;if(!e&&typeof e!=="object"){throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.")}const a=new f.AbortController;let i;if(e.abortSignal){if(e.abortSignal.aborted){throw new f.AbortError("The operation was aborted.")}i=e=>{if(e.type==="abort"){a.abort()}};e.abortSignal.addEventListener("abort",i)}if(e.timeout){setTimeout((()=>{a.abort()}),e.timeout)}if(e.formData){const t=e.formData;const a=new j["default"];const appendFormValue=(e,t)=>{if(typeof t==="function"){t=t()}if(t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")){a.append(e,t.value,t.options)}else{a.append(e,t)}};for(const e of Object.keys(t)){const a=t[e];if(Array.isArray(a)){for(let t=0;t{var t;(t=e.abortSignal)===null||t===void 0?void 0:t.removeEventListener("abort",i);return})).catch((e=>{q.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const a=isUrlHttps(e.url);if(e.proxySettings){const{host:i,port:n,username:o,password:r}=e.proxySettings;const s=`${i}:${n}:${o}:${r}`;const p=(t=this.proxyAgentMap.get(s))!==null&&t!==void 0?t:{};let l=getCachedAgent(a,p);if(l){return l}const d=createProxyAgent(e.url,e.proxySettings,e.headers);l=d.agent;if(d.isHttps){p.httpsAgent=d.agent}else{p.httpAgent=d.agent}this.proxyAgentMap.set(s,p);return l}else if(e.keepAlive){let t=getCachedAgent(a,this.keepAliveAgents);if(t){return t}const i={keepAlive:e.keepAlive};if(a){t=this.keepAliveAgents.httpsAgent=new N.Agent(i)}else{t=this.keepAliveAgents.httpAgent=new S.Agent(i)}return t}else{return a?N.globalAgent:S.globalAgent}}async fetch(e,t){return P["default"](e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,a)=>{this.cookieJar.getCookieString(e.url,((e,i)=>{if(e){a(e)}else{t(i)}}))}));e.headers.set("Cookie",t)}t.agent=this.getOrCreateAgent(e);t.compress=e.decompressResponse;return t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");if(t!==undefined){await new Promise(((a,i)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:true},(e=>{if(e){i(e)}else{a()}}))}))}}}}t.HttpPipelineLogLevel=void 0;(function(e){e[e["OFF"]=0]="OFF";e[e["ERROR"]=1]="ERROR";e[e["WARNING"]=2]="WARNING";e[e["INFO"]=3]="INFO"})(t.HttpPipelineLogLevel||(t.HttpPipelineLogLevel={}));function operationOptionsToRequestOptionsBase(e){const{requestOptions:t,tracingOptions:a}=e,i=o.__rest(e,["requestOptions","tracingOptions"]);let n=i;if(t){n=Object.assign(Object.assign({},n),t)}if(a){n.tracingContext=a.tracingContext;n.spanOptions=a===null||a===void 0?void 0:a.spanOptions}return n}class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}class RequestPolicyOptions{constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==t.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,t){if(this._logger&&this.shouldLog(e)){this._logger.log(e,t)}}}const U={explicitCharkey:false,trim:false,normalize:false,normalizeTags:false,attrkey:T,explicitArray:true,ignoreAttrs:false,mergeAttrs:false,explicitRoot:true,validator:undefined,xmlns:false,explicitChildren:false,preserveChildrenOrder:false,childkey:"$$",charsAsChildren:false,includeWhiteChars:false,async:false,strict:true,attrNameProcessors:undefined,attrValueProcessors:undefined,tagNameProcessors:undefined,valueProcessors:undefined,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:true},doctype:undefined,renderOpts:{pretty:true,indent:"  ",newline:"\n"},headless:false,chunkSize:1e4,emptyTag:"",cdata:false};const H=Object.assign({},U);H.explicitArray=false;const V=Object.assign({},U);V.explicitArray=false;V.renderOpts={pretty:false};function stringifyXML(e,t={}){var a;V.rootName=t.rootName;V.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Builder(V);return i.buildObject(e)}function parseXML(e,t={}){var a;H.explicitRoot=!!t.includeRoot;H.charkey=(a=t.xmlCharKey)!==null&&a!==void 0?a:O;const i=new x.Parser(H);return new Promise(((t,a)=>{if(!e){a(new Error("Document is empty"))}else{i.parseString(e,((e,i)=>{if(e){a(e)}else{t(i)}}))}}))}function deserializationPolicy(e,t){return{create:(a,i)=>new DeserializationPolicy(a,i,e,t)}}const $=["application/json","text/json"];const X=["application/xml","application/atom+xml"];const G={expectedContentTypes:{json:$,xml:X}};class DeserializationPolicy extends BaseRequestPolicy{constructor(e,t,a,i={}){var n;super(e,t);this.jsonContentTypes=a&&a.json||$;this.xmlContentTypes=a&&a.xml||X;this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:O}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>deserializeResponseBody(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function getOperationResponse(e){let t;const a=e.request;const i=a.operationSpec;if(i){const n=a.operationResponseGetter;if(!n){t=i.responses[e.status]}else{t=n(i,e)}}return t}function shouldDeserializeResponse(e){const t=e.request.shouldDeserialize;let a;if(t===undefined){a=true}else if(typeof t==="boolean"){a=t}else{a=t(e)}return a}function deserializeResponseBody(e,t,a,i={}){var n,o,r;const s={rootName:(n=i.rootName)!==null&&n!==void 0?n:"",includeRoot:(o=i.includeRoot)!==null&&o!==void 0?o:false,xmlCharKey:(r=i.xmlCharKey)!==null&&r!==void 0?r:O};return parse(e,t,a,s).then((e=>{if(!shouldDeserializeResponse(e)){return e}const t=e.request.operationSpec;if(!t||!t.responses){return e}const n=getOperationResponse(e);const{error:o,shouldReturnResponse:r}=handleErrorResponse(e,t,n);if(o){throw o}else if(r){return e}if(n){if(n.bodyMapper){let a=e.parsedBody;if(t.isXML&&n.bodyMapper.type.name===z.Sequence){a=typeof a==="object"?a[n.bodyMapper.xmlElementName]:[]}try{e.parsedBody=t.serializer.deserialize(n.bodyMapper,a,"operationRes.parsedBody",i)}catch(t){const a=new RestError(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,undefined,e.status,e.request,e);throw a}}else if(t.httpMethod==="HEAD"){e.parsedBody=a.status>=200&&a.status<300}if(n.headersMapper){e.parsedHeaders=t.serializer.deserialize(n.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",i)}}return e}))}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]==="default"}function handleErrorResponse(e,t,a){var i;const n=200<=e.status&&e.status<300;const o=isOperationSpecEmpty(t)?n:!!a;if(o){if(a){if(!a.isError){return{error:null,shouldReturnResponse:false}}}else{return{error:null,shouldReturnResponse:false}}}const r=a!==null&&a!==void 0?a:t.responses.default;const s=((i=e.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(e.status))||e.request.streamResponseBody;const p=s?`Unexpected status code: ${e.status}`:e.bodyAsText;const l=new RestError(p,undefined,e.status,e.request,e);if(!r){throw l}const d=r.bodyMapper;const c=r.headersMapper;try{if(e.parsedBody){const a=e.parsedBody;let i;if(d){let e=a;if(t.isXML&&d.type.name===z.Sequence){e=typeof a==="object"?a[d.xmlElementName]:[]}i=t.serializer.deserialize(d,e,"error.response.parsedBody")}const n=a.error||i||a;l.code=n.code;if(n.message){l.message=n.message}if(d){l.response.parsedBody=i}}if(e.headers&&c){l.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders")}}catch(t){l.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:false}}function parse(e,t,a,i){var n;const errorHandler=e=>{const t=`Error "${e}" occurred while parsing the response body - ${a.bodyAsText}.`;const i=e.code||RestError.PARSE_ERROR;const n=new RestError(t,i,a.status,a.request,a);return Promise.reject(n)};const o=((n=a.request.streamResponseStatusCodes)===null||n===void 0?void 0:n.has(a.status))||a.request.streamResponseBody;if(!o&&a.bodyAsText){const n=a.bodyAsText;const o=a.headers.get("Content-Type")||"";const r=!o?[]:o.split(";").map((e=>e.toLowerCase()));if(r.length===0||r.some((t=>e.indexOf(t)!==-1))){return new Promise((e=>{a.parsedBody=JSON.parse(n);e(a)})).catch(errorHandler)}else if(r.some((e=>t.indexOf(e)!==-1))){return parseXML(n,i).then((e=>{a.parsedBody=e;return a})).catch(errorHandler)}}return Promise.resolve(a)}const K={enable:true};function keepAlivePolicy(e){return{create:(t,a)=>new KeepAlivePolicy(t,a,e||K)}}class KeepAlivePolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.keepAliveOptions=a}async sendRequest(e){e.keepAlive=this.keepAliveOptions.enable;return this._nextPolicy.sendRequest(e)}}const W=["GET","HEAD"];const Q={handleRedirects:true,maxRetries:20};function redirectPolicy(e=20){return{create:(t,a)=>new RedirectPolicy(t,a,e)}}class RedirectPolicy extends BaseRequestPolicy{constructor(e,t,a=20){super(e,t);this.maxRetries=a}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>handleRedirect(this,e,0)))}}function handleRedirect(e,t,a){const{request:i,status:n}=t;const o=t.headers.get("location");if(o&&(n===300||n===301&&W.includes(i.method)||n===302&&W.includes(i.method)||n===303&&i.method==="POST"||n===307)&&(!e.maxRetries||ahandleRedirect(e,t,a+1)))}return Promise.resolve(t)}const J=3;const Y=1e3*30;const Z=1e3*90;const ee=1e3*3;function isNumber(e){return typeof e==="number"}function shouldRetry(e,t,a,i,n){if(!t(i,n)){return false}return a.retryCountnew ExponentialRetryPolicy(i,n,e,t,a)}}t.RetryMode=void 0;(function(e){e[e["Exponential"]=0]="Exponential"})(t.RetryMode||(t.RetryMode={}));const te={maxRetries:J,retryDelayInMs:Y,maxRetryDelayInMs:Z};class ExponentialRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.maxRetryInterval=isNumber(n)?n:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>retry$1(this,e,t))).catch((t=>retry$1(this,e,t.response,undefined,t)))}}async function retry$1(e,t,a,i,n){function shouldPolicyRetry(e){const t=e===null||e===void 0?void 0:e.status;if(t===503&&(a===null||a===void 0?void 0:a.headers.get(_.HeaderConstants.RETRY_AFTER))){return false}if(t===undefined||t<500&&t!==408||t===501||t===505){return false}return true}i=updateRetryData({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},i,n);const o=t.abortSignal&&t.abortSignal.aborted;if(!o&&shouldRetry(e.retryCount,shouldPolicyRetry,i,a)){q.info(`Retrying request in ${i.retryInterval}`);try{await s.delay(i.retryInterval);const a=await e._nextPolicy.sendRequest(t.clone());return retry$1(e,t,a,i)}catch(n){return retry$1(e,t,a,i,n)}}else if(o||n||!a){const e=i.error||new RestError("Failed to send the request.",RestError.REQUEST_SEND_ERROR,a&&a.status,a&&a.request,a);throw e}else{return a}}function logPolicy(e={}){return{create:(t,a)=>new LogPolicy(t,a,e)}}class LogPolicy extends BaseRequestPolicy{constructor(e,t,{logger:a=q.info,allowedHeaderNames:i=[],allowedQueryParameters:n=[]}={}){super(e,t);this.logger=a;this.sanitizer=new Sanitizer({allowedHeaderNames:i,allowedQueryParameters:n})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){if(!this.logger.enabled)return this._nextPolicy.sendRequest(e);this.logRequest(e);return this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){this.logger(`Response status code: ${e.status}`);this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`);return e}}function getPathStringFromParameter(e){return getPathStringFromParameterPath(e.parameterPath,e.mapper)}function getPathStringFromParameterPath(e,t){let a;if(typeof e==="string"){a=e}else if(Array.isArray(e)){a=e.join(".")}else{a=t.serializedName}return a}function getStreamResponseStatusCodes(e){const t=new Set;for(const a in e.responses){const i=e.responses[a];if(i.bodyMapper&&i.bodyMapper.type.name===z.Stream){t.add(Number(a))}}return t}function getDefaultUserAgentKey(){return _.HeaderConstants.USER_AGENT}function getPlatformSpecificData(){const e={key:"Node",value:process.version};const t={key:"OS",value:`(${w.arch()}-${w.type()}-${w.release()})`};return[e,t]}function getRuntimeInfo(){const e={key:"core-http",value:_.coreHttpVersion};return[e]}function getUserAgentString(e,t=" ",a="/"){return e.map((e=>{const t=e.value?`${a}${e.value}`:"";return`${e.key}${t}`})).join(t)}const ae=getDefaultUserAgentKey;function getDefaultUserAgentValue(){const e=getRuntimeInfo();const t=getPlatformSpecificData();const a=getUserAgentString(e.concat(t));return a}function userAgentPolicy(e){const t=!e||e.key===undefined||e.key===null?getDefaultUserAgentKey():e.key;const a=!e||e.value===undefined||e.value===null?getDefaultUserAgentValue():e.value;return{create:(e,i)=>new UserAgentPolicy(e,i,t,a)}}class UserAgentPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this._nextPolicy=e;this._options=t;this.headerKey=a;this.headerValue=i}sendRequest(e){this.addUserAgentHeader(e);return this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){if(!e.headers){e.headers=new HttpHeaders}if(!e.headers.get(this.headerKey)&&this.headerValue){e.headers.set(this.headerKey,this.headerValue)}}}t.QueryCollectionFormat=void 0;(function(e){e["Csv"]=",";e["Ssv"]=" ";e["Tsv"]="\t";e["Pipes"]="|";e["Multi"]="Multi"})(t.QueryCollectionFormat||(t.QueryCollectionFormat={}));const ie={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function beginRefresh(e,t,a){async function tryGetAccessToken(){if(Date.now()e.getToken(t,a);i=beginRefresh(tryGetAccessToken,o.retryIntervalInMs,(s=n===null||n===void 0?void 0:n.expiresOnTimestamp)!==null&&s!==void 0?s:Date.now()).then((e=>{i=null;n=e;return n})).catch((e=>{i=null;n=null;throw e}))}return i}return async e=>{if(r.mustRefresh)return refresh(e);if(r.shouldRefresh){refresh(e)}return n}}function bearerTokenAuthenticationPolicy(e,t){const a=createTokenCycler(e,t);class BearerTokenAuthenticationPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://")){throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.")}const{token:t}=await a({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});e.headers.set(_.HeaderConstants.AUTHORIZATION,`Bearer ${t}`);return this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new BearerTokenAuthenticationPolicy(e,t)}}function disableResponseDecompressionPolicy(){return{create:(e,t)=>new DisableResponseDecompressionPolicy(e,t)}}class DisableResponseDecompressionPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){e.decompressResponse=false;return this._nextPolicy.sendRequest(e)}}function generateClientRequestIdPolicy(e="x-ms-client-request-id"){return{create:(t,a)=>new GenerateClientRequestIdPolicy(t,a,e)}}class GenerateClientRequestIdPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this._requestIdHeaderName=a}sendRequest(e){if(!e.headers.contains(this._requestIdHeaderName)){e.headers.set(this._requestIdHeaderName,e.requestId)}return this._nextPolicy.sendRequest(e)}}let ne;function getCachedDefaultHttpClient(){if(!ne){ne=new NodeFetchHttpClient}return ne}function ndJsonPolicy(){return{create:(e,t)=>new NdJsonPolicy(e,t)}}class NdJsonPolicy extends BaseRequestPolicy{constructor(e,t){super(e,t)}async sendRequest(e){if(typeof e.body==="string"&&e.body.startsWith("[")){const t=JSON.parse(e.body);if(Array.isArray(t)){e.body=t.map((e=>JSON.stringify(e)+"\n")).join("")}}return this._nextPolicy.sendRequest(e)}}const oe=[];let re=false;const se=new Map;function loadEnvironmentProxyValue(){if(!process){return undefined}const e=getEnvironmentValue(_.HTTPS_PROXY);const t=getEnvironmentValue(_.ALL_PROXY);const a=getEnvironmentValue(_.HTTP_PROXY);return e||t||a}function isBypassed(e,t,a){if(t.length===0){return false}const i=URLBuilder.parse(e).getHost();if(a===null||a===void 0?void 0:a.has(i)){return a.get(i)}let n=false;for(const e of t){if(e[0]==="."){if(i.endsWith(e)){n=true}else{if(i.length===e.length-1&&i===e.slice(1)){n=true}}}else{if(i===e){n=true}}}a===null||a===void 0?void 0:a.set(i,n);return n}function loadNoProxy(){const e=getEnvironmentValue(_.NO_PROXY);re=true;if(e){return e.split(",").map((e=>e.trim())).filter((e=>e.length))}return[]}function getDefaultProxySettings(e){if(!e){e=loadEnvironmentProxyValue();if(!e){return undefined}}const{username:t,password:a,urlWithoutAuth:i}=extractAuthFromUrl(e);const n=URLBuilder.parse(i);const o=n.getScheme()?n.getScheme()+"://":"";return{host:o+n.getHost(),port:Number.parseInt(n.getPort()||"80"),username:t,password:a}}function proxyPolicy(e,t){if(!e){e=getDefaultProxySettings()}if(!re){oe.push(...loadNoProxy())}return{create:(a,i)=>new ProxyPolicy(a,i,e,t===null||t===void 0?void 0:t.customNoProxyList)}}function extractAuthFromUrl(e){const t=e.indexOf("@");if(t===-1){return{urlWithoutAuth:e}}const a=e.indexOf("://");const i=a!==-1?a+3:0;const n=e.substring(i,t);const o=n.indexOf(":");const r=o!==-1;const s=r?n.substring(0,o):n;const p=r?n.substring(o+1):undefined;const l=e.substring(0,i)+e.substring(t+1);return{username:s,password:p,urlWithoutAuth:l}}class ProxyPolicy extends BaseRequestPolicy{constructor(e,t,a,i){super(e,t);this.proxySettings=a;this.customNoProxyList=i}sendRequest(e){var t;if(!e.proxySettings&&!isBypassed(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:oe,this.customNoProxyList?undefined:se)){e.proxySettings=this.proxySettings}return this._nextPolicy.sendRequest(e)}}function rpRegistrationPolicy(e=30){return{create:(t,a)=>new RPRegistrationPolicy(t,a,e)}}class RPRegistrationPolicy extends BaseRequestPolicy{constructor(e,t,a=30){super(e,t);this._retryTimeout=a}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>registerIfNeeded(this,e,t)))}}function registerIfNeeded(e,t,a){if(a.status===409){const i=checkRPNotRegisteredError(a.bodyAsText);if(i){const n=extractSubscriptionUrl(t.url);return registerRP(e,n,i,t).catch((()=>false)).then((i=>{if(i){t.headers.set("x-ms-client-request-id",generateUuid());return e._nextPolicy.sendRequest(t.clone())}return a}))}}return Promise.resolve(a)}function getRequestEssentials(e,t=false){const a=e.clone();if(t){a.url=e.url}a.headers.set("x-ms-client-request-id",generateUuid());a.headers.set("Content-Type","application/json; charset=utf-8");return a}function checkRPNotRegisteredError(e){let t,a;if(e){try{a=JSON.parse(e)}catch(e){}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){const e=a.error.message.match(/.*'(.*)'/i);if(e){t=e.pop()}}}return t}function extractSubscriptionUrl(e){let t;const a=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0]){t=a[0]}else{throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`)}return t}async function registerRP(e,t,a,i){const n=`${t}providers/${a}/register?api-version=2016-02-01`;const o=`${t}providers/${a}?api-version=2016-02-01`;const r=getRequestEssentials(i);r.method="POST";r.url=n;const s=await e._nextPolicy.sendRequest(r);if(s.status!==200){throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`)}return getRegistrationStatus(e,o,i)}async function getRegistrationStatus(e,t,a){const i=getRequestEssentials(a);i.url=t;i.method="GET";const n=await e._nextPolicy.sendRequest(i);const o=n.parsedBody;if(n.parsedBody&&o.registrationState&&o.registrationState==="Registered"){return true}else{await s.delay(e._retryTimeout*1e3);return getRegistrationStatus(e,t,a)}}function signingPolicy(e){return{create:(t,a)=>new SigningPolicy(t,a,e)}}class SigningPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.authenticationProvider=a}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function systemErrorRetryPolicy(e,t,a,i){return{create:(n,o)=>new SystemErrorRetryPolicy(n,o,e,t,a,i)}}class SystemErrorRetryPolicy extends BaseRequestPolicy{constructor(e,t,a,i,n,o){super(e,t);this.retryCount=isNumber(a)?a:J;this.retryInterval=isNumber(i)?i:Y;this.minRetryInterval=isNumber(n)?n:ee;this.maxRetryInterval=isNumber(o)?o:Z}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>retry(this,e,t.response,t)))}}async function retry(e,t,a,i,n){n=updateRetryData(e,n,i);function shouldPolicyRetry(e,t){if(t&&t.code&&(t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT")){return true}return false}if(shouldRetry(e.retryCount,shouldPolicyRetry,n,a,i)){try{await s.delay(n.retryInterval);return e._nextPolicy.sendRequest(t.clone())}catch(i){return retry(e,t,a,i,n)}}else{if(i){return Promise.reject(n.error)}return a}}const pe=3;const le=_.HttpConstants.StatusCodes;function throttlingRetryPolicy(){return{create:(e,t)=>new ThrottlingRetryPolicy(e,t)}}const de="The operation was aborted.";class ThrottlingRetryPolicy extends BaseRequestPolicy{constructor(e,t,a){super(e,t);this.numberOfRetries=0;this._handleResponse=a||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());if(t.status!==le.TooManyRequests&&t.status!==le.ServiceUnavailable){return t}else{return this._handleResponse(e,t)}}async _defaultResponseHandler(e,t){var a;const i=t.headers.get(_.HeaderConstants.RETRY_AFTER);if(i){const t=ThrottlingRetryPolicy.parseRetryAfterHeader(i);if(t){this.numberOfRetries+=1;await s.delay(t,{abortSignal:e.abortSignal,abortErrorMsg:de});if((a=e.abortSignal)===null||a===void 0?void 0:a.aborted){throw new f.AbortError(de)}if(this.numberOfRetries{let a=undefined;const i=this;const n=t;return{create(t,o){const r=getCredentialScopes(n,i.baseUri);if(!r){throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`)}if(a===undefined||a===null){a=bearerTokenAuthenticationPolicy(e,r)}return a.create(t,o)}}};i=wrappedPolicyFactory()}else if(e&&typeof e.signRequest==="function"){q.info("ServiceClient: creating signing policy from provided credentials");i=signingPolicy(e)}else if(e!==undefined&&e!==null){throw new Error("The credentials argument must implement the TokenCredential interface")}q.info("ServiceClient: using default request policies");a=createDefaultRequestPolicyFactories(i,t);if(t.requestPolicyFactories){const e=t.requestPolicyFactories(a);if(e){a=e}}}this._requestPolicyFactories=a}sendRequest(e){if(e===null||e===undefined||typeof e!=="object"){throw new Error("options cannot be null or undefined and it must be of type object.")}let t;try{if(isWebResourceLike(e)){e.validateRequestProperties();t=e}else{t=new WebResource;t=t.prepare(e)}}catch(e){return Promise.reject(e)}let a=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0){for(let e=this._requestPolicyFactories.length-1;e>=0;--e){a=this._requestPolicyFactories[e].create(a,this._requestPolicyOptions)}}return a.sendRequest(t)}async sendOperationRequest(e,a,i){var n;if(typeof e.options==="function"){i=e.options;e.options=undefined}const o=(n=e.options)===null||n===void 0?void 0:n.serializerOptions;const r=new WebResource;let s;try{const i=a.baseUrl||this.baseUri;if(!i){throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.")}r.method=a.httpMethod;r.operationSpec=a;const n=URLBuilder.parse(i);if(a.path){n.appendPath(a.path)}if(a.urlParameters&&a.urlParameters.length>0){for(const t of a.urlParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);if(!t.skipEncoding){i=encodeURIComponent(i)}n.replaceAll(`{${t.mapper.serializedName||getPathStringFromParameter(t)}}`,i)}}if(a.queryParameters&&a.queryParameters.length>0){for(const i of a.queryParameters){let r=getOperationArgumentValueFromParameter(this,e,i,a.serializer);if(r!==undefined&&r!==null){r=a.serializer.serialize(i.mapper,r,getPathStringFromParameter(i),o);if(i.collectionFormat!==undefined&&i.collectionFormat!==null){if(i.collectionFormat===t.QueryCollectionFormat.Multi){if(r.length===0){continue}else{for(const e in r){const t=r[e];r[e]=t===undefined||t===null?"":t.toString()}}}else if(i.collectionFormat===t.QueryCollectionFormat.Ssv||i.collectionFormat===t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}}if(!i.skipEncoding){if(Array.isArray(r)){for(const e in r){if(r[e]!==undefined&&r[e]!==null){r[e]=encodeURIComponent(r[e])}}}else{r=encodeURIComponent(r)}}if(i.collectionFormat!==undefined&&i.collectionFormat!==null&&i.collectionFormat!==t.QueryCollectionFormat.Multi&&i.collectionFormat!==t.QueryCollectionFormat.Ssv&&i.collectionFormat!==t.QueryCollectionFormat.Tsv){r=r.join(i.collectionFormat)}n.setQueryParameter(i.mapper.serializedName||getPathStringFromParameter(i),r)}}}r.url=n.toString();const p=a.contentType||this.requestContentType;if(p&&a.requestBody){r.headers.set("Content-Type",p)}if(a.headerParameters){for(const t of a.headerParameters){let i=getOperationArgumentValueFromParameter(this,e,t,a.serializer);if(i!==undefined&&i!==null){i=a.serializer.serialize(t.mapper,i,getPathStringFromParameter(t),o);const e=t.mapper.headerCollectionPrefix;if(e){for(const t of Object.keys(i)){r.headers.set(e+t,i[t])}}else{r.headers.set(t.mapper.serializedName||getPathStringFromParameter(t),i)}}}}const l=e.options;if(l){if(l.customHeaders){for(const e in l.customHeaders){r.headers.set(e,l.customHeaders[e])}}if(l.abortSignal){r.abortSignal=l.abortSignal}if(l.timeout){r.timeout=l.timeout}if(l.onUploadProgress){r.onUploadProgress=l.onUploadProgress}if(l.onDownloadProgress){r.onDownloadProgress=l.onDownloadProgress}if(l.spanOptions){r.spanOptions=l.spanOptions}if(l.tracingContext){r.tracingContext=l.tracingContext}if(l.shouldDeserialize!==undefined&&l.shouldDeserialize!==null){r.shouldDeserialize=l.shouldDeserialize}}r.withCredentials=this._withCredentials;serializeRequestBody(this,r,e,a);if(r.streamResponseStatusCodes===undefined){r.streamResponseStatusCodes=getStreamResponseStatusCodes(a)}let d;let c;try{d=await this.sendRequest(r)}catch(e){c=e}if(c){if(c.response){c.details=flattenResponse(c.response,a.responses[c.statusCode]||a.responses["default"])}s=Promise.reject(c)}else{s=Promise.resolve(flattenResponse(d,a.responses[d.status]))}}catch(e){s=Promise.reject(e)}const p=i;if(p){s.then((e=>p(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>p(e)))}return s}}function serializeRequestBody(e,t,a,i){var n,o,r,s,p,l;const d=(o=(n=a.options)===null||n===void 0?void 0:n.serializerOptions)!==null&&o!==void 0?o:{};const c={rootName:(r=d.rootName)!==null&&r!==void 0?r:"",includeRoot:(s=d.includeRoot)!==null&&s!==void 0?s:false,xmlCharKey:(p=d.xmlCharKey)!==null&&p!==void 0?p:O};const m=d.xmlCharKey;if(i.requestBody&&i.requestBody.mapper){t.body=getOperationArgumentValueFromParameter(e,a,i.requestBody,i.serializer);const n=i.requestBody.mapper;const{required:o,xmlName:r,xmlElementName:s,serializedName:p,xmlNamespace:d,xmlNamespacePrefix:u}=n;const f=n.type.name;try{if(t.body!==undefined&&t.body!==null||o){const e=getPathStringFromParameter(i.requestBody);t.body=i.serializer.serialize(n,t.body,e,c);const a=f===z.Stream;if(i.isXML){const e=u?`xmlns:${u}`:"xmlns";const i=getXmlValueWithNamespace(d,e,f,t.body,c);if(f===z.Sequence){t.body=stringifyXML(prepareXMLRootList(i,s||r||p,e,d),{rootName:r||p,xmlCharKey:m})}else if(!a){t.body=stringifyXML(i,{rootName:r||p,xmlCharKey:m})}}else if(f===z.String&&(((l=i.contentType)===null||l===void 0?void 0:l.match("text/plain"))||i.mediaType==="text")){return}else if(!a){t.body=JSON.stringify(t.body)}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(p,undefined,"  ")}.`)}}else if(i.formDataParameters&&i.formDataParameters.length>0){t.formData={};for(const n of i.formDataParameters){const o=getOperationArgumentValueFromParameter(e,a,n,i.serializer);if(o!==undefined&&o!==null){const e=n.mapper.serializedName||getPathStringFromParameter(n);t.formData[e]=i.serializer.serialize(n.mapper,o,getPathStringFromParameter(n),c)}}}}function getXmlValueWithNamespace(e,t,a,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(a)){const a={};a[n.xmlCharKey]=i;a[T]={[t]:e};return a}return i}function getValueOrFunctionResult(e,t){let a;if(typeof e==="string"){a=e}else{a=t();if(typeof e==="function"){a=e(a)}}return a}function createDefaultRequestPolicyFactories(e,t){const a=[];if(t.generateClientRequestIdHeader){a.push(generateClientRequestIdPolicy(t.clientRequestIdHeaderName))}if(e){a.push(e)}const i=getValueOrFunctionResult(t.userAgentHeaderName,ae);const n=getValueOrFunctionResult(t.userAgent,getDefaultUserAgentValue);if(i&&n){a.push(userAgentPolicy({key:i,value:n}))}a.push(redirectPolicy());a.push(rpRegistrationPolicy(t.rpRegistrationRetryTimeout));if(!t.noRetryPolicy){a.push(exponentialRetryPolicy());a.push(systemErrorRetryPolicy());a.push(throttlingRetryPolicy())}a.push(deserializationPolicy(t.deserializationContentTypes));if(E){a.push(proxyPolicy(t.proxySettings))}a.push(logPolicy({logger:q.info}));return a}function createPipelineFromOptions(e,t){const a=[];if(e.sendStreamingJson){a.push(ndJsonPolicy())}let i=undefined;if(e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const a=getDefaultUserAgentValue();if(t.indexOf(a)===-1){t.push(a)}i=t.join(" ")}const n=Object.assign(Object.assign({},K),e.keepAliveOptions);const o=Object.assign(Object.assign({},te),e.retryOptions);const r=Object.assign(Object.assign({},Q),e.redirectOptions);if(E){a.push(proxyPolicy(e.proxyOptions))}const s=Object.assign(Object.assign({},G),e.deserializationOptions);const p=Object.assign({},e.loggingOptions);a.push(tracingPolicy({userAgent:i}),keepAlivePolicy(n),userAgentPolicy({value:i}),generateClientRequestIdPolicy(),deserializationPolicy(s.expectedContentTypes),throttlingRetryPolicy(),systemErrorRetryPolicy(),exponentialRetryPolicy(o.maxRetries,o.retryDelayInMs,o.maxRetryDelayInMs));if(r.handleRedirects){a.push(redirectPolicy(r.maxRetries))}if(t){a.push(t)}a.push(logPolicy(p));if(E&&e.decompressResponse===false){a.push(disableResponseDecompressionPolicy())}return{httpClient:e.httpClient,requestPolicyFactories:a}}function getOperationArgumentValueFromParameter(e,t,a,i){return getOperationArgumentValueFromParameterPath(e,t,a.parameterPath,a.mapper,i)}function getOperationArgumentValueFromParameterPath(e,t,a,i,n){var o;let r;if(typeof a==="string"){a=[a]}const s=(o=t.options)===null||o===void 0?void 0:o.serializerOptions;if(Array.isArray(a)){if(a.length>0){if(i.isConstant){r=i.defaultValue}else{let n=getPropertyFromParameterPath(t,a);if(!n.propertyFound){n=getPropertyFromParameterPath(e,a)}let o=false;if(!n.propertyFound){o=i.required||a[0]==="options"&&a.length===2}r=o?i.defaultValue:n.propertyValue}const o=getPathStringFromParameterPath(a,i);n.serialize(i,r,o,s)}}else{if(i.required){r={}}for(const o in a){const p=i.type.modelProperties[o];const l=a[o];const d=getOperationArgumentValueFromParameterPath(e,t,l,p,n);const c=getPathStringFromParameterPath(l,p);n.serialize(p,d,c,s);if(d!==undefined&&d!==null){if(!r){r={}}r[o]=d}}}return r}function getPropertyFromParameterPath(e,t){const a={propertyFound:false};let i=0;for(;iObject.defineProperty(t,"_response",{value:e});if(i){const t=i.type.name;if(t==="Stream"){return addOperationResponse(Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}))}const n=t==="Composite"&&i.type.modelProperties||{};const o=Object.keys(n).some((e=>n[e].serializedName===""));if(t==="Sequence"||o){const t=[...e.parsedBody||[]];for(const a of Object.keys(n)){if(n[a].serializedName){t[a]=e.parsedBody[a]}}if(a){for(const e of Object.keys(a)){t[e]=a[e]}}addOperationResponse(t);return t}if(t==="Composite"||t==="Dictionary"){return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}}if(i||e.request.method==="HEAD"||isPrimitiveType(e.parsedBody)){return addOperationResponse(Object.assign(Object.assign({},a),{body:e.parsedBody}))}return addOperationResponse(Object.assign(Object.assign({},a),e.parsedBody))}function getCredentialScopes(e,t){if(e===null||e===void 0?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t){return`${t}/.default`}return undefined}function createSpanFunction(e){return b.createSpanFunction(e)}const me=2*60*1e3;class ExpiringAccessTokenCache{constructor(e=me){this.cachedToken=undefined;this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){if(this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp){this.cachedToken=undefined}return this.cachedToken}}class AccessTokenRefresher{constructor(e,t,a=3e4){this.credential=e;this.scopes=t;this.requiredMillisecondsBeforeNewRefresh=a;this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);this.promise=undefined;return t||undefined}refresh(e){if(!this.promise){this.promise=this.getToken(e)}return this.promise}}const ue=_.HeaderConstants;const fe="Basic";class BasicAuthenticationCredentials{constructor(e,t,a=fe){this.authorizationScheme=fe;if(e===null||e===undefined||typeof e.valueOf()!=="string"){throw new Error("userName cannot be null or undefined and must be of type string.")}if(t===null||t===undefined||typeof t.valueOf()!=="string"){throw new Error("password cannot be null or undefined and must be of type string.")}this.userName=e;this.password=t;this.authorizationScheme=a}signRequest(e){const t=`${this.userName}:${this.password}`;const a=`${this.authorizationScheme} ${encodeString(t)}`;if(!e.headers)e.headers=new HttpHeaders;e.headers.set(ue.AUTHORIZATION,a);return Promise.resolve(e)}}class ApiKeyCredentials{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery){throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`)}this.inHeader=e.inHeader;this.inQuery=e.inQuery}signRequest(e){if(!e){return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`))}if(this.inHeader){if(!e.headers){e.headers=new HttpHeaders}for(const t in this.inHeader){e.headers.set(t,this.inHeader[t])}}if(this.inQuery){if(!e.url){return Promise.reject(new Error(`url cannot be null in the request object.`))}if(e.url.indexOf("?")<0){e.url+="?"}for(const t in this.inQuery){if(!e.url.endsWith("?")){e.url+="&"}e.url+=`${t}=${this.inQuery[t]}`}}return Promise.resolve(e)}}class TopicCredentials extends ApiKeyCredentials{constructor(e){if(!e||e&&typeof e!=="string"){throw new Error("topicKey cannot be null or undefined and must be of type string.")}const t={inHeader:{"aeg-sas-key":e}};super(t)}}Object.defineProperty(t,"delay",{enumerable:true,get:function(){return s.delay}});Object.defineProperty(t,"isTokenCredential",{enumerable:true,get:function(){return l.isTokenCredential}});t.AccessTokenRefresher=AccessTokenRefresher;t.ApiKeyCredentials=ApiKeyCredentials;t.BaseRequestPolicy=BaseRequestPolicy;t.BasicAuthenticationCredentials=BasicAuthenticationCredentials;t.Constants=_;t.DefaultHttpClient=NodeFetchHttpClient;t.ExpiringAccessTokenCache=ExpiringAccessTokenCache;t.HttpHeaders=HttpHeaders;t.MapperType=z;t.RequestPolicyOptions=RequestPolicyOptions;t.RestError=RestError;t.Serializer=Serializer;t.ServiceClient=ServiceClient;t.TopicCredentials=TopicCredentials;t.URLBuilder=URLBuilder;t.URLQuery=URLQuery;t.WebResource=WebResource;t.XML_ATTRKEY=T;t.XML_CHARKEY=O;t.applyMixins=applyMixins;t.bearerTokenAuthenticationPolicy=bearerTokenAuthenticationPolicy;t.createPipelineFromOptions=createPipelineFromOptions;t.createSpanFunction=createSpanFunction;t.deserializationPolicy=deserializationPolicy;t.deserializeResponseBody=deserializeResponseBody;t.disableResponseDecompressionPolicy=disableResponseDecompressionPolicy;t.encodeUri=encodeUri;t.executePromisesSequentially=executePromisesSequentially;t.exponentialRetryPolicy=exponentialRetryPolicy;t.flattenResponse=flattenResponse;t.generateClientRequestIdPolicy=generateClientRequestIdPolicy;t.generateUuid=generateUuid;t.getDefaultProxySettings=getDefaultProxySettings;t.getDefaultUserAgentValue=getDefaultUserAgentValue;t.isDuration=isDuration;t.isNode=E;t.isValidUuid=isValidUuid;t.keepAlivePolicy=keepAlivePolicy;t.logPolicy=logPolicy;t.operationOptionsToRequestOptionsBase=operationOptionsToRequestOptionsBase;t.parseXML=parseXML;t.promiseToCallback=promiseToCallback;t.promiseToServiceCallback=promiseToServiceCallback;t.proxyPolicy=proxyPolicy;t.redirectPolicy=redirectPolicy;t.serializeObject=serializeObject;t.signingPolicy=signingPolicy;t.stringifyXML=stringifyXML;t.stripRequest=stripRequest;t.stripResponse=stripResponse;t.systemErrorRetryPolicy=systemErrorRetryPolicy;t.throttlingRetryPolicy=throttlingRetryPolicy;t.tracingPolicy=tracingPolicy;t.userAgentPolicy=userAgentPolicy},6279:(e,t,a)=>{var i=a(5443);var n=a(3837);var o=a(1017);var r=a(3685);var s=a(5687);var p=a(7310).parse;var l=a(7147);var d=a(2781).Stream;var c=a(3583);var m=a(4812);var u=a(3971);e.exports=FormData;n.inherits(FormData,i);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];i.call(this);e=e||{};for(var t in e){this[t]=e[t]}}FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a=="string"){a={filename:a}}var o=i.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if(n.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();o(r);o(t);o(s);this._trackLength(r,t,a)};FormData.prototype._trackLength=function(e,t,a){var i=0;if(a.knownLength!=null){i+=+a.knownLength}else if(Buffer.isBuffer(t)){i=t.length}else if(typeof t==="string"){i=Buffer.byteLength(t)}this._valueLength+=i;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof d)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{l.stat(e.path,(function(a,i){var n;if(a){t(a);return}n=i.size-(e.start?e.start:0);t(null,n)}))}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",(function(a){e.pause();t(null,+a.headers["content-length"])}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header=="string"){return a.header}var i=this._getContentDisposition(t,a);var n=this._getContentType(t,a);var o="";var r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};if(typeof a.header=="object"){u(r,a.header)}var s;for(var p in r){if(!r.hasOwnProperty(p))continue;s=r[p];if(s==null){continue}if(!Array.isArray(s)){s=[s]}if(s.length){o+=p+": "+s.join("; ")+FormData.LINE_BREAK}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a,i;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){a=o.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){i='filename="'+a+'"'}return i};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e.name){a=c.lookup(e.name)}if(!a&&e.path){a=c.lookup(e.path)}if(!a&&e.readable&&e.hasOwnProperty("httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=c.lookup(t.filepath||t.filename)}if(!a&&typeof e=="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,i=this._streams.length;a{e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},8165:(e,t,a)=>{"use strict";
 /*!
  * Copyright (c) 2015-2020, Salesforce.com, Inc.
  * All rights reserved.
diff --git a/src/inputs.ts b/src/inputs.ts
index cbfc08d..fa4c58e 100644
--- a/src/inputs.ts
+++ b/src/inputs.ts
@@ -13,6 +13,7 @@ export const setArgs = (args: string[]) => {
     {key: 'memory', flag: '--memory'},
     {key: 'mount-path', flag: '--mount-string'},
     {key: 'network-plugin', flag: '--network-plugin'},
+    {key: 'wait', flag: '--wait'},
   ]
   inputs.forEach((input) => {
     const value = getInput(input.key).toLowerCase()
diff --git a/src/minikube.ts b/src/minikube.ts
deleted file mode 100644
index 387a66d..0000000
--- a/src/minikube.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-import {addPath, getInput} from '@actions/core'
-import {exec} from '@actions/exec'
-import {downloadTool} from '@actions/tool-cache'
-import {mkdirP, mv} from '@actions/io'
-import {platform as getPlatform} from 'os'
-import {join} from 'path'
-
-import {restoreCaches, saveCaches} from './cache'
-
-function setArgs(args: string[]) {
-  const inputs: {key: string; flag: string}[] = [
-    {key: 'driver', flag: '--driver'},
-    {key: 'container-runtime', flag: '--container-runtime'},
-    {key: 'kubernetes-version', flag: '--kubernetes-version'},
-    {key: 'cpus', flag: '--cpus'},
-    {key: 'memory', flag: '--memory'},
-    {key: 'network-plugin', flag: '--network-plugin'},
-    {key: 'cni', flag: '--cni'},
-  ]
-  inputs.forEach((input) => {
-    const value = getInput(input.key).toLowerCase()
-    if (value !== '') {
-      args.push(input.flag, value)
-    }
-  })
-}
-
-async function installCriDocker(): Promise {
-  const urlBase =
-    'https://storage.googleapis.com/setup-minikube/cri-dockerd/v0.2.3/'
-  const binaryDownload = downloadTool(urlBase + 'cri-dockerd')
-  const serviceDownload = downloadTool(urlBase + 'cri-docker.service')
-  const socketDownload = downloadTool(urlBase + 'cri-docker.socket')
-  await exec('chmod', ['+x', await binaryDownload])
-  await exec('sudo', ['mv', await binaryDownload, '/usr/bin/cri-dockerd'])
-  await exec('sudo', [
-    'mv',
-    await serviceDownload,
-    '/usr/lib/systemd/system/cri-docker.service',
-  ])
-  await exec('sudo', [
-    'mv',
-    await socketDownload,
-    '/usr/lib/systemd/system/cri-docker.socket',
-  ])
-}
-
-async function installConntrackSocat(): Promise {
-  await exec('sudo', ['apt-get', 'update', '-qq'])
-  await exec('sudo', ['apt-get', '-qq', '-y', 'install', 'conntrack', 'socat'])
-}
-
-async function installCrictl(): Promise {
-  const crictlURL =
-    'https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.17.0/crictl-v1.17.0-linux-amd64.tar.gz'
-  const crictlDownload = downloadTool(crictlURL)
-  await exec('sudo', [
-    'tar',
-    'zxvf',
-    await crictlDownload,
-    '-C',
-    '/usr/local/bin',
-  ])
-}
-
-async function installNoneDriverDeps(): Promise {
-  const driver = getInput('driver').toLowerCase()
-  if (driver !== 'none') {
-    return
-  }
-  await Promise.all([
-    installCriDocker(),
-    installConntrackSocat(),
-    installCrictl(),
-  ])
-}
-
-export async function startMinikube(): Promise {
-  const args = ['start']
-  setArgs(args)
-  const cacheHits = await restoreCaches()
-  await installNoneDriverDeps()
-  await exec('minikube', args)
-  await saveCaches(cacheHits)
-}
-
-export function getDownloadUrl(version: string): string {
-  const osPlat = getPlatform()
-  const platform = osPlat === 'win32' ? 'windows' : osPlat
-  const suffix = osPlat === 'win32' ? '.exe' : ''
-  switch (version) {
-    case 'latest':
-      return `https://github.com/kubernetes/minikube/releases/latest/download/minikube-${platform}-amd64${suffix}`
-    case 'head':
-      return `https://storage.googleapis.com/minikube-builds/master/minikube-${platform}-amd64${suffix}`
-    default:
-      return `https://github.com/kubernetes/minikube/releases/download/v${version}/minikube-${platform}-amd64${suffix}`
-  }
-}
-
-export async function downloadMinikube(version: string): Promise {
-  const url = getDownloadUrl(version)
-  const downloadPath = await downloadTool(url)
-  const binPath =
-    getPlatform() === 'darwin' ? '/Users/runner/bin' : '/home/runner/bin'
-  await mkdirP(binPath)
-  await exec('chmod', ['+x', downloadPath])
-  await mv(downloadPath, join(binPath, 'minikube'))
-  addPath(binPath)
-}