diff --git a/dist/index.js b/dist/index.js
index 78c97fb..c280355 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-(()=>{var __webpack_modules__={5116:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=a(r(7484));const p=a(r(6928));const c=a(r(680));const l=a(r(5552));const A=r(5321);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,r,i,s=false){return n(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const a=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(a));if(a.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of a){checkKey(e)}const n=yield c.getCompressionMethod();let d="";try{const t=yield l.getCacheEntry(a,e,{compressionMethod:n,enableCrossOsArchive:s});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(i===null||i===void 0?void 0:i.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}d=p.join(yield c.createTempDirectory(),c.getCacheFileName(n));o.debug(`Archive Path: ${d}`);yield l.downloadCache(t.archiveLocation,d,i);if(o.isDebug()){yield(0,A.listTar)(d,n)}const r=c.getArchiveFileSizeInBytes(d);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,A.extractTar)(d,n);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 c.unlinkFile(d)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var s,a,d,u,m;return n(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const n=yield c.getCompressionMethod();let g=-1;const h=yield c.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 E=yield c.createTempDirectory();const C=p.join(E,c.getCacheFileName(n));o.debug(`Archive Path: ${C}`);try{yield(0,A.createTar)(E,h,n);if(o.isDebug()){yield(0,A.listTar)(C,n)}const p=10*1024*1024*1024;const y=c.getArchiveFileSizeInBytes(C);o.debug(`File Size: ${y}`);if(y>p&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(y/(1024*1024))} MB (${y} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const I=yield l.reserveCache(t,e,{compressionMethod:n,enableCrossOsArchive:i,cacheSize:y});if((s=I===null||I===void 0?void 0:I.result)===null||s===void 0?void 0:s.cacheId){g=(a=I===null||I===void 0?void 0:I.result)===null||a===void 0?void 0:a.cacheId}else if((I===null||I===void 0?void 0:I.statusCode)===400){throw new Error((u=(d=I===null||I===void 0?void 0:I.error)===null||d===void 0?void 0:d.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(y/(1024*1024))} MB (${y} 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: ${(m=I===null||I===void 0?void 0:I.error)===null||m===void 0?void 0:m.message}`)}o.debug(`Saving Cache (ID: ${g})`);yield l.saveCache(g,C,r)}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 c.unlinkFile(C)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return g}))}t.saveCache=saveCache},5552:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.reserveCache=t.downloadCache=t.getCacheEntry=t.getCacheVersion=void 0;const o=a(r(7484));const p=r(4844);const c=r(4552);const l=a(r(6982));const A=a(r(9896));const d=r(7016);const u=a(r(680));const m=r(5067);const g=r(8356);const h=r(2846);const E="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 r=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${r}`);return r}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 c.BearerCredentialHandler(e);return new p.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t,r=false){const i=e.slice();if(t){i.push(t)}if(process.platform==="win32"&&!r){i.push("windows-only")}i.push(E);return l.createHash("sha256").update(i.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,r){return n(this,void 0,void 0,(function*(){const i=createHttpClient();const s=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const a=`cache?keys=${encodeURIComponent(e.join(","))}&version=${s}`;const p=yield(0,h.retryTypedResponse)("getCacheEntry",(()=>n(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(a))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],i,s)}return null}if(!(0,h.isSuccessStatusCode)(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const c=p.result;const l=c===null||c===void 0?void 0:c.archiveLocation;if(!l){throw new Error("Cache not found.")}o.setSecret(l);o.debug(`Cache Result:`);o.debug(JSON.stringify(c));return c}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,r){return n(this,void 0,void 0,(function*(){const i=`caches?key=${encodeURIComponent(e)}`;const s=yield(0,h.retryTypedResponse)("listCache",(()=>n(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(i))}))));if(s.statusCode===200){const t=s.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 '${r} 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,r){return n(this,void 0,void 0,(function*(){const i=new d.URL(e);const s=(0,g.getDownloadOptions)(r);if(i.hostname.endsWith(".blob.core.windows.net")){if(s.useAzureSdk){yield(0,m.downloadCacheStorageSDK)(e,t,s)}else if(s.concurrentBlobDownloads){yield(0,m.downloadCacheHttpClientConcurrent)(e,t,s)}else{yield(0,m.downloadCacheHttpClient)(e,t)}}else{yield(0,m.downloadCacheHttpClient)(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,r){return n(this,void 0,void 0,(function*(){const i=createHttpClient();const s=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const a={key:e,version:s,cacheSize:r===null||r===void 0?void 0:r.cacheSize};const o=yield(0,h.retryTypedResponse)("reserveCache",(()=>n(this,void 0,void 0,(function*(){return i.postJson(getCacheApiUrl("caches"),a)}))));return o}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,i,s){return n(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${s-i+1} bytes at offset ${i} with content range: ${getContentRange(i,s)}`);const a={"Content-Type":"application/octet-stream","Content-Range":getContentRange(i,s)};const p=yield(0,h.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${s})`,(()=>n(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),a)}))));if(!(0,h.isSuccessStatusCode)(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,r,i){return n(this,void 0,void 0,(function*(){const s=u.getArchiveFileSizeInBytes(r);const a=getCacheApiUrl(`caches/${t.toString()}`);const p=A.openSync(r,"r");const c=(0,g.getUploadOptions)(i);const l=u.assertDefined("uploadConcurrency",c.uploadConcurrency);const d=u.assertDefined("uploadChunkSize",c.uploadChunkSize);const m=[...new Array(l).keys()];o.debug("Awaiting all uploads");let h=0;try{yield Promise.all(m.map((()=>n(this,void 0,void 0,(function*(){while(hA.createReadStream(r,{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{A.closeSync(p)}return}))}function commitCache(e,t,r){return n(this,void 0,void 0,(function*(){const i={size:r};return yield(0,h.retryTypedResponse)("commitCache",(()=>n(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),i)}))))}))}function saveCache(e,t,r){return n(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,r);o.debug("Commiting cache");const s=u.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);const a=yield commitCache(i,e,s);if(!(0,h.isSuccessStatusCode)(a.statusCode)){throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},680:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(t){r[t]=e[t]&&function(r){return new Promise((function(i,s){r=e[t](r),settle(i,s,r.done,r.value)}))}}function settle(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}};Object.defineProperty(t,"__esModule",{value:true});t.isGhes=t.assertDefined=t.getGnuTarPathOnWindows=t.getCacheFileName=t.getCompressionMethod=t.unlinkFile=t.resolvePaths=t.getArchiveFileSizeInBytes=t.createTempDirectory=void 0;const p=a(r(7484));const c=a(r(5236));const l=a(r(7206));const A=a(r(4994));const d=a(r(9896));const u=a(r(6928));const m=a(r(3272));const g=a(r(9023));const h=r(2965);const E=r(8287);function createTempDirectory(){return n(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let r;if(e){r=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){r="/Users"}else{r="/home"}}t=u.join(r,"actions","temp")}const r=u.join(t,(0,h.v4)());yield A.mkdirP(r);return r}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return d.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,r,i,s;var a;return n(this,void 0,void 0,(function*(){const n=[];const c=(a=process.env["GITHUB_WORKSPACE"])!==null&&a!==void 0?a:process.cwd();const A=yield l.create(e.join("\n"),{implicitDescendants:false});try{for(var d=true,m=o(A.globGenerator()),g;g=yield m.next(),t=g.done,!t;d=true){s=g.value;d=false;const e=s;const t=u.relative(c,e).replace(new RegExp(`\\${u.sep}`,"g"),"/");p.debug(`Matched: ${t}`);if(t===""){n.push(".")}else{n.push(`${t}`)}}}catch(e){r={error:e}}finally{try{if(!d&&!t&&(i=m.return))yield i.call(m)}finally{if(r)throw r.error}}return n}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return n(this,void 0,void 0,(function*(){return g.promisify(d.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e,t=[]){return n(this,void 0,void 0,(function*(){let r="";t.push("--version");p.debug(`Checking ${e} ${t.join(" ")}`);try{yield c.exec(`${e}`,t,{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>r+=e.toString(),stderr:e=>r+=e.toString()}})}catch(e){p.debug(e.message)}r=r.trim();p.debug(r);return r}))}function getCompressionMethod(){return n(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]);const t=m.clean(e);p.debug(`zstd version: ${t}`);if(e===""){return E.CompressionMethod.Gzip}else{return E.CompressionMethod.ZstdWithoutLong}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===E.CompressionMethod.Gzip?E.CacheFilename.Gzip:E.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function getGnuTarPathOnWindows(){return n(this,void 0,void 0,(function*(){if(d.existsSync(E.GnuTarPathOnWindows)){return E.GnuTarPathOnWindows}const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")?A.which("tar"):""}))}t.getGnuTarPathOnWindows=getGnuTarPathOnWindows;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");const t=e.hostname.trimEnd().toUpperCase();const r=t==="GITHUB.COM";const i=t.endsWith(".GHE.COM")||t.endsWith(".GHE.LOCALHOST");return!r&&!i}t.isGhes=isGhes},8287:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ManifestFilename=t.TarFilename=t.SystemTarPathOnWindows=t.GnuTarPathOnWindows=t.SocketTimeout=t.DefaultRetryDelay=t.DefaultRetryAttempts=t.ArchiveToolType=t.CompressionMethod=t.CacheFilename=void 0;var r;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(r||(t.CacheFilename=r={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i||(t.CompressionMethod=i={}));var s;(function(e){e["GNU"]="gnu";e["BSD"]="bsd"})(s||(t.ArchiveToolType=s={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3;t.GnuTarPathOnWindows=`${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`;t.SystemTarPathOnWindows=`${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`;t.TarFilename="cache.tar";t.ManifestFilename="manifest.txt"},5067:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadCacheStorageSDK=t.downloadCacheHttpClientConcurrent=t.downloadCacheHttpClient=t.DownloadProgress=void 0;const o=a(r(7484));const p=r(4844);const c=r(1012);const l=a(r(181));const A=a(r(9896));const d=a(r(2203));const u=a(r(9023));const m=a(r(680));const g=r(8287);const h=r(2846);const E=r(8110);function pipeResponseToStream(e,t){return n(this,void 0,void 0,(function*(){const r=u.promisify(d.pipeline);yield r(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 r=Date.now()-this.startTime;const i=(e/(1024*1024)/(r/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 n(this,void 0,void 0,(function*(){const r=A.createWriteStream(t);const i=new p.HttpClient("actions/cache");const s=yield(0,h.retryHttpClientResponse)("downloadCache",(()=>n(this,void 0,void 0,(function*(){return i.get(e)}))));s.message.socket.setTimeout(g.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${g.SocketTimeout} ms`)}));yield pipeResponseToStream(s,r);const a=s.message.headers["content-length"];if(a){const e=parseInt(a);const r=m.getArchiveFileSizeInBytes(t);if(r!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${r}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheHttpClientConcurrent(e,t,r){var i;return n(this,void 0,void 0,(function*(){const s=yield A.promises.open(t,"w");const a=new p.HttpClient("actions/cache",undefined,{socketTimeout:r.timeoutInMs,keepAlive:true});try{const t=yield(0,h.retryHttpClientResponse)("downloadCacheMetadata",(()=>n(this,void 0,void 0,(function*(){return yield a.request("HEAD",e,null,{})}))));const o=t.message.headers["content-length"];if(o===undefined||o===null){throw new Error("Content-Length not found on blob response")}const p=parseInt(o);if(Number.isNaN(p)){throw new Error(`Could not interpret Content-Length: ${p}`)}const c=[];const l=4*1024*1024;for(let t=0;t
n(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(a,e,t,r)}))})}c.reverse();let A=0;let d=0;const u=new DownloadProgress(p);u.startDisplayTimer();const m=u.onProgress();const g=[];let E;const waitAndWrite=()=>n(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(g));yield s.write(e.buffer,0,e.count,e.offset);A--;delete g[e.offset];d+=e.count;m({loadedBytes:d})}));while(E=c.pop()){g[E.offset]=E.promiseGetter();A++;if(A>=((i=r.downloadConcurrency)!==null&&i!==void 0?i:10)){yield waitAndWrite()}}while(A>0){yield waitAndWrite()}}finally{a.dispose();yield s.close()}}))}t.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(e,t,r,i){return n(this,void 0,void 0,(function*(){const s=5;let a=0;while(true){try{const s=3e4;const a=yield promiseWithTimeout(s,downloadSegment(e,t,r,i));if(typeof a==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return a}catch(e){if(a>=s){throw e}a++}}}))}function downloadSegment(e,t,r,i){return n(this,void 0,void 0,(function*(){const s=yield(0,h.retryHttpClientResponse)("downloadCachePart",(()=>n(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+i-1}`})}))));if(!s.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:r,count:i,buffer:yield s.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var i;return n(this,void 0,void 0,(function*(){const s=new c.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}});const a=yield s.getProperties();const n=(i=a.contentLength)!==null&&i!==void 0?i:-1;if(n<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(134217728,l.constants.MAX_LENGTH);const i=new DownloadProgress(n);const a=A.openSync(t,"w");try{i.startDisplayTimer();const t=new E.AbortController;const o=t.signal;while(!i.isDone()){const p=i.segmentOffset+i.segmentSize;const c=Math.min(e,n-p);i.nextSegment(c);const l=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,s.downloadToBuffer(p,c,{abortSignal:o,concurrency:r.downloadConcurrency,onProgress:i.onProgress()}));if(l==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(l)){A.writeFileSync(a,l)}}}finally{i.stopDisplayTimer();A.closeSync(a)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>n(void 0,void 0,void 0,(function*(){let r;const i=new Promise((t=>{r=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(r);return e}))}))},2846:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.retryHttpClientResponse=t.retryTypedResponse=t.retry=t.isRetryableStatusCode=t.isServerErrorStatusCode=t.isSuccessStatusCode=void 0;const o=a(r(7484));const p=r(4844);const c=r(8287);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=[p.HttpCodes.BadGateway,p.HttpCodes.ServiceUnavailable,p.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,i=c.DefaultRetryAttempts,s=c.DefaultRetryDelay,a=undefined){return n(this,void 0,void 0,(function*(){let n="";let p=1;while(p<=i){let c=undefined;let l=undefined;let A=false;try{c=yield t()}catch(e){if(a){c=a(e)}A=true;n=e.message}if(c){l=r(c);if(!isServerErrorStatusCode(l)){return c}}if(l){A=isRetryableStatusCode(l);n=`Cache service responded with ${l}`}o.debug(`${e} - Attempt ${p} of ${i} failed with error: ${n}`);if(!A){o.debug(`${e} - Error is not retryable`);break}yield sleep(s);p++}throw Error(`${e} failed: ${n}`)}))}t.retry=retry;function retryTypedResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return n(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,i,(e=>{if(e instanceof p.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return n(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,i)}))}t.retryHttpClientResponse=retryHttpClientResponse},5321:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.createTar=t.extractTar=t.listTar=void 0;const o=r(5236);const p=a(r(4994));const c=r(9896);const l=a(r(6928));const A=a(r(680));const d=r(8287);const u=process.platform==="win32";function getTarPath(){return n(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield A.getGnuTarPathOnWindows();const t=d.SystemTarPathOnWindows;if(e){return{path:e,type:d.ArchiveToolType.GNU}}else if((0,c.existsSync)(t)){return{path:t,type:d.ArchiveToolType.BSD}}break}case"darwin":{const e=yield p.which("gtar",false);if(e){return{path:e,type:d.ArchiveToolType.GNU}}else{return{path:yield p.which("tar",true),type:d.ArchiveToolType.BSD}}}default:break}return{path:yield p.which("tar",true),type:d.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,i=""){return n(this,void 0,void 0,(function*(){const s=[`"${e.path}"`];const a=A.getCacheFileName(t);const n="cache.tar";const o=getWorkingDirectory();const p=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(r){case"create":s.push("--posix","-cf",p?n:a.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"--exclude",p?n:a.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"--files-from",d.ManifestFilename);break;case"extract":s.push("-xf",p?n:i.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${l.sep}`,"g"),"/"));break;case"list":s.push("-tf",p?n:i.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P");break}if(e.type===d.ArchiveToolType.GNU){switch(process.platform){case"win32":s.push("--force-local");break;case"darwin":s.push("--delay-directory-restore");break}}return s}))}function getCommands(e,t,r=""){return n(this,void 0,void 0,(function*(){let i;const s=yield getTarPath();const a=yield getTarArgs(s,e,t,r);const n=t!=="create"?yield getDecompressionProgram(s,e,r):yield getCompressionProgram(s,e);const o=s.type===d.ArchiveToolType.BSD&&e!==d.CompressionMethod.Gzip&&u;if(o&&t!=="create"){i=[[...n].join(" "),[...a].join(" ")]}else{i=[[...a].join(" "),[...n].join(" ")]}if(o){return i}return[i.join(" ")]}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getDecompressionProgram(e,t,r){return n(this,void 0,void 0,(function*(){const i=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(t){case d.CompressionMethod.Zstd:return i?["zstd -d --long=30 --force -o",d.TarFilename,r.replace(new RegExp(`\\${l.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d --long=30"':"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return i?["zstd -d --force -o",d.TarFilename,r.replace(new RegExp(`\\${l.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return n(this,void 0,void 0,(function*(){const r=A.getCacheFileName(t);const i=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(t){case d.CompressionMethod.Zstd:return i?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${l.sep}`,"g"),"/"),d.TarFilename]:["--use-compress-program",u?'"zstd -T0 --long=30"':"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return i?["zstd -T0 --force -o",r.replace(new RegExp(`\\${l.sep}`,"g"),"/"),d.TarFilename]:["--use-compress-program",u?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return n(this,void 0,void 0,(function*(){for(const r of e){try{yield(0,o.exec)(r,undefined,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(e){throw new Error(`${r.split(" ")[0]} failed with error: ${e===null||e===void 0?void 0:e.message}`)}}}))}function listTar(e,t){return n(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}t.listTar=listTar;function extractTar(e,t){return n(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield p.mkdirP(r);const i=yield getCommands(t,"extract",e);yield execCommands(i)}))}t.extractTar=extractTar;function createTar(e,t,r){return n(this,void 0,void 0,(function*(){(0,c.writeFileSync)(l.join(e,d.ManifestFilename),t.join("\n"));const i=yield getCommands(r,"create");yield execCommands(i,e)}))}t.createTar=createTar},8356:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getDownloadOptions=t.getUploadOptions=void 0;const n=a(r(7484));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:false,concurrentBlobDownloads:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:false};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.concurrentBlobDownloads==="boolean"){t.concurrentBlobDownloads=e.concurrentBlobDownloads}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}if(typeof e.lookupOnly==="boolean"){t.lookupOnly=e.lookupOnly}}const r=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(r&&!isNaN(Number(r))&&isFinite(Number(r))){t.segmentTimeoutInMs=Number(r)*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}`);n.debug(`Lookup only: ${t.lookupOnly}`);return t}t.getDownloadOptions=getDownloadOptions},3272:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var i=256;var s=Number.MAX_SAFE_INTEGER||9007199254740991;var a=16;var n=i-6;var o=t.re=[];var p=t.safeRe=[];var c=t.src=[];var l=t.tokens={};var A=0;function tok(e){l[e]=A++}var d="[a-zA-Z0-9-]";var u=[["\\s",1],["\\d",i],[d,n]];function makeSafeRe(e){for(var t=0;t n(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(a,e,t,r)}))})}c.reverse();let A=0;let d=0;const u=new DownloadProgress(p);u.startDisplayTimer();const m=u.onProgress();const g=[];let E;const waitAndWrite=()=>n(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(g));yield s.write(e.buffer,0,e.count,e.offset);A--;delete g[e.offset];d+=e.count;m({loadedBytes:d})}));while(E=c.pop()){g[E.offset]=E.promiseGetter();A++;if(A>=((i=r.downloadConcurrency)!==null&&i!==void 0?i:10)){yield waitAndWrite()}}while(A>0){yield waitAndWrite()}}finally{a.dispose();yield s.close()}}))}t.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(e,t,r,i){return n(this,void 0,void 0,(function*(){const s=5;let a=0;while(true){try{const s=3e4;const a=yield promiseWithTimeout(s,downloadSegment(e,t,r,i));if(typeof a==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return a}catch(e){if(a>=s){throw e}a++}}}))}function downloadSegment(e,t,r,i){return n(this,void 0,void 0,(function*(){const s=yield(0,h.retryHttpClientResponse)("downloadCachePart",(()=>n(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+i-1}`})}))));if(!s.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:r,count:i,buffer:yield s.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var i;return n(this,void 0,void 0,(function*(){const s=new c.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}});const a=yield s.getProperties();const n=(i=a.contentLength)!==null&&i!==void 0?i:-1;if(n<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(134217728,l.constants.MAX_LENGTH);const i=new DownloadProgress(n);const a=A.openSync(t,"w");try{i.startDisplayTimer();const t=new E.AbortController;const o=t.signal;while(!i.isDone()){const p=i.segmentOffset+i.segmentSize;const c=Math.min(e,n-p);i.nextSegment(c);const l=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,s.downloadToBuffer(p,c,{abortSignal:o,concurrency:r.downloadConcurrency,onProgress:i.onProgress()}));if(l==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(l)){A.writeFileSync(a,l)}}}finally{i.stopDisplayTimer();A.closeSync(a)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>n(void 0,void 0,void 0,(function*(){let r;const i=new Promise((t=>{r=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,i]).then((e=>{clearTimeout(r);return e}))}))},2846:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.retryHttpClientResponse=t.retryTypedResponse=t.retry=t.isRetryableStatusCode=t.isServerErrorStatusCode=t.isSuccessStatusCode=void 0;const o=a(r(7484));const p=r(4844);const c=r(8287);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=[p.HttpCodes.BadGateway,p.HttpCodes.ServiceUnavailable,p.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,i=c.DefaultRetryAttempts,s=c.DefaultRetryDelay,a=undefined){return n(this,void 0,void 0,(function*(){let n="";let p=1;while(p<=i){let c=undefined;let l=undefined;let A=false;try{c=yield t()}catch(e){if(a){c=a(e)}A=true;n=e.message}if(c){l=r(c);if(!isServerErrorStatusCode(l)){return c}}if(l){A=isRetryableStatusCode(l);n=`Cache service responded with ${l}`}o.debug(`${e} - Attempt ${p} of ${i} failed with error: ${n}`);if(!A){o.debug(`${e} - Error is not retryable`);break}yield sleep(s);p++}throw Error(`${e} failed: ${n}`)}))}t.retry=retry;function retryTypedResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return n(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,i,(e=>{if(e instanceof p.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,r=c.DefaultRetryAttempts,i=c.DefaultRetryDelay){return n(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,i)}))}t.retryHttpClientResponse=retryHttpClientResponse},5321:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.createTar=t.extractTar=t.listTar=void 0;const o=r(5236);const p=a(r(4994));const c=r(9896);const l=a(r(6928));const A=a(r(680));const d=r(8287);const u=process.platform==="win32";function getTarPath(){return n(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield A.getGnuTarPathOnWindows();const t=d.SystemTarPathOnWindows;if(e){return{path:e,type:d.ArchiveToolType.GNU}}else if((0,c.existsSync)(t)){return{path:t,type:d.ArchiveToolType.BSD}}break}case"darwin":{const e=yield p.which("gtar",false);if(e){return{path:e,type:d.ArchiveToolType.GNU}}else{return{path:yield p.which("tar",true),type:d.ArchiveToolType.BSD}}}default:break}return{path:yield p.which("tar",true),type:d.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,i=""){return n(this,void 0,void 0,(function*(){const s=[`"${e.path}"`];const a=A.getCacheFileName(t);const n="cache.tar";const o=getWorkingDirectory();const p=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(r){case"create":s.push("--posix","-cf",p?n:a.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"--exclude",p?n:a.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"--files-from",d.ManifestFilename);break;case"extract":s.push("-xf",p?n:i.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${l.sep}`,"g"),"/"));break;case"list":s.push("-tf",p?n:i.replace(new RegExp(`\\${l.sep}`,"g"),"/"),"-P");break}if(e.type===d.ArchiveToolType.GNU){switch(process.platform){case"win32":s.push("--force-local");break;case"darwin":s.push("--delay-directory-restore");break}}return s}))}function getCommands(e,t,r=""){return n(this,void 0,void 0,(function*(){let i;const s=yield getTarPath();const a=yield getTarArgs(s,e,t,r);const n=t!=="create"?yield getDecompressionProgram(s,e,r):yield getCompressionProgram(s,e);const o=s.type===d.ArchiveToolType.BSD&&e!==d.CompressionMethod.Gzip&&u;if(o&&t!=="create"){i=[[...n].join(" "),[...a].join(" ")]}else{i=[[...a].join(" "),[...n].join(" ")]}if(o){return i}return[i.join(" ")]}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getDecompressionProgram(e,t,r){return n(this,void 0,void 0,(function*(){const i=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(t){case d.CompressionMethod.Zstd:return i?["zstd -d --long=30 --force -o",d.TarFilename,r.replace(new RegExp(`\\${l.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d --long=30"':"unzstd --long=30"];case d.CompressionMethod.ZstdWithoutLong:return i?["zstd -d --force -o",d.TarFilename,r.replace(new RegExp(`\\${l.sep}`,"g"),"/")]:["--use-compress-program",u?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return n(this,void 0,void 0,(function*(){const r=A.getCacheFileName(t);const i=e.type===d.ArchiveToolType.BSD&&t!==d.CompressionMethod.Gzip&&u;switch(t){case d.CompressionMethod.Zstd:return i?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${l.sep}`,"g"),"/"),d.TarFilename]:["--use-compress-program",u?'"zstd -T0 --long=30"':"zstdmt --long=30"];case d.CompressionMethod.ZstdWithoutLong:return i?["zstd -T0 --force -o",r.replace(new RegExp(`\\${l.sep}`,"g"),"/"),d.TarFilename]:["--use-compress-program",u?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return n(this,void 0,void 0,(function*(){for(const r of e){try{yield(0,o.exec)(r,undefined,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(e){throw new Error(`${r.split(" ")[0]} failed with error: ${e===null||e===void 0?void 0:e.message}`)}}}))}function listTar(e,t){return n(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}t.listTar=listTar;function extractTar(e,t){return n(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield p.mkdirP(r);const i=yield getCommands(t,"extract",e);yield execCommands(i)}))}t.extractTar=extractTar;function createTar(e,t,r){return n(this,void 0,void 0,(function*(){(0,c.writeFileSync)(l.join(e,d.ManifestFilename),t.join("\n"));const i=yield getCommands(r,"create");yield execCommands(i,e)}))}t.createTar=createTar},8356:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getDownloadOptions=t.getUploadOptions=void 0;const n=a(r(7484));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:false,concurrentBlobDownloads:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:false};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.concurrentBlobDownloads==="boolean"){t.concurrentBlobDownloads=e.concurrentBlobDownloads}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}if(typeof e.lookupOnly==="boolean"){t.lookupOnly=e.lookupOnly}}const r=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(r&&!isNaN(Number(r))&&isFinite(Number(r))){t.segmentTimeoutInMs=Number(r)*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}`);n.debug(`Lookup only: ${t.lookupOnly}`);return t}t.getDownloadOptions=getDownloadOptions},3272:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var i=256;var s=Number.MAX_SAFE_INTEGER||9007199254740991;var a=16;var n=i-6;var o=t.re=[];var p=t.safeRe=[];var c=t.src=[];var l=t.tokens={};var A=0;function tok(e){l[e]=A++}var d="[a-zA-Z0-9-]";var u=[["\\s",1],["\\d",i],[d,n]];function makeSafeRe(e){for(var t=0;t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var s="";if(r.prerelease.length||i.prerelease.length){s="pre";var a="prerelease"}for(var n in r){if(n==="major"||n==="minor"||n==="patch"){if(r[n]!==i[n]){return s+n}}}return a}}t.compareIdentifiers=compareIdentifiers;var C=/^[0-9]+$/;function compareIdentifiers(e,t){var r=C.test(e);var i=C.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var s="";if(r.prerelease.length||i.prerelease.length){s="pre";var a="prerelease"}for(var n in r){if(n==="major"||n==="minor"||n==="patch"){if(r[n]!==i[n]){return s+n}}}return a}}t.compareIdentifiers=compareIdentifiers;var C=/^[0-9]+$/;function compareIdentifiers(e,t){var r=C.test(e);var i=C.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e{const c=generateBlockID(o,i);const l=r.blockSize*i;const A=i===s-1?t:l+r.blockSize;const d=A-l;a.push(c);await this.stageBlock(c,e(l,d),d,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:n.tracingOptions});p+=d;if(r.onProgress){r.onProgress({loadedBytes:p})}}))}await c.do();return this.commitBlockList(a,n)}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async uploadFile(e,t={}){const{span:r,updatedOptions:i}=ko("BlockBlobClient-uploadFile",t);try{const r=(await jo(e)).size;return await this.uploadSeekableInternal(((t,r)=>()=>Yo(e,{autoClose:true,end:r?t+r-1:Infinity,start:t})),r,Object.assign(Object.assign({},t),{tracingOptions:Object.assign(Object.assign({},t.tracingOptions),convertTracingToRequestOptionsBase(i))}))}catch(e){r.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadStream(e,t=ro,r=5,s={}){if(!s.blobHTTPHeaders){s.blobHTTPHeaders={}}if(!s.conditions){s.conditions={}}const{span:n,updatedOptions:o}=ko("BlockBlobClient-uploadStream",s);try{let a=0;const n=i.generateUuid();let p=0;const c=[];const l=new BufferScheduler(e,t,r,(async(e,t)=>{const r=generateBlockID(n,a);c.push(r);a++;await this.stageBlock(r,e,t,{conditions:s.conditions,encryptionScope:s.encryptionScope,tracingOptions:o.tracingOptions});p+=t;if(s.onProgress){s.onProgress({loadedBytes:p})}}),Math.ceil(r/4*3));await l.do();return await this.commitBlockList(c,Object.assign(Object.assign({},s),{tracingOptions:Object.assign(Object.assign({},s.tracingOptions),convertTracingToRequestOptionsBase(o))}))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}}class PageBlobClient extends BlobClient{constructor(e,t,r,s){let a;let n;s=s||{};if(isPipelineLike(t)){n=e;a=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){n=e;s=r;a=newPipeline(t,s)}else if(!t&&typeof t!=="string"){n=e;a=newPipeline(new AnonymousCredential,s)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const p=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);n=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(p));if(!s.proxyOptions){s.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}a=newPipeline(e,s)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){n=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(p))+"?"+c.accountSas;a=newPipeline(new AnonymousCredential,s)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(n,a);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(e){return new PageBlobClient(setURLParameter(this.url,po.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e,t={}){var r,i,s;t.conditions=t.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-create",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.pageBlobContext.create(0,e,Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(i=t.immutabilityPolicy)===null||i===void 0?void 0:i.expiriesOn,immutabilityPolicyMode:(s=t.immutabilityPolicy)===null||s===void 0?void 0:s.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async createIfNotExists(e,t={}){var r,i;const{span:s,updatedOptions:n}=ko("PageBlobClient-createIfNotExists",t);try{const r={ifNoneMatch:uo};const i=await this.create(e,Object.assign(Object.assign({},t),{conditions:r,tracingOptions:n.tracingOptions}));return Object.assign(Object.assign({succeeded:true},i),{_response:i._response})}catch(e){if(((r=e.details)===null||r===void 0?void 0:r.errorCode)==="BlobAlreadyExists"){s.setStatus({code:a.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(i=e.response)===null||i===void 0?void 0:i.parsedHeaders),{_response:e.response})}s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async uploadPages(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-uploadPages",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPages(r,e,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),requestOptions:{onUploadProgress:i.onProgress},range:rangeToString({offset:t,count:r}),sequenceNumberAccessConditions:i.conditions,transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadPagesFromURL(e,t,r,i,s={}){var n;s.conditions=s.conditions||{};s.sourceConditions=s.sourceConditions||{};const{span:o,updatedOptions:p}=ko("PageBlobClient-uploadPagesFromURL",s);try{ensureCpkIfSpecified(s.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(e,rangeToString({offset:t,count:i}),0,rangeToString({offset:r,count:i}),Object.assign({abortSignal:s.abortSignal,sourceContentMD5:s.sourceContentMD5,sourceContentCrc64:s.sourceContentCrc64,leaseAccessConditions:s.conditions,sequenceNumberAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(n=s.conditions)===null||n===void 0?void 0:n.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:s.sourceConditions.ifMatch,sourceIfModifiedSince:s.sourceConditions.ifModifiedSince,sourceIfNoneMatch:s.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:s.sourceConditions.ifUnmodifiedSince},cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope,copySourceAuthorization:httpAuthorizationToString(s.sourceAuthorization)},convertTracingToRequestOptionsBase(p)))}catch(e){o.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async clearPages(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-clearPages",r);try{return await this.pageBlobContext.clearPages(0,Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),range:rangeToString({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},convertTracingToRequestOptionsBase(n)))}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async getPageRanges(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-getPageRanges",r);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(n))).then(rangeResponseFromModel)}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async listPageRangesSegment(e=0,t,r,i={}){var s;const{span:n,updatedOptions:o}=ko("PageBlobClient-getPageRangesSegment",i);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}listPageRangeItemSegments(e=0,t,r,i={}){return s.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let a;if(!!r||r===undefined){do{a=yield s.__await(this.listPageRangesSegment(e,t,r,i));r=a.continuationToken;yield yield s.__await(yield s.__await(a))}while(r)}}))}listPageRangeItems(e=0,t,r={}){return s.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var i,a;let n;try{for(var o=s.__asyncValues(this.listPageRangeItemSegments(e,t,n,r)),p;p=yield s.__await(o.next()),!p.done;){const e=p.value;yield s.__await(yield*s.__asyncDelegator(s.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){i={error:e}}finally{try{if(p&&!p.done&&(a=o.return))yield s.__await(a.call(o))}finally{if(i)throw i.error}}}))}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};const i=this.listPageRangeItems(e,t,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeItemSegments(e,t,i.continuationToken,Object.assign({maxPageSize:i.maxPageSize},r))}}async getPageRangesDiff(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-getPageRangesDiff",i);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async listPageRangesDiffSegment(e,t,r,i,s){var n;const{span:o,updatedOptions:p}=ko("PageBlobClient-getPageRangesDiffSegment",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s===null||s===void 0?void 0:s.abortSignal,leaseAccessConditions:s===null||s===void 0?void 0:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.conditions),{ifTags:(n=s===null||s===void 0?void 0:s.conditions)===null||n===void 0?void 0:n.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),marker:i,maxPageSize:s===null||s===void 0?void 0:s.maxPageSize},convertTracingToRequestOptionsBase(p)))}catch(e){o.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}listPageRangeDiffItemSegments(e,t,r,i,a){return s.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let n;if(!!i||i===undefined){do{n=yield s.__await(this.listPageRangesDiffSegment(e,t,r,i,a));i=n.continuationToken;yield yield s.__await(yield s.__await(n))}while(i)}}))}listPageRangeDiffItems(e,t,r,i){return s.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var a,n;let o;try{for(var p=s.__asyncValues(this.listPageRangeDiffItemSegments(e,t,r,o,i)),c;c=yield s.__await(p.next()),!c.done;){const e=c.value;yield s.__await(yield*s.__asyncDelegator(s.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){a={error:e}}finally{try{if(c&&!c.done&&(n=p.return))yield s.__await(n.call(p))}finally{if(a)throw a.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const s=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.listPageRangeDiffItemSegments(e,t,r,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-GetPageRangesDiffForManagedDisks",i);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),prevSnapshotUrl:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async resize(e,t={}){var r;t.conditions=t.conditions||{};const{span:i,updatedOptions:s}=ko("PageBlobClient-resize",t);try{return await this.pageBlobContext.resize(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),encryptionScope:t.encryptionScope},convertTracingToRequestOptionsBase(s)))}catch(e){i.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async updateSequenceNumber(e,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-updateSequenceNumber",r);try{return await this.pageBlobContext.updateSequenceNumber(e,Object.assign({abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions})},convertTracingToRequestOptionsBase(n)))}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async startCopyIncremental(e,t={}){var r;const{span:i,updatedOptions:s}=ko("PageBlobClient-startCopyIncremental",t);try{return await this.pageBlobContext.copyIncremental(e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(s)))}catch(e){i.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}}async function getBodyAsText(e){let t=Buffer.alloc(ho);const r=await streamToBuffer2(e.readableStreamBody,t);t=t.slice(0,r);return t.toString()}function utf8ByteLength(e){return Buffer.byteLength(e)}const Jo=": ";const Wo=" ";const Xo=-1;class BatchResponseParser{constructor(e,t){if(!e||!e.contentType){throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.")}if(!t||t.size===0){throw new RangeError("Invalid state: subRequests is not provided or size is 0.")}this.batchResponse=e;this.subRequests=t;this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1];this.perResponsePrefix=`--${this.responseBatchBoundary}${fo}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==co.HTTP_ACCEPTED){throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`)}const e=await getBodyAsText(this.batchResponse);const t=e.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1);const r=t.length;if(r!==this.subRequests.size&&r!==1){throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.")}const s=new Array(r);let a=0;let n=0;for(let e=0;eA.createReadStream(r,{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{A.closeSync(p)}return}))}function commitCache(e,t,r){return n(this,void 0,void 0,(function*(){const i={size:r};return yield(0,h.retryTypedResponse)("commitCache",(()=>n(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),i)}))))}))}function saveCache(e,t,r){return n(this,void 0,void 0,(function*(){const i=createHttpClient();o.debug("Upload cache");yield uploadFile(i,e,t,r);o.debug("Commiting cache");const s=u.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);const a=yield commitCache(i,e,s);if(!(0,h.isSuccessStatusCode)(a.statusCode)){throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},680:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(t){r[t]=e[t]&&function(r){return new Promise((function(i,s){r=e[t](r),settle(i,s,r.done,r.value)}))}}function settle(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}};Object.defineProperty(t,"__esModule",{value:true});t.isGhes=t.assertDefined=t.getGnuTarPathOnWindows=t.getCacheFileName=t.getCompressionMethod=t.unlinkFile=t.resolvePaths=t.getArchiveFileSizeInBytes=t.createTempDirectory=void 0;const p=a(r(7484));const c=a(r(5236));const l=a(r(7206));const A=a(r(4994));const d=a(r(6982));const u=a(r(9896));const m=a(r(6928));const g=a(r(3272));const h=a(r(9023));const E=r(8287);function createTempDirectory(){return n(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let r;if(e){r=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){r="/Users"}else{r="/home"}}t=m.join(r,"actions","temp")}const r=m.join(t,d.randomUUID());yield A.mkdirP(r);return r}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return u.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,r,i,s;var a;return n(this,void 0,void 0,(function*(){const n=[];const c=(a=process.env["GITHUB_WORKSPACE"])!==null&&a!==void 0?a:process.cwd();const A=yield l.create(e.join("\n"),{implicitDescendants:false});try{for(var d=true,u=o(A.globGenerator()),g;g=yield u.next(),t=g.done,!t;d=true){s=g.value;d=false;const e=s;const t=m.relative(c,e).replace(new RegExp(`\\${m.sep}`,"g"),"/");p.debug(`Matched: ${t}`);if(t===""){n.push(".")}else{n.push(`${t}`)}}}catch(e){r={error:e}}finally{try{if(!d&&!t&&(i=u.return))yield i.call(u)}finally{if(r)throw r.error}}return n}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return n(this,void 0,void 0,(function*(){return h.promisify(u.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e,t=[]){return n(this,void 0,void 0,(function*(){let r="";t.push("--version");p.debug(`Checking ${e} ${t.join(" ")}`);try{yield c.exec(`${e}`,t,{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>r+=e.toString(),stderr:e=>r+=e.toString()}})}catch(e){p.debug(e.message)}r=r.trim();p.debug(r);return r}))}function getCompressionMethod(){return n(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]);const t=g.clean(e);p.debug(`zstd version: ${t}`);if(e===""){return E.CompressionMethod.Gzip}else{return E.CompressionMethod.ZstdWithoutLong}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===E.CompressionMethod.Gzip?E.CacheFilename.Gzip:E.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function getGnuTarPathOnWindows(){return n(this,void 0,void 0,(function*(){if(u.existsSync(E.GnuTarPathOnWindows)){return E.GnuTarPathOnWindows}const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")?A.which("tar"):""}))}t.getGnuTarPathOnWindows=getGnuTarPathOnWindows;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");const t=e.hostname.trimEnd().toUpperCase();const r=t==="GITHUB.COM";const i=t.endsWith(".GHE.COM")||t.endsWith(".GHE.LOCALHOST");return!r&&!i}t.isGhes=isGhes},8287:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ManifestFilename=t.TarFilename=t.SystemTarPathOnWindows=t.GnuTarPathOnWindows=t.SocketTimeout=t.DefaultRetryDelay=t.DefaultRetryAttempts=t.ArchiveToolType=t.CompressionMethod=t.CacheFilename=void 0;var r;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(r||(t.CacheFilename=r={}));var i;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(i||(t.CompressionMethod=i={}));var s;(function(e){e["GNU"]="gnu";e["BSD"]="bsd"})(s||(t.ArchiveToolType=s={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3;t.GnuTarPathOnWindows=`${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`;t.SystemTarPathOnWindows=`${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`;t.TarFilename="cache.tar";t.ManifestFilename="manifest.txt"},5067:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);s(t,e);return t};var n=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadCacheStorageSDK=t.downloadCacheHttpClientConcurrent=t.downloadCacheHttpClient=t.DownloadProgress=void 0;const o=a(r(7484));const p=r(4844);const c=r(1012);const l=a(r(181));const A=a(r(9896));const d=a(r(2203));const u=a(r(9023));const m=a(r(680));const g=r(8287);const h=r(2846);const E=r(8110);function pipeResponseToStream(e,t){return n(this,void 0,void 0,(function*(){const r=u.promisify(d.pipeline);yield r(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 r=Date.now()-this.startTime;const i=(e/(1024*1024)/(r/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 n(this,void 0,void 0,(function*(){const r=A.createWriteStream(t);const i=new p.HttpClient("actions/cache");const s=yield(0,h.retryHttpClientResponse)("downloadCache",(()=>n(this,void 0,void 0,(function*(){return i.get(e)}))));s.message.socket.setTimeout(g.SocketTimeout,(()=>{s.message.destroy();o.debug(`Aborting download, socket timed out after ${g.SocketTimeout} ms`)}));yield pipeResponseToStream(s,r);const a=s.message.headers["content-length"];if(a){const e=parseInt(a);const r=m.getArchiveFileSizeInBytes(t);if(r!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${r}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheHttpClientConcurrent(e,t,r){var i;return n(this,void 0,void 0,(function*(){const s=yield A.promises.open(t,"w");const a=new p.HttpClient("actions/cache",undefined,{socketTimeout:r.timeoutInMs,keepAlive:true});try{const t=yield(0,h.retryHttpClientResponse)("downloadCacheMetadata",(()=>n(this,void 0,void 0,(function*(){return yield a.request("HEAD",e,null,{})}))));const o=t.message.headers["content-length"];if(o===undefined||o===null){throw new Error("Content-Length not found on blob response")}const p=parseInt(o);if(Number.isNaN(p)){throw new Error(`Could not interpret Content-Length: ${p}`)}const c=[];const l=4*1024*1024;for(let t=0;t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var s="";if(r.prerelease.length||i.prerelease.length){s="pre";var a="prerelease"}for(var n in r){if(n==="major"||n==="minor"||n==="patch"){if(r[n]!==i[n]){return s+n}}}return a}}t.compareIdentifiers=compareIdentifiers;var C=/^[0-9]+$/;function compareIdentifiers(e,t){var r=C.test(e);var i=C.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var s="";if(r.prerelease.length||i.prerelease.length){s="pre";var a="prerelease"}for(var n in r){if(n==="major"||n==="minor"||n==="patch"){if(r[n]!==i[n]){return s+n}}}return a}}t.compareIdentifiers=compareIdentifiers;var C=/^[0-9]+$/;function compareIdentifiers(e,t){var r=C.test(e);var i=C.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e{const c=generateBlockID(o,i);const l=r.blockSize*i;const A=i===s-1?t:l+r.blockSize;const d=A-l;a.push(c);await this.stageBlock(c,e(l,d),d,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:n.tracingOptions});p+=d;if(r.onProgress){r.onProgress({loadedBytes:p})}}))}await c.do();return this.commitBlockList(a,n)}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async uploadFile(e,t={}){const{span:r,updatedOptions:i}=ko("BlockBlobClient-uploadFile",t);try{const r=(await jo(e)).size;return await this.uploadSeekableInternal(((t,r)=>()=>Yo(e,{autoClose:true,end:r?t+r-1:Infinity,start:t})),r,Object.assign(Object.assign({},t),{tracingOptions:Object.assign(Object.assign({},t.tracingOptions),convertTracingToRequestOptionsBase(i))}))}catch(e){r.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async uploadStream(e,t=ro,r=5,s={}){if(!s.blobHTTPHeaders){s.blobHTTPHeaders={}}if(!s.conditions){s.conditions={}}const{span:n,updatedOptions:o}=ko("BlockBlobClient-uploadStream",s);try{let a=0;const n=i.generateUuid();let p=0;const c=[];const l=new BufferScheduler(e,t,r,(async(e,t)=>{const r=generateBlockID(n,a);c.push(r);a++;await this.stageBlock(r,e,t,{conditions:s.conditions,encryptionScope:s.encryptionScope,tracingOptions:o.tracingOptions});p+=t;if(s.onProgress){s.onProgress({loadedBytes:p})}}),Math.ceil(r/4*3));await l.do();return await this.commitBlockList(c,Object.assign(Object.assign({},s),{tracingOptions:Object.assign(Object.assign({},s.tracingOptions),convertTracingToRequestOptionsBase(o))}))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}}class PageBlobClient extends BlobClient{constructor(e,t,r,s){let a;let n;s=s||{};if(isPipelineLike(t)){n=e;a=t}else if(i.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){n=e;s=r;a=newPipeline(t,s)}else if(!t&&typeof t!=="string"){n=e;a=newPipeline(new AnonymousCredential,s)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const p=r;const c=extractConnectionStringParts(e);if(c.kind==="AccountConnString"){if(i.isNode){const e=new StorageSharedKeyCredential(c.accountName,c.accountKey);n=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(p));if(!s.proxyOptions){s.proxyOptions=i.getDefaultProxySettings(c.proxyUri)}a=newPipeline(e,s)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(c.kind==="SASConnString"){n=appendToURLPath(appendToURLPath(c.url,encodeURIComponent(o)),encodeURIComponent(p))+"?"+c.accountSas;a=newPipeline(new AnonymousCredential,s)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(n,a);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(e){return new PageBlobClient(setURLParameter(this.url,po.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}async create(e,t={}){var r,i,s;t.conditions=t.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-create",t);try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.pageBlobContext.create(0,e,Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(i=t.immutabilityPolicy)===null||i===void 0?void 0:i.expiriesOn,immutabilityPolicyMode:(s=t.immutabilityPolicy)===null||s===void 0?void 0:s.policyMode,legalHold:t.legalHold,tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags)},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async createIfNotExists(e,t={}){var r,i;const{span:s,updatedOptions:n}=ko("PageBlobClient-createIfNotExists",t);try{const r={ifNoneMatch:uo};const i=await this.create(e,Object.assign(Object.assign({},t),{conditions:r,tracingOptions:n.tracingOptions}));return Object.assign(Object.assign({succeeded:true},i),{_response:i._response})}catch(e){if(((r=e.details)===null||r===void 0?void 0:r.errorCode)==="BlobAlreadyExists"){s.setStatus({code:a.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(i=e.response)===null||i===void 0?void 0:i.parsedHeaders),{_response:e.response})}s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async uploadPages(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-uploadPages",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPages(r,e,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),requestOptions:{onUploadProgress:i.onProgress},range:rangeToString({offset:t,count:r}),sequenceNumberAccessConditions:i.conditions,transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async uploadPagesFromURL(e,t,r,i,s={}){var n;s.conditions=s.conditions||{};s.sourceConditions=s.sourceConditions||{};const{span:o,updatedOptions:p}=ko("PageBlobClient-uploadPagesFromURL",s);try{ensureCpkIfSpecified(s.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(e,rangeToString({offset:t,count:i}),0,rangeToString({offset:r,count:i}),Object.assign({abortSignal:s.abortSignal,sourceContentMD5:s.sourceContentMD5,sourceContentCrc64:s.sourceContentCrc64,leaseAccessConditions:s.conditions,sequenceNumberAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(n=s.conditions)===null||n===void 0?void 0:n.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:s.sourceConditions.ifMatch,sourceIfModifiedSince:s.sourceConditions.ifModifiedSince,sourceIfNoneMatch:s.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:s.sourceConditions.ifUnmodifiedSince},cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope,copySourceAuthorization:httpAuthorizationToString(s.sourceAuthorization)},convertTracingToRequestOptionsBase(p)))}catch(e){o.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}async clearPages(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-clearPages",r);try{return await this.pageBlobContext.clearPages(0,Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),range:rangeToString({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},convertTracingToRequestOptionsBase(n)))}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async getPageRanges(e=0,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-getPageRanges",r);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(n))).then(rangeResponseFromModel)}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async listPageRangesSegment(e=0,t,r,i={}){var s;const{span:n,updatedOptions:o}=ko("PageBlobClient-getPageRangesSegment",i);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize},convertTracingToRequestOptionsBase(o)))}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}listPageRangeItemSegments(e=0,t,r,i={}){return s.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let a;if(!!r||r===undefined){do{a=yield s.__await(this.listPageRangesSegment(e,t,r,i));r=a.continuationToken;yield yield s.__await(yield s.__await(a))}while(r)}}))}listPageRangeItems(e=0,t,r={}){return s.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var i,a;let n;try{for(var o=s.__asyncValues(this.listPageRangeItemSegments(e,t,n,r)),p;p=yield s.__await(o.next()),!p.done;){const e=p.value;yield s.__await(yield*s.__asyncDelegator(s.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){i={error:e}}finally{try{if(p&&!p.done&&(a=o.return))yield s.__await(a.call(o))}finally{if(i)throw i.error}}}))}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};const i=this.listPageRangeItems(e,t,r);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeItemSegments(e,t,i.continuationToken,Object.assign({maxPageSize:i.maxPageSize},r))}}async getPageRangesDiff(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-getPageRangesDiff",i);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async listPageRangesDiffSegment(e,t,r,i,s){var n;const{span:o,updatedOptions:p}=ko("PageBlobClient-getPageRangesDiffSegment",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s===null||s===void 0?void 0:s.abortSignal,leaseAccessConditions:s===null||s===void 0?void 0:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.conditions),{ifTags:(n=s===null||s===void 0?void 0:s.conditions)===null||n===void 0?void 0:n.tagConditions}),prevsnapshot:r,range:rangeToString({offset:e,count:t}),marker:i,maxPageSize:s===null||s===void 0?void 0:s.maxPageSize},convertTracingToRequestOptionsBase(p)))}catch(e){o.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{o.end()}}listPageRangeDiffItemSegments(e,t,r,i,a){return s.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let n;if(!!i||i===undefined){do{n=yield s.__await(this.listPageRangesDiffSegment(e,t,r,i,a));i=n.continuationToken;yield yield s.__await(yield s.__await(n))}while(i)}}))}listPageRangeDiffItems(e,t,r,i){return s.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var a,n;let o;try{for(var p=s.__asyncValues(this.listPageRangeDiffItemSegments(e,t,r,o,i)),c;c=yield s.__await(p.next()),!c.done;){const e=c.value;yield s.__await(yield*s.__asyncDelegator(s.__asyncValues(ExtractPageRangeInfoItems(e))))}}catch(e){a={error:e}}finally{try{if(c&&!c.done&&(n=p.return))yield s.__await(n.call(p))}finally{if(a)throw a.error}}}))}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};const s=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.listPageRangeDiffItemSegments(e,t,r,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){var s;i.conditions=i.conditions||{};const{span:n,updatedOptions:o}=ko("PageBlobClient-GetPageRangesDiffForManagedDisks",i);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(s=i.conditions)===null||s===void 0?void 0:s.tagConditions}),prevSnapshotUrl:r,range:rangeToString({offset:e,count:t})},convertTracingToRequestOptionsBase(o))).then(rangeResponseFromModel)}catch(e){n.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{n.end()}}async resize(e,t={}){var r;t.conditions=t.conditions||{};const{span:i,updatedOptions:s}=ko("PageBlobClient-resize",t);try{return await this.pageBlobContext.resize(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),encryptionScope:t.encryptionScope},convertTracingToRequestOptionsBase(s)))}catch(e){i.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}async updateSequenceNumber(e,t,r={}){var i;r.conditions=r.conditions||{};const{span:s,updatedOptions:n}=ko("PageBlobClient-updateSequenceNumber",r);try{return await this.pageBlobContext.updateSequenceNumber(e,Object.assign({abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions})},convertTracingToRequestOptionsBase(n)))}catch(e){s.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async startCopyIncremental(e,t={}){var r;const{span:i,updatedOptions:s}=ko("PageBlobClient-startCopyIncremental",t);try{return await this.pageBlobContext.copyIncremental(e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(s)))}catch(e){i.setStatus({code:a.SpanStatusCode.ERROR,message:e.message});throw e}finally{i.end()}}}async function getBodyAsText(e){let t=Buffer.alloc(ho);const r=await streamToBuffer2(e.readableStreamBody,t);t=t.slice(0,r);return t.toString()}function utf8ByteLength(e){return Buffer.byteLength(e)}const Jo=": ";const Wo=" ";const Xo=-1;class BatchResponseParser{constructor(e,t){if(!e||!e.contentType){throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.")}if(!t||t.size===0){throw new RangeError("Invalid state: subRequests is not provided or size is 0.")}this.batchResponse=e;this.subRequests=t;this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1];this.perResponsePrefix=`--${this.responseBatchBoundary}${fo}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==co.HTTP_ACCEPTED){throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`)}const e=await getBodyAsText(this.batchResponse);const t=e.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1);const r=t.length;if(r!==this.subRequests.size&&r!==1){throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.")}const s=new Array(r);let a=0;let n=0;for(let e=0;e